From f7c1022fa22189bfde92245a4a012a9205ed6876 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 5 Jan 2026 22:21:54 +0000 Subject: [PATCH 1/2] feat: add custom prompt config in the request and return prompt in the response feat: update min_speaker_count and max_speaker_count to be optional docs: Clarify that min_speaker_count and max_speaker_count in SpeakerDiarizationConfig are not currently used docs: Update guidance on how to enable speaker diarization; to enable, set the diarization_config field to an empty SpeakerDiarizationConfig message PiperOrigin-RevId: 852383212 Source-Link: https://github.com/googleapis/googleapis/commit/1a141530079896691c100e0624705f2e0923f864 Source-Link: https://github.com/googleapis/googleapis-gen/commit/c84243caa11c7fc89056e0bd07b4c4c6aea0510b Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWVzc2VudGlhbF9jb250YWN0cy8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLXB1Ymxpc2hpbmctdjEvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLXB1Ymxpc2hpbmcvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLXYxLy5Pd2xCb3QueWFtbCIsImgiOiJjODQyNDNjYWExMWM3ZmM4OTA1NmUwYmQwN2I0YzRjNmFlYTA1MTBiIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWV2ZW50YXJjLy5Pd2xCb3QueWFtbCIsImgiOiJjODQyNDNjYWExMWM3ZmM4OTA1NmUwYmQwN2I0YzRjNmFlYTA1MTBiIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpbGVzdG9yZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpbGVzdG9yZS8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpbmFuY2lhbF9zZXJ2aWNlcy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpbmFuY2lhbF9zZXJ2aWNlcy8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpcmVzdG9yZS1hZG1pbi12MS8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpcmVzdG9yZS1hZG1pbi8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZpcmVzdG9yZS12MS8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZ1bmN0aW9ucy12MS8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZ1bmN0aW9ucy12Mi8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWZ1bmN0aW9ucy8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdkY19oYXJkd2FyZV9tYW5hZ2VtZW50LXYxYWxwaGEvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdkY19oYXJkd2FyZV9tYW5hZ2VtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiJjODQyNDNjYWExMWM3ZmM4OTA1NmUwYmQwN2I0YzRjNmFlYTA1MTBiIn0= Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdlbWluaV9kYXRhX2FuYWx5dGljcy8uT3dsQm90LnlhbWwiLCJoIjoiYzg0MjQzY2FhMTFjN2ZjODkwNTZlMGJkMDdiNGM0YzZhZWEwNTEwYiJ9 Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdrZV9iYWNrdXAtdjEvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== Copy-Tag: eyJwIjoiZ29vZ2xlLWNsb3VkLWdrZV9iYWNrdXAvLk93bEJvdC55YW1sIiwiaCI6ImM4NDI0M2NhYTExYzdmYzg5MDU2ZTBiZDA3YjRjNGM2YWVhMDUxMGIifQ== --- .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 39 + .../google-cloud-essential_contacts/.toys.rb | 28 + .../google-cloud-essential_contacts/.yardopts | 11 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-essential_contacts/Gemfile | 28 + .../LICENSE.md | 201 + .../google-cloud-essential_contacts/README.md | 142 + .../google-cloud-essential_contacts/Rakefile | 169 + .../google-cloud-essential_contacts.gemspec | 27 + .../lib/google-cloud-essential_contacts.rb | 19 + .../lib/google/cloud/essential_contacts.rb | 156 + .../cloud/essential_contacts/version.rb | 26 + .../cloud/essential_contacts/client_test.rb | 64 + .../cloud/essential_contacts/version_test.rb | 26 + .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 33 + ...oogle-cloud-eventarc-publishing-v1.gemspec | 28 + .../google-cloud-eventarc-publishing-v1.rb | 21 + .../google/cloud/eventarc/publishing/v1.rb | 47 + .../eventarc/publishing/v1/cloud_event_pb.rb | 51 + .../cloud/eventarc/publishing/v1/publisher.rb | 84 + .../publishing/v1/publisher/client.rb | 729 +++ .../publishing/v1/publisher/credentials.rb | 53 + .../eventarc/publishing/v1/publisher/rest.rb | 81 + .../publishing/v1/publisher/rest/client.rb | 665 +++ .../v1/publisher/rest/service_stub.rb | 269 + .../eventarc/publishing/v1/publisher_pb.rb | 58 + .../publishing/v1/publisher_services_pb.rb | 79 + .../cloud/eventarc/publishing/v1/rest.rb | 39 + .../cloud/eventarc/publishing/v1/version.rb | 30 + .../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 + .../eventarc/publishing/v1/cloud_event.rb | 125 + .../cloud/eventarc/publishing/v1/publisher.rb | 119 + .../proto_docs/google/protobuf/any.rb | 145 + .../proto_docs/google/protobuf/duration.rb | 98 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../snippets/Gemfile | 32 + .../snippets/publisher/publish.rb | 47 + .../publish_channel_connection_events.rb | 47 + .../snippets/publisher/publish_events.rb | 47 + ...a_google.cloud.eventarc.publishing.v1.json | 135 + .../publishing/v1/publisher_rest_test.rb | 266 + .../eventarc/publishing/v1/publisher_test.rb | 289 + .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 39 + .../google-cloud-eventarc-publishing/.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-eventarc-publishing/Gemfile | 28 + .../LICENSE.md | 201 + .../README.md | 142 + .../google-cloud-eventarc-publishing/Rakefile | 169 + .../google-cloud-eventarc-publishing.gemspec | 27 + .../lib/google-cloud-eventarc-publishing.rb | 19 + .../lib/google/cloud/eventarc/publishing.rb | 186 + .../cloud/eventarc/publishing/version.rb | 28 + .../cloud/eventarc/publishing/client_test.rb | 64 + .../cloud/eventarc/publishing/version_test.rb | 26 + .../test/helper.rb | 25 + .../google-cloud-eventarc-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-eventarc-v1/.rubocop.yml | 33 + .../google-cloud-eventarc-v1/.toys.rb | 28 + .../google-cloud-eventarc-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-eventarc-v1/CHANGELOG.md | 2 + .../google-cloud-eventarc-v1/Gemfile | 11 + .../google-cloud-eventarc-v1/LICENSE.md | 201 + .../google-cloud-eventarc-v1/README.md | 154 + .../google-cloud-eventarc-v1/Rakefile | 169 + .../gapic_metadata.json | 213 + .../google-cloud-eventarc-v1.gemspec | 30 + .../lib/google-cloud-eventarc-v1.rb | 21 + .../lib/google/cloud/eventarc/v1.rb | 45 + .../cloud/eventarc/v1/bindings_override.rb | 276 + .../eventarc/v1/channel_connection_pb.rb | 47 + .../google/cloud/eventarc/v1/channel_pb.rb | 48 + .../google/cloud/eventarc/v1/discovery_pb.rb | 47 + .../google/cloud/eventarc/v1/enrollment_pb.rb | 47 + .../lib/google/cloud/eventarc/v1/eventarc.rb | 57 + .../cloud/eventarc/v1/eventarc/client.rb | 4680 ++++++++++++++++ .../cloud/eventarc/v1/eventarc/credentials.rb | 51 + .../cloud/eventarc/v1/eventarc/operations.rb | 841 +++ .../cloud/eventarc/v1/eventarc/paths.rb | 331 ++ .../google/cloud/eventarc/v1/eventarc/rest.rb | 55 + .../cloud/eventarc/v1/eventarc/rest/client.rb | 4373 +++++++++++++++ .../eventarc/v1/eventarc/rest/operations.rb | 925 ++++ .../eventarc/v1/eventarc/rest/service_stub.rb | 2474 +++++++++ .../google/cloud/eventarc/v1/eventarc_pb.rb | 118 + .../cloud/eventarc/v1/eventarc_services_pb.rb | 124 + .../cloud/eventarc/v1/google_api_source_pb.rb | 52 + .../eventarc/v1/google_channel_config_pb.rb | 47 + .../cloud/eventarc/v1/logging_config_pb.rb | 45 + .../cloud/eventarc/v1/message_bus_pb.rb | 49 + .../cloud/eventarc/v1/network_config_pb.rb | 45 + .../google/cloud/eventarc/v1/pipeline_pb.rb | 65 + .../lib/google/cloud/eventarc/v1/rest.rb | 38 + .../google/cloud/eventarc/v1/trigger_pb.rb | 59 + .../lib/google/cloud/eventarc/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/eventarc/v1/channel.rb | 120 + .../cloud/eventarc/v1/channel_connection.rb | 71 + .../google/cloud/eventarc/v1/discovery.rb | 90 + .../google/cloud/eventarc/v1/enrollment.rb | 95 + .../google/cloud/eventarc/v1/eventarc.rb | 940 ++++ .../cloud/eventarc/v1/google_api_source.rb | 132 + .../eventarc/v1/google_channel_config.rb | 64 + .../cloud/eventarc/v1/logging_config.rb | 78 + .../google/cloud/eventarc/v1/message_bus.rb | 94 + .../cloud/eventarc/v1/network_config.rb | 37 + .../google/cloud/eventarc/v1/pipeline.rb | 606 +++ .../google/cloud/eventarc/v1/trigger.rb | 316 ++ .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/code.rb | 185 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../google-cloud-eventarc-v1/snippets/Gemfile | 32 + .../snippets/eventarc/create_channel.rb | 54 + .../eventarc/create_channel_connection.rb | 54 + .../snippets/eventarc/create_enrollment.rb | 54 + .../eventarc/create_google_api_source.rb | 54 + .../snippets/eventarc/create_message_bus.rb | 54 + .../snippets/eventarc/create_pipeline.rb | 54 + .../snippets/eventarc/create_trigger.rb | 54 + .../snippets/eventarc/delete_channel.rb | 54 + .../eventarc/delete_channel_connection.rb | 54 + .../snippets/eventarc/delete_enrollment.rb | 54 + .../eventarc/delete_google_api_source.rb | 54 + .../snippets/eventarc/delete_message_bus.rb | 54 + .../snippets/eventarc/delete_pipeline.rb | 54 + .../snippets/eventarc/delete_trigger.rb | 54 + .../snippets/eventarc/get_channel.rb | 47 + .../eventarc/get_channel_connection.rb | 47 + .../snippets/eventarc/get_enrollment.rb | 47 + .../eventarc/get_google_api_source.rb | 47 + .../eventarc/get_google_channel_config.rb | 47 + .../snippets/eventarc/get_message_bus.rb | 47 + .../snippets/eventarc/get_pipeline.rb | 47 + .../snippets/eventarc/get_provider.rb | 47 + .../snippets/eventarc/get_trigger.rb | 47 + .../eventarc/list_channel_connections.rb | 51 + .../snippets/eventarc/list_channels.rb | 51 + .../snippets/eventarc/list_enrollments.rb | 51 + .../eventarc/list_google_api_sources.rb | 51 + .../eventarc/list_message_bus_enrollments.rb | 47 + .../snippets/eventarc/list_message_buses.rb | 51 + .../snippets/eventarc/list_pipelines.rb | 51 + .../snippets/eventarc/list_providers.rb | 51 + .../snippets/eventarc/list_triggers.rb | 51 + .../snippets/eventarc/update_channel.rb | 54 + .../snippets/eventarc/update_enrollment.rb | 54 + .../eventarc/update_google_api_source.rb | 54 + .../eventarc/update_google_channel_config.rb | 47 + .../snippets/eventarc/update_message_bus.rb | 54 + .../snippets/eventarc/update_pipeline.rb | 54 + .../snippets/eventarc/update_trigger.rb | 54 + ...pet_metadata_google.cloud.eventarc.v1.json | 1575 ++++++ .../eventarc/v1/eventarc_operations_test.rb | 400 ++ .../cloud/eventarc/v1/eventarc_paths_test.rb | 244 + .../cloud/eventarc/v1/eventarc_rest_test.rb | 2290 ++++++++ .../google/cloud/eventarc/v1/eventarc_test.rb | 2690 ++++++++++ .../google-cloud-eventarc-v1/test/helper.rb | 25 + .../google-cloud-eventarc/.gitignore | 22 + .../google-cloud-eventarc/.repo-metadata.json | 18 + .../google-cloud-eventarc/.rubocop.yml | 39 + .../google-cloud-eventarc/.toys.rb | 28 + .../google-cloud-eventarc/.yardopts | 11 + .../google-cloud-eventarc/AUTHENTICATION.md | 122 + .../google-cloud-eventarc/CHANGELOG.md | 2 + owl-bot-staging/google-cloud-eventarc/Gemfile | 28 + .../google-cloud-eventarc/LICENSE.md | 201 + .../google-cloud-eventarc/README.md | 142 + .../google-cloud-eventarc/Rakefile | 169 + .../google-cloud-eventarc.gemspec | 27 + .../lib/google-cloud-eventarc.rb | 19 + .../lib/google/cloud/eventarc.rb | 157 + .../lib/google/cloud/eventarc/version.rb | 26 + .../test/google/cloud/eventarc/client_test.rb | 64 + .../google/cloud/eventarc/version_test.rb | 26 + .../google-cloud-eventarc/test/helper.rb | 25 + .../google-cloud-filestore-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-filestore-v1/.rubocop.yml | 33 + .../google-cloud-filestore-v1/.toys.rb | 28 + .../google-cloud-filestore-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-filestore-v1/CHANGELOG.md | 2 + .../google-cloud-filestore-v1/Gemfile | 11 + .../google-cloud-filestore-v1/LICENSE.md | 201 + .../google-cloud-filestore-v1/README.md | 154 + .../google-cloud-filestore-v1/Rakefile | 169 + .../gapic_metadata.json | 108 + .../google-cloud-filestore-v1.gemspec | 30 + .../lib/google-cloud-filestore-v1.rb | 21 + .../lib/google/cloud/filestore/v1.rb | 45 + .../cloud/filestore/v1/bindings_override.rb | 75 + .../filestore/v1/cloud_filestore_manager.rb | 74 + .../v1/cloud_filestore_manager/client.rb | 2370 ++++++++ .../v1/cloud_filestore_manager/credentials.rb | 47 + .../v1/cloud_filestore_manager/operations.rb | 841 +++ .../v1/cloud_filestore_manager/paths.rb | 109 + .../v1/cloud_filestore_manager/rest.rb | 72 + .../v1/cloud_filestore_manager/rest/client.rb | 2209 ++++++++ .../rest/operations.rb | 925 ++++ .../rest/service_stub.rb | 1188 ++++ .../v1/cloud_filestore_service_pb.rb | 101 + .../v1/cloud_filestore_service_services_pb.rb | 107 + .../lib/google/cloud/filestore/v1/rest.rb | 38 + .../lib/google/cloud/filestore/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/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/common/operation_metadata.rb | 54 + .../filestore/v1/cloud_filestore_service.rb | 1103 ++++ .../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/timestamp.rb | 127 + .../proto_docs/google/protobuf/wrappers.rb | 121 + .../proto_docs/google/rpc/status.rb | 48 + .../snippets/Gemfile | 32 + .../cloud_filestore_manager/create_backup.rb | 54 + .../create_instance.rb | 54 + .../create_snapshot.rb | 54 + .../cloud_filestore_manager/delete_backup.rb | 54 + .../delete_instance.rb | 54 + .../delete_snapshot.rb | 54 + .../cloud_filestore_manager/get_backup.rb | 47 + .../cloud_filestore_manager/get_instance.rb | 47 + .../cloud_filestore_manager/get_snapshot.rb | 47 + .../cloud_filestore_manager/list_backups.rb | 51 + .../cloud_filestore_manager/list_instances.rb | 51 + .../cloud_filestore_manager/list_snapshots.rb | 51 + .../promote_replica.rb | 54 + .../restore_instance.rb | 54 + .../revert_instance.rb | 54 + .../cloud_filestore_manager/update_backup.rb | 54 + .../update_instance.rb | 54 + .../update_snapshot.rb | 54 + ...et_metadata_google.cloud.filestore.v1.json | 735 +++ ...cloud_filestore_manager_operations_test.rb | 400 ++ .../v1/cloud_filestore_manager_paths_test.rb | 91 + .../v1/cloud_filestore_manager_rest_test.rb | 1098 ++++ .../v1/cloud_filestore_manager_test.rb | 1292 +++++ .../google-cloud-filestore-v1/test/helper.rb | 25 + .../google-cloud-filestore/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-filestore/.rubocop.yml | 39 + .../google-cloud-filestore/.toys.rb | 28 + .../google-cloud-filestore/.yardopts | 11 + .../google-cloud-filestore/AUTHENTICATION.md | 122 + .../google-cloud-filestore/CHANGELOG.md | 2 + .../google-cloud-filestore/Gemfile | 28 + .../google-cloud-filestore/LICENSE.md | 201 + .../google-cloud-filestore/README.md | 142 + .../google-cloud-filestore/Rakefile | 169 + .../google-cloud-filestore.gemspec | 27 + .../lib/google-cloud-filestore.rb | 19 + .../lib/google/cloud/filestore.rb | 174 + .../lib/google/cloud/filestore/version.rb | 26 + .../google/cloud/filestore/client_test.rb | 64 + .../google/cloud/filestore/version_test.rb | 26 + .../google-cloud-filestore/test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 208 + ...google-cloud-financial_services-v1.gemspec | 29 + .../lib/google-cloud-financial_services-v1.rb | 21 + .../lib/google/cloud/financial_services/v1.rb | 45 + .../google/cloud/financial_services/v1/aml.rb | 57 + .../cloud/financial_services/v1/aml/client.rb | 4704 ++++++++++++++++ .../financial_services/v1/aml/credentials.rb | 47 + .../financial_services/v1/aml/operations.rb | 841 +++ .../cloud/financial_services/v1/aml/paths.rb | 195 + .../cloud/financial_services/v1/aml/rest.rb | 55 + .../financial_services/v1/aml/rest/client.rb | 4403 +++++++++++++++ .../v1/aml/rest/operations.rb | 925 ++++ .../v1/aml/rest/service_stub.rb | 2417 +++++++++ .../v1/bindings_override.rb | 75 + .../cloud/financial_services/v1/rest.rb | 38 + .../cloud/financial_services/v1/version.rb | 28 + .../v1/backtest_result_pb.rb | 62 + .../v1/bigquery_destination_pb.rb | 45 + .../cloud/financialservices/v1/dataset_pb.rb | 60 + .../financialservices/v1/engine_config_pb.rb | 65 + .../financialservices/v1/engine_version_pb.rb | 52 + .../cloud/financialservices/v1/instance_pb.rb | 64 + .../v1/line_of_business_pb.rb | 42 + .../cloud/financialservices/v1/model_pb.rb | 61 + .../v1/prediction_result_pb.rb | 62 + .../cloud/financialservices/v1/service_pb.rb | 57 + .../v1/service_services_pb.rb | 138 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../financialservices/v1/backtest_result.rb | 277 + .../v1/bigquery_destination.rb | 56 + .../cloud/financialservices/v1/dataset.rb | 242 + .../financialservices/v1/engine_config.rb | 324 ++ .../financialservices/v1/engine_version.rb | 126 + .../cloud/financialservices/v1/instance.rb | 318 ++ .../financialservices/v1/line_of_business.rb | 38 + .../cloud/financialservices/v1/model.rb | 256 + .../financialservices/v1/prediction_result.rb | 277 + .../cloud/financialservices/v1/service.rb | 60 + .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/datetime.rb | 103 + .../proto_docs/google/type/interval.rb | 45 + .../snippets/Gemfile | 32 + .../snippets/aml/create_backtest_result.rb | 54 + .../snippets/aml/create_dataset.rb | 54 + .../snippets/aml/create_engine_config.rb | 54 + .../snippets/aml/create_instance.rb | 54 + .../snippets/aml/create_model.rb | 54 + .../snippets/aml/create_prediction_result.rb | 54 + .../snippets/aml/delete_backtest_result.rb | 54 + .../snippets/aml/delete_dataset.rb | 54 + .../snippets/aml/delete_engine_config.rb | 54 + .../snippets/aml/delete_instance.rb | 54 + .../snippets/aml/delete_model.rb | 54 + .../snippets/aml/delete_prediction_result.rb | 54 + .../aml/export_backtest_result_metadata.rb | 54 + .../aml/export_engine_config_metadata.rb | 54 + .../snippets/aml/export_model_metadata.rb | 54 + .../aml/export_prediction_result_metadata.rb | 54 + .../snippets/aml/export_registered_parties.rb | 54 + .../snippets/aml/get_backtest_result.rb | 47 + .../snippets/aml/get_dataset.rb | 47 + .../snippets/aml/get_engine_config.rb | 47 + .../snippets/aml/get_engine_version.rb | 47 + .../snippets/aml/get_instance.rb | 47 + .../snippets/aml/get_model.rb | 47 + .../snippets/aml/get_prediction_result.rb | 47 + .../snippets/aml/import_registered_parties.rb | 54 + .../snippets/aml/list_backtest_results.rb | 51 + .../snippets/aml/list_datasets.rb | 51 + .../snippets/aml/list_engine_configs.rb | 51 + .../snippets/aml/list_engine_versions.rb | 51 + .../snippets/aml/list_instances.rb | 51 + .../snippets/aml/list_models.rb | 51 + .../snippets/aml/list_prediction_results.rb | 51 + .../snippets/aml/update_backtest_result.rb | 54 + .../snippets/aml/update_dataset.rb | 54 + .../snippets/aml/update_engine_config.rb | 54 + .../snippets/aml/update_instance.rb | 54 + .../snippets/aml/update_model.rb | 54 + .../snippets/aml/update_prediction_result.rb | 54 + ...ata_google.cloud.financialservices.v1.json | 1535 ++++++ .../v1/aml_operations_test.rb | 400 ++ .../financial_services/v1/aml_paths_test.rb | 139 + .../financial_services/v1/aml_rest_test.rb | 2225 ++++++++ .../cloud/financial_services/v1/aml_test.rb | 2625 +++++++++ .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../google-cloud-financial_services/.toys.rb | 28 + .../google-cloud-financial_services/.yardopts | 11 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-financial_services/Gemfile | 28 + .../LICENSE.md | 201 + .../google-cloud-financial_services/README.md | 142 + .../google-cloud-financial_services/Rakefile | 169 + .../google-cloud-financial_services.gemspec | 27 + .../lib/google-cloud-financial_services.rb | 19 + .../lib/google/cloud/financial_services.rb | 157 + .../cloud/financial_services/version.rb | 26 + .../cloud/financial_services/client_test.rb | 64 + .../cloud/financial_services/version_test.rb | 26 + .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../google-cloud-firestore-admin-v1/.toys.rb | 28 + .../google-cloud-firestore-admin-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../google-cloud-firestore-admin-v1/Gemfile | 11 + .../LICENSE.md | 201 + .../google-cloud-firestore-admin-v1/README.md | 154 + .../google-cloud-firestore-admin-v1/Rakefile | 169 + .../gapic_metadata.json | 178 + .../google-cloud-firestore-admin-v1.gemspec | 29 + .../lib/google-cloud-firestore-admin-v1.rb | 21 + .../lib/google/cloud/firestore/admin/v1.rb | 47 + .../firestore/admin/v1/firestore_admin.rb | 85 + .../admin/v1/firestore_admin/client.rb | 3849 +++++++++++++ .../admin/v1/firestore_admin/credentials.rb | 54 + .../admin/v1/firestore_admin/operations.rb | 843 +++ .../admin/v1/firestore_admin/paths.rb | 220 + .../admin/v1/firestore_admin/rest.rb | 82 + .../admin/v1/firestore_admin/rest/client.rb | 3573 ++++++++++++ .../v1/firestore_admin/rest/operations.rb | 927 ++++ .../v1/firestore_admin/rest/service_stub.rb | 2050 +++++++ .../google/cloud/firestore/admin/v1/rest.rb | 39 + .../cloud/firestore/admin/v1/version.rb | 30 + .../google/firestore/admin/v1/backup_pb.rb | 51 + .../google/firestore/admin/v1/database_pb.rb | 64 + .../lib/google/firestore/admin/v1/field_pb.rb | 52 + .../firestore/admin/v1/firestore_admin_pb.rb | 112 + .../admin/v1/firestore_admin_services_pb.rb | 220 + .../lib/google/firestore/admin/v1/index_pb.rb | 56 + .../google/firestore/admin/v1/location_pb.rb | 44 + .../google/firestore/admin/v1/operation_pb.rb | 65 + .../google/firestore/admin/v1/schedule_pb.rb | 54 + .../google/firestore/admin/v1/snapshot_pb.rb | 49 + .../firestore/admin/v1/user_creds_pb.rb | 51 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../proto_docs/google/api/routing.rb | 459 ++ .../google/firestore/admin/v1/backup.rb | 99 + .../google/firestore/admin/v1/database.rb | 367 ++ .../google/firestore/admin/v1/field.rb | 139 + .../firestore/admin/v1/firestore_admin.rb | 746 +++ .../google/firestore/admin/v1/index.rb | 249 + .../google/firestore/admin/v1/location.rb | 35 + .../google/firestore/admin/v1/operation.rb | 349 ++ .../google/firestore/admin/v1/schedule.rb | 94 + .../google/firestore/admin/v1/snapshot.rb | 48 + .../google/firestore/admin/v1/user_creds.rb | 78 + .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/dayofweek.rb | 49 + .../snippets/Gemfile | 32 + .../firestore_admin/bulk_delete_documents.rb | 54 + .../firestore_admin/clone_database.rb | 54 + .../firestore_admin/create_backup_schedule.rb | 47 + .../firestore_admin/create_database.rb | 54 + .../snippets/firestore_admin/create_index.rb | 54 + .../firestore_admin/create_user_creds.rb | 47 + .../snippets/firestore_admin/delete_backup.rb | 47 + .../firestore_admin/delete_backup_schedule.rb | 47 + .../firestore_admin/delete_database.rb | 54 + .../snippets/firestore_admin/delete_index.rb | 47 + .../firestore_admin/delete_user_creds.rb | 47 + .../firestore_admin/disable_user_creds.rb | 47 + .../firestore_admin/enable_user_creds.rb | 47 + .../firestore_admin/export_documents.rb | 54 + .../snippets/firestore_admin/get_backup.rb | 47 + .../firestore_admin/get_backup_schedule.rb | 47 + .../snippets/firestore_admin/get_database.rb | 47 + .../snippets/firestore_admin/get_field.rb | 47 + .../snippets/firestore_admin/get_index.rb | 47 + .../firestore_admin/get_user_creds.rb | 47 + .../firestore_admin/import_documents.rb | 54 + .../firestore_admin/list_backup_schedules.rb | 47 + .../snippets/firestore_admin/list_backups.rb | 47 + .../firestore_admin/list_databases.rb | 47 + .../snippets/firestore_admin/list_fields.rb | 51 + .../snippets/firestore_admin/list_indexes.rb | 51 + .../firestore_admin/list_user_creds.rb | 47 + .../firestore_admin/reset_user_password.rb | 47 + .../firestore_admin/restore_database.rb | 54 + .../firestore_admin/update_backup_schedule.rb | 47 + .../firestore_admin/update_database.rb | 54 + .../snippets/firestore_admin/update_field.rb | 54 + ...et_metadata_google.firestore.admin.v1.json | 1295 +++++ .../v1/firestore_admin_operations_test.rb | 400 ++ .../admin/v1/firestore_admin_paths_test.rb | 163 + .../admin/v1/firestore_admin_rest_test.rb | 1862 +++++++ .../admin/v1/firestore_admin_test.rb | 2104 ++++++++ .../test/helper.rb | 25 + .../google-cloud-firestore-admin/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-firestore-admin/.rubocop.yml | 39 + .../google-cloud-firestore-admin/.toys.rb | 28 + .../google-cloud-firestore-admin/.yardopts | 11 + .../AUTHENTICATION.md | 122 + .../google-cloud-firestore-admin/CHANGELOG.md | 2 + .../google-cloud-firestore-admin/Gemfile | 28 + .../google-cloud-firestore-admin/LICENSE.md | 201 + .../google-cloud-firestore-admin/README.md | 142 + .../google-cloud-firestore-admin/Rakefile | 169 + .../google-cloud-firestore-admin.gemspec | 27 + .../lib/google-cloud-firestore-admin.rb | 19 + .../lib/google/cloud/firestore/admin.rb | 185 + .../google/cloud/firestore/admin/version.rb | 28 + .../cloud/firestore/admin/client_test.rb | 64 + .../cloud/firestore/admin/version_test.rb | 26 + .../test/helper.rb | 25 + .../google-cloud-firestore-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-firestore-v1/.rubocop.yml | 33 + .../google-cloud-firestore-v1/.toys.rb | 28 + .../google-cloud-firestore-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-firestore-v1/CHANGELOG.md | 2 + .../google-cloud-firestore-v1/Gemfile | 11 + .../google-cloud-firestore-v1/LICENSE.md | 201 + .../google-cloud-firestore-v1/README.md | 154 + .../google-cloud-firestore-v1/Rakefile | 169 + .../gapic_metadata.json | 103 + .../google-cloud-firestore-v1.gemspec | 29 + .../lib/google-cloud-firestore-v1.rb | 21 + .../lib/google/cloud/firestore/v1.rb | 45 + .../google/cloud/firestore/v1/firestore.rb | 61 + .../cloud/firestore/v1/firestore/client.rb | 2413 +++++++++ .../firestore/v1/firestore/credentials.rb | 52 + .../cloud/firestore/v1/firestore/rest.rb | 58 + .../firestore/v1/firestore/rest/client.rb | 2079 +++++++ .../v1/firestore/rest/service_stub.rb | 1026 ++++ .../lib/google/cloud/firestore/v1/rest.rb | 37 + .../lib/google/cloud/firestore/v1/version.rb | 28 + .../firestore/v1/aggregation_result_pb.rb | 45 + .../google/firestore/v1/bloom_filter_pb.rb | 43 + .../lib/google/firestore/v1/common_pb.rb | 49 + .../lib/google/firestore/v1/document_pb.rb | 55 + .../google/firestore/v1/explain_stats_pb.rb | 45 + .../lib/google/firestore/v1/firestore_pb.rb | 103 + .../firestore/v1/firestore_services_pb.rb | 114 + .../lib/google/firestore/v1/pipeline_pb.rb | 46 + .../lib/google/firestore/v1/query_pb.rb | 68 + .../google/firestore/v1/query_profile_pb.rb | 51 + .../lib/google/firestore/v1/write_pb.rb | 59 + .../proto_docs/README.md | 4 + .../proto_docs/google/api/client.rb | 473 ++ .../proto_docs/google/api/field_behavior.rb | 85 + .../proto_docs/google/api/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../proto_docs/google/api/routing.rb | 459 ++ .../google/firestore/v1/aggregation_result.rb | 53 + .../google/firestore/v1/bloom_filter.rb | 79 + .../proto_docs/google/firestore/v1/common.rb | 101 + .../google/firestore/v1/document.rb | 317 ++ .../google/firestore/v1/explain_stats.rb | 41 + .../google/firestore/v1/firestore.rb | 1110 ++++ .../google/firestore/v1/pipeline.rb | 51 + .../proto_docs/google/firestore/v1/query.rb | 629 +++ .../google/firestore/v1/query_profile.rb | 98 + .../proto_docs/google/firestore/v1/write.rb | 317 ++ .../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/struct.rb | 108 + .../proto_docs/google/protobuf/timestamp.rb | 127 + .../proto_docs/google/protobuf/wrappers.rb | 121 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/latlng.rb | 38 + .../snippets/Gemfile | 32 + .../snippets/firestore/batch_get_documents.rb | 50 + .../snippets/firestore/batch_write.rb | 47 + .../snippets/firestore/begin_transaction.rb | 47 + .../snippets/firestore/commit.rb | 47 + .../snippets/firestore/create_document.rb | 47 + .../snippets/firestore/delete_document.rb | 47 + .../snippets/firestore/execute_pipeline.rb | 50 + .../snippets/firestore/get_document.rb | 47 + .../snippets/firestore/list_collection_ids.rb | 47 + .../snippets/firestore/list_documents.rb | 51 + .../snippets/firestore/listen.rb | 56 + .../snippets/firestore/partition_query.rb | 51 + .../snippets/firestore/rollback.rb | 47 + .../firestore/run_aggregation_query.rb | 50 + .../snippets/firestore/run_query.rb | 50 + .../snippets/firestore/update_document.rb | 47 + .../snippets/firestore/write.rb | 56 + .../snippet_metadata_google.firestore.v1.json | 695 +++ .../cloud/firestore/v1/firestore_rest_test.rb | 951 ++++ .../cloud/firestore/v1/firestore_test.rb | 1329 +++++ .../google-cloud-firestore-v1/test/helper.rb | 25 + .../google-cloud-functions-v1/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-functions-v1/.rubocop.yml | 33 + .../google-cloud-functions-v1/.toys.rb | 28 + .../google-cloud-functions-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-functions-v1/CHANGELOG.md | 2 + .../google-cloud-functions-v1/Gemfile | 11 + .../google-cloud-functions-v1/LICENSE.md | 201 + .../google-cloud-functions-v1/README.md | 154 + .../google-cloud-functions-v1/Rakefile | 169 + .../gapic_metadata.json | 73 + .../google-cloud-functions-v1.gemspec | 30 + .../lib/google-cloud-functions-v1.rb | 21 + .../lib/google/cloud/functions/v1.rb | 45 + .../cloud/functions/v1/bindings_override.rb | 64 + .../functions/v1/cloud_functions_service.rb | 56 + .../v1/cloud_functions_service/client.rb | 1609 ++++++ .../v1/cloud_functions_service/credentials.rb | 51 + .../v1/cloud_functions_service/operations.rb | 833 +++ .../v1/cloud_functions_service/paths.rb | 109 + .../v1/cloud_functions_service/rest.rb | 54 + .../v1/cloud_functions_service/rest/client.rb | 1497 ++++++ .../rest/operations.rb | 923 ++++ .../rest/service_stub.rb | 759 +++ .../google/cloud/functions/v1/functions_pb.rb | 85 + .../functions/v1/functions_services_pb.rb | 106 + .../cloud/functions/v1/operations_pb.rb | 48 + .../lib/google/cloud/functions/v1/rest.rb | 38 + .../lib/google/cloud/functions/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/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/functions/v1/functions.rb | 773 +++ .../google/cloud/functions/v1/operations.rb | 77 + .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../cloud_functions_service/call_function.rb | 47 + .../create_function.rb | 54 + .../delete_function.rb | 54 + .../generate_download_url.rb | 47 + .../generate_upload_url.rb | 47 + .../cloud_functions_service/get_function.rb | 47 + .../cloud_functions_service/get_iam_policy.rb | 47 + .../cloud_functions_service/list_functions.rb | 51 + .../cloud_functions_service/set_iam_policy.rb | 47 + .../test_iam_permissions.rb | 47 + .../update_function.rb | 54 + ...et_metadata_google.cloud.functions.v1.json | 455 ++ ...cloud_functions_service_operations_test.rb | 400 ++ .../v1/cloud_functions_service_paths_test.rb | 91 + .../v1/cloud_functions_service_rest_test.rb | 705 +++ .../v1/cloud_functions_service_test.rb | 800 +++ .../google-cloud-functions-v1/test/helper.rb | 25 + .../google-cloud-functions-v2/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-functions-v2/.rubocop.yml | 33 + .../google-cloud-functions-v2/.toys.rb | 28 + .../google-cloud-functions-v2/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-functions-v2/CHANGELOG.md | 2 + .../google-cloud-functions-v2/Gemfile | 11 + .../google-cloud-functions-v2/LICENSE.md | 201 + .../google-cloud-functions-v2/README.md | 154 + .../google-cloud-functions-v2/Rakefile | 169 + .../gapic_metadata.json | 58 + .../google-cloud-functions-v2.gemspec | 30 + .../lib/google-cloud-functions-v2.rb | 21 + .../lib/google/cloud/functions/v2.rb | 45 + .../cloud/functions/v2/bindings_override.rb | 97 + .../cloud/functions/v2/function_service.rb | 61 + .../functions/v2/function_service/client.rb | 1300 +++++ .../v2/function_service/credentials.rb | 51 + .../v2/function_service/operations.rb | 841 +++ .../functions/v2/function_service/paths.rb | 240 + .../functions/v2/function_service/rest.rb | 59 + .../v2/function_service/rest/client.rb | 1210 +++++ .../v2/function_service/rest/operations.rb | 925 ++++ .../v2/function_service/rest/service_stub.rb | 573 ++ .../google/cloud/functions/v2/functions_pb.rb | 99 + .../functions/v2/functions_services_pb.rb | 94 + .../lib/google/cloud/functions/v2/rest.rb | 38 + .../lib/google/cloud/functions/v2/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/launch_stage.rb | 71 + .../proto_docs/google/api/resource.rb | 227 + .../google/cloud/functions/v2/functions.rb | 1129 ++++ .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/date.rb | 53 + .../proto_docs/google/type/expr.rb | 75 + .../snippets/Gemfile | 32 + .../function_service/create_function.rb | 54 + .../function_service/delete_function.rb | 54 + .../function_service/generate_download_url.rb | 47 + .../function_service/generate_upload_url.rb | 47 + .../snippets/function_service/get_function.rb | 47 + .../function_service/list_functions.rb | 51 + .../function_service/list_runtimes.rb | 47 + .../function_service/update_function.rb | 54 + ...et_metadata_google.cloud.functions.v2.json | 335 ++ .../v2/function_service_operations_test.rb | 400 ++ .../v2/function_service_paths_test.rb | 175 + .../v2/function_service_rest_test.rb | 542 ++ .../functions/v2/function_service_test.rb | 624 +++ .../google-cloud-functions-v2/test/helper.rb | 25 + .../google-cloud-functions/.gitignore | 22 + .../.repo-metadata.json | 18 + .../google-cloud-functions/.rubocop.yml | 39 + .../google-cloud-functions/.toys.rb | 28 + .../google-cloud-functions/.yardopts | 11 + .../google-cloud-functions/AUTHENTICATION.md | 122 + .../google-cloud-functions/CHANGELOG.md | 2 + .../google-cloud-functions/Gemfile | 28 + .../google-cloud-functions/LICENSE.md | 201 + .../google-cloud-functions/README.md | 142 + .../google-cloud-functions/Rakefile | 169 + .../google-cloud-functions.gemspec | 27 + .../lib/google-cloud-functions.rb | 19 + .../lib/google/cloud/functions.rb | 161 + .../lib/google/cloud/functions/version.rb | 26 + .../google/cloud/functions/client_test.rb | 64 + .../google/cloud/functions/version_test.rb | 26 + .../google-cloud-functions/test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 33 + .../.toys.rb | 28 + .../.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 11 + .../LICENSE.md | 201 + .../README.md | 154 + .../Rakefile | 169 + .../gapic_metadata.json | 203 + ...ud-gdc_hardware_management-v1alpha.gemspec | 29 + ...e-cloud-gdc_hardware_management-v1alpha.rb | 21 + .../cloud/gdc_hardware_management/v1alpha.rb | 45 + .../v1alpha/bindings_override.rb | 75 + .../v1alpha/gdc_hardware_management.rb | 56 + .../v1alpha/gdc_hardware_management/client.rb | 4499 ++++++++++++++++ .../gdc_hardware_management/credentials.rb | 47 + .../gdc_hardware_management/operations.rb | 841 +++ .../v1alpha/gdc_hardware_management/paths.rb | 208 + .../v1alpha/gdc_hardware_management/rest.rb | 54 + .../gdc_hardware_management/rest/client.rb | 4205 +++++++++++++++ .../rest/operations.rb | 925 ++++ .../rest/service_stub.rb | 2354 ++++++++ .../gdc_hardware_management/v1alpha/rest.rb | 38 + .../v1alpha/version.rb | 28 + .../v1alpha/resources_pb.rb | 99 + .../v1alpha/service_pb.rb | 107 + .../v1alpha/service_services_pb.rb | 120 + .../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 + .../v1alpha/resources.rb | 1206 +++++ .../gdchardwaremanagement/v1alpha/service.rb | 959 ++++ .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/date.rb | 53 + .../proto_docs/google/type/datetime.rb | 103 + .../proto_docs/google/type/dayofweek.rb | 49 + .../proto_docs/google/type/postal_address.rb | 135 + .../proto_docs/google/type/timeofday.rb | 45 + .../snippets/Gemfile | 32 + .../gdc_hardware_management/cancel_order.rb | 54 + .../gdc_hardware_management/create_comment.rb | 54 + .../create_hardware.rb | 54 + .../create_hardware_group.rb | 54 + .../gdc_hardware_management/create_order.rb | 54 + .../gdc_hardware_management/create_site.rb | 54 + .../gdc_hardware_management/create_zone.rb | 54 + .../delete_hardware.rb | 54 + .../delete_hardware_group.rb | 54 + .../gdc_hardware_management/delete_order.rb | 54 + .../gdc_hardware_management/delete_site.rb | 54 + .../gdc_hardware_management/delete_zone.rb | 54 + .../get_change_log_entry.rb | 47 + .../gdc_hardware_management/get_comment.rb | 47 + .../gdc_hardware_management/get_hardware.rb | 47 + .../get_hardware_group.rb | 47 + .../gdc_hardware_management/get_order.rb | 47 + .../gdc_hardware_management/get_site.rb | 47 + .../gdc_hardware_management/get_sku.rb | 47 + .../gdc_hardware_management/get_zone.rb | 47 + .../list_change_log_entries.rb | 51 + .../gdc_hardware_management/list_comments.rb | 51 + .../gdc_hardware_management/list_hardware.rb | 51 + .../list_hardware_groups.rb | 51 + .../gdc_hardware_management/list_orders.rb | 51 + .../gdc_hardware_management/list_sites.rb | 51 + .../gdc_hardware_management/list_skus.rb | 51 + .../gdc_hardware_management/list_zones.rb | 51 + .../record_action_on_comment.rb | 47 + .../request_order_date_change.rb | 54 + .../signal_zone_state.rb | 54 + .../gdc_hardware_management/submit_order.rb | 54 + .../update_hardware.rb | 54 + .../update_hardware_group.rb | 54 + .../gdc_hardware_management/update_order.rb | 54 + .../gdc_hardware_management/update_site.rb | 54 + .../gdc_hardware_management/update_zone.rb | 54 + ...e.cloud.gdchardwaremanagement.v1alpha.json | 1495 ++++++ ...gdc_hardware_management_operations_test.rb | 400 ++ .../gdc_hardware_management_paths_test.rb | 151 + .../gdc_hardware_management_rest_test.rb | 2172 ++++++++ .../v1alpha/gdc_hardware_management_test.rb | 2554 +++++++++ .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 18 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 28 + .../LICENSE.md | 201 + .../README.md | 142 + .../Rakefile | 169 + ...ogle-cloud-gdc_hardware_management.gemspec | 27 + .../google-cloud-gdc_hardware_management.rb | 19 + .../google/cloud/gdc_hardware_management.rb | 156 + .../cloud/gdc_hardware_management/version.rb | 26 + .../gdc_hardware_management/client_test.rb | 64 + .../gdc_hardware_management/version_test.rb | 26 + .../test/helper.rb | 25 + .../.gitignore | 22 + .../.repo-metadata.json | 17 + .../.rubocop.yml | 39 + .../.toys.rb | 28 + .../.yardopts | 11 + .../AUTHENTICATION.md | 122 + .../CHANGELOG.md | 2 + .../Gemfile | 28 + .../LICENSE.md | 201 + .../README.md | 142 + .../Rakefile | 169 + ...google-cloud-gemini_data_analytics.gemspec | 27 + .../lib/google-cloud-gemini_data_analytics.rb | 19 + .../lib/google/cloud/gemini_data_analytics.rb | 228 + .../cloud/gemini_data_analytics/version.rb | 26 + .../gemini_data_analytics/client_test.rb | 85 + .../gemini_data_analytics/version_test.rb | 26 + .../test/helper.rb | 25 + .../google-cloud-gke_backup-v1/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-gke_backup-v1/.rubocop.yml | 33 + .../google-cloud-gke_backup-v1/.toys.rb | 28 + .../google-cloud-gke_backup-v1/.yardopts | 12 + .../AUTHENTICATION.md | 122 + .../google-cloud-gke_backup-v1/CHANGELOG.md | 2 + .../google-cloud-gke_backup-v1/Gemfile | 11 + .../google-cloud-gke_backup-v1/LICENSE.md | 201 + .../google-cloud-gke_backup-v1/README.md | 154 + .../google-cloud-gke_backup-v1/Rakefile | 169 + .../gapic_metadata.json | 213 + .../google-cloud-gke_backup-v1.gemspec | 30 + .../lib/google-cloud-gke_backup-v1.rb | 21 + .../lib/google/cloud/gke_backup/v1.rb | 45 + .../cloud/gke_backup/v1/backup_for_gke.rb | 57 + .../gke_backup/v1/backup_for_gke/client.rb | 4776 +++++++++++++++++ .../v1/backup_for_gke/credentials.rb | 47 + .../v1/backup_for_gke/operations.rb | 841 +++ .../gke_backup/v1/backup_for_gke/paths.rb | 296 + .../gke_backup/v1/backup_for_gke/rest.rb | 55 + .../v1/backup_for_gke/rest/client.rb | 4469 +++++++++++++++ .../v1/backup_for_gke/rest/operations.rb | 925 ++++ .../v1/backup_for_gke/rest/service_stub.rb | 2472 +++++++++ .../cloud/gke_backup/v1/bindings_override.rb | 228 + .../lib/google/cloud/gke_backup/v1/rest.rb | 38 + .../lib/google/cloud/gke_backup/v1/version.rb | 28 + .../cloud/gkebackup/v1/backup_channel_pb.rb | 48 + .../google/cloud/gkebackup/v1/backup_pb.rb | 51 + .../gkebackup/v1/backup_plan_binding_pb.rb | 54 + .../cloud/gkebackup/v1/backup_plan_pb.rb | 63 + .../google/cloud/gkebackup/v1/common_pb.rb | 50 + .../google/cloud/gkebackup/v1/gkebackup_pb.rb | 121 + .../gkebackup/v1/gkebackup_services_pb.rb | 122 + .../cloud/gkebackup/v1/restore_channel_pb.rb | 48 + .../google/cloud/gkebackup/v1/restore_pb.rb | 67 + .../gkebackup/v1/restore_plan_binding_pb.rb | 48 + .../cloud/gkebackup/v1/restore_plan_pb.rb | 50 + .../google/cloud/gkebackup/v1/volume_pb.rb | 54 + .../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/gkebackup/v1/backup.rb | 264 + .../cloud/gkebackup/v1/backup_channel.rb | 86 + .../google/cloud/gkebackup/v1/backup_plan.rb | 367 ++ .../cloud/gkebackup/v1/backup_plan_binding.rb | 208 + .../google/cloud/gkebackup/v1/common.rb | 82 + .../google/cloud/gkebackup/v1/gkebackup.rb | 1065 ++++ .../google/cloud/gkebackup/v1/restore.rb | 680 +++ .../cloud/gkebackup/v1/restore_channel.rb | 85 + .../google/cloud/gkebackup/v1/restore_plan.rb | 126 + .../gkebackup/v1/restore_plan_binding.rb | 68 + .../google/cloud/gkebackup/v1/volume.rb | 227 + .../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/timestamp.rb | 127 + .../proto_docs/google/rpc/status.rb | 48 + .../proto_docs/google/type/date.rb | 53 + .../proto_docs/google/type/dayofweek.rb | 49 + .../proto_docs/google/type/expr.rb | 75 + .../proto_docs/google/type/timeofday.rb | 45 + .../snippets/Gemfile | 32 + .../snippets/backup_for_gke/create_backup.rb | 54 + .../backup_for_gke/create_backup_channel.rb | 54 + .../backup_for_gke/create_backup_plan.rb | 54 + .../snippets/backup_for_gke/create_restore.rb | 54 + .../backup_for_gke/create_restore_channel.rb | 54 + .../backup_for_gke/create_restore_plan.rb | 54 + .../snippets/backup_for_gke/delete_backup.rb | 54 + .../backup_for_gke/delete_backup_channel.rb | 54 + .../backup_for_gke/delete_backup_plan.rb | 54 + .../snippets/backup_for_gke/delete_restore.rb | 54 + .../backup_for_gke/delete_restore_channel.rb | 54 + .../backup_for_gke/delete_restore_plan.rb | 54 + .../snippets/backup_for_gke/get_backup.rb | 47 + .../backup_for_gke/get_backup_channel.rb | 47 + .../get_backup_index_download_url.rb | 47 + .../backup_for_gke/get_backup_plan.rb | 47 + .../backup_for_gke/get_backup_plan_binding.rb | 47 + .../snippets/backup_for_gke/get_restore.rb | 47 + .../backup_for_gke/get_restore_channel.rb | 47 + .../backup_for_gke/get_restore_plan.rb | 47 + .../get_restore_plan_binding.rb | 47 + .../backup_for_gke/get_volume_backup.rb | 47 + .../backup_for_gke/get_volume_restore.rb | 47 + .../backup_for_gke/list_backup_channels.rb | 51 + .../list_backup_plan_bindings.rb | 51 + .../backup_for_gke/list_backup_plans.rb | 51 + .../snippets/backup_for_gke/list_backups.rb | 51 + .../backup_for_gke/list_restore_channels.rb | 51 + .../list_restore_plan_bindings.rb | 51 + .../backup_for_gke/list_restore_plans.rb | 51 + .../snippets/backup_for_gke/list_restores.rb | 51 + .../backup_for_gke/list_volume_backups.rb | 51 + .../backup_for_gke/list_volume_restores.rb | 51 + .../snippets/backup_for_gke/update_backup.rb | 54 + .../backup_for_gke/update_backup_channel.rb | 54 + .../backup_for_gke/update_backup_plan.rb | 54 + .../snippets/backup_for_gke/update_restore.rb | 54 + .../backup_for_gke/update_restore_channel.rb | 54 + .../backup_for_gke/update_restore_plan.rb | 54 + ...et_metadata_google.cloud.gkebackup.v1.json | 1575 ++++++ .../v1/backup_for_gke_operations_test.rb | 400 ++ .../v1/backup_for_gke_paths_test.rb | 199 + .../gke_backup/v1/backup_for_gke_rest_test.rb | 2274 ++++++++ .../gke_backup/v1/backup_for_gke_test.rb | 2658 +++++++++ .../google-cloud-gke_backup-v1/test/helper.rb | 25 + .../google-cloud-gke_backup/.gitignore | 22 + .../.repo-metadata.json | 17 + .../google-cloud-gke_backup/.rubocop.yml | 39 + .../google-cloud-gke_backup/.toys.rb | 28 + .../google-cloud-gke_backup/.yardopts | 11 + .../google-cloud-gke_backup/AUTHENTICATION.md | 122 + .../google-cloud-gke_backup/CHANGELOG.md | 2 + .../google-cloud-gke_backup/Gemfile | 28 + .../google-cloud-gke_backup/LICENSE.md | 201 + .../google-cloud-gke_backup/README.md | 142 + .../google-cloud-gke_backup/Rakefile | 169 + .../google-cloud-gke_backup.gemspec | 27 + .../lib/google-cloud-gke_backup.rb | 19 + .../lib/google/cloud/gke_backup.rb | 157 + .../lib/google/cloud/gke_backup/version.rb | 26 + .../google/cloud/gke_backup/client_test.rb | 64 + .../google/cloud/gke_backup/version_test.rb | 26 + .../google-cloud-gke_backup/test/helper.rb | 25 + 1023 files changed, 217060 insertions(+) create mode 100644 owl-bot-staging/google-cloud-essential_contacts/.gitignore create mode 100644 owl-bot-staging/google-cloud-essential_contacts/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-essential_contacts/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-essential_contacts/.toys.rb create mode 100644 owl-bot-staging/google-cloud-essential_contacts/.yardopts create mode 100644 owl-bot-staging/google-cloud-essential_contacts/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-essential_contacts/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-essential_contacts/Gemfile create mode 100644 owl-bot-staging/google-cloud-essential_contacts/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-essential_contacts/README.md create mode 100644 owl-bot-staging/google-cloud-essential_contacts/Rakefile create mode 100644 owl-bot-staging/google-cloud-essential_contacts/google-cloud-essential_contacts.gemspec create mode 100644 owl-bot-staging/google-cloud-essential_contacts/lib/google-cloud-essential_contacts.rb create mode 100644 owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts.rb create mode 100644 owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts/version.rb create mode 100644 owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/client_test.rb create mode 100644 owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/version_test.rb create mode 100644 owl-bot-staging/google-cloud-essential_contacts/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/README.md create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/google-cloud-eventarc-publishing-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google-cloud-eventarc-publishing-v1.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/cloud_event_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/credentials.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/cloud_event.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/publisher.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_channel_connection_events.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_events.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/snippet_metadata_google.cloud.eventarc.publishing.v1.json create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_test.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/.gitignore create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/.toys.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/.yardopts create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/Gemfile create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/README.md create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/Rakefile create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/google-cloud-eventarc-publishing.gemspec create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/lib/google-cloud-eventarc-publishing.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing/version.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/client_test.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/version_test.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/README.md create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/google-cloud-eventarc-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google-cloud-eventarc-v1.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_connection_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/discovery_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/enrollment_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/client.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/credentials.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/operations.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/paths.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_api_source_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_channel_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/logging_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/message_bus_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/network_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/pipeline_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/trigger_pb.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel_connection.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/discovery.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/enrollment.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/eventarc.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_api_source.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_channel_config.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/logging_config.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/message_bus.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/network_config.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/pipeline.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/trigger.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/rpc/code.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel_connection.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_enrollment.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_google_api_source.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_message_bus.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_pipeline.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_trigger.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel_connection.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_enrollment.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_google_api_source.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_message_bus.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_pipeline.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_trigger.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel_connection.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_enrollment.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_api_source.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_channel_config.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_message_bus.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_pipeline.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_provider.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_trigger.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channel_connections.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channels.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_enrollments.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_google_api_sources.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_bus_enrollments.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_buses.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_pipelines.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_providers.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_triggers.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_channel.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_enrollment.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_api_source.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_channel_config.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_message_bus.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_pipeline.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_trigger.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/snippet_metadata_google.cloud.eventarc.v1.json create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_test.rb create mode 100644 owl-bot-staging/google-cloud-eventarc-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-eventarc/.gitignore create mode 100644 owl-bot-staging/google-cloud-eventarc/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-eventarc/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-eventarc/.toys.rb create mode 100644 owl-bot-staging/google-cloud-eventarc/.yardopts create mode 100644 owl-bot-staging/google-cloud-eventarc/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-eventarc/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-eventarc/Gemfile create mode 100644 owl-bot-staging/google-cloud-eventarc/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-eventarc/README.md create mode 100644 owl-bot-staging/google-cloud-eventarc/Rakefile create mode 100644 owl-bot-staging/google-cloud-eventarc/google-cloud-eventarc.gemspec create mode 100644 owl-bot-staging/google-cloud-eventarc/lib/google-cloud-eventarc.rb create mode 100644 owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc.rb create mode 100644 owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc/version.rb create mode 100644 owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/client_test.rb create mode 100644 owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/version_test.rb create mode 100644 owl-bot-staging/google-cloud-eventarc/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-filestore-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-filestore-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-filestore-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-filestore-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-filestore-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-filestore-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-filestore-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-filestore-v1/README.md create mode 100644 owl-bot-staging/google-cloud-filestore-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-filestore-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-filestore-v1/google-cloud-filestore-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google-cloud-filestore-v1.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/credentials.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/operations.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/paths.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_service_pb.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/common/operation_metadata.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/filestore/v1/cloud_filestore_service.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_backup.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_instance.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_backup.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_instance.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_backup.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_instance.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_backups.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_instances.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_snapshots.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/promote_replica.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/restore_instance.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/revert_instance.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_backup.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_instance.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_snapshot.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/snippet_metadata_google.cloud.filestore.v1.json create mode 100644 owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_test.rb create mode 100644 owl-bot-staging/google-cloud-filestore-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-filestore/.gitignore create mode 100644 owl-bot-staging/google-cloud-filestore/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-filestore/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-filestore/.toys.rb create mode 100644 owl-bot-staging/google-cloud-filestore/.yardopts create mode 100644 owl-bot-staging/google-cloud-filestore/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-filestore/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-filestore/Gemfile create mode 100644 owl-bot-staging/google-cloud-filestore/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-filestore/README.md create mode 100644 owl-bot-staging/google-cloud-filestore/Rakefile create mode 100644 owl-bot-staging/google-cloud-filestore/google-cloud-filestore.gemspec create mode 100644 owl-bot-staging/google-cloud-filestore/lib/google-cloud-filestore.rb create mode 100644 owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore.rb create mode 100644 owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore/version.rb create mode 100644 owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/client_test.rb create mode 100644 owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/version_test.rb create mode 100644 owl-bot-staging/google-cloud-filestore/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/README.md create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/google-cloud-financial_services-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google-cloud-financial_services-v1.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/client.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/credentials.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/operations.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/paths.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/backtest_result_pb.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/bigquery_destination_pb.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/dataset_pb.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/engine_config_pb.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/engine_version_pb.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/instance_pb.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/line_of_business_pb.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/model_pb.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/prediction_result_pb.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/backtest_result.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/bigquery_destination.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/dataset.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_config.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_version.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/instance.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/line_of_business.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/model.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/prediction_result.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/service.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/datetime.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/interval.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_backtest_result.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_dataset.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_engine_config.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_instance.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_model.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_prediction_result.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_backtest_result.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_dataset.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_engine_config.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_instance.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_model.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_prediction_result.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_backtest_result_metadata.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_engine_config_metadata.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_model_metadata.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_prediction_result_metadata.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_registered_parties.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_backtest_result.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_dataset.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_config.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_version.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_instance.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_model.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_prediction_result.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/import_registered_parties.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_backtest_results.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_datasets.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_configs.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_versions.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_instances.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_models.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_prediction_results.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_backtest_result.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_dataset.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_engine_config.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_instance.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_model.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_prediction_result.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/snippet_metadata_google.cloud.financialservices.v1.json create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_test.rb create mode 100644 owl-bot-staging/google-cloud-financial_services-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-financial_services/.gitignore create mode 100644 owl-bot-staging/google-cloud-financial_services/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-financial_services/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-financial_services/.toys.rb create mode 100644 owl-bot-staging/google-cloud-financial_services/.yardopts create mode 100644 owl-bot-staging/google-cloud-financial_services/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-financial_services/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-financial_services/Gemfile create mode 100644 owl-bot-staging/google-cloud-financial_services/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-financial_services/README.md create mode 100644 owl-bot-staging/google-cloud-financial_services/Rakefile create mode 100644 owl-bot-staging/google-cloud-financial_services/google-cloud-financial_services.gemspec create mode 100644 owl-bot-staging/google-cloud-financial_services/lib/google-cloud-financial_services.rb create mode 100644 owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services.rb create mode 100644 owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services/version.rb create mode 100644 owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/client_test.rb create mode 100644 owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/version_test.rb create mode 100644 owl-bot-staging/google-cloud-financial_services/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/README.md create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/google-cloud-firestore-admin-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google-cloud-firestore-admin-v1.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/credentials.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/backup_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/database_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/field_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/index_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/location_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/operation_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/schedule_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/snapshot_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/user_creds_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/routing.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/backup.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/database.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/field.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/index.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/location.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/operation.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/schedule.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/snapshot.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/user_creds.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/type/dayofweek.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/bulk_delete_documents.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/clone_database.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_backup_schedule.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_database.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_index.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_user_creds.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup_schedule.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_database.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_index.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_user_creds.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/disable_user_creds.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/enable_user_creds.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/export_documents.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup_schedule.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_database.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_field.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_index.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_user_creds.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/import_documents.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backup_schedules.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backups.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_databases.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_fields.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_indexes.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_user_creds.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/reset_user_password.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/restore_database.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_backup_schedule.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_database.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_field.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin/.gitignore create mode 100644 owl-bot-staging/google-cloud-firestore-admin/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-firestore-admin/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-firestore-admin/.toys.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin/.yardopts create mode 100644 owl-bot-staging/google-cloud-firestore-admin/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-firestore-admin/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-firestore-admin/Gemfile create mode 100644 owl-bot-staging/google-cloud-firestore-admin/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-firestore-admin/README.md create mode 100644 owl-bot-staging/google-cloud-firestore-admin/Rakefile create mode 100644 owl-bot-staging/google-cloud-firestore-admin/google-cloud-firestore-admin.gemspec create mode 100644 owl-bot-staging/google-cloud-firestore-admin/lib/google-cloud-firestore-admin.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin/version.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/client_test.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/version_test.rb create mode 100644 owl-bot-staging/google-cloud-firestore-admin/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-firestore-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-firestore-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-firestore-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-firestore-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-firestore-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-firestore-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-firestore-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-firestore-v1/README.md create mode 100644 owl-bot-staging/google-cloud-firestore-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-firestore-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-firestore-v1/google-cloud-firestore-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google-cloud-firestore-v1.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/credentials.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/aggregation_result_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/bloom_filter_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/common_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/document_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/explain_stats_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/firestore_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/firestore_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/pipeline_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/query_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/query_profile_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/write_pb.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/routing.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/aggregation_result.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/bloom_filter.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/common.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/document.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/explain_stats.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/firestore.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/pipeline.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query_profile.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/write.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/struct.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/wrappers.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/type/latlng.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_get_documents.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_write.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/begin_transaction.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/commit.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/create_document.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/delete_document.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/execute_pipeline.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/get_document.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_collection_ids.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_documents.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/listen.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/partition_query.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/rollback.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_aggregation_query.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_query.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/update_document.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/write.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/snippet_metadata_google.firestore.v1.json create mode 100644 owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_test.rb create mode 100644 owl-bot-staging/google-cloud-firestore-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-functions-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-functions-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-functions-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-functions-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-functions-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-functions-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-functions-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-functions-v1/README.md create mode 100644 owl-bot-staging/google-cloud-functions-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-functions-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-functions-v1/google-cloud-functions-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google-cloud-functions-v1.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/client.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_pb.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/operations_pb.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/functions.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/operations.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/call_function.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/create_function.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/delete_function.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_download_url.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_upload_url.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_function.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/list_functions.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/set_iam_policy.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/test_iam_permissions.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/update_function.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/snippet_metadata_google.cloud.functions.v1.json create mode 100644 owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_test.rb create mode 100644 owl-bot-staging/google-cloud-functions-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/.gitignore create mode 100644 owl-bot-staging/google-cloud-functions-v2/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-functions-v2/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-functions-v2/.toys.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/.yardopts create mode 100644 owl-bot-staging/google-cloud-functions-v2/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-functions-v2/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-functions-v2/Gemfile create mode 100644 owl-bot-staging/google-cloud-functions-v2/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-functions-v2/README.md create mode 100644 owl-bot-staging/google-cloud-functions-v2/Rakefile create mode 100644 owl-bot-staging/google-cloud-functions-v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-functions-v2/google-cloud-functions-v2.gemspec create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google-cloud-functions-v2.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/client.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/credentials.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/operations.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/paths.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_pb.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/rest.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/version.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/cloud/functions/v2/functions.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/create_function.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/delete_function.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_download_url.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_upload_url.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/get_function.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_functions.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_runtimes.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/update_function.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/snippet_metadata_google.cloud.functions.v2.json create mode 100644 owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_test.rb create mode 100644 owl-bot-staging/google-cloud-functions-v2/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-functions/.gitignore create mode 100644 owl-bot-staging/google-cloud-functions/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-functions/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-functions/.toys.rb create mode 100644 owl-bot-staging/google-cloud-functions/.yardopts create mode 100644 owl-bot-staging/google-cloud-functions/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-functions/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-functions/Gemfile create mode 100644 owl-bot-staging/google-cloud-functions/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-functions/README.md create mode 100644 owl-bot-staging/google-cloud-functions/Rakefile create mode 100644 owl-bot-staging/google-cloud-functions/google-cloud-functions.gemspec create mode 100644 owl-bot-staging/google-cloud-functions/lib/google-cloud-functions.rb create mode 100644 owl-bot-staging/google-cloud-functions/lib/google/cloud/functions.rb create mode 100644 owl-bot-staging/google-cloud-functions/lib/google/cloud/functions/version.rb create mode 100644 owl-bot-staging/google-cloud-functions/test/google/cloud/functions/client_test.rb create mode 100644 owl-bot-staging/google-cloud-functions/test/google/cloud/functions/version_test.rb create mode 100644 owl-bot-staging/google-cloud-functions/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.gitignore create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.toys.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.yardopts create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/Gemfile create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/README.md create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/Rakefile create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/google-cloud-gdc_hardware_management-v1alpha.gemspec create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google-cloud-gdc_hardware_management-v1alpha.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/operations.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/paths.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/rest.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/version.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/resources_pb.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_pb.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/resources.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/service.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/datetime.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/dayofweek.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/postal_address.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/timeofday.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/cancel_order.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_comment.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware_group.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_order.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_site.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_zone.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware_group.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_order.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_site.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_zone.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_change_log_entry.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_comment.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware_group.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_order.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_site.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_sku.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_zone.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_change_log_entries.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_comments.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware_groups.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_orders.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_sites.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_skus.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_zones.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/record_action_on_comment.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/request_order_date_change.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/signal_zone_state.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/submit_order.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware_group.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_order.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_site.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_zone.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/snippet_metadata_google.cloud.gdchardwaremanagement.v1alpha.json create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_test.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/.gitignore create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/.toys.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/.yardopts create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/Gemfile create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/README.md create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/Rakefile create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/google-cloud-gdc_hardware_management.gemspec create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/lib/google-cloud-gdc_hardware_management.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management/version.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/client_test.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/version_test.rb create mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/.gitignore create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/.toys.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/.yardopts create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/Gemfile create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/README.md create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/Rakefile create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/google-cloud-gemini_data_analytics.gemspec create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/lib/google-cloud-gemini_data_analytics.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics/version.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/client_test.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/version_test.rb create mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/.gitignore create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/.toys.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/.yardopts create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/Gemfile create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/README.md create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/Rakefile create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/google-cloud-gke_backup-v1.gemspec create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google-cloud-gke_backup-v1.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/credentials.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/paths.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/bindings_override.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/rest.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/version.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_channel_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_binding_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/common_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_services_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_channel_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_binding_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/volume_pb.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/README.md create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/client.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/field_behavior.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/field_info.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/launch_stage.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/resource.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_channel.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/common.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_channel.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/volume.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/longrunning/operations.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/any.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/duration.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/empty.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/field_mask.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/timestamp.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/rpc/status.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/date.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/dayofweek.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/expr.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/timeofday.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/Gemfile create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_channel.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_channel.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_plan.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_channel.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_channel.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_plan.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_channel.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_index_download_url.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_channel.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan_binding.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_backup.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_restore.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_channels.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plan_bindings.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plans.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backups.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_channels.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plan_bindings.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plans.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restores.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_backups.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_restores.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_channel.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_plan.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_channel.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_plan.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/snippet_metadata_google.cloud.gkebackup.v1.json create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_operations_test.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_paths_test.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_rest_test.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_test.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/test/helper.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup/.gitignore create mode 100644 owl-bot-staging/google-cloud-gke_backup/.repo-metadata.json create mode 100644 owl-bot-staging/google-cloud-gke_backup/.rubocop.yml create mode 100644 owl-bot-staging/google-cloud-gke_backup/.toys.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup/.yardopts create mode 100644 owl-bot-staging/google-cloud-gke_backup/AUTHENTICATION.md create mode 100644 owl-bot-staging/google-cloud-gke_backup/CHANGELOG.md create mode 100644 owl-bot-staging/google-cloud-gke_backup/Gemfile create mode 100644 owl-bot-staging/google-cloud-gke_backup/LICENSE.md create mode 100644 owl-bot-staging/google-cloud-gke_backup/README.md create mode 100644 owl-bot-staging/google-cloud-gke_backup/Rakefile create mode 100644 owl-bot-staging/google-cloud-gke_backup/google-cloud-gke_backup.gemspec create mode 100644 owl-bot-staging/google-cloud-gke_backup/lib/google-cloud-gke_backup.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup/version.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/client_test.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/version_test.rb create mode 100644 owl-bot-staging/google-cloud-gke_backup/test/helper.rb diff --git a/owl-bot-staging/google-cloud-essential_contacts/.gitignore b/owl-bot-staging/google-cloud-essential_contacts/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/.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-essential_contacts/.repo-metadata.json b/owl-bot-staging/google-cloud-essential_contacts/.repo-metadata.json new file mode 100644 index 000000000000..c386646e2edd --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "essentialcontacts.googleapis.com", + "api_shortname": "essentialcontacts", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-essential_contacts/latest", + "distribution_name": "google-cloud-essential_contacts", + "is_cloud": true, + "language": "ruby", + "name": "essentialcontacts", + "name_pretty": "Essential Contacts API", + "product_documentation": "https://cloud.google.com/resource-manager/docs/managing-notification-contacts/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Many Google Cloud services, such as Cloud Billing, send out notifications to share important information with Google Cloud users. By default, these notifications are sent to members with certain Identity and Access Management (IAM) roles. With Essential Contacts, you can customize who receives notifications by providing your own list of contacts.", + "ruby-cloud-env-prefix": "ESSENTIAL_CONTACTS", + "ruby-cloud-product-url": "https://cloud.google.com/resource-manager/docs/managing-notification-contacts/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-essential_contacts/.rubocop.yml b/owl-bot-staging/google-cloud-essential_contacts/.rubocop.yml new file mode 100644 index 000000000000..407124225c4e --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-essential_contacts.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-essential_contacts.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-essential_contacts/.toys.rb b/owl-bot-staging/google-cloud-essential_contacts/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/.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-essential_contacts/.yardopts b/owl-bot-staging/google-cloud-essential_contacts/.yardopts new file mode 100644 index 000000000000..c4cd4d947c99 --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Essential Contacts API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-essential_contacts/AUTHENTICATION.md b/owl-bot-staging/google-cloud-essential_contacts/AUTHENTICATION.md new file mode 100644 index 000000000000..d9c103556cac --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-essential_contacts 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-essential_contacts 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/essential_contacts" + +client = Google::Cloud::EssentialContacts.essential_contacts_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/essential_contacts" + +Google::Cloud::EssentialContacts.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::EssentialContacts.essential_contacts_service +``` + +### 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-essential_contacts +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/essential_contacts" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::EssentialContacts.essential_contacts_service +``` + +### 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-essential_contacts/CHANGELOG.md b/owl-bot-staging/google-cloud-essential_contacts/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-essential_contacts/Gemfile b/owl-bot-staging/google-cloud-essential_contacts/Gemfile new file mode 100644 index 000000000000..47268f965e6d --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-essential_contacts-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-essential_contacts.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-essential_contacts/LICENSE.md b/owl-bot-staging/google-cloud-essential_contacts/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/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-essential_contacts/README.md b/owl-bot-staging/google-cloud-essential_contacts/README.md new file mode 100644 index 000000000000..5cbde69e337d --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Essential Contacts API + +API Client library for the Essential Contacts API + +Many Google Cloud services, such as Cloud Billing, send out notifications to share important information with Google Cloud users. By default, these notifications are sent to members with certain Identity and Access Management (IAM) roles. With Essential Contacts, you can customize who receives notifications by providing your own list of contacts. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-essential_contacts-v*`. +The gem `google-cloud-essential_contacts` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-essential_contacts/latest) +for this library, google-cloud-essential_contacts, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-essential_contacts-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-essential_contacts-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/resource-manager/docs/managing-notification-contacts/) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-essential_contacts +``` + +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/essentialcontacts.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/essential_contacts" + +client = Google::Cloud::EssentialContacts.essential_contacts_service +request = ::Google::Cloud::EssentialContacts::V1::CreateContactRequest.new # (request fields as keyword arguments...) +response = client.create_contact request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-essential_contacts-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-essential_contacts-v1/latest). + +## 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-essential_contacts`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-essential_contacts-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-essential_contacts`. +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-essential_contacts-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-essential_contacts/Rakefile b/owl-bot-staging/google-cloud-essential_contacts/Rakefile new file mode 100644 index 000000000000..b5df6ce9dd01 --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/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 = true +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-essential_contacts acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["ESSENTIAL_CONTACTS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["ESSENTIAL_CONTACTS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["ESSENTIAL_CONTACTS_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 ESSENTIAL_CONTACTS_TEST_PROJECT=test123 ESSENTIAL_CONTACTS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/essential_contacts/v1/essential_contacts_service/credentials" + ::Google::Cloud::EssentialContacts::V1::EssentialContactsService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["ESSENTIAL_CONTACTS_PROJECT"] = project + ENV["ESSENTIAL_CONTACTS_TEST_PROJECT"] = project + ENV["ESSENTIAL_CONTACTS_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-essential_contacts 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-essential_contacts 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-essential_contacts 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-essential_contacts gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-essential_contacts" + header "google-cloud-essential_contacts rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-essential_contacts yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-essential_contacts 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-essential_contacts 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-essential_contacts 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-essential_contacts/google-cloud-essential_contacts.gemspec b/owl-bot-staging/google-cloud-essential_contacts/google-cloud-essential_contacts.gemspec new file mode 100644 index 000000000000..81a08d55a89a --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/google-cloud-essential_contacts.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/essential_contacts/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-essential_contacts" + gem.version = Google::Cloud::EssentialContacts::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Many Google Cloud services, such as Cloud Billing, send out notifications to share important information with Google Cloud users. By default, these notifications are sent to members with certain Identity and Access Management (IAM) roles. With Essential Contacts, you can customize who receives notifications by providing your own list of contacts." + gem.summary = "API Client library for the Essential Contacts API" + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-essential_contacts-v1", ">= 0.6", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-essential_contacts/lib/google-cloud-essential_contacts.rb b/owl-bot-staging/google-cloud-essential_contacts/lib/google-cloud-essential_contacts.rb new file mode 100644 index 000000000000..ff726a544154 --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/lib/google-cloud-essential_contacts.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/essential_contacts" unless defined? Google::Cloud::EssentialContacts::VERSION diff --git a/owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts.rb b/owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts.rb new file mode 100644 index 000000000000..f9dccb541985 --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/essential_contacts/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :essential_contacts do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module EssentialContacts + ## + # Create a new client object for EssentialContactsService. + # + # By default, this returns an instance of + # [Google::Cloud::EssentialContacts::V1::EssentialContactsService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-essential_contacts-v1/latest/Google-Cloud-EssentialContacts-V1-EssentialContactsService-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the EssentialContactsService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the EssentialContactsService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::EssentialContacts.essential_contacts_service_available?}. + # + # ## About EssentialContactsService + # + # Manages contacts for important Google Cloud notifications. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.essential_contacts_service version: :v1, transport: :grpc, &block + require "google/cloud/essential_contacts/#{version.to_s.downcase}" + + package_name = Google::Cloud::EssentialContacts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::EssentialContacts.const_get(package_name).const_get(:EssentialContactsService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the EssentialContactsService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::EssentialContacts.essential_contacts_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the EssentialContactsService service, + # or if the versioned client gem needs an update to support the EssentialContactsService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.essential_contacts_service_available? version: :v1, transport: :grpc + require "google/cloud/essential_contacts/#{version.to_s.downcase}" + package_name = Google::Cloud::EssentialContacts + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::EssentialContacts.const_get package_name + return false unless service_module.const_defined? :EssentialContactsService + service_module = service_module.const_get :EssentialContactsService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-essential_contacts library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # 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 [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.essential_contacts if block_given? + + ::Google::Cloud.configure.essential_contacts + end + end + end +end + +helper_path = ::File.join __dir__, "essential_contacts", "helpers.rb" +require "google/cloud/essential_contacts/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts/version.rb b/owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts/version.rb new file mode 100644 index 000000000000..253433281085 --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts/version.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! + + +module Google + module Cloud + module EssentialContacts + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/client_test.rb b/owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/client_test.rb new file mode 100644 index 000000000000..3ad36d160603 --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 "google/cloud/essential_contacts" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::EssentialContacts::ClientConstructionMinitest < 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_essential_contacts_service_grpc + skip unless Google::Cloud::EssentialContacts.essential_contacts_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::EssentialContacts.essential_contacts_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::EssentialContacts::V1::EssentialContactsService::Client, client + end + end + + def test_essential_contacts_service_rest + skip unless Google::Cloud::EssentialContacts.essential_contacts_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::EssentialContacts.essential_contacts_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::EssentialContacts::V1::EssentialContactsService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/version_test.rb b/owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/version_test.rb new file mode 100644 index 000000000000..934c060a3217 --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/version_test.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 "helper" +require "google/cloud/essential_contacts/version" + +class Google::Cloud::EssentialContacts::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::EssentialContacts::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-essential_contacts/test/helper.rb b/owl-bot-staging/google-cloud-essential_contacts/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-essential_contacts/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/.gitignore b/owl-bot-staging/google-cloud-eventarc-publishing-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-eventarc-publishing-v1/.repo-metadata.json new file mode 100644 index 000000000000..014edf840907 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "eventarcpublishing.googleapis.com", + "api_shortname": "eventarcpublishing", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest", + "distribution_name": "google-cloud-eventarc-publishing-v1", + "is_cloud": true, + "language": "ruby", + "name": "eventarcpublishing", + "name_pretty": "Eventarc Publishing V1 API", + "product_documentation": "https://cloud.google.com/eventarc/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. Note that google-cloud-eventarc-publishing-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-eventarc-publishing instead. See the readme for more details.", + "ruby-cloud-env-prefix": "EVENTARC", + "ruby-cloud-product-url": "https://cloud.google.com/eventarc/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/.rubocop.yml b/owl-bot-staging/google-cloud-eventarc-publishing-v1/.rubocop.yml new file mode 100644 index 000000000000..60ae90f7ab76 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-eventarc-publishing-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-eventarc-publishing-v1.rb" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/.toys.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/.yardopts b/owl-bot-staging/google-cloud-eventarc-publishing-v1/.yardopts new file mode 100644 index 000000000000..0eb413fa7068 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Eventarc Publishing 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-eventarc-publishing-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-eventarc-publishing-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..6730f31e37c8 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-eventarc-publishing-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-eventarc-publishing-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/eventarc/publishing/v1" + +client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/eventarc/publishing/v1" + +::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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-eventarc-publishing-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/eventarc/publishing/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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-eventarc-publishing-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-eventarc-publishing-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/Gemfile b/owl-bot-staging/google-cloud-eventarc-publishing-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/LICENSE.md b/owl-bot-staging/google-cloud-eventarc-publishing-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/README.md b/owl-bot-staging/google-cloud-eventarc-publishing-v1/README.md new file mode 100644 index 000000000000..4f3113c01616 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Eventarc Publishing V1 API + +Processes events generated by an event provider and delivers them to a subscriber. + +Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Eventarc Publishing V1 API. Most users should consider using +the main client gem, +[google-cloud-eventarc-publishing](https://rubygems.org/gems/google-cloud-eventarc-publishing). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-eventarc-publishing-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/eventarcpublishing.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/eventarc/publishing/v1" + +client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new +request = ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new # (request fields as keyword arguments...) +response = client.publish_channel_connection_events request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/eventarc/) +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/eventarc/publishing/v1" +require "logger" + +client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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-eventarc-publishing`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-eventarc-publishing-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-eventarc-publishing`. +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-eventarc-publishing-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-eventarc-publishing-v1/Rakefile b/owl-bot-staging/google-cloud-eventarc-publishing-v1/Rakefile new file mode 100644 index 000000000000..9ad77ce5856f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["EVENTARC_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["EVENTARC_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["EVENTARC_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 EVENTARC_TEST_PROJECT=test123 EVENTARC_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/eventarc/publishing/v1/publisher/credentials" + ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["EVENTARC_PROJECT"] = project + ENV["EVENTARC_TEST_PROJECT"] = project + ENV["EVENTARC_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-eventarc-publishing-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-eventarc-publishing-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-eventarc-publishing-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-eventarc-publishing-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-eventarc-publishing-v1" + header "google-cloud-eventarc-publishing-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-eventarc-publishing-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-eventarc-publishing-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-eventarc-publishing-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-eventarc-publishing-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-eventarc-publishing-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-eventarc-publishing-v1/gapic_metadata.json new file mode 100644 index 000000000000..93e22a3adc86 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/gapic_metadata.json @@ -0,0 +1,33 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.eventarc.publishing.v1", + "libraryPackage": "::Google::Cloud::Eventarc::Publishing::V1", + "services": { + "Publisher": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client", + "rpcs": { + "PublishChannelConnectionEvents": { + "methods": [ + "publish_channel_connection_events" + ] + }, + "PublishEvents": { + "methods": [ + "publish_events" + ] + }, + "Publish": { + "methods": [ + "publish" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/google-cloud-eventarc-publishing-v1.gemspec b/owl-bot-staging/google-cloud-eventarc-publishing-v1/google-cloud-eventarc-publishing-v1.gemspec new file mode 100644 index 000000000000..8e3d1d7363d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/google-cloud-eventarc-publishing-v1.gemspec @@ -0,0 +1,28 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/eventarc/publishing/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-eventarc-publishing-v1" + gem.version = Google::Cloud::Eventarc::Publishing::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. Note that google-cloud-eventarc-publishing-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-eventarc-publishing instead. See the readme for more details." + gem.summary = "Processes events generated by an event provider and delivers them to a subscriber." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google-cloud-eventarc-publishing-v1.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google-cloud-eventarc-publishing-v1.rb new file mode 100644 index 000000000000..cfdad23e421f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google-cloud-eventarc-publishing-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/eventarc/publishing/v1" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1.rb new file mode 100644 index 000000000000..0e65f4632a87 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1.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 "google/cloud/eventarc/publishing/v1/publisher" +require "google/cloud/eventarc/publishing/v1/version" + +module Google + module Cloud + module Eventarc + module Publishing + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/eventarc/publishing/v1" + # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/eventarc/publishing/v1" + # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/eventarc/publishing/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/cloud_event_pb.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/cloud_event_pb.rb new file mode 100644 index 000000000000..4b2b22ac2147 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/cloud_event_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/eventarc/publishing/v1/cloud_event.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/any_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n5google/cloud/eventarc/publishing/v1/cloud_event.proto\x12#google.cloud.eventarc.publishing.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfc\x04\n\nCloudEvent\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06source\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cspec_version\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12X\n\nattributes\x18\x05 \x03(\x0b\x32?.google.cloud.eventarc.publishing.v1.CloudEvent.AttributesEntryB\x03\xe0\x41\x01\x12\x1a\n\x0b\x62inary_data\x18\x06 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x18\n\ttext_data\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x00\x12/\n\nproto_data\x18\x08 \x01(\x0b\x32\x14.google.protobuf.AnyB\x03\xe0\x41\x01H\x00\x1a\xd3\x01\n\x18\x43loudEventAttributeValue\x12\x14\n\nce_boolean\x18\x01 \x01(\x08H\x00\x12\x14\n\nce_integer\x18\x02 \x01(\x05H\x00\x12\x13\n\tce_string\x18\x03 \x01(\tH\x00\x12\x12\n\x08\x63\x65_bytes\x18\x04 \x01(\x0cH\x00\x12\x10\n\x06\x63\x65_uri\x18\x05 \x01(\tH\x00\x12\x14\n\nce_uri_ref\x18\x06 \x01(\tH\x00\x12\x32\n\x0c\x63\x65_timestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x06\n\x04\x61ttr\x1a{\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12W\n\x05value\x18\x02 \x01(\x0b\x32H.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue:\x02\x38\x01\x42\x06\n\x04\x64\x61taB\xfb\x01\n\'com.google.cloud.eventarc.publishing.v1B\x0f\x43loudEventProtoP\x01ZGcloud.google.com/go/eventarc/publishing/apiv1/publishingpb;publishingpb\xaa\x02#Google.Cloud.Eventarc.Publishing.V1\xca\x02#Google\\Cloud\\Eventarc\\Publishing\\V1\xea\x02\'Google::Cloud::Eventarc::Publishing::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Any", "google/protobuf/any.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Eventarc + module Publishing + module V1 + CloudEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.CloudEvent").msgclass + CloudEvent::CloudEventAttributeValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher.rb new file mode 100644 index 000000000000..7aabbb71cad3 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher.rb @@ -0,0 +1,84 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/publishing/v1/version" + +require "google/cloud/eventarc/publishing/v1/publisher/credentials" +require "google/cloud/eventarc/publishing/v1/publisher/client" +require "google/cloud/eventarc/publishing/v1/publisher/rest" + +module Google + module Cloud + module Eventarc + module Publishing + module V1 + ## + # Eventarc processes events generated by an event provider and delivers them to + # a subscriber. + # + # An event provider is a software-as-a-service (SaaS) system or + # product that can generate and deliver events through Eventarc. + # + # A third-party event provider is an event provider from outside of Google. + # + # A partner is a third-party event provider that is integrated with Eventarc. + # + # A subscriber is a Google Cloud customer interested in receiving events. + # + # Channel is a first-class Eventarc resource that is created and managed + # by the subscriber in their Google Cloud project. A Channel represents a + # subscriber's intent to receive events from an event provider. A Channel is + # associated with exactly one event provider. + # + # ChannelConnection is a first-class Eventarc resource that + # is created and managed by the partner in their Google Cloud project. A + # ChannelConnection represents a connection between a partner and a + # subscriber's Channel. A ChannelConnection has a one-to-one mapping with a + # Channel. + # + # Bus is a first-class Eventarc resource that is created and managed in a + # Google Cloud project. A Bus provides a discoverable endpoint for events and + # is a router that receives all events published by event providers and + # delivers them to zero or more subscribers. + # + # Publisher allows an event provider to publish events to Eventarc. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/eventarc/publishing/v1/publisher" + # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/eventarc/publishing/v1/publisher/rest" + # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new + # + module Publisher + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "publisher", "helpers.rb" +require "google/cloud/eventarc/publishing/v1/publisher/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb new file mode 100644 index 000000000000..5d67d8c95938 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb @@ -0,0 +1,729 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/publishing/v1/publisher_pb" + +module Google + module Cloud + module Eventarc + module Publishing + module V1 + module Publisher + ## + # Client for the Publisher service. + # + # Eventarc processes events generated by an event provider and delivers them to + # a subscriber. + # + # An event provider is a software-as-a-service (SaaS) system or + # product that can generate and deliver events through Eventarc. + # + # A third-party event provider is an event provider from outside of Google. + # + # A partner is a third-party event provider that is integrated with Eventarc. + # + # A subscriber is a Google Cloud customer interested in receiving events. + # + # Channel is a first-class Eventarc resource that is created and managed + # by the subscriber in their Google Cloud project. A Channel represents a + # subscriber's intent to receive events from an event provider. A Channel is + # associated with exactly one event provider. + # + # ChannelConnection is a first-class Eventarc resource that + # is created and managed by the partner in their Google Cloud project. A + # ChannelConnection represents a connection between a partner and a + # subscriber's Channel. A ChannelConnection has a one-to-one mapping with a + # Channel. + # + # Bus is a first-class Eventarc resource that is created and managed in a + # Google Cloud project. A Bus provides a discoverable endpoint for events and + # is a router that receives all events published by event providers and + # delivers them to zero or more subscribers. + # + # Publisher allows an event provider to publish events to Eventarc. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "eventarcpublishing.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :publisher_stub + + ## + # Configure the Publisher Client class. + # + # See {::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Publisher clients + # ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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", "Eventarc", "Publishing", "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.publish_channel_connection_events.timeout = 60.0 + + default_config.rpcs.publish.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Publisher 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::Eventarc::Publishing::V1::Publisher::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 + @publisher_stub.universe_domain + end + + ## + # Create a new Publisher client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Publisher 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/eventarc/publishing/v1/publisher_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 + + @publisher_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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 + ) + + @publisher_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @publisher_stub.logger + end + + # Service calls + + ## + # Publish events to a ChannelConnection in a partner's project. + # + # @overload publish_channel_connection_events(request, options = nil) + # Pass arguments to `publish_channel_connection_events` via a request object, either of type + # {::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload publish_channel_connection_events(channel_connection: nil, events: nil, text_events: nil) + # Pass arguments to `publish_channel_connection_events` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param channel_connection [::String] + # The channel_connection that the events are published from. For example: + # `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. + # @param events [::Array<::Google::Protobuf::Any, ::Hash>] + # The CloudEvents v1.0 events to publish. No other types are allowed. + # If this field is set, then the `text_events` fields must not be set. + # @param text_events [::Array<::String>] + # The text representation of events to publish. + # CloudEvent v1.0 in JSON format is the only allowed type. Refer to + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + # for specification. + # If this field is set, then the `events` fields must not be set. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/publishing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new + # + # # Call the publish_channel_connection_events method. + # result = client.publish_channel_connection_events request + # + # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse. + # p result + # + def publish_channel_connection_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.publish_channel_connection_events.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.channel_connection + header_params["channel_connection"] = request.channel_connection + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.publish_channel_connection_events.timeout, + metadata: metadata, + retry_policy: @config.rpcs.publish_channel_connection_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @publisher_stub.call_rpc :publish_channel_connection_events, 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 + + ## + # Publish events to a subscriber's channel. + # + # @overload publish_events(request, options = nil) + # Pass arguments to `publish_events` via a request object, either of type + # {::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload publish_events(channel: nil, events: nil, text_events: nil) + # Pass arguments to `publish_events` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param channel [::String] + # The full name of the channel to publish to. For example: + # `projects/{project}/locations/{location}/channels/{channel-id}`. + # @param events [::Array<::Google::Protobuf::Any, ::Hash>] + # The CloudEvents v1.0 events to publish. No other types are allowed. + # If this field is set, then the `text_events` fields must not be set. + # @param text_events [::Array<::String>] + # The text representation of events to publish. + # CloudEvent v1.0 in JSON format is the only allowed type. Refer to + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + # for specification. + # If this field is set, then the `events` fields must not be set. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/publishing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new + # + # # Call the publish_events method. + # result = client.publish_events request + # + # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse. + # p result + # + def publish_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.publish_events.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.channel + header_params["channel"] = request.channel + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.publish_events.timeout, + metadata: metadata, + retry_policy: @config.rpcs.publish_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @publisher_stub.call_rpc :publish_events, 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 + + ## + # Publish events to a message bus. + # + # @overload publish(request, options = nil) + # Pass arguments to `publish` via a request object, either of type + # {::Google::Cloud::Eventarc::Publishing::V1::PublishRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::Publishing::V1::PublishRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload publish(message_bus: nil, proto_message: nil, json_message: nil, avro_message: nil) + # Pass arguments to `publish` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param message_bus [::String] + # Required. The full name of the message bus to publish events to. Format: + # `projects/{project}/locations/{location}/messageBuses/{messageBus}`. + # @param proto_message [::Google::Cloud::Eventarc::Publishing::V1::CloudEvent, ::Hash] + # The Protobuf format of the CloudEvent being published. Specification can + # be found here: + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md + # + # Note: The following parameters are mutually exclusive: `proto_message`, `json_message`, `avro_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param json_message [::String] + # The JSON format of the CloudEvent being published. Specification can be + # found here: + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + # + # Note: The following parameters are mutually exclusive: `json_message`, `proto_message`, `avro_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param avro_message [::String] + # The Avro format of the CloudEvent being published. Specification can + # be found here: + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md + # + # Note: The following parameters are mutually exclusive: `avro_message`, `proto_message`, `json_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/publishing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new + # + # # Call the publish method. + # result = client.publish request + # + # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishResponse. + # p result + # + def publish request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::Publishing::V1::PublishRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.publish.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.message_bus + header_params["message_bus"] = request.message_bus + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.publish.timeout, + metadata: metadata, + retry_policy: @config.rpcs.publish.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @publisher_stub.call_rpc :publish, 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 Publisher API. + # + # This class represents the configuration for Publisher, + # 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::Eventarc::Publishing::V1::Publisher::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 + # # publish_channel_connection_events to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.publish_channel_connection_events.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.publish_channel_connection_events.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::Eventarc::Publishing::V1::Publisher::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 = "eventarcpublishing.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 Publisher 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 `publish_channel_connection_events` + # @return [::Gapic::Config::Method] + # + attr_reader :publish_channel_connection_events + ## + # RPC-specific configuration for `publish_events` + # @return [::Gapic::Config::Method] + # + attr_reader :publish_events + ## + # RPC-specific configuration for `publish` + # @return [::Gapic::Config::Method] + # + attr_reader :publish + + # @private + def initialize parent_rpcs = nil + publish_channel_connection_events_config = parent_rpcs.publish_channel_connection_events if parent_rpcs.respond_to? :publish_channel_connection_events + @publish_channel_connection_events = ::Gapic::Config::Method.new publish_channel_connection_events_config + publish_events_config = parent_rpcs.publish_events if parent_rpcs.respond_to? :publish_events + @publish_events = ::Gapic::Config::Method.new publish_events_config + publish_config = parent_rpcs.publish if parent_rpcs.respond_to? :publish + @publish = ::Gapic::Config::Method.new publish_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/credentials.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/credentials.rb new file mode 100644 index 000000000000..50419d0983d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/credentials.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 "googleauth" + +module Google + module Cloud + module Eventarc + module Publishing + module V1 + module Publisher + # Credentials for the Publisher API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "EVENTARC_CREDENTIALS", + "EVENTARC_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "EVENTARC_CREDENTIALS_JSON", + "EVENTARC_KEYFILE_JSON", + "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 +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest.rb new file mode 100644 index 000000000000..f625fb135fe4 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest.rb @@ -0,0 +1,81 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/publishing/v1/version" + +require "google/cloud/eventarc/publishing/v1/publisher/credentials" +require "google/cloud/eventarc/publishing/v1/publisher/rest/client" + +module Google + module Cloud + module Eventarc + module Publishing + module V1 + ## + # Eventarc processes events generated by an event provider and delivers them to + # a subscriber. + # + # An event provider is a software-as-a-service (SaaS) system or + # product that can generate and deliver events through Eventarc. + # + # A third-party event provider is an event provider from outside of Google. + # + # A partner is a third-party event provider that is integrated with Eventarc. + # + # A subscriber is a Google Cloud customer interested in receiving events. + # + # Channel is a first-class Eventarc resource that is created and managed + # by the subscriber in their Google Cloud project. A Channel represents a + # subscriber's intent to receive events from an event provider. A Channel is + # associated with exactly one event provider. + # + # ChannelConnection is a first-class Eventarc resource that + # is created and managed by the partner in their Google Cloud project. A + # ChannelConnection represents a connection between a partner and a + # subscriber's Channel. A ChannelConnection has a one-to-one mapping with a + # Channel. + # + # Bus is a first-class Eventarc resource that is created and managed in a + # Google Cloud project. A Bus provides a discoverable endpoint for events and + # is a router that receives all events published by event providers and + # delivers them to zero or more subscribers. + # + # Publisher allows an event provider to publish events to Eventarc. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/eventarc/publishing/v1/publisher/rest" + # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new + # + module Publisher + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/eventarc/publishing/v1/publisher/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb new file mode 100644 index 000000000000..9b92a9131331 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb @@ -0,0 +1,665 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/publishing/v1/publisher_pb" +require "google/cloud/eventarc/publishing/v1/publisher/rest/service_stub" + +module Google + module Cloud + module Eventarc + module Publishing + module V1 + module Publisher + module Rest + ## + # REST client for the Publisher service. + # + # Eventarc processes events generated by an event provider and delivers them to + # a subscriber. + # + # An event provider is a software-as-a-service (SaaS) system or + # product that can generate and deliver events through Eventarc. + # + # A third-party event provider is an event provider from outside of Google. + # + # A partner is a third-party event provider that is integrated with Eventarc. + # + # A subscriber is a Google Cloud customer interested in receiving events. + # + # Channel is a first-class Eventarc resource that is created and managed + # by the subscriber in their Google Cloud project. A Channel represents a + # subscriber's intent to receive events from an event provider. A Channel is + # associated with exactly one event provider. + # + # ChannelConnection is a first-class Eventarc resource that + # is created and managed by the partner in their Google Cloud project. A + # ChannelConnection represents a connection between a partner and a + # subscriber's Channel. A ChannelConnection has a one-to-one mapping with a + # Channel. + # + # Bus is a first-class Eventarc resource that is created and managed in a + # Google Cloud project. A Bus provides a discoverable endpoint for events and + # is a router that receives all events published by event providers and + # delivers them to zero or more subscribers. + # + # Publisher allows an event provider to publish events to Eventarc. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "eventarcpublishing.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :publisher_stub + + ## + # Configure the Publisher Client class. + # + # See {::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Publisher clients + # ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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", "Eventarc", "Publishing", "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.publish_channel_connection_events.timeout = 60.0 + + default_config.rpcs.publish.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Publisher 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::Eventarc::Publishing::V1::Publisher::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 + @publisher_stub.universe_domain + end + + ## + # Create a new Publisher REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Publisher 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 + + @publisher_stub = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @publisher_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 + end + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @publisher_stub.logger + end + + # Service calls + + ## + # Publish events to a ChannelConnection in a partner's project. + # + # @overload publish_channel_connection_events(request, options = nil) + # Pass arguments to `publish_channel_connection_events` via a request object, either of type + # {::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload publish_channel_connection_events(channel_connection: nil, events: nil, text_events: nil) + # Pass arguments to `publish_channel_connection_events` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param channel_connection [::String] + # The channel_connection that the events are published from. For example: + # `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. + # @param events [::Array<::Google::Protobuf::Any, ::Hash>] + # The CloudEvents v1.0 events to publish. No other types are allowed. + # If this field is set, then the `text_events` fields must not be set. + # @param text_events [::Array<::String>] + # The text representation of events to publish. + # CloudEvent v1.0 in JSON format is the only allowed type. Refer to + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + # for specification. + # If this field is set, then the `events` fields must not be set. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/publishing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new + # + # # Call the publish_channel_connection_events method. + # result = client.publish_channel_connection_events request + # + # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse. + # p result + # + def publish_channel_connection_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.publish_channel_connection_events.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.publish_channel_connection_events.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.publish_channel_connection_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @publisher_stub.publish_channel_connection_events 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 + + ## + # Publish events to a subscriber's channel. + # + # @overload publish_events(request, options = nil) + # Pass arguments to `publish_events` via a request object, either of type + # {::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload publish_events(channel: nil, events: nil, text_events: nil) + # Pass arguments to `publish_events` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param channel [::String] + # The full name of the channel to publish to. For example: + # `projects/{project}/locations/{location}/channels/{channel-id}`. + # @param events [::Array<::Google::Protobuf::Any, ::Hash>] + # The CloudEvents v1.0 events to publish. No other types are allowed. + # If this field is set, then the `text_events` fields must not be set. + # @param text_events [::Array<::String>] + # The text representation of events to publish. + # CloudEvent v1.0 in JSON format is the only allowed type. Refer to + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + # for specification. + # If this field is set, then the `events` fields must not be set. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/publishing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new + # + # # Call the publish_events method. + # result = client.publish_events request + # + # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse. + # p result + # + def publish_events request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.publish_events.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.publish_events.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.publish_events.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @publisher_stub.publish_events 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 + + ## + # Publish events to a message bus. + # + # @overload publish(request, options = nil) + # Pass arguments to `publish` via a request object, either of type + # {::Google::Cloud::Eventarc::Publishing::V1::PublishRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::Publishing::V1::PublishRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload publish(message_bus: nil, proto_message: nil, json_message: nil, avro_message: nil) + # Pass arguments to `publish` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param message_bus [::String] + # Required. The full name of the message bus to publish events to. Format: + # `projects/{project}/locations/{location}/messageBuses/{messageBus}`. + # @param proto_message [::Google::Cloud::Eventarc::Publishing::V1::CloudEvent, ::Hash] + # The Protobuf format of the CloudEvent being published. Specification can + # be found here: + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md + # + # Note: The following parameters are mutually exclusive: `proto_message`, `json_message`, `avro_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param json_message [::String] + # The JSON format of the CloudEvent being published. Specification can be + # found here: + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + # + # Note: The following parameters are mutually exclusive: `json_message`, `proto_message`, `avro_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param avro_message [::String] + # The Avro format of the CloudEvent being published. Specification can + # be found here: + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md + # + # Note: The following parameters are mutually exclusive: `avro_message`, `proto_message`, `json_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/publishing/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new + # + # # Call the publish method. + # result = client.publish request + # + # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishResponse. + # p result + # + def publish request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::Publishing::V1::PublishRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.publish.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.publish.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.publish.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @publisher_stub.publish 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 Publisher REST API. + # + # This class represents the configuration for Publisher 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::Eventarc::Publishing::V1::Publisher::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 + # # publish_channel_connection_events to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.publish_channel_connection_events.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.publish_channel_connection_events.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 = "eventarcpublishing.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 Publisher 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 `publish_channel_connection_events` + # @return [::Gapic::Config::Method] + # + attr_reader :publish_channel_connection_events + ## + # RPC-specific configuration for `publish_events` + # @return [::Gapic::Config::Method] + # + attr_reader :publish_events + ## + # RPC-specific configuration for `publish` + # @return [::Gapic::Config::Method] + # + attr_reader :publish + + # @private + def initialize parent_rpcs = nil + publish_channel_connection_events_config = parent_rpcs.publish_channel_connection_events if parent_rpcs.respond_to? :publish_channel_connection_events + @publish_channel_connection_events = ::Gapic::Config::Method.new publish_channel_connection_events_config + publish_events_config = parent_rpcs.publish_events if parent_rpcs.respond_to? :publish_events + @publish_events = ::Gapic::Config::Method.new publish_events_config + publish_config = parent_rpcs.publish if parent_rpcs.respond_to? :publish + @publish = ::Gapic::Config::Method.new publish_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/service_stub.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/service_stub.rb new file mode 100644 index 000000000000..82c0817073aa --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/service_stub.rb @@ -0,0 +1,269 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/publishing/v1/publisher_pb" + +module Google + module Cloud + module Eventarc + module Publishing + module V1 + module Publisher + module Rest + ## + # REST service stub for the Publisher 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 publish_channel_connection_events REST call + # + # @param request_pb [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse] + # A result object deserialized from the server's reply + def publish_channel_connection_events request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_publish_channel_connection_events_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "publish_channel_connection_events", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the publish_events REST call + # + # @param request_pb [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse] + # A result object deserialized from the server's reply + def publish_events request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_publish_events_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "publish_events", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the publish REST call + # + # @param request_pb [::Google::Cloud::Eventarc::Publishing::V1::PublishRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] + # A result object deserialized from the server's reply + def publish request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_publish_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "publish", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::Publishing::V1::PublishResponse.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 publish_channel_connection_events REST call + # + # @param request_pb [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_publish_channel_connection_events_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{channel_connection}:publishEvents", + body: "*", + matches: [ + ["channel_connection", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the publish_events REST call + # + # @param request_pb [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_publish_events_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{channel}:publishEvents", + body: "*", + matches: [ + ["channel", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the publish REST call + # + # @param request_pb [::Google::Cloud::Eventarc::Publishing::V1::PublishRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_publish_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{message_bus}:publish", + body: "*", + matches: [ + ["message_bus", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_pb.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_pb.rb new file mode 100644 index 000000000000..624ebfd71e45 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_pb.rb @@ -0,0 +1,58 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/eventarc/publishing/v1/publisher.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/cloud/eventarc/publishing/v1/cloud_event_pb' +require 'google/protobuf/any_pb' + + +descriptor_data = "\n3google/cloud/eventarc/publishing/v1/publisher.proto\x12#google.cloud.eventarc.publishing.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x35google/cloud/eventarc/publishing/v1/cloud_event.proto\x1a\x19google/protobuf/any.proto\"~\n%PublishChannelConnectionEventsRequest\x12\x1a\n\x12\x63hannel_connection\x18\x01 \x01(\t\x12$\n\x06\x65vents\x18\x02 \x03(\x0b\x32\x14.google.protobuf.Any\x12\x13\n\x0btext_events\x18\x03 \x03(\t\"(\n&PublishChannelConnectionEventsResponse\"b\n\x14PublishEventsRequest\x12\x0f\n\x07\x63hannel\x18\x01 \x01(\t\x12$\n\x06\x65vents\x18\x02 \x03(\x0b\x32\x14.google.protobuf.Any\x12\x13\n\x0btext_events\x18\x03 \x03(\t\"\x17\n\x15PublishEventsResponse\"\xae\x01\n\x0ePublishRequest\x12\x18\n\x0bmessage_bus\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\rproto_message\x18\x02 \x01(\x0b\x32/.google.cloud.eventarc.publishing.v1.CloudEventH\x00\x12\x16\n\x0cjson_message\x18\x03 \x01(\tH\x00\x12\x16\n\x0c\x61vro_message\x18\x04 \x01(\x0cH\x00\x42\x08\n\x06\x66ormat\"\x11\n\x0fPublishResponse2\x93\x06\n\tPublisher\x12\x98\x02\n\x1ePublishChannelConnectionEvents\x12J.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest\x1aK.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse\"]\x82\xd3\xe4\x93\x02W\"R/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents:\x01*\x12\xd0\x01\n\rPublishEvents\x12\x39.google.cloud.eventarc.publishing.v1.PublishEventsRequest\x1a:.google.cloud.eventarc.publishing.v1.PublishEventsResponse\"H\x82\xd3\xe4\x93\x02\x42\"=/v1/{channel=projects/*/locations/*/channels/*}:publishEvents:\x01*\x12\xc0\x01\n\x07Publish\x12\x33.google.cloud.eventarc.publishing.v1.PublishRequest\x1a\x34.google.cloud.eventarc.publishing.v1.PublishResponse\"J\x82\xd3\xe4\x93\x02\x44\"?/v1/{message_bus=projects/*/locations/*/messageBuses/*}:publish:\x01*\x1aU\xca\x41!eventarcpublishing.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfa\x01\n\'com.google.cloud.eventarc.publishing.v1B\x0ePublisherProtoP\x01ZGcloud.google.com/go/eventarc/publishing/apiv1/publishingpb;publishingpb\xaa\x02#Google.Cloud.Eventarc.Publishing.V1\xca\x02#Google\\Cloud\\Eventarc\\Publishing\\V1\xea\x02\'Google::Cloud::Eventarc::Publishing::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Any", "google/protobuf/any.proto"], + ["google.cloud.eventarc.publishing.v1.CloudEvent", "google/cloud/eventarc/publishing/v1/cloud_event.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Eventarc + module Publishing + module V1 + PublishChannelConnectionEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest").msgclass + PublishChannelConnectionEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse").msgclass + PublishEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.PublishEventsRequest").msgclass + PublishEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.PublishEventsResponse").msgclass + PublishRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.PublishRequest").msgclass + PublishResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.PublishResponse").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_services_pb.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_services_pb.rb new file mode 100644 index 000000000000..91a3a99f35ea --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_services_pb.rb @@ -0,0 +1,79 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/eventarc/publishing/v1/publisher.proto for package 'Google.Cloud.Eventarc.Publishing.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/eventarc/publishing/v1/publisher_pb' + +module Google + module Cloud + module Eventarc + module Publishing + module V1 + module Publisher + # Eventarc processes events generated by an event provider and delivers them to + # a subscriber. + # + # An event provider is a software-as-a-service (SaaS) system or + # product that can generate and deliver events through Eventarc. + # + # A third-party event provider is an event provider from outside of Google. + # + # A partner is a third-party event provider that is integrated with Eventarc. + # + # A subscriber is a Google Cloud customer interested in receiving events. + # + # Channel is a first-class Eventarc resource that is created and managed + # by the subscriber in their Google Cloud project. A Channel represents a + # subscriber's intent to receive events from an event provider. A Channel is + # associated with exactly one event provider. + # + # ChannelConnection is a first-class Eventarc resource that + # is created and managed by the partner in their Google Cloud project. A + # ChannelConnection represents a connection between a partner and a + # subscriber's Channel. A ChannelConnection has a one-to-one mapping with a + # Channel. + # + # Bus is a first-class Eventarc resource that is created and managed in a + # Google Cloud project. A Bus provides a discoverable endpoint for events and + # is a router that receives all events published by event providers and + # delivers them to zero or more subscribers. + # + # Publisher allows an event provider to publish events to Eventarc. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.eventarc.publishing.v1.Publisher' + + # Publish events to a ChannelConnection in a partner's project. + rpc :PublishChannelConnectionEvents, ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest, ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse + # Publish events to a subscriber's channel. + rpc :PublishEvents, ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest, ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse + # Publish events to a message bus. + rpc :Publish, ::Google::Cloud::Eventarc::Publishing::V1::PublishRequest, ::Google::Cloud::Eventarc::Publishing::V1::PublishResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/rest.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/rest.rb new file mode 100644 index 000000000000..bb17fad8ae69 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/publishing/v1/publisher/rest" +require "google/cloud/eventarc/publishing/v1/version" + +module Google + module Cloud + module Eventarc + module Publishing + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/eventarc/publishing/v1/rest" + # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/version.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/version.rb new file mode 100644 index 000000000000..8f2a79d2ceef --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module Publishing + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/README.md new file mode 100644 index 000000000000..e063d6bb52de --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Eventarc Publishing 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-eventarc-publishing-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/cloud_event.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/cloud_event.rb new file mode 100644 index 000000000000..8048b1534086 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/cloud_event.rb @@ -0,0 +1,125 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module Publishing + module V1 + # CloudEvent represents a vendor-neutral specification for defining the format + # of event data. + # @!attribute [rw] id + # @return [::String] + # Required. Identifies the event. Producers MUST ensure that source + id is + # unique for each distinct event. + # @!attribute [rw] source + # @return [::String] + # Required. Identifies the context in which an event happened. + # URI-reference + # @!attribute [rw] spec_version + # @return [::String] + # Required. The version of the CloudEvents specification which the event + # uses. + # @!attribute [rw] type + # @return [::String] + # Required. This attribute contains a value describing the type of event + # related to the originating occurrence. + # @!attribute [rw] attributes + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Eventarc::Publishing::V1::CloudEvent::CloudEventAttributeValue}] + # Optional. Used for Optional & Extension Attributes + # @!attribute [rw] binary_data + # @return [::String] + # Optional. Binary data. + # + # Note: The following fields are mutually exclusive: `binary_data`, `text_data`, `proto_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] text_data + # @return [::String] + # Optional. Text data. + # + # Note: The following fields are mutually exclusive: `text_data`, `binary_data`, `proto_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] proto_data + # @return [::Google::Protobuf::Any] + # Optional. Proto data. + # + # NOTE: The `protoData` field only functions as expected when the payload + # is specifically a `CloudEvent` message type, and can't be used for + # arbitrary protocol buffer messages. For any other protocol buffer type, + # you must serialize your proto message into bytes, and use the + # `binaryData` field instead. + # + # Note: The following fields are mutually exclusive: `proto_data`, `binary_data`, `text_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class CloudEvent + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The following abstract data types are available for use in attributes. + # @!attribute [rw] ce_boolean + # @return [::Boolean] + # Boolean value. + # + # Note: The following fields are mutually exclusive: `ce_boolean`, `ce_integer`, `ce_string`, `ce_bytes`, `ce_uri`, `ce_uri_ref`, `ce_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ce_integer + # @return [::Integer] + # Integer value. + # + # Note: The following fields are mutually exclusive: `ce_integer`, `ce_boolean`, `ce_string`, `ce_bytes`, `ce_uri`, `ce_uri_ref`, `ce_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ce_string + # @return [::String] + # String value. + # + # Note: The following fields are mutually exclusive: `ce_string`, `ce_boolean`, `ce_integer`, `ce_bytes`, `ce_uri`, `ce_uri_ref`, `ce_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ce_bytes + # @return [::String] + # Bytes value. + # + # Note: The following fields are mutually exclusive: `ce_bytes`, `ce_boolean`, `ce_integer`, `ce_string`, `ce_uri`, `ce_uri_ref`, `ce_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ce_uri + # @return [::String] + # URI value. + # + # Note: The following fields are mutually exclusive: `ce_uri`, `ce_boolean`, `ce_integer`, `ce_string`, `ce_bytes`, `ce_uri_ref`, `ce_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ce_uri_ref + # @return [::String] + # URI-reference value. + # + # Note: The following fields are mutually exclusive: `ce_uri_ref`, `ce_boolean`, `ce_integer`, `ce_string`, `ce_bytes`, `ce_uri`, `ce_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] ce_timestamp + # @return [::Google::Protobuf::Timestamp] + # Timestamp value. + # + # Note: The following fields are mutually exclusive: `ce_timestamp`, `ce_boolean`, `ce_integer`, `ce_string`, `ce_bytes`, `ce_uri`, `ce_uri_ref`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class CloudEventAttributeValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Eventarc::Publishing::V1::CloudEvent::CloudEventAttributeValue] + class AttributesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/publisher.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/publisher.rb new file mode 100644 index 000000000000..5bbbeef93e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/publisher.rb @@ -0,0 +1,119 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module Publishing + module V1 + # The request message for the PublishChannelConnectionEvents method. + # @!attribute [rw] channel_connection + # @return [::String] + # The channel_connection that the events are published from. For example: + # `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. + # @!attribute [rw] events + # @return [::Array<::Google::Protobuf::Any>] + # The CloudEvents v1.0 events to publish. No other types are allowed. + # If this field is set, then the `text_events` fields must not be set. + # @!attribute [rw] text_events + # @return [::Array<::String>] + # The text representation of events to publish. + # CloudEvent v1.0 in JSON format is the only allowed type. Refer to + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + # for specification. + # If this field is set, then the `events` fields must not be set. + class PublishChannelConnectionEventsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for the PublishChannelConnectionEvents method. + class PublishChannelConnectionEventsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the PublishEvents method. + # @!attribute [rw] channel + # @return [::String] + # The full name of the channel to publish to. For example: + # `projects/{project}/locations/{location}/channels/{channel-id}`. + # @!attribute [rw] events + # @return [::Array<::Google::Protobuf::Any>] + # The CloudEvents v1.0 events to publish. No other types are allowed. + # If this field is set, then the `text_events` fields must not be set. + # @!attribute [rw] text_events + # @return [::Array<::String>] + # The text representation of events to publish. + # CloudEvent v1.0 in JSON format is the only allowed type. Refer to + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + # for specification. + # If this field is set, then the `events` fields must not be set. + class PublishEventsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for the PublishEvents method. + class PublishEventsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the Publish method. + # @!attribute [rw] message_bus + # @return [::String] + # Required. The full name of the message bus to publish events to. Format: + # `projects/{project}/locations/{location}/messageBuses/{messageBus}`. + # @!attribute [rw] proto_message + # @return [::Google::Cloud::Eventarc::Publishing::V1::CloudEvent] + # The Protobuf format of the CloudEvent being published. Specification can + # be found here: + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md + # + # Note: The following fields are mutually exclusive: `proto_message`, `json_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] json_message + # @return [::String] + # The JSON format of the CloudEvent being published. Specification can be + # found here: + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md + # + # Note: The following fields are mutually exclusive: `json_message`, `proto_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] avro_message + # @return [::String] + # The Avro format of the CloudEvent being published. Specification can + # be found here: + # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md + # + # Note: The following fields are mutually exclusive: `avro_message`, `proto_message`, `json_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class PublishRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for the Publish method. + class PublishResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/Gemfile new file mode 100644 index 000000000000..094311882594 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1", path: "../" +else + gem "google-cloud-eventarc-publishing-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-eventarc-publishing-v1/snippets/publisher/publish.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish.rb new file mode 100644 index 000000000000..af1dc40abb6a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish.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 eventarcpublishing_v1_generated_Publisher_Publish_sync] +require "google/cloud/eventarc/publishing/v1" + +## +# Snippet for the publish call in the Publisher service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish. +# +def publish + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new + + # Call the publish method. + result = client.publish request + + # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishResponse. + p result +end +# [END eventarcpublishing_v1_generated_Publisher_Publish_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_channel_connection_events.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_channel_connection_events.rb new file mode 100644 index 000000000000..616772e6ed28 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_channel_connection_events.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 eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_sync] +require "google/cloud/eventarc/publishing/v1" + +## +# Snippet for the publish_channel_connection_events call in the Publisher service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish_channel_connection_events. +# +def publish_channel_connection_events + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new + + # Call the publish_channel_connection_events method. + result = client.publish_channel_connection_events request + + # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse. + p result +end +# [END eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_events.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_events.rb new file mode 100644 index 000000000000..1b36485da486 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_events.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 eventarcpublishing_v1_generated_Publisher_PublishEvents_sync] +require "google/cloud/eventarc/publishing/v1" + +## +# Snippet for the publish_events call in the Publisher service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish_events. +# +def publish_events + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new + + # Call the publish_events method. + result = client.publish_events request + + # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse. + p result +end +# [END eventarcpublishing_v1_generated_Publisher_PublishEvents_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/snippet_metadata_google.cloud.eventarc.publishing.v1.json b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/snippet_metadata_google.cloud.eventarc.publishing.v1.json new file mode 100644 index 000000000000..4ce4f1ed5454 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/snippet_metadata_google.cloud.eventarc.publishing.v1.json @@ -0,0 +1,135 @@ +{ + "client_library": { + "name": "google-cloud-eventarc-publishing-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.eventarc.publishing.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_sync", + "title": "Snippet for the publish_channel_connection_events call in the Publisher service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish_channel_connection_events.", + "file": "publisher/publish_channel_connection_events.rb", + "language": "RUBY", + "client_method": { + "short_name": "publish_channel_connection_events", + "full_name": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish_channel_connection_events", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse", + "client": { + "short_name": "Publisher::Client", + "full_name": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client" + }, + "method": { + "short_name": "PublishChannelConnectionEvents", + "full_name": "google.cloud.eventarc.publishing.v1.Publisher.PublishChannelConnectionEvents", + "service": { + "short_name": "Publisher", + "full_name": "google.cloud.eventarc.publishing.v1.Publisher" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarcpublishing_v1_generated_Publisher_PublishEvents_sync", + "title": "Snippet for the publish_events call in the Publisher service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish_events.", + "file": "publisher/publish_events.rb", + "language": "RUBY", + "client_method": { + "short_name": "publish_events", + "full_name": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish_events", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse", + "client": { + "short_name": "Publisher::Client", + "full_name": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client" + }, + "method": { + "short_name": "PublishEvents", + "full_name": "google.cloud.eventarc.publishing.v1.Publisher.PublishEvents", + "service": { + "short_name": "Publisher", + "full_name": "google.cloud.eventarc.publishing.v1.Publisher" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarcpublishing_v1_generated_Publisher_Publish_sync", + "title": "Snippet for the publish call in the Publisher service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish.", + "file": "publisher/publish.rb", + "language": "RUBY", + "client_method": { + "short_name": "publish", + "full_name": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::Publishing::V1::PublishRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::Publishing::V1::PublishResponse", + "client": { + "short_name": "Publisher::Client", + "full_name": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client" + }, + "method": { + "short_name": "Publish", + "full_name": "google.cloud.eventarc.publishing.v1.Publisher.Publish", + "service": { + "short_name": "Publisher", + "full_name": "google.cloud.eventarc.publishing.v1.Publisher" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_rest_test.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_rest_test.rb new file mode 100644 index 000000000000..11ee4f46f7e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_rest_test.rb @@ -0,0 +1,266 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/publishing/v1/publisher_pb" +require "google/cloud/eventarc/publishing/v1/publisher/rest" + + +class ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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_publish_channel_connection_events + # Create test objects. + client_result = ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + channel_connection = "hello world" + events = [{}] + text_events = ["hello world"] + + publish_channel_connection_events_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::ServiceStub.stub :transcode_publish_channel_connection_events_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, publish_channel_connection_events_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.publish_channel_connection_events({ channel_connection: channel_connection, events: events, text_events: text_events }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.publish_channel_connection_events channel_connection: channel_connection, events: events, text_events: text_events do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.publish_channel_connection_events ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new(channel_connection: channel_connection, events: events, text_events: text_events) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.publish_channel_connection_events({ channel_connection: channel_connection, events: events, text_events: text_events }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.publish_channel_connection_events(::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new(channel_connection: channel_connection, events: events, text_events: text_events), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, publish_channel_connection_events_client_stub.call_count + end + end + end + + def test_publish_events + # Create test objects. + client_result = ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + channel = "hello world" + events = [{}] + text_events = ["hello world"] + + publish_events_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::ServiceStub.stub :transcode_publish_events_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, publish_events_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.publish_events({ channel: channel, events: events, text_events: text_events }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.publish_events channel: channel, events: events, text_events: text_events do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.publish_events ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new(channel: channel, events: events, text_events: text_events) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.publish_events({ channel: channel, events: events, text_events: text_events }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.publish_events(::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new(channel: channel, events: events, text_events: text_events), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, publish_events_client_stub.call_count + end + end + end + + def test_publish + # Create test objects. + client_result = ::Google::Cloud::Eventarc::Publishing::V1::PublishResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + message_bus = "hello world" + proto_message = {} + + publish_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::ServiceStub.stub :transcode_publish_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, publish_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.publish({ message_bus: message_bus, proto_message: proto_message }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.publish message_bus: message_bus, proto_message: proto_message do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.publish ::Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new(message_bus: message_bus, proto_message: proto_message) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.publish({ message_bus: message_bus, proto_message: proto_message }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.publish(::Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new(message_bus: message_bus, proto_message: proto_message), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, publish_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::Eventarc::Publishing::V1::Publisher::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::Eventarc::Publishing::V1::Publisher::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_test.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_test.rb new file mode 100644 index 000000000000..0220d369112d --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_test.rb @@ -0,0 +1,289 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/publishing/v1/publisher_pb" +require "google/cloud/eventarc/publishing/v1/publisher" + +class ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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_publish_channel_connection_events + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + channel_connection = "hello world" + events = [{}] + text_events = ["hello world"] + + publish_channel_connection_events_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :publish_channel_connection_events, name + assert_kind_of ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest, request + assert_equal "hello world", request["channel_connection"] + assert_kind_of ::Google::Protobuf::Any, request["events"].first + assert_equal ["hello world"], request["text_events"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, publish_channel_connection_events_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.publish_channel_connection_events({ channel_connection: channel_connection, events: events, text_events: text_events }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.publish_channel_connection_events channel_connection: channel_connection, events: events, text_events: text_events do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.publish_channel_connection_events ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new(channel_connection: channel_connection, events: events, text_events: text_events) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.publish_channel_connection_events({ channel_connection: channel_connection, events: events, text_events: text_events }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.publish_channel_connection_events(::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new(channel_connection: channel_connection, events: events, text_events: text_events), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, publish_channel_connection_events_client_stub.call_rpc_count + end + end + + def test_publish_events + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + channel = "hello world" + events = [{}] + text_events = ["hello world"] + + publish_events_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :publish_events, name + assert_kind_of ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest, request + assert_equal "hello world", request["channel"] + assert_kind_of ::Google::Protobuf::Any, request["events"].first + assert_equal ["hello world"], request["text_events"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, publish_events_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.publish_events({ channel: channel, events: events, text_events: text_events }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.publish_events channel: channel, events: events, text_events: text_events do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.publish_events ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new(channel: channel, events: events, text_events: text_events) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.publish_events({ channel: channel, events: events, text_events: text_events }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.publish_events(::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new(channel: channel, events: events, text_events: text_events), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, publish_events_client_stub.call_rpc_count + end + end + + def test_publish + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::Publishing::V1::PublishResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + message_bus = "hello world" + proto_message = {} + + publish_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :publish, name + assert_kind_of ::Google::Cloud::Eventarc::Publishing::V1::PublishRequest, request + assert_equal "hello world", request["message_bus"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::Publishing::V1::CloudEvent), request["proto_message"] + assert_equal :proto_message, request.format + refute_nil options + end + + Gapic::ServiceStub.stub :new, publish_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.publish({ message_bus: message_bus, proto_message: proto_message }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.publish message_bus: message_bus, proto_message: proto_message do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.publish ::Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new(message_bus: message_bus, proto_message: proto_message) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.publish({ message_bus: message_bus, proto_message: proto_message }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.publish(::Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new(message_bus: message_bus, proto_message: proto_message), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, publish_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::Eventarc::Publishing::V1::Publisher::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::Eventarc::Publishing::V1::Publisher::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::Eventarc::Publishing::V1::Publisher::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/helper.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/.gitignore b/owl-bot-staging/google-cloud-eventarc-publishing/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/.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-eventarc-publishing/.repo-metadata.json b/owl-bot-staging/google-cloud-eventarc-publishing/.repo-metadata.json new file mode 100644 index 000000000000..2432ef244b9f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "eventarcpublishing.googleapis.com", + "api_shortname": "eventarcpublishing", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing/latest", + "distribution_name": "google-cloud-eventarc-publishing", + "is_cloud": true, + "language": "ruby", + "name": "eventarcpublishing", + "name_pretty": "Eventarc Publishing API", + "product_documentation": "https://cloud.google.com/eventarc/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution.", + "ruby-cloud-env-prefix": "EVENTARC", + "ruby-cloud-product-url": "https://cloud.google.com/eventarc/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/.rubocop.yml b/owl-bot-staging/google-cloud-eventarc-publishing/.rubocop.yml new file mode 100644 index 000000000000..a0d4941c7060 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-eventarc-publishing.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-eventarc-publishing.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/.toys.rb b/owl-bot-staging/google-cloud-eventarc-publishing/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/.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-eventarc-publishing/.yardopts b/owl-bot-staging/google-cloud-eventarc-publishing/.yardopts new file mode 100644 index 000000000000..35a2141fbd42 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Eventarc Publishing API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/AUTHENTICATION.md b/owl-bot-staging/google-cloud-eventarc-publishing/AUTHENTICATION.md new file mode 100644 index 000000000000..03c28d6b5626 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-eventarc-publishing 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-eventarc-publishing 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/eventarc/publishing" + +client = Google::Cloud::Eventarc::Publishing.publisher do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/eventarc/publishing" + +Google::Cloud::Eventarc::Publishing.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Eventarc::Publishing.publisher +``` + +### 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-eventarc-publishing +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/eventarc/publishing" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Eventarc::Publishing.publisher +``` + +### 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-eventarc-publishing/CHANGELOG.md b/owl-bot-staging/google-cloud-eventarc-publishing/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/Gemfile b/owl-bot-staging/google-cloud-eventarc-publishing/Gemfile new file mode 100644 index 000000000000..6b70c9a75da2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-eventarc-publishing-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-eventarc-publishing.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/LICENSE.md b/owl-bot-staging/google-cloud-eventarc-publishing/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/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-eventarc-publishing/README.md b/owl-bot-staging/google-cloud-eventarc-publishing/README.md new file mode 100644 index 000000000000..799c323688b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Eventarc Publishing API + +API Client library for the Eventarc Publishing API + +Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-eventarc-publishing-v*`. +The gem `google-cloud-eventarc-publishing` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing/latest) +for this library, google-cloud-eventarc-publishing, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-eventarc-publishing-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/eventarc/) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-eventarc-publishing +``` + +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/eventarcpublishing.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/eventarc/publishing" + +client = Google::Cloud::Eventarc::Publishing.publisher +request = ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new # (request fields as keyword arguments...) +response = client.publish_channel_connection_events request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-eventarc-publishing-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest). + +## 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-eventarc-publishing`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-eventarc-publishing-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-eventarc-publishing`. +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-eventarc-publishing-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-eventarc-publishing/Rakefile b/owl-bot-staging/google-cloud-eventarc-publishing/Rakefile new file mode 100644 index 000000000000..1f41914e913a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/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 = true +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-eventarc-publishing acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["EVENTARC_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["EVENTARC_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["EVENTARC_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 EVENTARC_TEST_PROJECT=test123 EVENTARC_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/eventarc/publishing/v1/publisher/credentials" + ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["EVENTARC_PROJECT"] = project + ENV["EVENTARC_TEST_PROJECT"] = project + ENV["EVENTARC_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-eventarc-publishing 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-eventarc-publishing 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-eventarc-publishing 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-eventarc-publishing gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-eventarc-publishing" + header "google-cloud-eventarc-publishing rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-eventarc-publishing yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-eventarc-publishing 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-eventarc-publishing 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-eventarc-publishing 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-eventarc-publishing/google-cloud-eventarc-publishing.gemspec b/owl-bot-staging/google-cloud-eventarc-publishing/google-cloud-eventarc-publishing.gemspec new file mode 100644 index 000000000000..8bb1beb85efe --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/google-cloud-eventarc-publishing.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/eventarc/publishing/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-eventarc-publishing" + gem.version = Google::Cloud::Eventarc::Publishing::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution." + gem.summary = "API Client library for the Eventarc Publishing API" + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-eventarc-publishing-v1", ">= 0.8", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/lib/google-cloud-eventarc-publishing.rb b/owl-bot-staging/google-cloud-eventarc-publishing/lib/google-cloud-eventarc-publishing.rb new file mode 100644 index 000000000000..39c492129bda --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/lib/google-cloud-eventarc-publishing.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/publishing" unless defined? Google::Cloud::Eventarc::Publishing::VERSION diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing.rb b/owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing.rb new file mode 100644 index 000000000000..82acf3414b8e --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing.rb @@ -0,0 +1,186 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/eventarc/publishing/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :eventarc_publishing do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Eventarc + module Publishing + ## + # Create a new client object for Publisher. + # + # By default, this returns an instance of + # [Google::Cloud::Eventarc::Publishing::V1::Publisher::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest/Google-Cloud-Eventarc-Publishing-V1-Publisher-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Publisher service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Publisher service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Eventarc::Publishing.publisher_available?}. + # + # ## About Publisher + # + # Eventarc processes events generated by an event provider and delivers them to + # a subscriber. + # + # An event provider is a software-as-a-service (SaaS) system or + # product that can generate and deliver events through Eventarc. + # + # A third-party event provider is an event provider from outside of Google. + # + # A partner is a third-party event provider that is integrated with Eventarc. + # + # A subscriber is a Google Cloud customer interested in receiving events. + # + # Channel is a first-class Eventarc resource that is created and managed + # by the subscriber in their Google Cloud project. A Channel represents a + # subscriber's intent to receive events from an event provider. A Channel is + # associated with exactly one event provider. + # + # ChannelConnection is a first-class Eventarc resource that + # is created and managed by the partner in their Google Cloud project. A + # ChannelConnection represents a connection between a partner and a + # subscriber's Channel. A ChannelConnection has a one-to-one mapping with a + # Channel. + # + # Bus is a first-class Eventarc resource that is created and managed in a + # Google Cloud project. A Bus provides a discoverable endpoint for events and + # is a router that receives all events published by event providers and + # delivers them to zero or more subscribers. + # + # Publisher allows an event provider to publish events to Eventarc. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.publisher version: :v1, transport: :grpc, &block + require "google/cloud/eventarc/publishing/#{version.to_s.downcase}" + + package_name = Google::Cloud::Eventarc::Publishing + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Eventarc::Publishing.const_get(package_name).const_get(:Publisher) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Publisher service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Eventarc::Publishing.publisher}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Publisher service, + # or if the versioned client gem needs an update to support the Publisher service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.publisher_available? version: :v1, transport: :grpc + require "google/cloud/eventarc/publishing/#{version.to_s.downcase}" + package_name = Google::Cloud::Eventarc::Publishing + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Eventarc::Publishing.const_get package_name + return false unless service_module.const_defined? :Publisher + service_module = service_module.const_get :Publisher + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-eventarc-publishing library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # 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 [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.eventarc_publishing if block_given? + + ::Google::Cloud.configure.eventarc_publishing + end + end + end + end +end + +helper_path = ::File.join __dir__, "publishing", "helpers.rb" +require "google/cloud/eventarc/publishing/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing/version.rb b/owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing/version.rb new file mode 100644 index 000000000000..3a5906949348 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing/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 Eventarc + module Publishing + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/client_test.rb b/owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/client_test.rb new file mode 100644 index 000000000000..ba529f89a494 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 "google/cloud/eventarc/publishing" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Eventarc::Publishing::ClientConstructionMinitest < 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_publisher_grpc + skip unless Google::Cloud::Eventarc::Publishing.publisher_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Eventarc::Publishing.publisher transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Eventarc::Publishing::V1::Publisher::Client, client + end + end + + def test_publisher_rest + skip unless Google::Cloud::Eventarc::Publishing.publisher_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Eventarc::Publishing.publisher transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/version_test.rb b/owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/version_test.rb new file mode 100644 index 000000000000..12c6dda057e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/version_test.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 "helper" +require "google/cloud/eventarc/publishing/version" + +class Google::Cloud::Eventarc::Publishing::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Eventarc::Publishing::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/test/helper.rb b/owl-bot-staging/google-cloud-eventarc-publishing/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-publishing/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-eventarc-v1/.gitignore b/owl-bot-staging/google-cloud-eventarc-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-eventarc-v1/.repo-metadata.json new file mode 100644 index 000000000000..565e97a76258 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "eventarc.googleapis.com", + "api_shortname": "eventarc", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest", + "distribution_name": "google-cloud-eventarc-v1", + "is_cloud": true, + "language": "ruby", + "name": "eventarc", + "name_pretty": "Eventarc V1 API", + "product_documentation": "https://cloud.google.com/eventarc/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. Note that google-cloud-eventarc-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-eventarc instead. See the readme for more details.", + "ruby-cloud-env-prefix": "EVENTARC", + "ruby-cloud-product-url": "https://cloud.google.com/eventarc/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-eventarc-v1/.rubocop.yml b/owl-bot-staging/google-cloud-eventarc-v1/.rubocop.yml new file mode 100644 index 000000000000..abf9cb09ce60 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-eventarc-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-eventarc-v1.rb" diff --git a/owl-bot-staging/google-cloud-eventarc-v1/.toys.rb b/owl-bot-staging/google-cloud-eventarc-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/.yardopts b/owl-bot-staging/google-cloud-eventarc-v1/.yardopts new file mode 100644 index 000000000000..e550b53fbd6f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Eventarc 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-eventarc-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-eventarc-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..935ba2836622 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-eventarc-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-eventarc-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/eventarc/v1" + +client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/eventarc/v1" + +::Google::Cloud::Eventarc::V1::Eventarc::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Eventarc::V1::Eventarc::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-eventarc-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/eventarc/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Eventarc::V1::Eventarc::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-eventarc-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-eventarc-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-eventarc-v1/Gemfile b/owl-bot-staging/google-cloud-eventarc-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-eventarc-v1/LICENSE.md b/owl-bot-staging/google-cloud-eventarc-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/README.md b/owl-bot-staging/google-cloud-eventarc-v1/README.md new file mode 100644 index 000000000000..7f75e675cf2c --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Eventarc V1 API + +Build event-driven applications on Google Cloud Platform. + +Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Eventarc V1 API. Most users should consider using +the main client gem, +[google-cloud-eventarc](https://rubygems.org/gems/google-cloud-eventarc). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-eventarc-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/eventarc.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/eventarc/v1" + +client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new +request = ::Google::Cloud::Eventarc::V1::GetTriggerRequest.new # (request fields as keyword arguments...) +response = client.get_trigger request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/eventarc/) +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/eventarc/v1" +require "logger" + +client = ::Google::Cloud::Eventarc::V1::Eventarc::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-eventarc`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-eventarc-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-eventarc`. +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-eventarc-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-eventarc-v1/Rakefile b/owl-bot-staging/google-cloud-eventarc-v1/Rakefile new file mode 100644 index 000000000000..bc448a6aad9f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["EVENTARC_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["EVENTARC_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["EVENTARC_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 EVENTARC_TEST_PROJECT=test123 EVENTARC_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/eventarc/v1/eventarc/credentials" + ::Google::Cloud::Eventarc::V1::Eventarc::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["EVENTARC_PROJECT"] = project + ENV["EVENTARC_TEST_PROJECT"] = project + ENV["EVENTARC_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-eventarc-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-eventarc-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-eventarc-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-eventarc-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-eventarc-v1" + header "google-cloud-eventarc-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-eventarc-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-eventarc-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-eventarc-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-eventarc-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-eventarc-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-eventarc-v1/gapic_metadata.json new file mode 100644 index 000000000000..759cf8203b1f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/gapic_metadata.json @@ -0,0 +1,213 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.eventarc.v1", + "libraryPackage": "::Google::Cloud::Eventarc::V1", + "services": { + "Eventarc": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Eventarc::V1::Eventarc::Client", + "rpcs": { + "GetTrigger": { + "methods": [ + "get_trigger" + ] + }, + "ListTriggers": { + "methods": [ + "list_triggers" + ] + }, + "CreateTrigger": { + "methods": [ + "create_trigger" + ] + }, + "UpdateTrigger": { + "methods": [ + "update_trigger" + ] + }, + "DeleteTrigger": { + "methods": [ + "delete_trigger" + ] + }, + "GetChannel": { + "methods": [ + "get_channel" + ] + }, + "ListChannels": { + "methods": [ + "list_channels" + ] + }, + "CreateChannel": { + "methods": [ + "create_channel" + ] + }, + "UpdateChannel": { + "methods": [ + "update_channel" + ] + }, + "DeleteChannel": { + "methods": [ + "delete_channel" + ] + }, + "GetProvider": { + "methods": [ + "get_provider" + ] + }, + "ListProviders": { + "methods": [ + "list_providers" + ] + }, + "GetChannelConnection": { + "methods": [ + "get_channel_connection" + ] + }, + "ListChannelConnections": { + "methods": [ + "list_channel_connections" + ] + }, + "CreateChannelConnection": { + "methods": [ + "create_channel_connection" + ] + }, + "DeleteChannelConnection": { + "methods": [ + "delete_channel_connection" + ] + }, + "GetGoogleChannelConfig": { + "methods": [ + "get_google_channel_config" + ] + }, + "UpdateGoogleChannelConfig": { + "methods": [ + "update_google_channel_config" + ] + }, + "GetMessageBus": { + "methods": [ + "get_message_bus" + ] + }, + "ListMessageBuses": { + "methods": [ + "list_message_buses" + ] + }, + "ListMessageBusEnrollments": { + "methods": [ + "list_message_bus_enrollments" + ] + }, + "CreateMessageBus": { + "methods": [ + "create_message_bus" + ] + }, + "UpdateMessageBus": { + "methods": [ + "update_message_bus" + ] + }, + "DeleteMessageBus": { + "methods": [ + "delete_message_bus" + ] + }, + "GetEnrollment": { + "methods": [ + "get_enrollment" + ] + }, + "ListEnrollments": { + "methods": [ + "list_enrollments" + ] + }, + "CreateEnrollment": { + "methods": [ + "create_enrollment" + ] + }, + "UpdateEnrollment": { + "methods": [ + "update_enrollment" + ] + }, + "DeleteEnrollment": { + "methods": [ + "delete_enrollment" + ] + }, + "GetPipeline": { + "methods": [ + "get_pipeline" + ] + }, + "ListPipelines": { + "methods": [ + "list_pipelines" + ] + }, + "CreatePipeline": { + "methods": [ + "create_pipeline" + ] + }, + "UpdatePipeline": { + "methods": [ + "update_pipeline" + ] + }, + "DeletePipeline": { + "methods": [ + "delete_pipeline" + ] + }, + "GetGoogleApiSource": { + "methods": [ + "get_google_api_source" + ] + }, + "ListGoogleApiSources": { + "methods": [ + "list_google_api_sources" + ] + }, + "CreateGoogleApiSource": { + "methods": [ + "create_google_api_source" + ] + }, + "UpdateGoogleApiSource": { + "methods": [ + "update_google_api_source" + ] + }, + "DeleteGoogleApiSource": { + "methods": [ + "delete_google_api_source" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-eventarc-v1/google-cloud-eventarc-v1.gemspec b/owl-bot-staging/google-cloud-eventarc-v1/google-cloud-eventarc-v1.gemspec new file mode 100644 index 000000000000..88e91d7a851a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/google-cloud-eventarc-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/eventarc/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-eventarc-v1" + gem.version = Google::Cloud::Eventarc::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. Note that google-cloud-eventarc-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-eventarc instead. See the readme for more details." + gem.summary = "Build event-driven applications on Google Cloud Platform." + 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.1" + + 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-eventarc-v1/lib/google-cloud-eventarc-v1.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google-cloud-eventarc-v1.rb new file mode 100644 index 000000000000..865ac816d268 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google-cloud-eventarc-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/eventarc/v1" diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1.rb new file mode 100644 index 000000000000..c10cd884460d --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1.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/eventarc/v1/eventarc" +require "google/cloud/eventarc/v1/version" + +module Google + module Cloud + module Eventarc + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/eventarc/v1" + # client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/eventarc/v1" + # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/eventarc/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/bindings_override.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/bindings_override.rb new file mode 100644 index 000000000000..955210ffd48a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/bindings_override.rb @@ -0,0 +1,276 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Eventarc + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/eventarc/v1/rest" + # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Eventarc"] + 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/[^/]+/triggers/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/kafkaSources/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, 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/[^/]+/triggers/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/kafkaSources/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, 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/[^/]+/triggers/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/kafkaSources/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_connection_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_connection_pb.rb new file mode 100644 index 000000000000..3ba7d0551de8 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_connection_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/eventarc/v1/channel_connection.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n1google/cloud/eventarc/v1/channel_connection.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa4\x04\n\x11\x43hannelConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x38\n\x07\x63hannel\x18\x05 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Channel\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\x12\x1d\n\x10\x61\x63tivation_token\x18\x08 \x01(\tB\x03\xe0\x41\x04\x12L\n\x06labels\x18\t \x03(\x0b\x32\x37.google.cloud.eventarc.v1.ChannelConnection.LabelsEntryB\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:\xa7\x01\xea\x41\xa3\x01\n)eventarc.googleapis.com/ChannelConnection\x12Oprojects/{project}/locations/{location}/channelConnections/{channel_connection}*\x12\x63hannelConnections2\x11\x63hannelConnectionB\xc6\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x16\x43hannelConnectionProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Eventarc + module V1 + ChannelConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ChannelConnection").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_pb.rb new file mode 100644 index 000000000000..1f27d9bc928e --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_pb.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/eventarc/v1/channel.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/eventarc/v1/channel.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc1\x05\n\x07\x43hannel\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\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\x10\n\x08provider\x18\x07 \x01(\t\x12\x1b\n\x0cpubsub_topic\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x00\x12;\n\x05state\x18\t \x01(\x0e\x32\'.google.cloud.eventarc.v1.Channel.StateB\x03\xe0\x41\x03\x12\x1d\n\x10\x61\x63tivation_token\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x0f\x63rypto_key_name\x18\x0b \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x1a\n\rsatisfies_pzs\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\x12\x42\n\x06labels\x18\r \x03(\x0b\x32-.google.cloud.eventarc.v1.Channel.LabelsEntryB\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\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08INACTIVE\x10\x03:s\xea\x41p\n\x1f\x65ventarc.googleapis.com/Channel\x12:projects/{project}/locations/{location}/channels/{channel}*\x08\x63hannels2\x07\x63hannelB\x0b\n\ttransportB\xbc\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x0c\x43hannelProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Eventarc + module V1 + Channel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.Channel").msgclass + Channel::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.Channel.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/discovery_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/discovery_pb.rb new file mode 100644 index 000000000000..8392d17fa96e --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/discovery_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/eventarc/v1/discovery.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n(google/cloud/eventarc/v1/discovery.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf1\x01\n\x08Provider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x0b\x65vent_types\x18\x03 \x03(\x0b\x32#.google.cloud.eventarc.v1.EventTypeB\x03\xe0\x41\x03:x\xea\x41u\n eventarc.googleapis.com/Provider\x12 e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # List triggers. + # + # @overload list_triggers(request, options = nil) + # Pass arguments to `list_triggers` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListTriggersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListTriggersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_triggers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_triggers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection to list triggers on. + # @param page_size [::Integer] + # The maximum number of triggers to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # The page token; provide the value from the `next_page_token` field in a + # previous `ListTriggers` call to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListTriggers` must match + # the call that provided the page token. + # @param order_by [::String] + # The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, trigger_id`. + # @param filter [::String] + # Filter field. Used to filter the Triggers to be listed. Possible filters + # are described in https://google.aip.dev/160. For example, using + # "?filter=destination:gke" would list only Triggers with a gke destination. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Trigger>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Trigger>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListTriggersRequest.new + # + # # Call the list_triggers method. + # result = client.list_triggers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::Trigger. + # p item + # end + # + def list_triggers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListTriggersRequest + + # Converts hash and nil to 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_triggers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_triggers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_triggers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :list_triggers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_triggers, 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 new trigger in a particular project and location. + # + # @overload create_trigger(request, options = nil) + # Pass arguments to `create_trigger` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreateTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreateTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trigger(parent: nil, trigger: nil, trigger_id: nil, validate_only: nil) + # Pass arguments to `create_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this trigger. + # @param trigger [::Google::Cloud::Eventarc::V1::Trigger, ::Hash] + # Required. The trigger to create. + # @param trigger_id [::String] + # Required. The user-provided ID to be assigned to the trigger. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreateTriggerRequest.new + # + # # Call the create_trigger method. + # result = client.create_trigger request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateTriggerRequest + + # Converts hash and nil to 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_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :create_trigger, 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 a single trigger. + # + # @overload update_trigger(request, options = nil) + # Pass arguments to `update_trigger` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdateTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdateTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trigger(trigger: nil, update_mask: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param trigger [::Google::Cloud::Eventarc::V1::Trigger, ::Hash] + # The trigger to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The fields to be updated; only fields explicitly provided are updated. + # If no field mask is provided, all provided fields in the request are + # updated. To update all fields, provide a field mask of "*". + # @param allow_missing [::Boolean] + # If set to true, and the trigger is not found, a new trigger will be + # created. In this situation, `update_mask` is ignored. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new + # + # # Call the update_trigger method. + # result = client.update_trigger request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateTriggerRequest + + # Converts hash and nil to 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_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.trigger&.name + header_params["trigger.name"] = request.trigger.name + end + + request_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_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :update_trigger, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single trigger. + # + # @overload delete_trigger(request, options = nil) + # Pass arguments to `delete_trigger` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeleteTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeleteTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_trigger(name: nil, etag: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `delete_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 trigger to be deleted. + # @param etag [::String] + # If provided, the trigger will only be deleted if the etag matches the + # current etag on the resource. + # @param allow_missing [::Boolean] + # If set to true, and the trigger is not found, the request will succeed + # but no action will be taken on the server. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new + # + # # Call the delete_trigger method. + # result = client.delete_trigger request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteTriggerRequest + + # Converts hash and nil to 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_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_trigger.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :delete_trigger, 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 + + ## + # Get a single Channel. + # + # @overload get_channel(request, options = nil) + # Pass arguments to `get_channel` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_channel(name: nil) + # Pass arguments to `get_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 channel to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Eventarc::V1::Channel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Eventarc::V1::Channel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetChannelRequest.new + # + # # Call the get_channel method. + # result = client.get_channel request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::Channel. + # p result + # + def get_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetChannelRequest + + # Converts hash and nil to 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_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :get_channel, 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 channels. + # + # @overload list_channels(request, options = nil) + # Pass arguments to `list_channels` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListChannelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListChannelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_channels(parent: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_channels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection to list channels on. + # @param page_size [::Integer] + # The maximum number of channels to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # The page token; provide the value from the `next_page_token` field in a + # previous `ListChannels` call to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListChannels` must + # match the call that provided the page token. + # @param order_by [::String] + # The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, channel_id`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListChannelsRequest.new + # + # # Call the list_channels method. + # result = client.list_channels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::Channel. + # p item + # end + # + def list_channels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListChannelsRequest + + # Converts hash and nil to 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_channels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_channels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_channels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :list_channels, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_channels, 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 new channel in a particular project and location. + # + # @overload create_channel(request, options = nil) + # Pass arguments to `create_channel` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreateChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreateChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_channel(parent: nil, channel: nil, channel_id: nil, validate_only: nil) + # Pass arguments to `create_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this channel. + # @param channel [::Google::Cloud::Eventarc::V1::Channel, ::Hash] + # Required. The channel to create. + # @param channel_id [::String] + # Required. The user-provided ID to be assigned to the channel. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreateChannelRequest.new + # + # # Call the create_channel method. + # result = client.create_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateChannelRequest + + # Converts hash and nil to 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_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :create_channel, 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 a single channel. + # + # @overload update_channel(request, options = nil) + # Pass arguments to `update_channel` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdateChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdateChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_channel(channel: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param channel [::Google::Cloud::Eventarc::V1::Channel, ::Hash] + # The channel to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The fields to be updated; only fields explicitly provided are updated. + # If no field mask is provided, all provided fields in the request are + # updated. To update all fields, provide a field mask of "*". + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdateChannelRequest.new + # + # # Call the update_channel method. + # result = client.update_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateChannelRequest + + # Converts hash and nil to 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_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.channel&.name + header_params["channel.name"] = request.channel.name + end + + request_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_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :update_channel, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single channel. + # + # @overload delete_channel(request, options = nil) + # Pass arguments to `delete_channel` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeleteChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeleteChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_channel(name: nil, validate_only: nil) + # Pass arguments to `delete_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 channel to be deleted. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeleteChannelRequest.new + # + # # Call the delete_channel method. + # result = client.delete_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteChannelRequest + + # Converts hash and nil to 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_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :delete_channel, 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 + + ## + # Get a single Provider. + # + # @overload get_provider(request, options = nil) + # Pass arguments to `get_provider` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetProviderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetProviderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_provider(name: nil) + # Pass arguments to `get_provider` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 provider to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Eventarc::V1::Provider] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Eventarc::V1::Provider] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetProviderRequest.new + # + # # Call the get_provider method. + # result = client.get_provider request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::Provider. + # p result + # + def get_provider request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetProviderRequest + + # Converts hash and nil to 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_provider.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_provider.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_provider.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :get_provider, 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 providers. + # + # @overload list_providers(request, options = nil) + # Pass arguments to `list_providers` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListProvidersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListProvidersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_providers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_providers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the provider to get. + # @param page_size [::Integer] + # The maximum number of providers to return on each page. + # @param page_token [::String] + # The page token; provide the value from the `next_page_token` field in a + # previous `ListProviders` call to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProviders` must + # match the call that provided the page token. + # @param order_by [::String] + # The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting oder is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, _id`. + # @param filter [::String] + # The filter field that the list request will filter on. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Provider>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Provider>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListProvidersRequest.new + # + # # Call the list_providers method. + # result = client.list_providers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::Provider. + # p item + # end + # + def list_providers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListProvidersRequest + + # Converts hash and nil to 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_providers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_providers.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_providers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :list_providers, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_providers, 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 a single ChannelConnection. + # + # @overload get_channel_connection(request, options = nil) + # Pass arguments to `get_channel_connection` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_channel_connection(name: nil) + # Pass arguments to `get_channel_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 channel connection to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Eventarc::V1::ChannelConnection] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Eventarc::V1::ChannelConnection] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new + # + # # Call the get_channel_connection method. + # result = client.get_channel_connection request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::ChannelConnection. + # p result + # + def get_channel_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest + + # Converts hash and nil to 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_channel_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_channel_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_channel_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :get_channel_connection, 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 channel connections. + # + # @overload list_channel_connections(request, options = nil) + # Pass arguments to `list_channel_connections` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_channel_connections(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_channel_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection from which to list channel connections. + # @param page_size [::Integer] + # The maximum number of channel connections to return on each page. + # + # Note: The service may send fewer responses. + # @param page_token [::String] + # The page token; provide the value from the `next_page_token` field in a + # previous `ListChannelConnections` call to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListChannelConnetions` + # 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::Eventarc::V1::ChannelConnection>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::ChannelConnection>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.new + # + # # Call the list_channel_connections method. + # result = client.list_channel_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::ChannelConnection. + # p item + # end + # + def list_channel_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest + + # Converts hash and nil to 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_channel_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_channel_connections.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_channel_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :list_channel_connections, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_channel_connections, 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 new ChannelConnection in a particular project and location. + # + # @overload create_channel_connection(request, options = nil) + # Pass arguments to `create_channel_connection` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_channel_connection(parent: nil, channel_connection: nil, channel_connection_id: nil) + # Pass arguments to `create_channel_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this channel connection. + # @param channel_connection [::Google::Cloud::Eventarc::V1::ChannelConnection, ::Hash] + # Required. Channel connection to create. + # @param channel_connection_id [::String] + # Required. The user-provided ID to be assigned to the channel connection. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new + # + # # Call the create_channel_connection method. + # result = client.create_channel_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_channel_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest + + # Converts hash and nil to 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_channel_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_channel_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_channel_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :create_channel_connection, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single ChannelConnection. + # + # @overload delete_channel_connection(request, options = nil) + # Pass arguments to `delete_channel_connection` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_channel_connection(name: nil) + # Pass arguments to `delete_channel_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 channel connection to delete. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.new + # + # # Call the delete_channel_connection method. + # result = client.delete_channel_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_channel_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest + + # Converts hash and nil to 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_channel_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_channel_connection.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_channel_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :delete_channel_connection, 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 + + ## + # Get a GoogleChannelConfig. + # The name of the GoogleChannelConfig in the response is ALWAYS coded with + # projectID. + # + # @overload get_google_channel_config(request, options = nil) + # Pass arguments to `get_google_channel_config` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_google_channel_config(name: nil) + # Pass arguments to `get_google_channel_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 config to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new + # + # # Call the get_google_channel_config method. + # result = client.get_google_channel_config request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig. + # p result + # + def get_google_channel_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest + + # Converts hash and nil to 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_google_channel_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::Eventarc::V1::VERSION + metadata[:"x-goog-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_google_channel_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_google_channel_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :get_google_channel_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 + + ## + # Update a single GoogleChannelConfig + # + # @overload update_google_channel_config(request, options = nil) + # Pass arguments to `update_google_channel_config` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_google_channel_config(google_channel_config: nil, update_mask: nil) + # Pass arguments to `update_google_channel_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 google_channel_config [::Google::Cloud::Eventarc::V1::GoogleChannelConfig, ::Hash] + # Required. The config to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The fields to be updated; only fields explicitly provided are updated. + # If no field mask is provided, all provided fields in the request are + # updated. To update all fields, provide a field mask of "*". + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new + # + # # Call the update_google_channel_config method. + # result = client.update_google_channel_config request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig. + # p result + # + def update_google_channel_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest + + # Converts hash and nil to 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_google_channel_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::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.google_channel_config&.name + header_params["google_channel_config.name"] = request.google_channel_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_google_channel_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_google_channel_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :update_google_channel_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 + + ## + # Get a single MessageBus. + # + # @overload get_message_bus(request, options = nil) + # Pass arguments to `get_message_bus` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetMessageBusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetMessageBusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_message_bus(name: nil) + # Pass arguments to `get_message_bus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 message bus to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Eventarc::V1::MessageBus] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Eventarc::V1::MessageBus] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetMessageBusRequest.new + # + # # Call the get_message_bus method. + # result = client.get_message_bus request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::MessageBus. + # p result + # + def get_message_bus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetMessageBusRequest + + # Converts hash and nil to 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_message_bus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_message_bus.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_message_bus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :get_message_bus, 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 message buses. + # + # @overload list_message_buses(request, options = nil) + # Pass arguments to `list_message_buses` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListMessageBusesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListMessageBusesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_message_buses(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_message_buses` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection to list message buses on. + # @param page_size [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # @param order_by [::String] + # Optional. The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, update_time`. + # @param filter [::String] + # Optional. The filter field that the list request will filter on. + # Possible filtersare described in https://google.aip.dev/160. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new + # + # # Call the list_message_buses method. + # result = client.list_message_buses request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::MessageBus. + # p item + # end + # + def list_message_buses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest + + # Converts hash and nil to 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_message_buses.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_message_buses.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_message_buses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :list_message_buses, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_message_buses, 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 + + ## + # List message bus enrollments. + # + # @overload list_message_bus_enrollments(request, options = nil) + # Pass arguments to `list_message_bus_enrollments` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_message_bus_enrollments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_message_bus_enrollments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 message bus to list enrollments on. + # @param page_size [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.new + # + # # Call the list_message_bus_enrollments method. + # result = client.list_message_bus_enrollments request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse. + # p result + # + def list_message_bus_enrollments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest + + # Converts hash and nil to 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_message_bus_enrollments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_message_bus_enrollments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_message_bus_enrollments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :list_message_bus_enrollments, 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 new MessageBus in a particular project and location. + # + # @overload create_message_bus(request, options = nil) + # Pass arguments to `create_message_bus` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreateMessageBusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreateMessageBusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_message_bus(parent: nil, message_bus: nil, message_bus_id: nil, validate_only: nil) + # Pass arguments to `create_message_bus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this message bus. + # @param message_bus [::Google::Cloud::Eventarc::V1::MessageBus, ::Hash] + # Required. The message bus to create. + # @param message_bus_id [::String] + # Required. The user-provided ID to be assigned to the MessageBus. It should + # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new + # + # # Call the create_message_bus method. + # result = client.create_message_bus request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_message_bus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest + + # Converts hash and nil to 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_message_bus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_message_bus.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_message_bus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :create_message_bus, 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 a single message bus. + # + # @overload update_message_bus(request, options = nil) + # Pass arguments to `update_message_bus` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_message_bus(message_bus: nil, update_mask: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_message_bus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param message_bus [::Google::Cloud::Eventarc::V1::MessageBus, ::Hash] + # Required. The MessageBus to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The fields to be updated; only fields explicitly provided are + # updated. If no field mask is provided, all provided fields in the request + # are updated. To update all fields, provide a field mask of "*". + # @param allow_missing [::Boolean] + # Optional. If set to true, and the MessageBus is not found, a new MessageBus + # will be created. In this situation, `update_mask` is ignored. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new + # + # # Call the update_message_bus method. + # result = client.update_message_bus request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_message_bus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest + + # Converts hash and nil to 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_message_bus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.message_bus&.name + header_params["message_bus.name"] = request.message_bus.name + end + + request_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_message_bus.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_message_bus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :update_message_bus, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single message bus. + # + # @overload delete_message_bus(request, options = nil) + # Pass arguments to `delete_message_bus` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_message_bus(name: nil, etag: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `delete_message_bus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 MessageBus to be deleted. + # @param etag [::String] + # Optional. If provided, the MessageBus will only be deleted if the etag + # matches the current etag on the resource. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the MessageBus is not found, the request will + # succeed but no action will be taken on the server. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new + # + # # Call the delete_message_bus method. + # result = client.delete_message_bus request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_message_bus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest + + # Converts hash and nil to 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_message_bus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_message_bus.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_message_bus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :delete_message_bus, 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 + + ## + # Get a single Enrollment. + # + # @overload get_enrollment(request, options = nil) + # Pass arguments to `get_enrollment` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetEnrollmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetEnrollmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_enrollment(name: nil) + # Pass arguments to `get_enrollment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Enrollment to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Eventarc::V1::Enrollment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Eventarc::V1::Enrollment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new + # + # # Call the get_enrollment method. + # result = client.get_enrollment request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::Enrollment. + # p result + # + def get_enrollment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest + + # Converts hash and nil to 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_enrollment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_enrollment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_enrollment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :get_enrollment, 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 Enrollments. + # + # @overload list_enrollments(request, options = nil) + # Pass arguments to `list_enrollments` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_enrollments(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_enrollments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection to list triggers on. + # @param page_size [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # @param order_by [::String] + # Optional. The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, update_time`. + # @param filter [::String] + # Optional. The filter field that the list request will filter on. + # Possible filtersare described in https://google.aip.dev/160. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new + # + # # Call the list_enrollments method. + # result = client.list_enrollments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::Enrollment. + # p item + # end + # + def list_enrollments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest + + # Converts hash and nil to 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_enrollments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_enrollments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_enrollments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :list_enrollments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_enrollments, 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 new Enrollment in a particular project and location. + # + # @overload create_enrollment(request, options = nil) + # Pass arguments to `create_enrollment` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_enrollment(parent: nil, enrollment: nil, enrollment_id: nil, validate_only: nil) + # Pass arguments to `create_enrollment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this enrollment. + # @param enrollment [::Google::Cloud::Eventarc::V1::Enrollment, ::Hash] + # Required. The enrollment to create. + # @param enrollment_id [::String] + # Required. The user-provided ID to be assigned to the Enrollment. It should + # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new + # + # # Call the create_enrollment method. + # result = client.create_enrollment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_enrollment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest + + # Converts hash and nil to 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_enrollment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_enrollment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_enrollment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :create_enrollment, 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 a single Enrollment. + # + # @overload update_enrollment(request, options = nil) + # Pass arguments to `update_enrollment` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_enrollment(enrollment: nil, update_mask: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_enrollment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param enrollment [::Google::Cloud::Eventarc::V1::Enrollment, ::Hash] + # Required. The Enrollment to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The fields to be updated; only fields explicitly provided are + # updated. If no field mask is provided, all provided fields in the request + # are updated. To update all fields, provide a field mask of "*". + # @param allow_missing [::Boolean] + # Optional. If set to true, and the Enrollment is not found, a new Enrollment + # will be created. In this situation, `update_mask` is ignored. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new + # + # # Call the update_enrollment method. + # result = client.update_enrollment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_enrollment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest + + # Converts hash and nil to 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_enrollment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.enrollment&.name + header_params["enrollment.name"] = request.enrollment.name + end + + request_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_enrollment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_enrollment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :update_enrollment, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single Enrollment. + # + # @overload delete_enrollment(request, options = nil) + # Pass arguments to `delete_enrollment` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_enrollment(name: nil, etag: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `delete_enrollment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Enrollment to be deleted. + # @param etag [::String] + # Optional. If provided, the Enrollment will only be deleted if the etag + # matches the current etag on the resource. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the Enrollment is not found, the request will + # succeed but no action will be taken on the server. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new + # + # # Call the delete_enrollment method. + # result = client.delete_enrollment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_enrollment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest + + # Converts hash and nil to 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_enrollment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_enrollment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_enrollment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :delete_enrollment, 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 + + ## + # Get a single Pipeline. + # + # @overload get_pipeline(request, options = nil) + # Pass arguments to `get_pipeline` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetPipelineRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetPipelineRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_pipeline(name: nil) + # Pass arguments to `get_pipeline` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 pipeline to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Eventarc::V1::Pipeline] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Eventarc::V1::Pipeline] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetPipelineRequest.new + # + # # Call the get_pipeline method. + # result = client.get_pipeline request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::Pipeline. + # p result + # + def get_pipeline request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetPipelineRequest + + # Converts hash and nil to 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_pipeline.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_pipeline.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_pipeline.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :get_pipeline, 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 pipelines. + # + # @overload list_pipelines(request, options = nil) + # Pass arguments to `list_pipelines` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListPipelinesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListPipelinesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_pipelines(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_pipelines` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection to list pipelines on. + # @param page_size [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # @param order_by [::String] + # Optional. The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, update_time`. + # @param filter [::String] + # Optional. The filter field that the list request will filter on. + # Possible filters are described in https://google.aip.dev/160. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListPipelinesRequest.new + # + # # Call the list_pipelines method. + # result = client.list_pipelines request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::Pipeline. + # p item + # end + # + def list_pipelines request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListPipelinesRequest + + # Converts hash and nil to 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_pipelines.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_pipelines.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_pipelines.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :list_pipelines, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_pipelines, 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 new Pipeline in a particular project and location. + # + # @overload create_pipeline(request, options = nil) + # Pass arguments to `create_pipeline` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreatePipelineRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreatePipelineRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_pipeline(parent: nil, pipeline: nil, pipeline_id: nil, validate_only: nil) + # Pass arguments to `create_pipeline` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this pipeline. + # @param pipeline [::Google::Cloud::Eventarc::V1::Pipeline, ::Hash] + # Required. The pipeline to create. + # @param pipeline_id [::String] + # Required. The user-provided ID to be assigned to the Pipeline. It should + # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreatePipelineRequest.new + # + # # Call the create_pipeline method. + # result = client.create_pipeline request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_pipeline request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreatePipelineRequest + + # Converts hash and nil to 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_pipeline.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_pipeline.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_pipeline.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :create_pipeline, 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 a single pipeline. + # + # @overload update_pipeline(request, options = nil) + # Pass arguments to `update_pipeline` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdatePipelineRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdatePipelineRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_pipeline(pipeline: nil, update_mask: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_pipeline` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param pipeline [::Google::Cloud::Eventarc::V1::Pipeline, ::Hash] + # Required. The Pipeline to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The fields to be updated; only fields explicitly provided are + # updated. If no field mask is provided, all provided fields in the request + # are updated. To update all fields, provide a field mask of "*". + # @param allow_missing [::Boolean] + # Optional. If set to true, and the Pipeline is not found, a new Pipeline + # will be created. In this situation, `update_mask` is ignored. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new + # + # # Call the update_pipeline method. + # result = client.update_pipeline request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_pipeline request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest + + # Converts hash and nil to 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_pipeline.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.pipeline&.name + header_params["pipeline.name"] = request.pipeline.name + end + + request_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_pipeline.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_pipeline.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :update_pipeline, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single pipeline. + # + # @overload delete_pipeline(request, options = nil) + # Pass arguments to `delete_pipeline` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeletePipelineRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeletePipelineRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_pipeline(name: nil, etag: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `delete_pipeline` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Pipeline to be deleted. + # @param etag [::String] + # Optional. If provided, the Pipeline will only be deleted if the etag + # matches the current etag on the resource. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the Pipeline is not found, the request will + # succeed but no action will be taken on the server. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeletePipelineRequest.new + # + # # Call the delete_pipeline method. + # result = client.delete_pipeline request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_pipeline request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeletePipelineRequest + + # Converts hash and nil to 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_pipeline.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_pipeline.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_pipeline.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :delete_pipeline, 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 + + ## + # Get a single GoogleApiSource. + # + # @overload get_google_api_source(request, options = nil) + # Pass arguments to `get_google_api_source` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_google_api_source(name: nil) + # Pass arguments to `get_google_api_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 google api source to get. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Eventarc::V1::GoogleApiSource] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new + # + # # Call the get_google_api_source method. + # result = client.get_google_api_source request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleApiSource. + # p result + # + def get_google_api_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest + + # Converts hash and nil to 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_google_api_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_google_api_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_google_api_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :get_google_api_source, 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 GoogleApiSources. + # + # @overload list_google_api_sources(request, options = nil) + # Pass arguments to `list_google_api_sources` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_google_api_sources(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_google_api_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection to list GoogleApiSources on. + # @param page_size [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # @param order_by [::String] + # Optional. The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, update_time`. + # @param filter [::String] + # Optional. The filter field that the list request will filter on. + # Possible filtersare described in https://google.aip.dev/160. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new + # + # # Call the list_google_api_sources method. + # result = client.list_google_api_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::GoogleApiSource. + # p item + # end + # + def list_google_api_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest + + # Converts hash and nil to 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_google_api_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_google_api_sources.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_google_api_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :list_google_api_sources, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_google_api_sources, 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 new GoogleApiSource in a particular project and location. + # + # @overload create_google_api_source(request, options = nil) + # Pass arguments to `create_google_api_source` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_google_api_source(parent: nil, google_api_source: nil, google_api_source_id: nil, validate_only: nil) + # Pass arguments to `create_google_api_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this google api source. + # @param google_api_source [::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash] + # Required. The google api source to create. + # @param google_api_source_id [::String] + # Required. The user-provided ID to be assigned to the GoogleApiSource. It + # should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new + # + # # Call the create_google_api_source method. + # result = client.create_google_api_source request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_google_api_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest + + # Converts hash and nil to 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_google_api_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_google_api_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_google_api_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :create_google_api_source, 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 a single GoogleApiSource. + # + # @overload update_google_api_source(request, options = nil) + # Pass arguments to `update_google_api_source` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_google_api_source(google_api_source: nil, update_mask: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_google_api_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param google_api_source [::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash] + # Required. The GoogleApiSource to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The fields to be updated; only fields explicitly provided are + # updated. If no field mask is provided, all provided fields in the request + # are updated. To update all fields, provide a field mask of "*". + # @param allow_missing [::Boolean] + # Optional. If set to true, and the GoogleApiSource is not found, a new + # GoogleApiSource will be created. In this situation, `update_mask` is + # ignored. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new + # + # # Call the update_google_api_source method. + # result = client.update_google_api_source request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_google_api_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest + + # Converts hash and nil to 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_google_api_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.google_api_source&.name + header_params["google_api_source.name"] = request.google_api_source.name + end + + request_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_google_api_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_google_api_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :update_google_api_source, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single GoogleApiSource. + # + # @overload delete_google_api_source(request, options = nil) + # Pass arguments to `delete_google_api_source` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_google_api_source(name: nil, etag: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `delete_google_api_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 GoogleApiSource to be deleted. + # @param etag [::String] + # Optional. If provided, the MessageBus will only be deleted if the etag + # matches the current etag on the resource. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the MessageBus is not found, the request will + # succeed but no action will be taken on the server. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new + # + # # Call the delete_google_api_source method. + # result = client.delete_google_api_source request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_google_api_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest + + # Converts hash and nil to 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_google_api_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION + metadata[:"x-goog-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_google_api_source.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_google_api_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.call_rpc :delete_google_api_source, 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 Eventarc API. + # + # This class represents the configuration for Eventarc, + # 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::Eventarc::V1::Eventarc::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 + # # get_trigger to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Eventarc::V1::Eventarc::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_trigger.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_trigger.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::Eventarc::V1::Eventarc::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 = "eventarc.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 Eventarc 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 `get_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :get_trigger + ## + # RPC-specific configuration for `list_triggers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_triggers + ## + # RPC-specific configuration for `create_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :create_trigger + ## + # RPC-specific configuration for `update_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :update_trigger + ## + # RPC-specific configuration for `delete_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_trigger + ## + # RPC-specific configuration for `get_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :get_channel + ## + # RPC-specific configuration for `list_channels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_channels + ## + # RPC-specific configuration for `create_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :create_channel + ## + # RPC-specific configuration for `update_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :update_channel + ## + # RPC-specific configuration for `delete_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_channel + ## + # RPC-specific configuration for `get_provider` + # @return [::Gapic::Config::Method] + # + attr_reader :get_provider + ## + # RPC-specific configuration for `list_providers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_providers + ## + # RPC-specific configuration for `get_channel_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :get_channel_connection + ## + # RPC-specific configuration for `list_channel_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_channel_connections + ## + # RPC-specific configuration for `create_channel_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :create_channel_connection + ## + # RPC-specific configuration for `delete_channel_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_channel_connection + ## + # RPC-specific configuration for `get_google_channel_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_google_channel_config + ## + # RPC-specific configuration for `update_google_channel_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_google_channel_config + ## + # RPC-specific configuration for `get_message_bus` + # @return [::Gapic::Config::Method] + # + attr_reader :get_message_bus + ## + # RPC-specific configuration for `list_message_buses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_message_buses + ## + # RPC-specific configuration for `list_message_bus_enrollments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_message_bus_enrollments + ## + # RPC-specific configuration for `create_message_bus` + # @return [::Gapic::Config::Method] + # + attr_reader :create_message_bus + ## + # RPC-specific configuration for `update_message_bus` + # @return [::Gapic::Config::Method] + # + attr_reader :update_message_bus + ## + # RPC-specific configuration for `delete_message_bus` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_message_bus + ## + # RPC-specific configuration for `get_enrollment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_enrollment + ## + # RPC-specific configuration for `list_enrollments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_enrollments + ## + # RPC-specific configuration for `create_enrollment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_enrollment + ## + # RPC-specific configuration for `update_enrollment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_enrollment + ## + # RPC-specific configuration for `delete_enrollment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_enrollment + ## + # RPC-specific configuration for `get_pipeline` + # @return [::Gapic::Config::Method] + # + attr_reader :get_pipeline + ## + # RPC-specific configuration for `list_pipelines` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pipelines + ## + # RPC-specific configuration for `create_pipeline` + # @return [::Gapic::Config::Method] + # + attr_reader :create_pipeline + ## + # RPC-specific configuration for `update_pipeline` + # @return [::Gapic::Config::Method] + # + attr_reader :update_pipeline + ## + # RPC-specific configuration for `delete_pipeline` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_pipeline + ## + # RPC-specific configuration for `get_google_api_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_google_api_source + ## + # RPC-specific configuration for `list_google_api_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_google_api_sources + ## + # RPC-specific configuration for `create_google_api_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_google_api_source + ## + # RPC-specific configuration for `update_google_api_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_google_api_source + ## + # RPC-specific configuration for `delete_google_api_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_google_api_source + + # @private + def initialize parent_rpcs = nil + get_trigger_config = parent_rpcs.get_trigger if parent_rpcs.respond_to? :get_trigger + @get_trigger = ::Gapic::Config::Method.new get_trigger_config + list_triggers_config = parent_rpcs.list_triggers if parent_rpcs.respond_to? :list_triggers + @list_triggers = ::Gapic::Config::Method.new list_triggers_config + create_trigger_config = parent_rpcs.create_trigger if parent_rpcs.respond_to? :create_trigger + @create_trigger = ::Gapic::Config::Method.new create_trigger_config + update_trigger_config = parent_rpcs.update_trigger if parent_rpcs.respond_to? :update_trigger + @update_trigger = ::Gapic::Config::Method.new update_trigger_config + delete_trigger_config = parent_rpcs.delete_trigger if parent_rpcs.respond_to? :delete_trigger + @delete_trigger = ::Gapic::Config::Method.new delete_trigger_config + get_channel_config = parent_rpcs.get_channel if parent_rpcs.respond_to? :get_channel + @get_channel = ::Gapic::Config::Method.new get_channel_config + list_channels_config = parent_rpcs.list_channels if parent_rpcs.respond_to? :list_channels + @list_channels = ::Gapic::Config::Method.new list_channels_config + create_channel_config = parent_rpcs.create_channel if parent_rpcs.respond_to? :create_channel + @create_channel = ::Gapic::Config::Method.new create_channel_config + update_channel_config = parent_rpcs.update_channel if parent_rpcs.respond_to? :update_channel + @update_channel = ::Gapic::Config::Method.new update_channel_config + delete_channel_config = parent_rpcs.delete_channel if parent_rpcs.respond_to? :delete_channel + @delete_channel = ::Gapic::Config::Method.new delete_channel_config + get_provider_config = parent_rpcs.get_provider if parent_rpcs.respond_to? :get_provider + @get_provider = ::Gapic::Config::Method.new get_provider_config + list_providers_config = parent_rpcs.list_providers if parent_rpcs.respond_to? :list_providers + @list_providers = ::Gapic::Config::Method.new list_providers_config + get_channel_connection_config = parent_rpcs.get_channel_connection if parent_rpcs.respond_to? :get_channel_connection + @get_channel_connection = ::Gapic::Config::Method.new get_channel_connection_config + list_channel_connections_config = parent_rpcs.list_channel_connections if parent_rpcs.respond_to? :list_channel_connections + @list_channel_connections = ::Gapic::Config::Method.new list_channel_connections_config + create_channel_connection_config = parent_rpcs.create_channel_connection if parent_rpcs.respond_to? :create_channel_connection + @create_channel_connection = ::Gapic::Config::Method.new create_channel_connection_config + delete_channel_connection_config = parent_rpcs.delete_channel_connection if parent_rpcs.respond_to? :delete_channel_connection + @delete_channel_connection = ::Gapic::Config::Method.new delete_channel_connection_config + get_google_channel_config_config = parent_rpcs.get_google_channel_config if parent_rpcs.respond_to? :get_google_channel_config + @get_google_channel_config = ::Gapic::Config::Method.new get_google_channel_config_config + update_google_channel_config_config = parent_rpcs.update_google_channel_config if parent_rpcs.respond_to? :update_google_channel_config + @update_google_channel_config = ::Gapic::Config::Method.new update_google_channel_config_config + get_message_bus_config = parent_rpcs.get_message_bus if parent_rpcs.respond_to? :get_message_bus + @get_message_bus = ::Gapic::Config::Method.new get_message_bus_config + list_message_buses_config = parent_rpcs.list_message_buses if parent_rpcs.respond_to? :list_message_buses + @list_message_buses = ::Gapic::Config::Method.new list_message_buses_config + list_message_bus_enrollments_config = parent_rpcs.list_message_bus_enrollments if parent_rpcs.respond_to? :list_message_bus_enrollments + @list_message_bus_enrollments = ::Gapic::Config::Method.new list_message_bus_enrollments_config + create_message_bus_config = parent_rpcs.create_message_bus if parent_rpcs.respond_to? :create_message_bus + @create_message_bus = ::Gapic::Config::Method.new create_message_bus_config + update_message_bus_config = parent_rpcs.update_message_bus if parent_rpcs.respond_to? :update_message_bus + @update_message_bus = ::Gapic::Config::Method.new update_message_bus_config + delete_message_bus_config = parent_rpcs.delete_message_bus if parent_rpcs.respond_to? :delete_message_bus + @delete_message_bus = ::Gapic::Config::Method.new delete_message_bus_config + get_enrollment_config = parent_rpcs.get_enrollment if parent_rpcs.respond_to? :get_enrollment + @get_enrollment = ::Gapic::Config::Method.new get_enrollment_config + list_enrollments_config = parent_rpcs.list_enrollments if parent_rpcs.respond_to? :list_enrollments + @list_enrollments = ::Gapic::Config::Method.new list_enrollments_config + create_enrollment_config = parent_rpcs.create_enrollment if parent_rpcs.respond_to? :create_enrollment + @create_enrollment = ::Gapic::Config::Method.new create_enrollment_config + update_enrollment_config = parent_rpcs.update_enrollment if parent_rpcs.respond_to? :update_enrollment + @update_enrollment = ::Gapic::Config::Method.new update_enrollment_config + delete_enrollment_config = parent_rpcs.delete_enrollment if parent_rpcs.respond_to? :delete_enrollment + @delete_enrollment = ::Gapic::Config::Method.new delete_enrollment_config + get_pipeline_config = parent_rpcs.get_pipeline if parent_rpcs.respond_to? :get_pipeline + @get_pipeline = ::Gapic::Config::Method.new get_pipeline_config + list_pipelines_config = parent_rpcs.list_pipelines if parent_rpcs.respond_to? :list_pipelines + @list_pipelines = ::Gapic::Config::Method.new list_pipelines_config + create_pipeline_config = parent_rpcs.create_pipeline if parent_rpcs.respond_to? :create_pipeline + @create_pipeline = ::Gapic::Config::Method.new create_pipeline_config + update_pipeline_config = parent_rpcs.update_pipeline if parent_rpcs.respond_to? :update_pipeline + @update_pipeline = ::Gapic::Config::Method.new update_pipeline_config + delete_pipeline_config = parent_rpcs.delete_pipeline if parent_rpcs.respond_to? :delete_pipeline + @delete_pipeline = ::Gapic::Config::Method.new delete_pipeline_config + get_google_api_source_config = parent_rpcs.get_google_api_source if parent_rpcs.respond_to? :get_google_api_source + @get_google_api_source = ::Gapic::Config::Method.new get_google_api_source_config + list_google_api_sources_config = parent_rpcs.list_google_api_sources if parent_rpcs.respond_to? :list_google_api_sources + @list_google_api_sources = ::Gapic::Config::Method.new list_google_api_sources_config + create_google_api_source_config = parent_rpcs.create_google_api_source if parent_rpcs.respond_to? :create_google_api_source + @create_google_api_source = ::Gapic::Config::Method.new create_google_api_source_config + update_google_api_source_config = parent_rpcs.update_google_api_source if parent_rpcs.respond_to? :update_google_api_source + @update_google_api_source = ::Gapic::Config::Method.new update_google_api_source_config + delete_google_api_source_config = parent_rpcs.delete_google_api_source if parent_rpcs.respond_to? :delete_google_api_source + @delete_google_api_source = ::Gapic::Config::Method.new delete_google_api_source_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/credentials.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/credentials.rb new file mode 100644 index 000000000000..7a26ab2f1527 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/credentials.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! + +require "googleauth" + +module Google + module Cloud + module Eventarc + module V1 + module Eventarc + # Credentials for the Eventarc API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "EVENTARC_CREDENTIALS", + "EVENTARC_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "EVENTARC_CREDENTIALS_JSON", + "EVENTARC_KEYFILE_JSON", + "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-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/operations.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/operations.rb new file mode 100644 index 000000000000..3a911a6858ec --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/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 Eventarc + module V1 + module Eventarc + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "eventarc.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Eventarc 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 Eventarc 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::Eventarc::V1::VERSION + metadata[:"x-goog-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::Eventarc::V1::VERSION + metadata[:"x-goog-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::Eventarc::V1::VERSION + metadata[:"x-goog-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::Eventarc::V1::VERSION + metadata[:"x-goog-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::Eventarc::V1::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 = "eventarc.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-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/paths.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/paths.rb new file mode 100644 index 000000000000..5c3ff82df756 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/paths.rb @@ -0,0 +1,331 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module V1 + module Eventarc + # Path helper methods for the Eventarc API. + module Paths + ## + # Create a fully-qualified Channel resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/channels/{channel}` + # + # @param project [String] + # @param location [String] + # @param channel [String] + # + # @return [::String] + def channel_path project:, location:, channel: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/channels/#{channel}" + end + + ## + # Create a fully-qualified ChannelConnection resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/channelConnections/{channel_connection}` + # + # @param project [String] + # @param location [String] + # @param channel_connection [String] + # + # @return [::String] + def channel_connection_path project:, location:, channel_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}/channelConnections/#{channel_connection}" + end + + ## + # Create a fully-qualified CloudFunction resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/functions/{function}` + # + # @param project [String] + # @param location [String] + # @param function [String] + # + # @return [::String] + def cloud_function_path project:, location:, function: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/functions/#{function}" + end + + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_key_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + + ## + # Create a fully-qualified Enrollment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/enrollments/{enrollment}` + # + # @param project [String] + # @param location [String] + # @param enrollment [String] + # + # @return [::String] + def enrollment_path project:, location:, enrollment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/enrollments/#{enrollment}" + end + + ## + # Create a fully-qualified GoogleApiSource resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/googleApiSources/{google_api_source}` + # + # @param project [String] + # @param location [String] + # @param google_api_source [String] + # + # @return [::String] + def google_api_source_path project:, location:, google_api_source: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/googleApiSources/#{google_api_source}" + end + + ## + # Create a fully-qualified GoogleChannelConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/googleChannelConfig` + # + # @param project [String] + # @param location [String] + # + # @return [::String] + def google_channel_config_path project:, location: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/locations/#{location}/googleChannelConfig" + 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 MessageBus resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/messageBuses/{message_bus}` + # + # @param project [String] + # @param location [String] + # @param message_bus [String] + # + # @return [::String] + def message_bus_path project:, location:, message_bus: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/messageBuses/#{message_bus}" + end + + ## + # Create a fully-qualified NetworkAttachment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/regions/{region}/networkAttachments/{networkattachment}` + # + # @param project [String] + # @param region [String] + # @param networkattachment [String] + # + # @return [::String] + def network_attachment_path project:, region:, networkattachment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" + + "projects/#{project}/regions/#{region}/networkAttachments/#{networkattachment}" + end + + ## + # Create a fully-qualified Pipeline resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/pipelines/{pipeline}` + # + # @param project [String] + # @param location [String] + # @param pipeline [String] + # + # @return [::String] + def pipeline_path project:, location:, pipeline: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/pipelines/#{pipeline}" + end + + ## + # Create a fully-qualified Provider resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/providers/{provider}` + # + # @param project [String] + # @param location [String] + # @param provider [String] + # + # @return [::String] + def provider_path project:, location:, provider: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/providers/#{provider}" + end + + ## + # Create a fully-qualified ServiceAccount resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/serviceAccounts/{service_account}` + # + # @param project [String] + # @param service_account [String] + # + # @return [::String] + def service_account_path project:, service_account: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/serviceAccounts/#{service_account}" + end + + ## + # Create a fully-qualified Topic resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/topics/{topic}` + # + # @param project [String] + # @param topic [String] + # + # @return [::String] + def topic_path project:, topic: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/topics/#{topic}" + end + + ## + # Create a fully-qualified Trigger resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/triggers/{trigger}` + # + # @param project [String] + # @param location [String] + # @param trigger [String] + # + # @return [::String] + def trigger_path project:, location:, trigger: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/triggers/#{trigger}" + end + + ## + # Create a fully-qualified Workflow resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workflows/{workflow}` + # + # @param project [String] + # @param location [String] + # @param workflow [String] + # + # @return [::String] + def workflow_path project:, location:, workflow: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workflows/#{workflow}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest.rb new file mode 100644 index 000000000000..28d926c87698 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/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/eventarc/v1/version" +require "google/cloud/eventarc/v1/bindings_override" + +require "google/cloud/eventarc/v1/eventarc/credentials" +require "google/cloud/eventarc/v1/eventarc/paths" +require "google/cloud/eventarc/v1/eventarc/rest/operations" +require "google/cloud/eventarc/v1/eventarc/rest/client" + +module Google + module Cloud + module Eventarc + module V1 + ## + # Eventarc allows users to subscribe to various events that are provided by + # Google Cloud services and forward them to supported destinations. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/eventarc/v1/eventarc/rest" + # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + module Eventarc + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/eventarc/v1/eventarc/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb new file mode 100644 index 000000000000..638c1674b6e6 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb @@ -0,0 +1,4373 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/v1/eventarc_pb" +require "google/cloud/eventarc/v1/eventarc/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Eventarc + module V1 + module Eventarc + module Rest + ## + # REST client for the Eventarc service. + # + # Eventarc allows users to subscribe to various events that are provided by + # Google Cloud services and forward them to supported destinations. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "eventarc.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :eventarc_stub + + ## + # Configure the Eventarc Client class. + # + # See {::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Eventarc clients + # ::Google::Cloud::Eventarc::V1::Eventarc::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", "Eventarc", "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.get_trigger.timeout = 60.0 + default_config.rpcs.get_trigger.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.list_triggers.timeout = 60.0 + default_config.rpcs.list_triggers.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.create_trigger.timeout = 60.0 + + default_config.rpcs.update_trigger.timeout = 60.0 + + default_config.rpcs.delete_trigger.timeout = 60.0 + + default_config.rpcs.get_channel.timeout = 60.0 + default_config.rpcs.get_channel.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.list_channels.timeout = 60.0 + default_config.rpcs.list_channels.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.create_channel.timeout = 60.0 + + default_config.rpcs.update_channel.timeout = 60.0 + + default_config.rpcs.delete_channel.timeout = 60.0 + + default_config.rpcs.get_provider.timeout = 60.0 + default_config.rpcs.get_provider.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.list_providers.timeout = 60.0 + default_config.rpcs.list_providers.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.get_channel_connection.timeout = 60.0 + default_config.rpcs.get_channel_connection.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.list_channel_connections.timeout = 60.0 + default_config.rpcs.list_channel_connections.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.create_channel_connection.timeout = 60.0 + + default_config.rpcs.delete_channel_connection.timeout = 60.0 + + default_config.rpcs.get_google_channel_config.timeout = 60.0 + default_config.rpcs.get_google_channel_config.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.update_google_channel_config.timeout = 60.0 + + default_config.rpcs.get_message_bus.timeout = 60.0 + default_config.rpcs.get_message_bus.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.list_message_buses.timeout = 60.0 + default_config.rpcs.list_message_buses.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.list_message_bus_enrollments.timeout = 60.0 + default_config.rpcs.list_message_bus_enrollments.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.create_message_bus.timeout = 60.0 + + default_config.rpcs.update_message_bus.timeout = 60.0 + + default_config.rpcs.delete_message_bus.timeout = 60.0 + + default_config.rpcs.get_enrollment.timeout = 60.0 + default_config.rpcs.get_enrollment.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.list_enrollments.timeout = 60.0 + default_config.rpcs.list_enrollments.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.create_enrollment.timeout = 60.0 + + default_config.rpcs.update_enrollment.timeout = 60.0 + + default_config.rpcs.delete_enrollment.timeout = 60.0 + + default_config.rpcs.get_pipeline.timeout = 60.0 + default_config.rpcs.get_pipeline.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.list_pipelines.timeout = 60.0 + default_config.rpcs.list_pipelines.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.create_pipeline.timeout = 60.0 + + default_config.rpcs.update_pipeline.timeout = 60.0 + + default_config.rpcs.delete_pipeline.timeout = 60.0 + + default_config.rpcs.get_google_api_source.timeout = 60.0 + default_config.rpcs.get_google_api_source.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.list_google_api_sources.timeout = 60.0 + default_config.rpcs.list_google_api_sources.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] + } + + default_config.rpcs.create_google_api_source.timeout = 60.0 + + default_config.rpcs.update_google_api_source.timeout = 60.0 + + default_config.rpcs.delete_google_api_source.timeout = 60.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Eventarc 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::Eventarc::V1::Eventarc::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 + @eventarc_stub.universe_domain + end + + ## + # Create a new Eventarc REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Eventarc 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::Eventarc::V1::Eventarc::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 + + @eventarc_stub = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @eventarc_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 = @eventarc_stub.endpoint + config.universe_domain = @eventarc_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @eventarc_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 = @eventarc_stub.endpoint + config.universe_domain = @eventarc_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @eventarc_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Eventarc::V1::Eventarc::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 + @eventarc_stub.logger + end + + # Service calls + + ## + # Get a single trigger. + # + # @overload get_trigger(request, options = nil) + # Pass arguments to `get_trigger` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_trigger(name: nil) + # Pass arguments to `get_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 trigger to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::Trigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::Trigger] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetTriggerRequest.new + # + # # Call the get_trigger method. + # result = client.get_trigger request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::Trigger. + # p result + # + def get_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetTriggerRequest + + # Converts hash and nil to an 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_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.get_trigger 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 triggers. + # + # @overload list_triggers(request, options = nil) + # Pass arguments to `list_triggers` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListTriggersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListTriggersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_triggers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_triggers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection to list triggers on. + # @param page_size [::Integer] + # The maximum number of triggers to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # The page token; provide the value from the `next_page_token` field in a + # previous `ListTriggers` call to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListTriggers` must match + # the call that provided the page token. + # @param order_by [::String] + # The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, trigger_id`. + # @param filter [::String] + # Filter field. Used to filter the Triggers to be listed. Possible filters + # are described in https://google.aip.dev/160. For example, using + # "?filter=destination:gke" would list only Triggers with a gke destination. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Trigger>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Trigger>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListTriggersRequest.new + # + # # Call the list_triggers method. + # result = client.list_triggers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::Trigger. + # p item + # end + # + def list_triggers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListTriggersRequest + + # Converts hash and nil to an 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_triggers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_triggers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_triggers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.list_triggers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_triggers, "triggers", 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 new trigger in a particular project and location. + # + # @overload create_trigger(request, options = nil) + # Pass arguments to `create_trigger` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreateTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreateTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trigger(parent: nil, trigger: nil, trigger_id: nil, validate_only: nil) + # Pass arguments to `create_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this trigger. + # @param trigger [::Google::Cloud::Eventarc::V1::Trigger, ::Hash] + # Required. The trigger to create. + # @param trigger_id [::String] + # Required. The user-provided ID to be assigned to the trigger. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreateTriggerRequest.new + # + # # Call the create_trigger method. + # result = client.create_trigger request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateTriggerRequest + + # Converts hash and nil to an 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_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.create_trigger request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a single trigger. + # + # @overload update_trigger(request, options = nil) + # Pass arguments to `update_trigger` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdateTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdateTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_trigger(trigger: nil, update_mask: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param trigger [::Google::Cloud::Eventarc::V1::Trigger, ::Hash] + # The trigger to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The fields to be updated; only fields explicitly provided are updated. + # If no field mask is provided, all provided fields in the request are + # updated. To update all fields, provide a field mask of "*". + # @param allow_missing [::Boolean] + # If set to true, and the trigger is not found, a new trigger will be + # created. In this situation, `update_mask` is ignored. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new + # + # # Call the update_trigger method. + # result = client.update_trigger request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateTriggerRequest + + # Converts hash and nil to an 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_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.update_trigger request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single trigger. + # + # @overload delete_trigger(request, options = nil) + # Pass arguments to `delete_trigger` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeleteTriggerRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeleteTriggerRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_trigger(name: nil, etag: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `delete_trigger` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 trigger to be deleted. + # @param etag [::String] + # If provided, the trigger will only be deleted if the etag matches the + # current etag on the resource. + # @param allow_missing [::Boolean] + # If set to true, and the trigger is not found, the request will succeed + # but no action will be taken on the server. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new + # + # # Call the delete_trigger method. + # result = client.delete_trigger request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_trigger request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteTriggerRequest + + # Converts hash and nil to an 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_trigger.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_trigger.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_trigger.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.delete_trigger 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 + + ## + # Get a single Channel. + # + # @overload get_channel(request, options = nil) + # Pass arguments to `get_channel` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_channel(name: nil) + # Pass arguments to `get_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 channel to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::Channel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::Channel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetChannelRequest.new + # + # # Call the get_channel method. + # result = client.get_channel request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::Channel. + # p result + # + def get_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetChannelRequest + + # Converts hash and nil to an 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_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.get_channel 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 channels. + # + # @overload list_channels(request, options = nil) + # Pass arguments to `list_channels` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListChannelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListChannelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_channels(parent: nil, page_size: nil, page_token: nil, order_by: nil) + # Pass arguments to `list_channels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection to list channels on. + # @param page_size [::Integer] + # The maximum number of channels to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # The page token; provide the value from the `next_page_token` field in a + # previous `ListChannels` call to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListChannels` must + # match the call that provided the page token. + # @param order_by [::String] + # The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, channel_id`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListChannelsRequest.new + # + # # Call the list_channels method. + # result = client.list_channels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::Channel. + # p item + # end + # + def list_channels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListChannelsRequest + + # Converts hash and nil to an 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_channels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_channels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_channels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.list_channels request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_channels, "channels", 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 new channel in a particular project and location. + # + # @overload create_channel(request, options = nil) + # Pass arguments to `create_channel` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreateChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreateChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_channel(parent: nil, channel: nil, channel_id: nil, validate_only: nil) + # Pass arguments to `create_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this channel. + # @param channel [::Google::Cloud::Eventarc::V1::Channel, ::Hash] + # Required. The channel to create. + # @param channel_id [::String] + # Required. The user-provided ID to be assigned to the channel. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreateChannelRequest.new + # + # # Call the create_channel method. + # result = client.create_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateChannelRequest + + # Converts hash and nil to an 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_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.create_channel request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a single channel. + # + # @overload update_channel(request, options = nil) + # Pass arguments to `update_channel` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdateChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdateChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_channel(channel: nil, update_mask: nil, validate_only: nil) + # Pass arguments to `update_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param channel [::Google::Cloud::Eventarc::V1::Channel, ::Hash] + # The channel to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The fields to be updated; only fields explicitly provided are updated. + # If no field mask is provided, all provided fields in the request are + # updated. To update all fields, provide a field mask of "*". + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdateChannelRequest.new + # + # # Call the update_channel method. + # result = client.update_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateChannelRequest + + # Converts hash and nil to an 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_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.update_channel request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single channel. + # + # @overload delete_channel(request, options = nil) + # Pass arguments to `delete_channel` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeleteChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeleteChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_channel(name: nil, validate_only: nil) + # Pass arguments to `delete_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 channel to be deleted. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeleteChannelRequest.new + # + # # Call the delete_channel method. + # result = client.delete_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteChannelRequest + + # Converts hash and nil to an 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_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.delete_channel 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 + + ## + # Get a single Provider. + # + # @overload get_provider(request, options = nil) + # Pass arguments to `get_provider` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetProviderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetProviderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_provider(name: nil) + # Pass arguments to `get_provider` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 provider to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::Provider] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::Provider] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetProviderRequest.new + # + # # Call the get_provider method. + # result = client.get_provider request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::Provider. + # p result + # + def get_provider request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetProviderRequest + + # Converts hash and nil to an 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_provider.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_provider.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_provider.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.get_provider 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 providers. + # + # @overload list_providers(request, options = nil) + # Pass arguments to `list_providers` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListProvidersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListProvidersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_providers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_providers` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the provider to get. + # @param page_size [::Integer] + # The maximum number of providers to return on each page. + # @param page_token [::String] + # The page token; provide the value from the `next_page_token` field in a + # previous `ListProviders` call to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProviders` must + # match the call that provided the page token. + # @param order_by [::String] + # The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting oder is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, _id`. + # @param filter [::String] + # The filter field that the list request will filter on. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Provider>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Provider>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListProvidersRequest.new + # + # # Call the list_providers method. + # result = client.list_providers request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::Provider. + # p item + # end + # + def list_providers request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListProvidersRequest + + # Converts hash and nil to an 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_providers.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_providers.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_providers.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.list_providers request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_providers, "providers", 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 a single ChannelConnection. + # + # @overload get_channel_connection(request, options = nil) + # Pass arguments to `get_channel_connection` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_channel_connection(name: nil) + # Pass arguments to `get_channel_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 channel connection to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::ChannelConnection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::ChannelConnection] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new + # + # # Call the get_channel_connection method. + # result = client.get_channel_connection request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::ChannelConnection. + # p result + # + def get_channel_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest + + # Converts hash and nil to an 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_channel_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_channel_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_channel_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.get_channel_connection 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 channel connections. + # + # @overload list_channel_connections(request, options = nil) + # Pass arguments to `list_channel_connections` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_channel_connections(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_channel_connections` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection from which to list channel connections. + # @param page_size [::Integer] + # The maximum number of channel connections to return on each page. + # + # Note: The service may send fewer responses. + # @param page_token [::String] + # The page token; provide the value from the `next_page_token` field in a + # previous `ListChannelConnections` call to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListChannelConnetions` + # 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::Eventarc::V1::ChannelConnection>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::ChannelConnection>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.new + # + # # Call the list_channel_connections method. + # result = client.list_channel_connections request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::ChannelConnection. + # p item + # end + # + def list_channel_connections request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest + + # Converts hash and nil to an 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_channel_connections.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_channel_connections.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_channel_connections.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.list_channel_connections request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_channel_connections, "channel_connections", 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 new ChannelConnection in a particular project and location. + # + # @overload create_channel_connection(request, options = nil) + # Pass arguments to `create_channel_connection` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_channel_connection(parent: nil, channel_connection: nil, channel_connection_id: nil) + # Pass arguments to `create_channel_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this channel connection. + # @param channel_connection [::Google::Cloud::Eventarc::V1::ChannelConnection, ::Hash] + # Required. Channel connection to create. + # @param channel_connection_id [::String] + # Required. The user-provided ID to be assigned to the channel connection. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new + # + # # Call the create_channel_connection method. + # result = client.create_channel_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_channel_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest + + # Converts hash and nil to an 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_channel_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_channel_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_channel_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.create_channel_connection request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single ChannelConnection. + # + # @overload delete_channel_connection(request, options = nil) + # Pass arguments to `delete_channel_connection` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_channel_connection(name: nil) + # Pass arguments to `delete_channel_connection` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 channel connection to delete. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.new + # + # # Call the delete_channel_connection method. + # result = client.delete_channel_connection request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_channel_connection request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest + + # Converts hash and nil to an 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_channel_connection.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_channel_connection.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_channel_connection.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.delete_channel_connection 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 + + ## + # Get a GoogleChannelConfig. + # The name of the GoogleChannelConfig in the response is ALWAYS coded with + # projectID. + # + # @overload get_google_channel_config(request, options = nil) + # Pass arguments to `get_google_channel_config` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_google_channel_config(name: nil) + # Pass arguments to `get_google_channel_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 config to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new + # + # # Call the get_google_channel_config method. + # result = client.get_google_channel_config request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig. + # p result + # + def get_google_channel_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest + + # Converts hash and nil to an 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_google_channel_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::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_google_channel_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_google_channel_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.get_google_channel_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 + + ## + # Update a single GoogleChannelConfig + # + # @overload update_google_channel_config(request, options = nil) + # Pass arguments to `update_google_channel_config` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_google_channel_config(google_channel_config: nil, update_mask: nil) + # Pass arguments to `update_google_channel_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 google_channel_config [::Google::Cloud::Eventarc::V1::GoogleChannelConfig, ::Hash] + # Required. The config to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The fields to be updated; only fields explicitly provided are updated. + # If no field mask is provided, all provided fields in the request are + # updated. To update all fields, provide a field mask of "*". + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new + # + # # Call the update_google_channel_config method. + # result = client.update_google_channel_config request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig. + # p result + # + def update_google_channel_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest + + # Converts hash and nil to an 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_google_channel_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::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_google_channel_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_google_channel_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.update_google_channel_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 + + ## + # Get a single MessageBus. + # + # @overload get_message_bus(request, options = nil) + # Pass arguments to `get_message_bus` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetMessageBusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetMessageBusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_message_bus(name: nil) + # Pass arguments to `get_message_bus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 message bus to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::MessageBus] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::MessageBus] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetMessageBusRequest.new + # + # # Call the get_message_bus method. + # result = client.get_message_bus request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::MessageBus. + # p result + # + def get_message_bus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetMessageBusRequest + + # Converts hash and nil to an 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_message_bus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_message_bus.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_message_bus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.get_message_bus 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 message buses. + # + # @overload list_message_buses(request, options = nil) + # Pass arguments to `list_message_buses` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListMessageBusesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListMessageBusesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_message_buses(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_message_buses` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection to list message buses on. + # @param page_size [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # @param order_by [::String] + # Optional. The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, update_time`. + # @param filter [::String] + # Optional. The filter field that the list request will filter on. + # Possible filtersare described in https://google.aip.dev/160. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new + # + # # Call the list_message_buses method. + # result = client.list_message_buses request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::MessageBus. + # p item + # end + # + def list_message_buses request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest + + # Converts hash and nil to an 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_message_buses.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_message_buses.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_message_buses.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.list_message_buses request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_message_buses, "message_buses", 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 + + ## + # List message bus enrollments. + # + # @overload list_message_bus_enrollments(request, options = nil) + # Pass arguments to `list_message_bus_enrollments` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_message_bus_enrollments(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_message_bus_enrollments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 message bus to list enrollments on. + # @param page_size [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.new + # + # # Call the list_message_bus_enrollments method. + # result = client.list_message_bus_enrollments request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse. + # p result + # + def list_message_bus_enrollments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest + + # Converts hash and nil to an 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_message_bus_enrollments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_message_bus_enrollments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_message_bus_enrollments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.list_message_bus_enrollments 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 new MessageBus in a particular project and location. + # + # @overload create_message_bus(request, options = nil) + # Pass arguments to `create_message_bus` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreateMessageBusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreateMessageBusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_message_bus(parent: nil, message_bus: nil, message_bus_id: nil, validate_only: nil) + # Pass arguments to `create_message_bus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this message bus. + # @param message_bus [::Google::Cloud::Eventarc::V1::MessageBus, ::Hash] + # Required. The message bus to create. + # @param message_bus_id [::String] + # Required. The user-provided ID to be assigned to the MessageBus. It should + # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new + # + # # Call the create_message_bus method. + # result = client.create_message_bus request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_message_bus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest + + # Converts hash and nil to an 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_message_bus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_message_bus.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_message_bus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.create_message_bus request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a single message bus. + # + # @overload update_message_bus(request, options = nil) + # Pass arguments to `update_message_bus` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_message_bus(message_bus: nil, update_mask: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_message_bus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param message_bus [::Google::Cloud::Eventarc::V1::MessageBus, ::Hash] + # Required. The MessageBus to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The fields to be updated; only fields explicitly provided are + # updated. If no field mask is provided, all provided fields in the request + # are updated. To update all fields, provide a field mask of "*". + # @param allow_missing [::Boolean] + # Optional. If set to true, and the MessageBus is not found, a new MessageBus + # will be created. In this situation, `update_mask` is ignored. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new + # + # # Call the update_message_bus method. + # result = client.update_message_bus request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_message_bus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest + + # Converts hash and nil to an 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_message_bus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_message_bus.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_message_bus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.update_message_bus request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single message bus. + # + # @overload delete_message_bus(request, options = nil) + # Pass arguments to `delete_message_bus` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_message_bus(name: nil, etag: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `delete_message_bus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 MessageBus to be deleted. + # @param etag [::String] + # Optional. If provided, the MessageBus will only be deleted if the etag + # matches the current etag on the resource. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the MessageBus is not found, the request will + # succeed but no action will be taken on the server. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new + # + # # Call the delete_message_bus method. + # result = client.delete_message_bus request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_message_bus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest + + # Converts hash and nil to an 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_message_bus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_message_bus.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_message_bus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.delete_message_bus 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 + + ## + # Get a single Enrollment. + # + # @overload get_enrollment(request, options = nil) + # Pass arguments to `get_enrollment` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetEnrollmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetEnrollmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_enrollment(name: nil) + # Pass arguments to `get_enrollment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Enrollment to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::Enrollment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::Enrollment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new + # + # # Call the get_enrollment method. + # result = client.get_enrollment request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::Enrollment. + # p result + # + def get_enrollment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest + + # Converts hash and nil to an 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_enrollment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_enrollment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_enrollment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.get_enrollment 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 Enrollments. + # + # @overload list_enrollments(request, options = nil) + # Pass arguments to `list_enrollments` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_enrollments(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_enrollments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection to list triggers on. + # @param page_size [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # @param order_by [::String] + # Optional. The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, update_time`. + # @param filter [::String] + # Optional. The filter field that the list request will filter on. + # Possible filtersare described in https://google.aip.dev/160. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new + # + # # Call the list_enrollments method. + # result = client.list_enrollments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::Enrollment. + # p item + # end + # + def list_enrollments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest + + # Converts hash and nil to an 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_enrollments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_enrollments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_enrollments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.list_enrollments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_enrollments, "enrollments", 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 new Enrollment in a particular project and location. + # + # @overload create_enrollment(request, options = nil) + # Pass arguments to `create_enrollment` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_enrollment(parent: nil, enrollment: nil, enrollment_id: nil, validate_only: nil) + # Pass arguments to `create_enrollment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this enrollment. + # @param enrollment [::Google::Cloud::Eventarc::V1::Enrollment, ::Hash] + # Required. The enrollment to create. + # @param enrollment_id [::String] + # Required. The user-provided ID to be assigned to the Enrollment. It should + # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new + # + # # Call the create_enrollment method. + # result = client.create_enrollment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_enrollment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest + + # Converts hash and nil to an 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_enrollment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_enrollment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_enrollment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.create_enrollment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a single Enrollment. + # + # @overload update_enrollment(request, options = nil) + # Pass arguments to `update_enrollment` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_enrollment(enrollment: nil, update_mask: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_enrollment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param enrollment [::Google::Cloud::Eventarc::V1::Enrollment, ::Hash] + # Required. The Enrollment to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The fields to be updated; only fields explicitly provided are + # updated. If no field mask is provided, all provided fields in the request + # are updated. To update all fields, provide a field mask of "*". + # @param allow_missing [::Boolean] + # Optional. If set to true, and the Enrollment is not found, a new Enrollment + # will be created. In this situation, `update_mask` is ignored. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new + # + # # Call the update_enrollment method. + # result = client.update_enrollment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_enrollment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest + + # Converts hash and nil to an 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_enrollment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_enrollment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_enrollment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.update_enrollment request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single Enrollment. + # + # @overload delete_enrollment(request, options = nil) + # Pass arguments to `delete_enrollment` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_enrollment(name: nil, etag: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `delete_enrollment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Enrollment to be deleted. + # @param etag [::String] + # Optional. If provided, the Enrollment will only be deleted if the etag + # matches the current etag on the resource. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the Enrollment is not found, the request will + # succeed but no action will be taken on the server. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new + # + # # Call the delete_enrollment method. + # result = client.delete_enrollment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_enrollment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest + + # Converts hash and nil to an 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_enrollment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_enrollment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_enrollment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.delete_enrollment 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 + + ## + # Get a single Pipeline. + # + # @overload get_pipeline(request, options = nil) + # Pass arguments to `get_pipeline` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetPipelineRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetPipelineRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_pipeline(name: nil) + # Pass arguments to `get_pipeline` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 pipeline to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::Pipeline] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::Pipeline] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetPipelineRequest.new + # + # # Call the get_pipeline method. + # result = client.get_pipeline request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::Pipeline. + # p result + # + def get_pipeline request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetPipelineRequest + + # Converts hash and nil to an 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_pipeline.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_pipeline.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_pipeline.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.get_pipeline 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 pipelines. + # + # @overload list_pipelines(request, options = nil) + # Pass arguments to `list_pipelines` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListPipelinesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListPipelinesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_pipelines(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_pipelines` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection to list pipelines on. + # @param page_size [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # @param order_by [::String] + # Optional. The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, update_time`. + # @param filter [::String] + # Optional. The filter field that the list request will filter on. + # Possible filters are described in https://google.aip.dev/160. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListPipelinesRequest.new + # + # # Call the list_pipelines method. + # result = client.list_pipelines request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::Pipeline. + # p item + # end + # + def list_pipelines request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListPipelinesRequest + + # Converts hash and nil to an 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_pipelines.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_pipelines.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_pipelines.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.list_pipelines request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_pipelines, "pipelines", 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 new Pipeline in a particular project and location. + # + # @overload create_pipeline(request, options = nil) + # Pass arguments to `create_pipeline` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreatePipelineRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreatePipelineRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_pipeline(parent: nil, pipeline: nil, pipeline_id: nil, validate_only: nil) + # Pass arguments to `create_pipeline` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this pipeline. + # @param pipeline [::Google::Cloud::Eventarc::V1::Pipeline, ::Hash] + # Required. The pipeline to create. + # @param pipeline_id [::String] + # Required. The user-provided ID to be assigned to the Pipeline. It should + # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreatePipelineRequest.new + # + # # Call the create_pipeline method. + # result = client.create_pipeline request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_pipeline request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreatePipelineRequest + + # Converts hash and nil to an 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_pipeline.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_pipeline.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_pipeline.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.create_pipeline request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a single pipeline. + # + # @overload update_pipeline(request, options = nil) + # Pass arguments to `update_pipeline` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdatePipelineRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdatePipelineRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_pipeline(pipeline: nil, update_mask: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_pipeline` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param pipeline [::Google::Cloud::Eventarc::V1::Pipeline, ::Hash] + # Required. The Pipeline to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The fields to be updated; only fields explicitly provided are + # updated. If no field mask is provided, all provided fields in the request + # are updated. To update all fields, provide a field mask of "*". + # @param allow_missing [::Boolean] + # Optional. If set to true, and the Pipeline is not found, a new Pipeline + # will be created. In this situation, `update_mask` is ignored. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new + # + # # Call the update_pipeline method. + # result = client.update_pipeline request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_pipeline request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest + + # Converts hash and nil to an 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_pipeline.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_pipeline.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_pipeline.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.update_pipeline request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single pipeline. + # + # @overload delete_pipeline(request, options = nil) + # Pass arguments to `delete_pipeline` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeletePipelineRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeletePipelineRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_pipeline(name: nil, etag: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `delete_pipeline` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 Pipeline to be deleted. + # @param etag [::String] + # Optional. If provided, the Pipeline will only be deleted if the etag + # matches the current etag on the resource. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the Pipeline is not found, the request will + # succeed but no action will be taken on the server. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeletePipelineRequest.new + # + # # Call the delete_pipeline method. + # result = client.delete_pipeline request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_pipeline request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeletePipelineRequest + + # Converts hash and nil to an 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_pipeline.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_pipeline.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_pipeline.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.delete_pipeline 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 + + ## + # Get a single GoogleApiSource. + # + # @overload get_google_api_source(request, options = nil) + # Pass arguments to `get_google_api_source` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_google_api_source(name: nil) + # Pass arguments to `get_google_api_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 google api source to get. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::GoogleApiSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new + # + # # Call the get_google_api_source method. + # result = client.get_google_api_source request + # + # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleApiSource. + # p result + # + def get_google_api_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest + + # Converts hash and nil to an 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_google_api_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_google_api_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_google_api_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.get_google_api_source 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 GoogleApiSources. + # + # @overload list_google_api_sources(request, options = nil) + # Pass arguments to `list_google_api_sources` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_google_api_sources(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_google_api_sources` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection to list GoogleApiSources on. + # @param page_size [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @param page_token [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # @param order_by [::String] + # Optional. The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, update_time`. + # @param filter [::String] + # Optional. The filter field that the list request will filter on. + # Possible filtersare described in https://google.aip.dev/160. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new + # + # # Call the list_google_api_sources method. + # result = client.list_google_api_sources request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Eventarc::V1::GoogleApiSource. + # p item + # end + # + def list_google_api_sources request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest + + # Converts hash and nil to an 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_google_api_sources.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_google_api_sources.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_google_api_sources.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.list_google_api_sources request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_google_api_sources, "google_api_sources", 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 new GoogleApiSource in a particular project and location. + # + # @overload create_google_api_source(request, options = nil) + # Pass arguments to `create_google_api_source` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_google_api_source(parent: nil, google_api_source: nil, google_api_source_id: nil, validate_only: nil) + # Pass arguments to `create_google_api_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 collection in which to add this google api source. + # @param google_api_source [::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash] + # Required. The google api source to create. + # @param google_api_source_id [::String] + # Required. The user-provided ID to be assigned to the GoogleApiSource. It + # should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new + # + # # Call the create_google_api_source method. + # result = client.create_google_api_source request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_google_api_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest + + # Converts hash and nil to an 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_google_api_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_google_api_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_google_api_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.create_google_api_source request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Update a single GoogleApiSource. + # + # @overload update_google_api_source(request, options = nil) + # Pass arguments to `update_google_api_source` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_google_api_source(google_api_source: nil, update_mask: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `update_google_api_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param google_api_source [::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash] + # Required. The GoogleApiSource to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. The fields to be updated; only fields explicitly provided are + # updated. If no field mask is provided, all provided fields in the request + # are updated. To update all fields, provide a field mask of "*". + # @param allow_missing [::Boolean] + # Optional. If set to true, and the GoogleApiSource is not found, a new + # GoogleApiSource will be created. In this situation, `update_mask` is + # ignored. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new + # + # # Call the update_google_api_source method. + # result = client.update_google_api_source request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_google_api_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest + + # Converts hash and nil to an 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_google_api_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_google_api_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_google_api_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.update_google_api_source request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Delete a single GoogleApiSource. + # + # @overload delete_google_api_source(request, options = nil) + # Pass arguments to `delete_google_api_source` via a request object, either of type + # {::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_google_api_source(name: nil, etag: nil, allow_missing: nil, validate_only: nil) + # Pass arguments to `delete_google_api_source` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 GoogleApiSource to be deleted. + # @param etag [::String] + # Optional. If provided, the MessageBus will only be deleted if the etag + # matches the current etag on the resource. + # @param allow_missing [::Boolean] + # Optional. If set to true, and the MessageBus is not found, the request will + # succeed but no action will be taken on the server. + # @param validate_only [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/eventarc/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new + # + # # Call the delete_google_api_source method. + # result = client.delete_google_api_source request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_google_api_source request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest + + # Converts hash and nil to an 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_google_api_source.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_google_api_source.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_google_api_source.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @eventarc_stub.delete_google_api_source 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 Eventarc REST API. + # + # This class represents the configuration for Eventarc 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::Eventarc::V1::Eventarc::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 + # # get_trigger to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_trigger.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_trigger.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 = "eventarc.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 Eventarc 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 `get_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :get_trigger + ## + # RPC-specific configuration for `list_triggers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_triggers + ## + # RPC-specific configuration for `create_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :create_trigger + ## + # RPC-specific configuration for `update_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :update_trigger + ## + # RPC-specific configuration for `delete_trigger` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_trigger + ## + # RPC-specific configuration for `get_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :get_channel + ## + # RPC-specific configuration for `list_channels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_channels + ## + # RPC-specific configuration for `create_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :create_channel + ## + # RPC-specific configuration for `update_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :update_channel + ## + # RPC-specific configuration for `delete_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_channel + ## + # RPC-specific configuration for `get_provider` + # @return [::Gapic::Config::Method] + # + attr_reader :get_provider + ## + # RPC-specific configuration for `list_providers` + # @return [::Gapic::Config::Method] + # + attr_reader :list_providers + ## + # RPC-specific configuration for `get_channel_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :get_channel_connection + ## + # RPC-specific configuration for `list_channel_connections` + # @return [::Gapic::Config::Method] + # + attr_reader :list_channel_connections + ## + # RPC-specific configuration for `create_channel_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :create_channel_connection + ## + # RPC-specific configuration for `delete_channel_connection` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_channel_connection + ## + # RPC-specific configuration for `get_google_channel_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_google_channel_config + ## + # RPC-specific configuration for `update_google_channel_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_google_channel_config + ## + # RPC-specific configuration for `get_message_bus` + # @return [::Gapic::Config::Method] + # + attr_reader :get_message_bus + ## + # RPC-specific configuration for `list_message_buses` + # @return [::Gapic::Config::Method] + # + attr_reader :list_message_buses + ## + # RPC-specific configuration for `list_message_bus_enrollments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_message_bus_enrollments + ## + # RPC-specific configuration for `create_message_bus` + # @return [::Gapic::Config::Method] + # + attr_reader :create_message_bus + ## + # RPC-specific configuration for `update_message_bus` + # @return [::Gapic::Config::Method] + # + attr_reader :update_message_bus + ## + # RPC-specific configuration for `delete_message_bus` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_message_bus + ## + # RPC-specific configuration for `get_enrollment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_enrollment + ## + # RPC-specific configuration for `list_enrollments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_enrollments + ## + # RPC-specific configuration for `create_enrollment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_enrollment + ## + # RPC-specific configuration for `update_enrollment` + # @return [::Gapic::Config::Method] + # + attr_reader :update_enrollment + ## + # RPC-specific configuration for `delete_enrollment` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_enrollment + ## + # RPC-specific configuration for `get_pipeline` + # @return [::Gapic::Config::Method] + # + attr_reader :get_pipeline + ## + # RPC-specific configuration for `list_pipelines` + # @return [::Gapic::Config::Method] + # + attr_reader :list_pipelines + ## + # RPC-specific configuration for `create_pipeline` + # @return [::Gapic::Config::Method] + # + attr_reader :create_pipeline + ## + # RPC-specific configuration for `update_pipeline` + # @return [::Gapic::Config::Method] + # + attr_reader :update_pipeline + ## + # RPC-specific configuration for `delete_pipeline` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_pipeline + ## + # RPC-specific configuration for `get_google_api_source` + # @return [::Gapic::Config::Method] + # + attr_reader :get_google_api_source + ## + # RPC-specific configuration for `list_google_api_sources` + # @return [::Gapic::Config::Method] + # + attr_reader :list_google_api_sources + ## + # RPC-specific configuration for `create_google_api_source` + # @return [::Gapic::Config::Method] + # + attr_reader :create_google_api_source + ## + # RPC-specific configuration for `update_google_api_source` + # @return [::Gapic::Config::Method] + # + attr_reader :update_google_api_source + ## + # RPC-specific configuration for `delete_google_api_source` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_google_api_source + + # @private + def initialize parent_rpcs = nil + get_trigger_config = parent_rpcs.get_trigger if parent_rpcs.respond_to? :get_trigger + @get_trigger = ::Gapic::Config::Method.new get_trigger_config + list_triggers_config = parent_rpcs.list_triggers if parent_rpcs.respond_to? :list_triggers + @list_triggers = ::Gapic::Config::Method.new list_triggers_config + create_trigger_config = parent_rpcs.create_trigger if parent_rpcs.respond_to? :create_trigger + @create_trigger = ::Gapic::Config::Method.new create_trigger_config + update_trigger_config = parent_rpcs.update_trigger if parent_rpcs.respond_to? :update_trigger + @update_trigger = ::Gapic::Config::Method.new update_trigger_config + delete_trigger_config = parent_rpcs.delete_trigger if parent_rpcs.respond_to? :delete_trigger + @delete_trigger = ::Gapic::Config::Method.new delete_trigger_config + get_channel_config = parent_rpcs.get_channel if parent_rpcs.respond_to? :get_channel + @get_channel = ::Gapic::Config::Method.new get_channel_config + list_channels_config = parent_rpcs.list_channels if parent_rpcs.respond_to? :list_channels + @list_channels = ::Gapic::Config::Method.new list_channels_config + create_channel_config = parent_rpcs.create_channel if parent_rpcs.respond_to? :create_channel + @create_channel = ::Gapic::Config::Method.new create_channel_config + update_channel_config = parent_rpcs.update_channel if parent_rpcs.respond_to? :update_channel + @update_channel = ::Gapic::Config::Method.new update_channel_config + delete_channel_config = parent_rpcs.delete_channel if parent_rpcs.respond_to? :delete_channel + @delete_channel = ::Gapic::Config::Method.new delete_channel_config + get_provider_config = parent_rpcs.get_provider if parent_rpcs.respond_to? :get_provider + @get_provider = ::Gapic::Config::Method.new get_provider_config + list_providers_config = parent_rpcs.list_providers if parent_rpcs.respond_to? :list_providers + @list_providers = ::Gapic::Config::Method.new list_providers_config + get_channel_connection_config = parent_rpcs.get_channel_connection if parent_rpcs.respond_to? :get_channel_connection + @get_channel_connection = ::Gapic::Config::Method.new get_channel_connection_config + list_channel_connections_config = parent_rpcs.list_channel_connections if parent_rpcs.respond_to? :list_channel_connections + @list_channel_connections = ::Gapic::Config::Method.new list_channel_connections_config + create_channel_connection_config = parent_rpcs.create_channel_connection if parent_rpcs.respond_to? :create_channel_connection + @create_channel_connection = ::Gapic::Config::Method.new create_channel_connection_config + delete_channel_connection_config = parent_rpcs.delete_channel_connection if parent_rpcs.respond_to? :delete_channel_connection + @delete_channel_connection = ::Gapic::Config::Method.new delete_channel_connection_config + get_google_channel_config_config = parent_rpcs.get_google_channel_config if parent_rpcs.respond_to? :get_google_channel_config + @get_google_channel_config = ::Gapic::Config::Method.new get_google_channel_config_config + update_google_channel_config_config = parent_rpcs.update_google_channel_config if parent_rpcs.respond_to? :update_google_channel_config + @update_google_channel_config = ::Gapic::Config::Method.new update_google_channel_config_config + get_message_bus_config = parent_rpcs.get_message_bus if parent_rpcs.respond_to? :get_message_bus + @get_message_bus = ::Gapic::Config::Method.new get_message_bus_config + list_message_buses_config = parent_rpcs.list_message_buses if parent_rpcs.respond_to? :list_message_buses + @list_message_buses = ::Gapic::Config::Method.new list_message_buses_config + list_message_bus_enrollments_config = parent_rpcs.list_message_bus_enrollments if parent_rpcs.respond_to? :list_message_bus_enrollments + @list_message_bus_enrollments = ::Gapic::Config::Method.new list_message_bus_enrollments_config + create_message_bus_config = parent_rpcs.create_message_bus if parent_rpcs.respond_to? :create_message_bus + @create_message_bus = ::Gapic::Config::Method.new create_message_bus_config + update_message_bus_config = parent_rpcs.update_message_bus if parent_rpcs.respond_to? :update_message_bus + @update_message_bus = ::Gapic::Config::Method.new update_message_bus_config + delete_message_bus_config = parent_rpcs.delete_message_bus if parent_rpcs.respond_to? :delete_message_bus + @delete_message_bus = ::Gapic::Config::Method.new delete_message_bus_config + get_enrollment_config = parent_rpcs.get_enrollment if parent_rpcs.respond_to? :get_enrollment + @get_enrollment = ::Gapic::Config::Method.new get_enrollment_config + list_enrollments_config = parent_rpcs.list_enrollments if parent_rpcs.respond_to? :list_enrollments + @list_enrollments = ::Gapic::Config::Method.new list_enrollments_config + create_enrollment_config = parent_rpcs.create_enrollment if parent_rpcs.respond_to? :create_enrollment + @create_enrollment = ::Gapic::Config::Method.new create_enrollment_config + update_enrollment_config = parent_rpcs.update_enrollment if parent_rpcs.respond_to? :update_enrollment + @update_enrollment = ::Gapic::Config::Method.new update_enrollment_config + delete_enrollment_config = parent_rpcs.delete_enrollment if parent_rpcs.respond_to? :delete_enrollment + @delete_enrollment = ::Gapic::Config::Method.new delete_enrollment_config + get_pipeline_config = parent_rpcs.get_pipeline if parent_rpcs.respond_to? :get_pipeline + @get_pipeline = ::Gapic::Config::Method.new get_pipeline_config + list_pipelines_config = parent_rpcs.list_pipelines if parent_rpcs.respond_to? :list_pipelines + @list_pipelines = ::Gapic::Config::Method.new list_pipelines_config + create_pipeline_config = parent_rpcs.create_pipeline if parent_rpcs.respond_to? :create_pipeline + @create_pipeline = ::Gapic::Config::Method.new create_pipeline_config + update_pipeline_config = parent_rpcs.update_pipeline if parent_rpcs.respond_to? :update_pipeline + @update_pipeline = ::Gapic::Config::Method.new update_pipeline_config + delete_pipeline_config = parent_rpcs.delete_pipeline if parent_rpcs.respond_to? :delete_pipeline + @delete_pipeline = ::Gapic::Config::Method.new delete_pipeline_config + get_google_api_source_config = parent_rpcs.get_google_api_source if parent_rpcs.respond_to? :get_google_api_source + @get_google_api_source = ::Gapic::Config::Method.new get_google_api_source_config + list_google_api_sources_config = parent_rpcs.list_google_api_sources if parent_rpcs.respond_to? :list_google_api_sources + @list_google_api_sources = ::Gapic::Config::Method.new list_google_api_sources_config + create_google_api_source_config = parent_rpcs.create_google_api_source if parent_rpcs.respond_to? :create_google_api_source + @create_google_api_source = ::Gapic::Config::Method.new create_google_api_source_config + update_google_api_source_config = parent_rpcs.update_google_api_source if parent_rpcs.respond_to? :update_google_api_source + @update_google_api_source = ::Gapic::Config::Method.new update_google_api_source_config + delete_google_api_source_config = parent_rpcs.delete_google_api_source if parent_rpcs.respond_to? :delete_google_api_source + @delete_google_api_source = ::Gapic::Config::Method.new delete_google_api_source_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb new file mode 100644 index 000000000000..c614b3676ac4 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Eventarc + module V1 + module Eventarc + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "eventarc.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the Eventarc 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 Eventarc 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::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Eventarc::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "eventarc.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] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/service_stub.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/service_stub.rb new file mode 100644 index 000000000000..f2628aad0e57 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/service_stub.rb @@ -0,0 +1,2474 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/v1/eventarc_pb" + +module Google + module Cloud + module Eventarc + module V1 + module Eventarc + module Rest + ## + # REST service stub for the Eventarc 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 get_trigger REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetTriggerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::Trigger] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::Trigger] + # A result object deserialized from the server's reply + def get_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_trigger_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_trigger", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::Trigger.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_triggers REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListTriggersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::ListTriggersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::ListTriggersResponse] + # A result object deserialized from the server's reply + def list_triggers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_triggers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_triggers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::ListTriggersResponse.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_trigger REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreateTriggerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_trigger_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_trigger", + 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_trigger REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateTriggerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_trigger_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_trigger", + 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_trigger REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteTriggerRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_trigger request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_trigger_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_trigger", + 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_channel REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::Channel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::Channel] + # A result object deserialized from the server's reply + def get_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_channel_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_channel", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::Channel.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_channels REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListChannelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::ListChannelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::ListChannelsResponse] + # A result object deserialized from the server's reply + def list_channels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_channels_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_channels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::ListChannelsResponse.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_channel REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreateChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_channel_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_channel", + 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_channel REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_channel_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_channel", + 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_channel REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_channel_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_channel", + 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_provider REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetProviderRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::Provider] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::Provider] + # A result object deserialized from the server's reply + def get_provider request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_provider_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_provider", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::Provider.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_providers REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListProvidersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::ListProvidersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::ListProvidersResponse] + # A result object deserialized from the server's reply + def list_providers request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_providers_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_providers", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::ListProvidersResponse.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_channel_connection REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::ChannelConnection] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::ChannelConnection] + # A result object deserialized from the server's reply + def get_channel_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_channel_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_channel_connection", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::ChannelConnection.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_channel_connections REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse] + # A result object deserialized from the server's reply + def list_channel_connections request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_channel_connections_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_channel_connections", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse.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_channel_connection REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_channel_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_channel_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_channel_connection", + 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_channel_connection REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_channel_connection request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_channel_connection_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_channel_connection", + 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_google_channel_config REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] + # A result object deserialized from the server's reply + def get_google_channel_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_google_channel_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_google_channel_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::GoogleChannelConfig.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_google_channel_config REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] + # A result object deserialized from the server's reply + def update_google_channel_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_google_channel_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_google_channel_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::GoogleChannelConfig.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_message_bus REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetMessageBusRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::MessageBus] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::MessageBus] + # A result object deserialized from the server's reply + def get_message_bus request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_message_bus_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_message_bus", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::MessageBus.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_message_buses REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListMessageBusesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::ListMessageBusesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::ListMessageBusesResponse] + # A result object deserialized from the server's reply + def list_message_buses request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_message_buses_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_message_buses", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::ListMessageBusesResponse.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_message_bus_enrollments REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse] + # A result object deserialized from the server's reply + def list_message_bus_enrollments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_message_bus_enrollments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_message_bus_enrollments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse.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_message_bus REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreateMessageBusRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_message_bus request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_message_bus_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_message_bus", + 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_message_bus REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_message_bus request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_message_bus_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_message_bus", + 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_message_bus REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_message_bus request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_message_bus_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_message_bus", + 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_enrollment REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetEnrollmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::Enrollment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::Enrollment] + # A result object deserialized from the server's reply + def get_enrollment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_enrollment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_enrollment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::Enrollment.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_enrollments REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse] + # A result object deserialized from the server's reply + def list_enrollments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_enrollments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_enrollments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse.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_enrollment REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_enrollment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_enrollment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_enrollment", + 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_enrollment REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_enrollment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_enrollment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_enrollment", + 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_enrollment REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_enrollment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_enrollment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_enrollment", + 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_pipeline REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetPipelineRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::Pipeline] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::Pipeline] + # A result object deserialized from the server's reply + def get_pipeline request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_pipeline_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_pipeline", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::Pipeline.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_pipelines REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListPipelinesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::ListPipelinesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::ListPipelinesResponse] + # A result object deserialized from the server's reply + def list_pipelines request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_pipelines_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_pipelines", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::ListPipelinesResponse.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_pipeline REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreatePipelineRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_pipeline request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_pipeline_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_pipeline", + 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_pipeline REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdatePipelineRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_pipeline request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_pipeline_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_pipeline", + 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_pipeline REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeletePipelineRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_pipeline request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_pipeline_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_pipeline", + 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_google_api_source REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::GoogleApiSource] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource] + # A result object deserialized from the server's reply + def get_google_api_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_google_api_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_google_api_source", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::GoogleApiSource.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_google_api_sources REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse] + # A result object deserialized from the server's reply + def list_google_api_sources request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_google_api_sources_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_google_api_sources", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse.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_google_api_source REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_google_api_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_google_api_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_google_api_source", + 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_google_api_source REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_google_api_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_google_api_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_google_api_source", + 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_google_api_source REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_google_api_source request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_google_api_source_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_google_api_source", + 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 get_trigger REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetTriggerRequest] + # 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_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_triggers REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListTriggersRequest] + # 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_triggers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/triggers", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_trigger REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreateTriggerRequest] + # 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_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/triggers", + body: "trigger", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_trigger REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateTriggerRequest] + # 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_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{trigger.name}", + body: "trigger", + matches: [ + ["trigger.name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_trigger REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteTriggerRequest] + # 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_trigger_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_channel REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetChannelRequest] + # 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_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_channels REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListChannelsRequest] + # 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_channels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/channels", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_channel REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreateChannelRequest] + # 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_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/channels", + body: "channel", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_channel REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateChannelRequest] + # 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_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{channel.name}", + body: "channel", + matches: [ + ["channel.name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_channel REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteChannelRequest] + # 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_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_provider REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetProviderRequest] + # 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_provider_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/providers/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_providers REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListProvidersRequest] + # 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_providers_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/providers", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_channel_connection REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest] + # 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_channel_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_channel_connections REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest] + # 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_channel_connections_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/channelConnections", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_channel_connection REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest] + # 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_channel_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/channelConnections", + body: "channel_connection", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_channel_connection REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest] + # 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_channel_connection_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_google_channel_config REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest] + # 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_google_channel_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/googleChannelConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_google_channel_config REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest] + # 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_google_channel_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{google_channel_config.name}", + body: "google_channel_config", + matches: [ + ["google_channel_config.name", %r{^projects/[^/]+/locations/[^/]+/googleChannelConfig/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_message_bus REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetMessageBusRequest] + # 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_message_bus_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_message_buses REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListMessageBusesRequest] + # 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_message_buses_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/messageBuses", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_message_bus_enrollments REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest] + # 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_message_bus_enrollments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}:listEnrollments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_message_bus REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreateMessageBusRequest] + # 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_message_bus_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/messageBuses", + body: "message_bus", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_message_bus REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest] + # 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_message_bus_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{message_bus.name}", + body: "message_bus", + matches: [ + ["message_bus.name", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_message_bus REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest] + # 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_message_bus_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_enrollment REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetEnrollmentRequest] + # 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_enrollment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_enrollments REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest] + # 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_enrollments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/enrollments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_enrollment REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest] + # 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_enrollment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/enrollments", + body: "enrollment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_enrollment REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest] + # 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_enrollment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{enrollment.name}", + body: "enrollment", + matches: [ + ["enrollment.name", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_enrollment REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest] + # 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_enrollment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_pipeline REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetPipelineRequest] + # 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_pipeline_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_pipelines REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListPipelinesRequest] + # 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_pipelines_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/pipelines", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_pipeline REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreatePipelineRequest] + # 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_pipeline_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/pipelines", + body: "pipeline", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_pipeline REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdatePipelineRequest] + # 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_pipeline_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{pipeline.name}", + body: "pipeline", + matches: [ + ["pipeline.name", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_pipeline REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeletePipelineRequest] + # 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_pipeline_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_google_api_source REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest] + # 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_google_api_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_google_api_sources REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest] + # 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_google_api_sources_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/googleApiSources", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_google_api_source REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest] + # 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_google_api_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/googleApiSources", + body: "google_api_source", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_google_api_source REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest] + # 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_google_api_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{google_api_source.name}", + body: "google_api_source", + matches: [ + ["google_api_source.name", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_google_api_source REST call + # + # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest] + # 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_google_api_source_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_pb.rb new file mode 100644 index 000000000000..aec41989c61a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_pb.rb @@ -0,0 +1,118 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/eventarc/v1/eventarc.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/eventarc/v1/channel_pb' +require 'google/cloud/eventarc/v1/channel_connection_pb' +require 'google/cloud/eventarc/v1/discovery_pb' +require 'google/cloud/eventarc/v1/enrollment_pb' +require 'google/cloud/eventarc/v1/google_api_source_pb' +require 'google/cloud/eventarc/v1/google_channel_config_pb' +require 'google/cloud/eventarc/v1/message_bus_pb' +require 'google/cloud/eventarc/v1/pipeline_pb' +require 'google/cloud/eventarc/v1/trigger_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\'google/cloud/eventarc/v1/eventarc.proto\x12\x18google.cloud.eventarc.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/eventarc/v1/channel.proto\x1a\x31google/cloud/eventarc/v1/channel_connection.proto\x1a(google/cloud/eventarc/v1/discovery.proto\x1a)google/cloud/eventarc/v1/enrollment.proto\x1a\x30google/cloud/eventarc/v1/google_api_source.proto\x1a\x34google/cloud/eventarc/v1/google_channel_config.proto\x1a*google/cloud/eventarc/v1/message_bus.proto\x1a\'google/cloud/eventarc/v1/pipeline.proto\x1a&google/cloud/eventarc/v1/trigger.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"J\n\x11GetTriggerRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Trigger\"\x97\x01\n\x13ListTriggersRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x65ventarc.googleapis.com/Trigger\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"y\n\x14ListTriggersResponse\x12\x33\n\x08triggers\x18\x01 \x03(\x0b\x32!.google.cloud.eventarc.v1.Trigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbd\x01\n\x14\x43reateTriggerRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x65ventarc.googleapis.com/Trigger\x12\x37\n\x07trigger\x18\x02 \x01(\x0b\x32!.google.cloud.eventarc.v1.TriggerB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xae\x01\n\x14UpdateTriggerRequest\x12\x32\n\x07trigger\x18\x01 \x01(\x0b\x32!.google.cloud.eventarc.v1.Trigger\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x8e\x01\n\x14\x44\x65leteTriggerRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Trigger\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"J\n\x11GetChannelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Channel\"\x87\x01\n\x13ListChannelsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x65ventarc.googleapis.com/Channel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x04 \x01(\t\"y\n\x14ListChannelsResponse\x12\x33\n\x08\x63hannels\x18\x01 \x03(\x0b\x32!.google.cloud.eventarc.v1.Channel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbd\x01\n\x14\x43reateChannelRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x65ventarc.googleapis.com/Channel\x12\x37\n\x07\x63hannel\x18\x02 \x01(\x0b\x32!.google.cloud.eventarc.v1.ChannelB\x03\xe0\x41\x02\x12\x17\n\nchannel_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x97\x01\n\x14UpdateChannelRequest\x12\x32\n\x07\x63hannel\x18\x01 \x01(\x0b\x32!.google.cloud.eventarc.v1.Channel\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"i\n\x14\x44\x65leteChannelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Channel\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"L\n\x12GetProviderRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n eventarc.googleapis.com/Provider\"\x99\x01\n\x14ListProvidersRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 eventarc.googleapis.com/Provider\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"|\n\x15ListProvidersResponse\x12\x35\n\tproviders\x18\x01 \x03(\x0b\x32\".google.cloud.eventarc.v1.Provider\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"^\n\x1bGetChannelConnectionRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)eventarc.googleapis.com/ChannelConnection\"\x89\x01\n\x1dListChannelConnectionsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)eventarc.googleapis.com/ChannelConnection\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x98\x01\n\x1eListChannelConnectionsResponse\x12H\n\x13\x63hannel_connections\x18\x01 \x03(\x0b\x32+.google.cloud.eventarc.v1.ChannelConnection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xd5\x01\n\x1e\x43reateChannelConnectionRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)eventarc.googleapis.com/ChannelConnection\x12L\n\x12\x63hannel_connection\x18\x02 \x01(\x0b\x32+.google.cloud.eventarc.v1.ChannelConnectionB\x03\xe0\x41\x02\x12\"\n\x15\x63hannel_connection_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"a\n\x1e\x44\x65leteChannelConnectionRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)eventarc.googleapis.com/ChannelConnection\"\xa6\x01\n UpdateGoogleChannelConfigRequest\x12Q\n\x15google_channel_config\x18\x01 \x01(\x0b\x32-.google.cloud.eventarc.v1.GoogleChannelConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"b\n\x1dGetGoogleChannelConfigRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+eventarc.googleapis.com/GoogleChannelConfig\"P\n\x14GetMessageBusRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"eventarc.googleapis.com/MessageBus\"\xb2\x01\n\x17ListMessageBusesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"eventarc.googleapis.com/MessageBus\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\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x85\x01\n\x18ListMessageBusesResponse\x12;\n\rmessage_buses\x18\x01 \x03(\x0b\x32$.google.cloud.eventarc.v1.MessageBus\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8f\x01\n ListMessageBusEnrollmentsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"eventarc.googleapis.com/MessageBus\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!ListMessageBusEnrollmentsResponse\x12\x13\n\x0b\x65nrollments\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xce\x01\n\x17\x43reateMessageBusRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"eventarc.googleapis.com/MessageBus\x12>\n\x0bmessage_bus\x18\x02 \x01(\x0b\x32$.google.cloud.eventarc.v1.MessageBusB\x03\xe0\x41\x02\x12\x1b\n\x0emessage_bus_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xc7\x01\n\x17UpdateMessageBusRequest\x12>\n\x0bmessage_bus\x18\x01 \x01(\x0b\x32$.google.cloud.eventarc.v1.MessageBusB\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\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x9e\x01\n\x17\x44\x65leteMessageBusRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"eventarc.googleapis.com/MessageBus\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"P\n\x14GetEnrollmentRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"eventarc.googleapis.com/Enrollment\"\xb1\x01\n\x16ListEnrollmentsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"eventarc.googleapis.com/Enrollment\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\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x82\x01\n\x17ListEnrollmentsResponse\x12\x39\n\x0b\x65nrollments\x18\x01 \x03(\x0b\x32$.google.cloud.eventarc.v1.Enrollment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xcc\x01\n\x17\x43reateEnrollmentRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"eventarc.googleapis.com/Enrollment\x12=\n\nenrollment\x18\x02 \x01(\x0b\x32$.google.cloud.eventarc.v1.EnrollmentB\x03\xe0\x41\x02\x12\x1a\n\renrollment_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xc6\x01\n\x17UpdateEnrollmentRequest\x12=\n\nenrollment\x18\x01 \x01(\x0b\x32$.google.cloud.eventarc.v1.EnrollmentB\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\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x9e\x01\n\x17\x44\x65leteEnrollmentRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"eventarc.googleapis.com/Enrollment\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"L\n\x12GetPipelineRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n eventarc.googleapis.com/Pipeline\"\xad\x01\n\x14ListPipelinesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 eventarc.googleapis.com/Pipeline\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\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"|\n\x15ListPipelinesResponse\x12\x35\n\tpipelines\x18\x01 \x03(\x0b\x32\".google.cloud.eventarc.v1.Pipeline\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xc2\x01\n\x15\x43reatePipelineRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 eventarc.googleapis.com/Pipeline\x12\x39\n\x08pipeline\x18\x02 \x01(\x0b\x32\".google.cloud.eventarc.v1.PipelineB\x03\xe0\x41\x02\x12\x18\n\x0bpipeline_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xc0\x01\n\x15UpdatePipelineRequest\x12\x39\n\x08pipeline\x18\x01 \x01(\x0b\x32\".google.cloud.eventarc.v1.PipelineB\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\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x9a\x01\n\x15\x44\x65letePipelineRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n eventarc.googleapis.com/Pipeline\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"Z\n\x19GetGoogleApiSourceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'eventarc.googleapis.com/GoogleApiSource\"\xbb\x01\n\x1bListGoogleApiSourcesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'eventarc.googleapis.com/GoogleApiSource\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\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x93\x01\n\x1cListGoogleApiSourcesResponse\x12\x45\n\x12google_api_sources\x18\x01 \x03(\x0b\x32).google.cloud.eventarc.v1.GoogleApiSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xe9\x01\n\x1c\x43reateGoogleApiSourceRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'eventarc.googleapis.com/GoogleApiSource\x12I\n\x11google_api_source\x18\x02 \x01(\x0b\x32).google.cloud.eventarc.v1.GoogleApiSourceB\x03\xe0\x41\x02\x12!\n\x14google_api_source_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xd7\x01\n\x1cUpdateGoogleApiSourceRequest\x12I\n\x11google_api_source\x18\x01 \x01(\x0b\x32).google.cloud.eventarc.v1.GoogleApiSourceB\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\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x1c\x44\x65leteGoogleApiSourceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'eventarc.googleapis.com/GoogleApiSource\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\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\x32\xf5@\n\x08\x45ventarc\x12\x99\x01\n\nGetTrigger\x12+.google.cloud.eventarc.v1.GetTriggerRequest\x1a!.google.cloud.eventarc.v1.Trigger\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/triggers/*}\x12\xac\x01\n\x0cListTriggers\x12-.google.cloud.eventarc.v1.ListTriggersRequest\x1a..google.cloud.eventarc.v1.ListTriggersResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/triggers\x12\xd8\x01\n\rCreateTrigger\x12..google.cloud.eventarc.v1.CreateTriggerRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x1c\n\x07Trigger\x12\x11OperationMetadata\xda\x41\x19parent,trigger,trigger_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/triggers:\x07trigger\x12\xe9\x01\n\rUpdateTrigger\x12..google.cloud.eventarc.v1.UpdateTriggerRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41\x1c\n\x07Trigger\x12\x11OperationMetadata\xda\x41!trigger,update_mask,allow_missing\x82\xd3\xe4\x93\x02?24/v1/{trigger.name=projects/*/locations/*/triggers/*}:\x07trigger\x12\xc8\x01\n\rDeleteTrigger\x12..google.cloud.eventarc.v1.DeleteTriggerRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41\x1c\n\x07Trigger\x12\x11OperationMetadata\xda\x41\x12name,allow_missing\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/triggers/*}\x12\x99\x01\n\nGetChannel\x12+.google.cloud.eventarc.v1.GetChannelRequest\x1a!.google.cloud.eventarc.v1.Channel\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/channels/*}\x12\xac\x01\n\x0cListChannels\x12-.google.cloud.eventarc.v1.ListChannelsRequest\x1a..google.cloud.eventarc.v1.ListChannelsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/channels\x12\xd8\x01\n\rCreateChannel\x12..google.cloud.eventarc.v1.CreateChannelRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x1c\n\x07\x43hannel\x12\x11OperationMetadata\xda\x41\x19parent,channel,channel_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/channels:\x07\x63hannel\x12\xda\x01\n\rUpdateChannel\x12..google.cloud.eventarc.v1.UpdateChannelRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07\x43hannel\x12\x11OperationMetadata\xda\x41\x13\x63hannel,update_mask\x82\xd3\xe4\x93\x02?24/v1/{channel.name=projects/*/locations/*/channels/*}:\x07\x63hannel\x12\xba\x01\n\rDeleteChannel\x12..google.cloud.eventarc.v1.DeleteChannelRequest\x1a\x1d.google.longrunning.Operation\"Z\xca\x41\x1c\n\x07\x43hannel\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/channels/*}\x12\x9d\x01\n\x0bGetProvider\x12,.google.cloud.eventarc.v1.GetProviderRequest\x1a\".google.cloud.eventarc.v1.Provider\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/providers/*}\x12\xb0\x01\n\rListProviders\x12..google.cloud.eventarc.v1.ListProvidersRequest\x1a/.google.cloud.eventarc.v1.ListProvidersResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/providers\x12\xc1\x01\n\x14GetChannelConnection\x12\x35.google.cloud.eventarc.v1.GetChannelConnectionRequest\x1a+.google.cloud.eventarc.v1.ChannelConnection\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/channelConnections/*}\x12\xd4\x01\n\x16ListChannelConnections\x12\x37.google.cloud.eventarc.v1.ListChannelConnectionsRequest\x1a\x38.google.cloud.eventarc.v1.ListChannelConnectionsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*}/channelConnections\x12\xa2\x02\n\x17\x43reateChannelConnection\x12\x38.google.cloud.eventarc.v1.CreateChannelConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41&\n\x11\x43hannelConnection\x12\x11OperationMetadata\xda\x41/parent,channel_connection,channel_connection_id\x82\xd3\xe4\x93\x02L\"6/v1/{parent=projects/*/locations/*}/channelConnections:\x12\x63hannel_connection\x12\xe2\x01\n\x17\x44\x65leteChannelConnection\x12\x38.google.cloud.eventarc.v1.DeleteChannelConnectionRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41&\n\x11\x43hannelConnection\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1/{name=projects/*/locations/*/channelConnections/*}\x12\xc6\x01\n\x16GetGoogleChannelConfig\x12\x37.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest\x1a-.google.cloud.eventarc.v1.GoogleChannelConfig\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/googleChannelConfig}\x12\x97\x02\n\x19UpdateGoogleChannelConfig\x12:.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest\x1a-.google.cloud.eventarc.v1.GoogleChannelConfig\"\x8e\x01\xda\x41!google_channel_config,update_mask\x82\xd3\xe4\x93\x02\x64\x32K/v1/{google_channel_config.name=projects/*/locations/*/googleChannelConfig}:\x15google_channel_config\x12\xa6\x01\n\rGetMessageBus\x12..google.cloud.eventarc.v1.GetMessageBusRequest\x1a$.google.cloud.eventarc.v1.MessageBus\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/messageBuses/*}\x12\xbc\x01\n\x10ListMessageBuses\x12\x31.google.cloud.eventarc.v1.ListMessageBusesRequest\x1a\x32.google.cloud.eventarc.v1.ListMessageBusesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/messageBuses\x12\xe9\x01\n\x19ListMessageBusEnrollments\x12:.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest\x1a;.google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/messageBuses/*}:listEnrollments\x12\xf2\x01\n\x10\x43reateMessageBus\x12\x31.google.cloud.eventarc.v1.CreateMessageBusRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41\x1f\n\nMessageBus\x12\x11OperationMetadata\xda\x41!parent,message_bus,message_bus_id\x82\xd3\xe4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/messageBuses:\x0bmessage_bus\x12\xf4\x01\n\x10UpdateMessageBus\x12\x31.google.cloud.eventarc.v1.UpdateMessageBusRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41\x1f\n\nMessageBus\x12\x11OperationMetadata\xda\x41\x17message_bus,update_mask\x82\xd3\xe4\x93\x02K2\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/enrollments/*}\x12\xb8\x01\n\x0fListEnrollments\x12\x30.google.cloud.eventarc.v1.ListEnrollmentsRequest\x1a\x31.google.cloud.eventarc.v1.ListEnrollmentsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/enrollments\x12\xee\x01\n\x10\x43reateEnrollment\x12\x31.google.cloud.eventarc.v1.CreateEnrollmentRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nEnrollment\x12\x11OperationMetadata\xda\x41\x1fparent,enrollment,enrollment_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/enrollments:\nenrollment\x12\xf0\x01\n\x10UpdateEnrollment\x12\x31.google.cloud.eventarc.v1.UpdateEnrollmentRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nEnrollment\x12\x11OperationMetadata\xda\x41\x16\x65nrollment,update_mask\x82\xd3\xe4\x93\x02H2:/v1/{enrollment.name=projects/*/locations/*/enrollments/*}:\nenrollment\x12\xcb\x01\n\x10\x44\x65leteEnrollment\x12\x31.google.cloud.eventarc.v1.DeleteEnrollmentRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41\x1f\n\nEnrollment\x12\x11OperationMetadata\xda\x41\tname,etag\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/enrollments/*}\x12\x9d\x01\n\x0bGetPipeline\x12,.google.cloud.eventarc.v1.GetPipelineRequest\x1a\".google.cloud.eventarc.v1.Pipeline\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/pipelines/*}\x12\xb0\x01\n\rListPipelines\x12..google.cloud.eventarc.v1.ListPipelinesRequest\x1a/.google.cloud.eventarc.v1.ListPipelinesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/pipelines\x12\xdf\x01\n\x0e\x43reatePipeline\x12/.google.cloud.eventarc.v1.CreatePipelineRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Pipeline\x12\x11OperationMetadata\xda\x41\x1bparent,pipeline,pipeline_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/pipelines:\x08pipeline\x12\xe1\x01\n\x0eUpdatePipeline\x12/.google.cloud.eventarc.v1.UpdatePipelineRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Pipeline\x12\x11OperationMetadata\xda\x41\x14pipeline,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{pipeline.name=projects/*/locations/*/pipelines/*}:\x08pipeline\x12\xc3\x01\n\x0e\x44\x65letePipeline\x12/.google.cloud.eventarc.v1.DeletePipelineRequest\x1a\x1d.google.longrunning.Operation\"a\xca\x41\x1d\n\x08Pipeline\x12\x11OperationMetadata\xda\x41\tname,etag\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/pipelines/*}\x12\xb9\x01\n\x12GetGoogleApiSource\x12\x33.google.cloud.eventarc.v1.GetGoogleApiSourceRequest\x1a).google.cloud.eventarc.v1.GoogleApiSource\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/googleApiSources/*}\x12\xcc\x01\n\x14ListGoogleApiSources\x12\x35.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest\x1a\x36.google.cloud.eventarc.v1.ListGoogleApiSourcesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/googleApiSources\x12\x97\x02\n\x15\x43reateGoogleApiSource\x12\x36.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41$\n\x0fGoogleApiSource\x12\x11OperationMetadata\xda\x41-parent,google_api_source,google_api_source_id\x82\xd3\xe4\x93\x02I\"4/v1/{parent=projects/*/locations/*}/googleApiSources:\x11google_api_source\x12\x99\x02\n\x15UpdateGoogleApiSource\x12\x36.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41$\n\x0fGoogleApiSource\x12\x11OperationMetadata\xda\x41\x1dgoogle_api_source,update_mask\x82\xd3\xe4\x93\x02[2F/v1/{google_api_source.name=projects/*/locations/*/googleApiSources/*}:\x11google_api_source\x12\xdf\x01\n\x15\x44\x65leteGoogleApiSource\x12\x36.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41$\n\x0fGoogleApiSource\x12\x11OperationMetadata\xda\x41\tname,etag\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/googleApiSources/*}\x1aK\xca\x41\x17\x65ventarc.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbd\x01\n\x1c\x63om.google.cloud.eventarc.v1B\rEventarcProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.cloud.eventarc.v1.Trigger", "google/cloud/eventarc/v1/trigger.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.cloud.eventarc.v1.Channel", "google/cloud/eventarc/v1/channel.proto"], + ["google.cloud.eventarc.v1.Provider", "google/cloud/eventarc/v1/discovery.proto"], + ["google.cloud.eventarc.v1.ChannelConnection", "google/cloud/eventarc/v1/channel_connection.proto"], + ["google.cloud.eventarc.v1.GoogleChannelConfig", "google/cloud/eventarc/v1/google_channel_config.proto"], + ["google.cloud.eventarc.v1.MessageBus", "google/cloud/eventarc/v1/message_bus.proto"], + ["google.cloud.eventarc.v1.Enrollment", "google/cloud/eventarc/v1/enrollment.proto"], + ["google.cloud.eventarc.v1.Pipeline", "google/cloud/eventarc/v1/pipeline.proto"], + ["google.cloud.eventarc.v1.GoogleApiSource", "google/cloud/eventarc/v1/google_api_source.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Eventarc + module V1 + GetTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetTriggerRequest").msgclass + ListTriggersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListTriggersRequest").msgclass + ListTriggersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListTriggersResponse").msgclass + CreateTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreateTriggerRequest").msgclass + UpdateTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdateTriggerRequest").msgclass + DeleteTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeleteTriggerRequest").msgclass + GetChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetChannelRequest").msgclass + ListChannelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListChannelsRequest").msgclass + ListChannelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListChannelsResponse").msgclass + CreateChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreateChannelRequest").msgclass + UpdateChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdateChannelRequest").msgclass + DeleteChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeleteChannelRequest").msgclass + GetProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetProviderRequest").msgclass + ListProvidersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListProvidersRequest").msgclass + ListProvidersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListProvidersResponse").msgclass + GetChannelConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetChannelConnectionRequest").msgclass + ListChannelConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListChannelConnectionsRequest").msgclass + ListChannelConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListChannelConnectionsResponse").msgclass + CreateChannelConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreateChannelConnectionRequest").msgclass + DeleteChannelConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeleteChannelConnectionRequest").msgclass + UpdateGoogleChannelConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest").msgclass + GetGoogleChannelConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetGoogleChannelConfigRequest").msgclass + GetMessageBusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetMessageBusRequest").msgclass + ListMessageBusesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListMessageBusesRequest").msgclass + ListMessageBusesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListMessageBusesResponse").msgclass + ListMessageBusEnrollmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest").msgclass + ListMessageBusEnrollmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse").msgclass + CreateMessageBusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreateMessageBusRequest").msgclass + UpdateMessageBusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdateMessageBusRequest").msgclass + DeleteMessageBusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeleteMessageBusRequest").msgclass + GetEnrollmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetEnrollmentRequest").msgclass + ListEnrollmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListEnrollmentsRequest").msgclass + ListEnrollmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListEnrollmentsResponse").msgclass + CreateEnrollmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreateEnrollmentRequest").msgclass + UpdateEnrollmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdateEnrollmentRequest").msgclass + DeleteEnrollmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeleteEnrollmentRequest").msgclass + GetPipelineRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetPipelineRequest").msgclass + ListPipelinesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListPipelinesRequest").msgclass + ListPipelinesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListPipelinesResponse").msgclass + CreatePipelineRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreatePipelineRequest").msgclass + UpdatePipelineRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdatePipelineRequest").msgclass + DeletePipelineRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeletePipelineRequest").msgclass + GetGoogleApiSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetGoogleApiSourceRequest").msgclass + ListGoogleApiSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListGoogleApiSourcesRequest").msgclass + ListGoogleApiSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListGoogleApiSourcesResponse").msgclass + CreateGoogleApiSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreateGoogleApiSourceRequest").msgclass + UpdateGoogleApiSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest").msgclass + DeleteGoogleApiSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_services_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_services_pb.rb new file mode 100644 index 000000000000..ab08ceb88e7c --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_services_pb.rb @@ -0,0 +1,124 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/eventarc/v1/eventarc.proto for package 'Google.Cloud.Eventarc.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/eventarc/v1/eventarc_pb' + +module Google + module Cloud + module Eventarc + module V1 + module Eventarc + # Eventarc allows users to subscribe to various events that are provided by + # Google Cloud services and forward them to supported destinations. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.eventarc.v1.Eventarc' + + # Get a single trigger. + rpc :GetTrigger, ::Google::Cloud::Eventarc::V1::GetTriggerRequest, ::Google::Cloud::Eventarc::V1::Trigger + # List triggers. + rpc :ListTriggers, ::Google::Cloud::Eventarc::V1::ListTriggersRequest, ::Google::Cloud::Eventarc::V1::ListTriggersResponse + # Create a new trigger in a particular project and location. + rpc :CreateTrigger, ::Google::Cloud::Eventarc::V1::CreateTriggerRequest, ::Google::Longrunning::Operation + # Update a single trigger. + rpc :UpdateTrigger, ::Google::Cloud::Eventarc::V1::UpdateTriggerRequest, ::Google::Longrunning::Operation + # Delete a single trigger. + rpc :DeleteTrigger, ::Google::Cloud::Eventarc::V1::DeleteTriggerRequest, ::Google::Longrunning::Operation + # Get a single Channel. + rpc :GetChannel, ::Google::Cloud::Eventarc::V1::GetChannelRequest, ::Google::Cloud::Eventarc::V1::Channel + # List channels. + rpc :ListChannels, ::Google::Cloud::Eventarc::V1::ListChannelsRequest, ::Google::Cloud::Eventarc::V1::ListChannelsResponse + # Create a new channel in a particular project and location. + rpc :CreateChannel, ::Google::Cloud::Eventarc::V1::CreateChannelRequest, ::Google::Longrunning::Operation + # Update a single channel. + rpc :UpdateChannel, ::Google::Cloud::Eventarc::V1::UpdateChannelRequest, ::Google::Longrunning::Operation + # Delete a single channel. + rpc :DeleteChannel, ::Google::Cloud::Eventarc::V1::DeleteChannelRequest, ::Google::Longrunning::Operation + # Get a single Provider. + rpc :GetProvider, ::Google::Cloud::Eventarc::V1::GetProviderRequest, ::Google::Cloud::Eventarc::V1::Provider + # List providers. + rpc :ListProviders, ::Google::Cloud::Eventarc::V1::ListProvidersRequest, ::Google::Cloud::Eventarc::V1::ListProvidersResponse + # Get a single ChannelConnection. + rpc :GetChannelConnection, ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest, ::Google::Cloud::Eventarc::V1::ChannelConnection + # List channel connections. + rpc :ListChannelConnections, ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest, ::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse + # Create a new ChannelConnection in a particular project and location. + rpc :CreateChannelConnection, ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest, ::Google::Longrunning::Operation + # Delete a single ChannelConnection. + rpc :DeleteChannelConnection, ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest, ::Google::Longrunning::Operation + # Get a GoogleChannelConfig. + # The name of the GoogleChannelConfig in the response is ALWAYS coded with + # projectID. + rpc :GetGoogleChannelConfig, ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest, ::Google::Cloud::Eventarc::V1::GoogleChannelConfig + # Update a single GoogleChannelConfig + rpc :UpdateGoogleChannelConfig, ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest, ::Google::Cloud::Eventarc::V1::GoogleChannelConfig + # Get a single MessageBus. + rpc :GetMessageBus, ::Google::Cloud::Eventarc::V1::GetMessageBusRequest, ::Google::Cloud::Eventarc::V1::MessageBus + # List message buses. + rpc :ListMessageBuses, ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest, ::Google::Cloud::Eventarc::V1::ListMessageBusesResponse + # List message bus enrollments. + rpc :ListMessageBusEnrollments, ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest, ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse + # Create a new MessageBus in a particular project and location. + rpc :CreateMessageBus, ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest, ::Google::Longrunning::Operation + # Update a single message bus. + rpc :UpdateMessageBus, ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest, ::Google::Longrunning::Operation + # Delete a single message bus. + rpc :DeleteMessageBus, ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest, ::Google::Longrunning::Operation + # Get a single Enrollment. + rpc :GetEnrollment, ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest, ::Google::Cloud::Eventarc::V1::Enrollment + # List Enrollments. + rpc :ListEnrollments, ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest, ::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse + # Create a new Enrollment in a particular project and location. + rpc :CreateEnrollment, ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest, ::Google::Longrunning::Operation + # Update a single Enrollment. + rpc :UpdateEnrollment, ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest, ::Google::Longrunning::Operation + # Delete a single Enrollment. + rpc :DeleteEnrollment, ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest, ::Google::Longrunning::Operation + # Get a single Pipeline. + rpc :GetPipeline, ::Google::Cloud::Eventarc::V1::GetPipelineRequest, ::Google::Cloud::Eventarc::V1::Pipeline + # List pipelines. + rpc :ListPipelines, ::Google::Cloud::Eventarc::V1::ListPipelinesRequest, ::Google::Cloud::Eventarc::V1::ListPipelinesResponse + # Create a new Pipeline in a particular project and location. + rpc :CreatePipeline, ::Google::Cloud::Eventarc::V1::CreatePipelineRequest, ::Google::Longrunning::Operation + # Update a single pipeline. + rpc :UpdatePipeline, ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest, ::Google::Longrunning::Operation + # Delete a single pipeline. + rpc :DeletePipeline, ::Google::Cloud::Eventarc::V1::DeletePipelineRequest, ::Google::Longrunning::Operation + # Get a single GoogleApiSource. + rpc :GetGoogleApiSource, ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest, ::Google::Cloud::Eventarc::V1::GoogleApiSource + # List GoogleApiSources. + rpc :ListGoogleApiSources, ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest, ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse + # Create a new GoogleApiSource in a particular project and location. + rpc :CreateGoogleApiSource, ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest, ::Google::Longrunning::Operation + # Update a single GoogleApiSource. + rpc :UpdateGoogleApiSource, ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest, ::Google::Longrunning::Operation + # Delete a single GoogleApiSource. + rpc :DeleteGoogleApiSource, ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_api_source_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_api_source_pb.rb new file mode 100644 index 000000000000..e3c9e2336923 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_api_source_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/eventarc/v1/google_api_source.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/eventarc/v1/logging_config_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n0google/cloud/eventarc/v1/google_api_source.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/eventarc/v1/logging_config.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x95\t\n\x0fGoogleApiSource\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\x11\n\x04\x65tag\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\x12J\n\x06labels\x18\x06 \x03(\x0b\x32\x35.google.cloud.eventarc.v1.GoogleApiSource.LabelsEntryB\x03\xe0\x41\x01\x12T\n\x0b\x61nnotations\x18\x07 \x03(\x0b\x32:.google.cloud.eventarc.v1.GoogleApiSource.AnnotationsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12?\n\x0b\x64\x65stination\x18\t \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"eventarc.googleapis.com/MessageBus\x12\x42\n\x0f\x63rypto_key_name\x18\n \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x44\n\x0elogging_config\x18\x0b \x01(\x0b\x32\'.google.cloud.eventarc.v1.LoggingConfigB\x03\xe0\x41\x01\x12l\n\x19organization_subscription\x18\x0c \x01(\x0b\x32\x42.google.cloud.eventarc.v1.GoogleApiSource.OrganizationSubscriptionB\x03\xe0\x41\x01H\x00\x12\x64\n\x15project_subscriptions\x18\r \x01(\x0b\x32>.google.cloud.eventarc.v1.GoogleApiSource.ProjectSubscriptionsB\x03\xe0\x41\x01H\x00\x1a)\n\x14ProjectSubscriptions\x12\x11\n\x04list\x18\x01 \x03(\tB\x03\xe0\x41\x02\x1a\x30\n\x18OrganizationSubscription\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\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\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9e\x01\xea\x41\x9a\x01\n\'eventarc.googleapis.com/GoogleApiSource\x12Lprojects/{project}/locations/{location}/googleApiSources/{google_api_source}*\x10googleApiSources2\x0fgoogleApiSourceB\x19\n\x17wide_scope_subscriptionB\xc4\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x14GoogleApiSourceProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.eventarc.v1.LoggingConfig", "google/cloud/eventarc/v1/logging_config.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Eventarc + module V1 + GoogleApiSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GoogleApiSource").msgclass + GoogleApiSource::ProjectSubscriptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GoogleApiSource.ProjectSubscriptions").msgclass + GoogleApiSource::OrganizationSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GoogleApiSource.OrganizationSubscription").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_channel_config_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_channel_config_pb.rb new file mode 100644 index 000000000000..a13ab31abd3f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_channel_config_pb.rb @@ -0,0 +1,47 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/eventarc/v1/google_channel_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/eventarc/v1/google_channel_config.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x03\n\x13GoogleChannelConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x0f\x63rypto_key_name\x18\x07 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12N\n\x06labels\x18\x08 \x03(\x0b\x32\x39.google.cloud.eventarc.v1.GoogleChannelConfig.LabelsEntryB\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:\x99\x01\xea\x41\x95\x01\n+eventarc.googleapis.com/GoogleChannelConfig\x12;projects/{project}/locations/{location}/googleChannelConfig*\x14googleChannelConfigs2\x13googleChannelConfigB\xc3\x02\n\x1c\x63om.google.cloud.eventarc.v1B\x18GoogleChannelConfigProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}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"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Eventarc + module V1 + GoogleChannelConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GoogleChannelConfig").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/logging_config_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/logging_config_pb.rb new file mode 100644 index 000000000000..0d0339e543e0 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/logging_config_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/eventarc/v1/logging_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' + + +descriptor_data = "\n-google/cloud/eventarc/v1/logging_config.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xf8\x01\n\rLoggingConfig\x12N\n\x0clog_severity\x18\x01 \x01(\x0e\x32\x33.google.cloud.eventarc.v1.LoggingConfig.LogSeverityB\x03\xe0\x41\x01\"\x96\x01\n\x0bLogSeverity\x12\x1c\n\x18LOG_SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\n\n\x06NOTICE\x10\x04\x12\x0b\n\x07WARNING\x10\x05\x12\t\n\x05\x45RROR\x10\x06\x12\x0c\n\x08\x43RITICAL\x10\x07\x12\t\n\x05\x41LERT\x10\x08\x12\r\n\tEMERGENCY\x10\tB\xc2\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x12LoggingConfigProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Eventarc + module V1 + LoggingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.LoggingConfig").msgclass + LoggingConfig::LogSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.LoggingConfig.LogSeverity").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/message_bus_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/message_bus_pb.rb new file mode 100644 index 000000000000..7eb68a2df02e --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/message_bus_pb.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/eventarc/v1/message_bus.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/eventarc/v1/logging_config_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n*google/cloud/eventarc/v1/message_bus.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/eventarc/v1/logging_config.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd9\x05\n\nMessageBus\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\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\x45\n\x06labels\x18\x06 \x03(\x0b\x32\x30.google.cloud.eventarc.v1.MessageBus.LabelsEntryB\x03\xe0\x41\x01\x12O\n\x0b\x61nnotations\x18\x07 \x03(\x0b\x32\x35.google.cloud.eventarc.v1.MessageBus.AnnotationsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x0f\x63rypto_key_name\x18\n \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x44\n\x0elogging_config\x18\x0b \x01(\x0b\x32\'.google.cloud.eventarc.v1.LoggingConfigB\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\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x86\x01\xea\x41\x82\x01\n\"eventarc.googleapis.com/MessageBus\x12\x42projects/{project}/locations/{location}/messageBuses/{message_bus}*\x0cmessageBuses2\nmessageBusB\xbf\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x0fMessageBusProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.eventarc.v1.LoggingConfig", "google/cloud/eventarc/v1/logging_config.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Eventarc + module V1 + MessageBus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.MessageBus").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/network_config_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/network_config_pb.rb new file mode 100644 index 000000000000..3610c18613eb --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/network_config_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/eventarc/v1/network_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n-google/cloud/eventarc/v1/network_config.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"]\n\rNetworkConfig\x12L\n\x12network_attachment\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(compute.googleapis.com/NetworkAttachmentB\xc2\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x12NetworkConfigProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Eventarc + module V1 + NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.NetworkConfig").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/pipeline_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/pipeline_pb.rb new file mode 100644 index 000000000000..30e691747f84 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/pipeline_pb.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/eventarc/v1/pipeline.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/eventarc/v1/logging_config_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\'google/cloud/eventarc/v1/pipeline.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/eventarc/v1/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x82\x18\n\x08Pipeline\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x06labels\x18\x04 \x03(\x0b\x32..google.cloud.eventarc.v1.Pipeline.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x05 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12M\n\x0b\x61nnotations\x18\x06 \x03(\x0b\x32\x33.google.cloud.eventarc.v1.Pipeline.AnnotationsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12I\n\x0c\x64\x65stinations\x18\x08 \x03(\x0b\x32..google.cloud.eventarc.v1.Pipeline.DestinationB\x03\xe0\x41\x02\x12\x45\n\nmediations\x18\t \x03(\x0b\x32,.google.cloud.eventarc.v1.Pipeline.MediationB\x03\xe0\x41\x01\x12\x42\n\x0f\x63rypto_key_name\x18\n \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12Z\n\x14input_payload_format\x18\x0b \x01(\x0b\x32\x37.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormatB\x03\xe0\x41\x01\x12\x44\n\x0elogging_config\x18\x0c \x01(\x0b\x32\'.google.cloud.eventarc.v1.LoggingConfigB\x03\xe0\x41\x01\x12I\n\x0cretry_policy\x18\r \x01(\x0b\x32..google.cloud.eventarc.v1.Pipeline.RetryPolicyB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x63 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\x1a\x9f\x03\n\x14MessagePayloadFormat\x12_\n\x08protobuf\x18\x01 \x01(\x0b\x32\x46.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormatB\x03\xe0\x41\x01H\x00\x12W\n\x04\x61vro\x18\x02 \x01(\x0b\x32\x42.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormatB\x03\xe0\x41\x01H\x00\x12W\n\x04json\x18\x03 \x01(\x0b\x32\x42.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormatB\x03\xe0\x41\x01H\x00\x1a\x0c\n\nJsonFormat\x1a\x30\n\x0eProtobufFormat\x12\x1e\n\x11schema_definition\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a,\n\nAvroFormat\x12\x1e\n\x11schema_definition\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x06\n\x04kind\x1a\xe5\t\n\x0b\x44\x65stination\x12Y\n\x0enetwork_config\x18\x01 \x01(\x0b\x32<.google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfigB\x03\xe0\x41\x01\x12Y\n\rhttp_endpoint\x18\x02 \x01(\x0b\x32;.google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpointB\x03\xe0\x41\x01H\x00\x12=\n\x08workflow\x18\x03 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!workflows.googleapis.com/WorkflowH\x00\x12\x41\n\x0bmessage_bus\x18\x04 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"eventarc.googleapis.com/MessageBusH\x00\x12\x34\n\x05topic\x18\x08 \x01(\tB#\xe0\x41\x01\xfa\x41\x1d\n\x1bpubsub.googleapis.com/TopicH\x00\x12g\n\x15\x61uthentication_config\x18\x05 \x01(\x0b\x32\x43.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfigB\x03\xe0\x41\x01\x12[\n\x15output_payload_format\x18\x06 \x01(\x0b\x32\x37.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormatB\x03\xe0\x41\x01\x1a]\n\rNetworkConfig\x12L\n\x12network_attachment\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(compute.googleapis.com/NetworkAttachment\x1aG\n\x0cHttpEndpoint\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12%\n\x18message_binding_template\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\xdf\x03\n\x14\x41uthenticationConfig\x12i\n\x0bgoogle_oidc\x18\x01 \x01(\x0b\x32M.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcTokenB\x03\xe0\x41\x01H\x00\x12j\n\x0boauth_token\x18\x02 \x01(\x0b\x32N.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthTokenB\x03\xe0\x41\x01H\x00\x1a\x66\n\tOidcToken\x12\x42\n\x0fservice_account\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x15\n\x08\x61udience\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x64\n\nOAuthToken\x12\x42\n\x0fservice_account\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x12\n\x05scope\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\"\n authentication_method_descriptorB\x18\n\x16\x64\x65stination_descriptor\x1a\xb7\x01\n\tMediation\x12Z\n\x0etransformation\x18\x01 \x01(\x0b\x32;.google.cloud.eventarc.v1.Pipeline.Mediation.TransformationB\x03\xe0\x41\x01H\x00\x1a\x36\n\x0eTransformation\x12$\n\x17transformation_template\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x16\n\x14mediation_descriptor\x1a\x9a\x01\n\x0bRetryPolicy\x12\x19\n\x0cmax_attempts\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x37\n\x0fmin_retry_delay\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmax_retry_delay\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:x\xea\x41u\n eventarc.googleapis.com/Pipeline\x12] + # 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-eventarc-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel.rb new file mode 100644 index 000000000000..17ae7aa5261a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel.rb @@ -0,0 +1,120 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module V1 + # A representation of the Channel resource. + # A Channel is a resource on which event providers publish their events. + # The published events are delivered through the transport associated with the + # channel. Note that a channel is associated with exactly one event provider. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the channel. Must be unique within the + # location on the project and must be in + # `projects/{project}/locations/{location}/channels/{channel_id}` format. + # @!attribute [r] uid + # @return [::String] + # Output only. Server assigned unique identifier for the channel. The value + # is a UUID4 string and guaranteed to remain unchanged until the resource is + # deleted. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last-modified time. + # @!attribute [rw] provider + # @return [::String] + # The name of the event provider (e.g. Eventarc SaaS partner) associated + # with the channel. This provider will be granted permissions to publish + # events to the channel. Format: + # `projects/{project}/locations/{location}/providers/{provider_id}`. + # @!attribute [r] pubsub_topic + # @return [::String] + # Output only. The name of the Pub/Sub topic created and managed by + # Eventarc system as a transport for the event delivery. Format: + # `projects/{project}/topics/{topic_id}`. + # @!attribute [r] state + # @return [::Google::Cloud::Eventarc::V1::Channel::State] + # Output only. The state of a Channel. + # @!attribute [r] activation_token + # @return [::String] + # Output only. The activation token for the channel. The token must be used + # by the provider to register the channel for publishing. + # @!attribute [rw] crypto_key_name + # @return [::String] + # Optional. Resource name of a KMS crypto key (managed by the user) used to + # encrypt/decrypt their event data. + # + # It must match the pattern + # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. Whether or not this Channel satisfies the requirements of + # physical zone separation + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels. + class Channel + 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 + + # State lists all the possible states of a Channel + module State + # Default value. This value is unused. + STATE_UNSPECIFIED = 0 + + # The PENDING state indicates that a Channel has been created successfully + # and there is a new activation token available for the subscriber to use + # to convey the Channel to the provider in order to create a Connection. + PENDING = 1 + + # The ACTIVE state indicates that a Channel has been successfully + # connected with the event provider. + # An ACTIVE Channel is ready to receive and route events from the + # event provider. + ACTIVE = 2 + + # The INACTIVE state indicates that the Channel cannot receive events + # permanently. There are two possible cases this state can happen: + # + # 1. The SaaS provider disconnected from this Channel. + # 2. The Channel activation token has expired but the SaaS provider + # wasn't connected. + # + # To re-establish a Connection with a provider, the subscriber + # should create a new Channel and give it to the provider. + INACTIVE = 3 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel_connection.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel_connection.rb new file mode 100644 index 000000000000..33d3e3998d74 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel_connection.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 Cloud + module Eventarc + module V1 + # A representation of the ChannelConnection resource. + # A ChannelConnection is a resource which event providers create during the + # activation process to establish a connection between the provider and the + # subscriber channel. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the connection. + # @!attribute [r] uid + # @return [::String] + # Output only. Server assigned ID of the resource. + # The server guarantees uniqueness and immutability until deleted. + # @!attribute [rw] channel + # @return [::String] + # Required. The name of the connected subscriber Channel. + # This is a weak reference to avoid cross project and cross accounts + # references. This must be in + # `projects/{project}/location/{location}/channels/{channel_id}` format. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last-modified time. + # @!attribute [rw] activation_token + # @return [::String] + # Input only. Activation token for the channel. The token will be used + # during the creation of ChannelConnection to bind the channel with the + # provider project. This field will not be stored in the provider resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels. + class ChannelConnection + 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 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/discovery.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/discovery.rb new file mode 100644 index 000000000000..e2cbf265b2aa --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/discovery.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 Eventarc + module V1 + # A representation of the Provider resource. + # @!attribute [r] name + # @return [::String] + # Output only. In + # `projects/{project}/locations/{location}/providers/{provider_id}` format. + # @!attribute [r] display_name + # @return [::String] + # Output only. Human friendly name for the Provider. For example "Cloud + # Storage". + # @!attribute [r] event_types + # @return [::Array<::Google::Cloud::Eventarc::V1::EventType>] + # Output only. Event types for this provider. + class Provider + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A representation of the event type resource. + # @!attribute [r] type + # @return [::String] + # Output only. The full name of the event type (for example, + # "google.cloud.storage.object.v1.finalized"). In the form of + # \\{provider-specific-prefix}.\\{resource}.\\{version}.\\{verb}. Types MUST be + # versioned and event schemas are guaranteed to remain backward compatible + # within one version. Note that event type versions and API versions do not + # need to match. + # @!attribute [r] description + # @return [::String] + # Output only. Human friendly description of what the event type is about. + # For example "Bucket created in Cloud Storage". + # @!attribute [r] filtering_attributes + # @return [::Array<::Google::Cloud::Eventarc::V1::FilteringAttribute>] + # Output only. Filtering attributes for the event type. + # @!attribute [r] event_schema_uri + # @return [::String] + # Output only. URI for the event schema. + # For example + # "https://github.com/googleapis/google-cloudevents/blob/master/proto/google/events/cloud/storage/v1/events.proto" + class EventType + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A representation of the FilteringAttribute resource. + # Filtering attributes are per event type. + # @!attribute [r] attribute + # @return [::String] + # Output only. Attribute used for filtering the event type. + # @!attribute [r] description + # @return [::String] + # Output only. Description of the purpose of the attribute. + # @!attribute [r] required + # @return [::Boolean] + # Output only. If true, the triggers for this provider should always specify + # a filter on these attributes. Trigger creation will fail otherwise. + # @!attribute [r] path_pattern_supported + # @return [::Boolean] + # Output only. If true, the attribute accepts matching expressions in the + # Eventarc PathPattern format. + class FilteringAttribute + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/enrollment.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/enrollment.rb new file mode 100644 index 000000000000..725556282574 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/enrollment.rb @@ -0,0 +1,95 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module V1 + # An enrollment represents a subscription for messages on a particular message + # bus. It defines a matching criteria for messages on the bus and the + # subscriber endpoint where matched messages should be delivered. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name of the form + # projects/\\{project}/locations/\\{location}/enrollments/\\{enrollment} + # @!attribute [r] uid + # @return [::String] + # Output only. Server assigned unique identifier for the channel. The value + # is a UUID4 string and guaranteed to remain unchanged until the resource is + # deleted. + # @!attribute [r] etag + # @return [::String] + # Output only. This checksum is computed by the server based on the value of + # other fields, and might be sent only on update and delete requests to + # ensure that the client has an up-to-date value before proceeding. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last-modified time. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource annotations. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Resource display name. + # @!attribute [rw] cel_match + # @return [::String] + # Required. A CEL expression identifying which messages this enrollment + # applies to. + # @!attribute [rw] message_bus + # @return [::String] + # Required. Immutable. Resource name of the message bus identifying the + # source of the messages. It matches the form + # projects/\\{project}/locations/\\{location}/messageBuses/\\{messageBus}. + # @!attribute [rw] destination + # @return [::String] + # Required. Destination is the Pipeline that the Enrollment is delivering to. + # It must point to the full resource name of a Pipeline. Format: + # "projects/\\{PROJECT_ID}/locations/\\{region}/pipelines/{PIPELINE_ID)" + class Enrollment + 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 AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/eventarc.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/eventarc.rb new file mode 100644 index 000000000000..6e89415f7a0a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/eventarc.rb @@ -0,0 +1,940 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module V1 + # The request message for the GetTrigger method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the trigger to get. + class GetTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the ListTriggers method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection to list triggers on. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of triggers to return on each page. + # + # Note: The service may send fewer. + # @!attribute [rw] page_token + # @return [::String] + # The page token; provide the value from the `next_page_token` field in a + # previous `ListTriggers` call to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListTriggers` must match + # the call that provided the page token. + # @!attribute [rw] order_by + # @return [::String] + # The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, trigger_id`. + # @!attribute [rw] filter + # @return [::String] + # Filter field. Used to filter the Triggers to be listed. Possible filters + # are described in https://google.aip.dev/160. For example, using + # "?filter=destination:gke" would list only Triggers with a gke destination. + class ListTriggersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for the `ListTriggers` method. + # @!attribute [rw] triggers + # @return [::Array<::Google::Cloud::Eventarc::V1::Trigger>] + # The requested triggers, up to the number specified in `page_size`. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that can be sent to `ListTriggers` to request the next page. + # If this is empty, then there are no more pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources, if any. + class ListTriggersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the CreateTrigger method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection in which to add this trigger. + # @!attribute [rw] trigger + # @return [::Google::Cloud::Eventarc::V1::Trigger] + # Required. The trigger to create. + # @!attribute [rw] trigger_id + # @return [::String] + # Required. The user-provided ID to be assigned to the trigger. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class CreateTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the UpdateTrigger method. + # @!attribute [rw] trigger + # @return [::Google::Cloud::Eventarc::V1::Trigger] + # The trigger to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The fields to be updated; only fields explicitly provided are updated. + # If no field mask is provided, all provided fields in the request are + # updated. To update all fields, provide a field mask of "*". + # @!attribute [rw] allow_missing + # @return [::Boolean] + # If set to true, and the trigger is not found, a new trigger will be + # created. In this situation, `update_mask` is ignored. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class UpdateTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the DeleteTrigger method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the trigger to be deleted. + # @!attribute [rw] etag + # @return [::String] + # If provided, the trigger will only be deleted if the etag matches the + # current etag on the resource. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # If set to true, and the trigger is not found, the request will succeed + # but no action will be taken on the server. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class DeleteTriggerRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the GetChannel method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the channel to get. + class GetChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the ListChannels method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection to list channels on. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of channels to return on each page. + # + # Note: The service may send fewer. + # @!attribute [rw] page_token + # @return [::String] + # The page token; provide the value from the `next_page_token` field in a + # previous `ListChannels` call to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListChannels` must + # match the call that provided the page token. + # @!attribute [rw] order_by + # @return [::String] + # The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, channel_id`. + class ListChannelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for the `ListChannels` method. + # @!attribute [rw] channels + # @return [::Array<::Google::Cloud::Eventarc::V1::Channel>] + # The requested channels, up to the number specified in `page_size`. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that can be sent to `ListChannels` to request the next page. + # If this is empty, then there are no more pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources, if any. + class ListChannelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the CreateChannel method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection in which to add this channel. + # @!attribute [rw] channel + # @return [::Google::Cloud::Eventarc::V1::Channel] + # Required. The channel to create. + # @!attribute [rw] channel_id + # @return [::String] + # Required. The user-provided ID to be assigned to the channel. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class CreateChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the UpdateChannel method. + # @!attribute [rw] channel + # @return [::Google::Cloud::Eventarc::V1::Channel] + # The channel to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The fields to be updated; only fields explicitly provided are updated. + # If no field mask is provided, all provided fields in the request are + # updated. To update all fields, provide a field mask of "*". + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class UpdateChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the DeleteChannel method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the channel to be deleted. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class DeleteChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the GetProvider method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the provider to get. + class GetProviderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the ListProviders method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the provider to get. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of providers to return on each page. + # @!attribute [rw] page_token + # @return [::String] + # The page token; provide the value from the `next_page_token` field in a + # previous `ListProviders` call to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListProviders` must + # match the call that provided the page token. + # @!attribute [rw] order_by + # @return [::String] + # The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting oder is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, _id`. + # @!attribute [rw] filter + # @return [::String] + # The filter field that the list request will filter on. + class ListProvidersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for the `ListProviders` method. + # @!attribute [rw] providers + # @return [::Array<::Google::Cloud::Eventarc::V1::Provider>] + # The requested providers, up to the number specified in `page_size`. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that can be sent to `ListProviders` to request the next page. + # If this is empty, then there are no more pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources, if any. + class ListProvidersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the GetChannelConnection method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the channel connection to get. + class GetChannelConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the ListChannelConnections method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection from which to list channel connections. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of channel connections to return on each page. + # + # Note: The service may send fewer responses. + # @!attribute [rw] page_token + # @return [::String] + # The page token; provide the value from the `next_page_token` field in a + # previous `ListChannelConnections` call to retrieve the subsequent page. + # + # When paginating, all other parameters provided to `ListChannelConnetions` + # match the call that provided the page token. + class ListChannelConnectionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for the `ListChannelConnections` method. + # @!attribute [rw] channel_connections + # @return [::Array<::Google::Cloud::Eventarc::V1::ChannelConnection>] + # The requested channel connections, up to the number specified in + # `page_size`. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that can be sent to `ListChannelConnections` to request the + # next page. + # If this is empty, then there are no more pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources, if any. + class ListChannelConnectionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the CreateChannelConnection method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection in which to add this channel connection. + # @!attribute [rw] channel_connection + # @return [::Google::Cloud::Eventarc::V1::ChannelConnection] + # Required. Channel connection to create. + # @!attribute [rw] channel_connection_id + # @return [::String] + # Required. The user-provided ID to be assigned to the channel connection. + class CreateChannelConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the DeleteChannelConnection method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the channel connection to delete. + class DeleteChannelConnectionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the UpdateGoogleChannelConfig method. + # @!attribute [rw] google_channel_config + # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] + # Required. The config to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The fields to be updated; only fields explicitly provided are updated. + # If no field mask is provided, all provided fields in the request are + # updated. To update all fields, provide a field mask of "*". + class UpdateGoogleChannelConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the GetGoogleChannelConfig method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the config to get. + class GetGoogleChannelConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the GetMessageBus method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the message bus to get. + class GetMessageBusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the ListMessageBuses method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection to list message buses on. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, update_time`. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter field that the list request will filter on. + # Possible filtersare described in https://google.aip.dev/160. + class ListMessageBusesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for the `ListMessageBuses` method. + # @!attribute [rw] message_buses + # @return [::Array<::Google::Cloud::Eventarc::V1::MessageBus>] + # The requested message buses, up to the number specified in `page_size`. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that can be sent to `ListMessageBuses` to request the next + # page. If this is empty, then there are no more pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources, if any. + class ListMessageBusesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the `ListMessageBusEnrollments` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent message bus to list enrollments on. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + class ListMessageBusEnrollmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for the `ListMessageBusEnrollments` method.` + # @!attribute [rw] enrollments + # @return [::Array<::String>] + # The requested enrollments, up to the number specified in `page_size`. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that can be sent to `ListMessageBusEnrollments` to request the + # next page. If this is empty, then there are no more pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources, if any. + class ListMessageBusEnrollmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the CreateMessageBus method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection in which to add this message bus. + # @!attribute [rw] message_bus + # @return [::Google::Cloud::Eventarc::V1::MessageBus] + # Required. The message bus to create. + # @!attribute [rw] message_bus_id + # @return [::String] + # Required. The user-provided ID to be assigned to the MessageBus. It should + # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class CreateMessageBusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the UpdateMessageBus method. + # @!attribute [rw] message_bus + # @return [::Google::Cloud::Eventarc::V1::MessageBus] + # Required. The MessageBus to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The fields to be updated; only fields explicitly provided are + # updated. If no field mask is provided, all provided fields in the request + # are updated. To update all fields, provide a field mask of "*". + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the MessageBus is not found, a new MessageBus + # will be created. In this situation, `update_mask` is ignored. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class UpdateMessageBusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the DeleteMessageBus method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the MessageBus to be deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. If provided, the MessageBus will only be deleted if the etag + # matches the current etag on the resource. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the MessageBus is not found, the request will + # succeed but no action will be taken on the server. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class DeleteMessageBusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the GetEnrollment method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Enrollment to get. + class GetEnrollmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the ListEnrollments method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection to list triggers on. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, update_time`. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter field that the list request will filter on. + # Possible filtersare described in https://google.aip.dev/160. + class ListEnrollmentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for the `ListEnrollments` method. + # @!attribute [rw] enrollments + # @return [::Array<::Google::Cloud::Eventarc::V1::Enrollment>] + # The requested Enrollments, up to the number specified in `page_size`. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that can be sent to `ListEnrollments` to request the next + # page. If this is empty, then there are no more pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources, if any. + class ListEnrollmentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the CreateEnrollment method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection in which to add this enrollment. + # @!attribute [rw] enrollment + # @return [::Google::Cloud::Eventarc::V1::Enrollment] + # Required. The enrollment to create. + # @!attribute [rw] enrollment_id + # @return [::String] + # Required. The user-provided ID to be assigned to the Enrollment. It should + # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class CreateEnrollmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the UpdateEnrollment method. + # @!attribute [rw] enrollment + # @return [::Google::Cloud::Eventarc::V1::Enrollment] + # Required. The Enrollment to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The fields to be updated; only fields explicitly provided are + # updated. If no field mask is provided, all provided fields in the request + # are updated. To update all fields, provide a field mask of "*". + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the Enrollment is not found, a new Enrollment + # will be created. In this situation, `update_mask` is ignored. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class UpdateEnrollmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the DeleteEnrollment method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Enrollment to be deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. If provided, the Enrollment will only be deleted if the etag + # matches the current etag on the resource. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the Enrollment is not found, the request will + # succeed but no action will be taken on the server. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class DeleteEnrollmentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the GetPipeline method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the pipeline to get. + class GetPipelineRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the ListPipelines method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection to list pipelines on. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, update_time`. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter field that the list request will filter on. + # Possible filters are described in https://google.aip.dev/160. + class ListPipelinesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for the ListPipelines method. + # @!attribute [rw] pipelines + # @return [::Array<::Google::Cloud::Eventarc::V1::Pipeline>] + # The requested pipelines, up to the number specified in `page_size`. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that can be sent to `ListPipelines` to request the next + # page. If this is empty, then there are no more pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources, if any. + class ListPipelinesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the CreatePipeline method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection in which to add this pipeline. + # @!attribute [rw] pipeline + # @return [::Google::Cloud::Eventarc::V1::Pipeline] + # Required. The pipeline to create. + # @!attribute [rw] pipeline_id + # @return [::String] + # Required. The user-provided ID to be assigned to the Pipeline. It should + # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class CreatePipelineRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the UpdatePipeline method. + # @!attribute [rw] pipeline + # @return [::Google::Cloud::Eventarc::V1::Pipeline] + # Required. The Pipeline to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The fields to be updated; only fields explicitly provided are + # updated. If no field mask is provided, all provided fields in the request + # are updated. To update all fields, provide a field mask of "*". + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the Pipeline is not found, a new Pipeline + # will be created. In this situation, `update_mask` is ignored. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class UpdatePipelineRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the DeletePipeline method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the Pipeline to be deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. If provided, the Pipeline will only be deleted if the etag + # matches the current etag on the resource. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the Pipeline is not found, the request will + # succeed but no action will be taken on the server. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class DeletePipelineRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the GetGoogleApiSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the google api source to get. + class GetGoogleApiSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the ListGoogleApiSources method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection to list GoogleApiSources on. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of results to return on each page. + # + # Note: The service may send fewer. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The page token; provide the value from the `next_page_token` + # field in a previous call to retrieve the subsequent page. + # + # When paginating, all other parameters provided must match + # the previous call that provided the page token. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The sorting order of the resources returned. Value should be a + # comma-separated list of fields. The default sorting order is ascending. To + # specify descending order for a field, append a `desc` suffix; for example: + # `name desc, update_time`. + # @!attribute [rw] filter + # @return [::String] + # Optional. The filter field that the list request will filter on. + # Possible filtersare described in https://google.aip.dev/160. + class ListGoogleApiSourcesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response message for the `ListGoogleApiSources` method. + # @!attribute [rw] google_api_sources + # @return [::Array<::Google::Cloud::Eventarc::V1::GoogleApiSource>] + # The requested GoogleApiSources, up to the number specified in `page_size`. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that can be sent to `ListMessageBusEnrollments` to request the + # next page. If this is empty, then there are no more pages. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unreachable resources, if any. + class ListGoogleApiSourcesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the CreateGoogleApiSource method. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent collection in which to add this google api source. + # @!attribute [rw] google_api_source + # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource] + # Required. The google api source to create. + # @!attribute [rw] google_api_source_id + # @return [::String] + # Required. The user-provided ID to be assigned to the GoogleApiSource. It + # should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class CreateGoogleApiSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the UpdateGoogleApiSource method. + # @!attribute [rw] google_api_source + # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource] + # Required. The GoogleApiSource to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. The fields to be updated; only fields explicitly provided are + # updated. If no field mask is provided, all provided fields in the request + # are updated. To update all fields, provide a field mask of "*". + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the GoogleApiSource is not found, a new + # GoogleApiSource will be created. In this situation, `update_mask` is + # ignored. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class UpdateGoogleApiSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for the DeleteGoogleApiSource method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the GoogleApiSource to be deleted. + # @!attribute [rw] etag + # @return [::String] + # Optional. If provided, the MessageBus will only be deleted if the etag + # matches the current etag on the resource. + # @!attribute [rw] allow_missing + # @return [::Boolean] + # Optional. If set to true, and the MessageBus is not found, the request will + # succeed but no action will be taken on the server. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If set, validate the request and preview the review, but do not + # post it. + class DeleteGoogleApiSourceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the 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 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_api_source.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_api_source.rb new file mode 100644 index 000000000000..4a833af465b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_api_source.rb @@ -0,0 +1,132 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module V1 + # A GoogleApiSource represents a subscription of 1P events from a MessageBus. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name of the form + # projects/\\{project}/locations/\\{location}/googleApiSources/\\{google_api_source} + # @!attribute [r] uid + # @return [::String] + # Output only. Server assigned unique identifier for the channel. The value + # is a UUID4 string and guaranteed to remain unchanged until the resource is + # deleted. + # @!attribute [r] etag + # @return [::String] + # Output only. This checksum is computed by the server based on the value of + # other fields, and might be sent only on update and delete requests to + # ensure that the client has an up-to-date value before proceeding. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last-modified time. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource annotations. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Resource display name. + # @!attribute [rw] destination + # @return [::String] + # Required. Destination is the message bus that the GoogleApiSource is + # delivering to. It must be point to the full resource name of a MessageBus. + # Format: + # "projects/\\{PROJECT_ID}/locations/\\{region}/messagesBuses/{MESSAGE_BUS_ID) + # @!attribute [rw] crypto_key_name + # @return [::String] + # Optional. Resource name of a KMS crypto key (managed by the user) used to + # encrypt/decrypt their event data. + # + # It must match the pattern + # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + # @!attribute [rw] logging_config + # @return [::Google::Cloud::Eventarc::V1::LoggingConfig] + # Optional. Config to control Platform logging for the GoogleApiSource. + # @!attribute [rw] organization_subscription + # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource::OrganizationSubscription] + # Optional. Config to enable subscribing to events from all projects in the + # GoogleApiSource's org. + # + # Note: The following fields are mutually exclusive: `organization_subscription`, `project_subscriptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] project_subscriptions + # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource::ProjectSubscriptions] + # Optional. Config to enable subscribing to all events from a list of + # projects. + # + # All the projects must be in the same org as the GoogleApiSource. + # + # Note: The following fields are mutually exclusive: `project_subscriptions`, `organization_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class GoogleApiSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Config to enable subscribing to all events from a list of projects. + # @!attribute [rw] list + # @return [::Array<::String>] + # Required. A list of projects to receive events from. + # + # All the projects must be in the same org. The listed projects should have + # the format project/\\{identifier} where identifier can be either the + # project id for project number. A single list may contain both formats. At + # most 100 projects can be listed. + class ProjectSubscriptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Config to enabled subscribing to events from other projects in the org. + # @!attribute [rw] enabled + # @return [::Boolean] + # Required. Enable org level subscription. + class OrganizationSubscription + 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 [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_channel_config.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_channel_config.rb new file mode 100644 index 000000000000..ce8f19576d7c --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_channel_config.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module V1 + # A GoogleChannelConfig is a resource that stores the custom settings + # respected by Eventarc first-party triggers in the matching region. + # Once configured, first-party event data will be protected + # using the specified custom managed encryption key instead of Google-managed + # encryption keys. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the config. Must be in the format of, + # `projects/{project}/locations/{location}/googleChannelConfig`. + # In API responses, the config name always includes the projectID, regardless + # of whether the projectID or projectNumber was provided. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last-modified time. + # @!attribute [rw] crypto_key_name + # @return [::String] + # Optional. Resource name of a KMS crypto key (managed by the user) used to + # encrypt/decrypt their event data. + # + # It must match the pattern + # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels. + class GoogleChannelConfig + 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 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/logging_config.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/logging_config.rb new file mode 100644 index 000000000000..214240e10f90 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/logging_config.rb @@ -0,0 +1,78 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module V1 + # The configuration for Platform Telemetry logging for Eventarc Advanced + # resources. + # @!attribute [rw] log_severity + # @return [::Google::Cloud::Eventarc::V1::LoggingConfig::LogSeverity] + # Optional. The minimum severity of logs that will be sent to + # Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be + # sent, unless it is NONE. + class LoggingConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The different severities for logging supported by Eventarc Advanced + # resources. + # This enum is an exhaustive list of log severities and is FROZEN. Do not + # expect new values to be added. + module LogSeverity + # Log severity is not specified. This value is treated the same as NONE, + # but is used to distinguish between no update and update to NONE in + # update_masks. + LOG_SEVERITY_UNSPECIFIED = 0 + + # Default value at resource creation, presence of this value must be + # treated as no logging/disable logging. + NONE = 1 + + # Debug or trace level logging. + DEBUG = 2 + + # Routine information, such as ongoing status or performance. + INFO = 3 + + # Normal but significant events, such as start up, shut down, or a + # configuration change. + NOTICE = 4 + + # Warning events might cause problems. + WARNING = 5 + + # Error events are likely to cause problems. + ERROR = 6 + + # Critical events cause more severe problems or outages. + CRITICAL = 7 + + # A person must take action immediately. + ALERT = 8 + + # One or more systems are unusable. + EMERGENCY = 9 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/message_bus.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/message_bus.rb new file mode 100644 index 000000000000..af2653a373ba --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/message_bus.rb @@ -0,0 +1,94 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module V1 + # MessageBus for the messages flowing through the system. The admin has + # visibility and control over the messages being published and consumed and can + # restrict publishers and subscribers to only a subset of data available in the + # system by defining authorization policies. + # @!attribute [rw] name + # @return [::String] + # Identifier. Resource name of the form + # projects/\\{project}/locations/\\{location}/messageBuses/\\{message_bus} + # @!attribute [r] uid + # @return [::String] + # Output only. Server assigned unique identifier for the channel. The value + # is a UUID4 string and guaranteed to remain unchanged until the resource is + # deleted. + # @!attribute [r] etag + # @return [::String] + # Output only. This checksum is computed by the server based on the value of + # other fields, and might be sent only on update and delete requests to + # ensure that the client has an up-to-date value before proceeding. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last-modified time. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource labels. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Resource annotations. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Resource display name. + # @!attribute [rw] crypto_key_name + # @return [::String] + # Optional. Resource name of a KMS crypto key (managed by the user) used to + # encrypt/decrypt their event data. + # + # It must match the pattern + # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. + # @!attribute [rw] logging_config + # @return [::Google::Cloud::Eventarc::V1::LoggingConfig] + # Optional. Config to control Platform logging for the Message Bus. This log + # configuration is applied to the Message Bus itself, and all the Enrollments + # attached to it. + class MessageBus + 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 AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/network_config.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/network_config.rb new file mode 100644 index 000000000000..3fbdfc0f7b41 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/network_config.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module V1 + # Network Configuration that can be inherited by other protos. + # @!attribute [rw] network_attachment + # @return [::String] + # Required. Name of the NetworkAttachment that allows access to the + # customer's VPC. Format: + # `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}` + class NetworkConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/pipeline.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/pipeline.rb new file mode 100644 index 000000000000..e81e95c6c07c --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/pipeline.rb @@ -0,0 +1,606 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module V1 + # A representation of the Pipeline resource. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the Pipeline. Must be unique within the + # location of the project and must be in + # `projects/{project}/locations/{location}/pipelines/{pipeline}` format. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up + # to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and + # "2014-10-02T15:01:23.045123456Z". + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last-modified time. + # A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up + # to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and + # "2014-10-02T15:01:23.045123456Z". + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User labels attached to the Pipeline that can be used to group + # resources. An object containing a list of "key": value pairs. Example: { + # "name": "wrench", "mass": "1.3kg", "count": "3" }. + # @!attribute [r] uid + # @return [::String] + # Output only. Server-assigned unique identifier for the Pipeline. The value + # is a UUID4 string and guaranteed to remain unchanged until the resource is + # deleted. + # @!attribute [rw] annotations + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User-defined annotations. See + # https://google.aip.dev/128#annotations. + # @!attribute [rw] display_name + # @return [::String] + # Optional. Display name of resource. + # @!attribute [rw] destinations + # @return [::Array<::Google::Cloud::Eventarc::V1::Pipeline::Destination>] + # Required. List of destinations to which messages will be forwarded. + # Currently, exactly one destination is supported per Pipeline. + # @!attribute [rw] mediations + # @return [::Array<::Google::Cloud::Eventarc::V1::Pipeline::Mediation>] + # Optional. List of mediation operations to be performed on the message. + # Currently, only one Transformation operation is allowed in each Pipeline. + # @!attribute [rw] crypto_key_name + # @return [::String] + # Optional. Resource name of a KMS crypto key (managed by the user) used to + # encrypt/decrypt the event data. If not set, an internal Google-owned key + # will be used to encrypt messages. It must match the pattern + # "projects/\\{project}/locations/\\{location}/keyRings/\\{keyring}/cryptoKeys/\\{key}". + # @!attribute [rw] input_payload_format + # @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat] + # Optional. The payload format expected for the messages received by the + # Pipeline. If input_payload_format is set then any messages not matching + # this format will be treated as persistent errors. If input_payload_format + # is not set, then the message data will be treated as an opaque binary and + # no output format can be set on the Pipeline through the + # Pipeline.Destination.output_payload_format field. Any Mediations on the + # Pipeline that involve access to the data field will fail as persistent + # errors. + # @!attribute [rw] logging_config + # @return [::Google::Cloud::Eventarc::V1::LoggingConfig] + # Optional. Config to control Platform Logging for Pipelines. + # @!attribute [rw] retry_policy + # @return [::Google::Cloud::Eventarc::V1::Pipeline::RetryPolicy] + # Optional. The retry policy to use in the pipeline. + # @!attribute [r] etag + # @return [::String] + # Output only. This checksum is computed by the server based on the value of + # other fields, and might be sent only on create requests to ensure that the + # client has an up-to-date value before proceeding. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. Whether or not this Pipeline satisfies the requirements of + # physical zone separation + class Pipeline + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents the format of message data. + # @!attribute [rw] protobuf + # @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat::ProtobufFormat] + # Optional. Protobuf format. + # + # Note: The following fields are mutually exclusive: `protobuf`, `avro`, `json`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] avro + # @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat::AvroFormat] + # Optional. Avro format. + # + # Note: The following fields are mutually exclusive: `avro`, `protobuf`, `json`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] json + # @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat::JsonFormat] + # Optional. JSON format. + # + # Note: The following fields are mutually exclusive: `json`, `protobuf`, `avro`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class MessagePayloadFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The format of a JSON message payload. + class JsonFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The format of a Protobuf message payload. + # @!attribute [rw] schema_definition + # @return [::String] + # Optional. The entire schema definition is stored in this field. + class ProtobufFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The format of an AVRO message payload. + # @!attribute [rw] schema_definition + # @return [::String] + # Optional. The entire schema definition is stored in this field. + class AvroFormat + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents a target of an invocation over HTTP. + # @!attribute [rw] network_config + # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::NetworkConfig] + # Optional. Network config is used to configure how Pipeline resolves and + # connects to a destination. + # @!attribute [rw] http_endpoint + # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::HttpEndpoint] + # Optional. An HTTP endpoint destination described by an URI. + # If a DNS FQDN is provided as the endpoint, Pipeline will create a + # peering zone to the consumer VPC and forward DNS requests to the VPC + # specified by network config to resolve the service endpoint. See: + # https://cloud.google.com/dns/docs/zones/zones-overview#peering_zones + # + # Note: The following fields are mutually exclusive: `http_endpoint`, `workflow`, `message_bus`, `topic`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] workflow + # @return [::String] + # Optional. The resource name of the Workflow whose Executions are + # triggered by the events. The Workflow resource should be deployed in + # the same project as the Pipeline. Format: + # `projects/{project}/locations/{location}/workflows/{workflow}` + # + # Note: The following fields are mutually exclusive: `workflow`, `http_endpoint`, `message_bus`, `topic`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] message_bus + # @return [::String] + # Optional. The resource name of the Message Bus to which events should + # be published. The Message Bus resource should exist in the same project + # as the Pipeline. Format: + # `projects/{project}/locations/{location}/messageBuses/{message_bus}` + # + # Note: The following fields are mutually exclusive: `message_bus`, `http_endpoint`, `workflow`, `topic`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] topic + # @return [::String] + # Optional. The resource name of the Pub/Sub topic to which events should + # be published. Format: + # `projects/{project}/locations/{location}/topics/{topic}` + # + # Note: The following fields are mutually exclusive: `topic`, `http_endpoint`, `workflow`, `message_bus`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] authentication_config + # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig] + # Optional. An authentication config used to authenticate message requests, + # such that destinations can verify the source. For example, this can be + # used with private Google Cloud destinations that require Google Cloud + # credentials for access like Cloud Run. This field is optional and should + # be set only by users interested in authenticated push. + # @!attribute [rw] output_payload_format + # @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat] + # Optional. The message format before it is delivered to the destination. + # If not set, the message will be delivered in the format it was originally + # delivered to the Pipeline. This field can only be set if + # Pipeline.input_payload_format is also set. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a network config to be used for destination resolution and + # connectivity. + # @!attribute [rw] network_attachment + # @return [::String] + # Required. Name of the NetworkAttachment that allows access to the + # consumer VPC. Format: + # `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}` + class NetworkConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a HTTP endpoint destination. + # @!attribute [rw] uri + # @return [::String] + # Required. The URI of the HTTP endpoint. + # + # The value must be a RFC2396 URI string. + # Examples: `https://svc.us-central1.p.local:8080/route`. + # Only the HTTPS protocol is supported. + # @!attribute [rw] message_binding_template + # @return [::String] + # Optional. The CEL expression used to modify how the destination-bound + # HTTP request is constructed. + # + # If a binding expression is not specified here, the message + # is treated as a CloudEvent and is mapped to the HTTP request according + # to the CloudEvent HTTP Protocol Binding Binary Content Mode + # (https://github.com/cloudevents/spec/blob/main/cloudevents/bindings/http-protocol-binding.md#31-binary-content-mode). + # In this representation, all fields except the `data` and + # `datacontenttype` field on the message are mapped to HTTP request + # headers with a prefix of `ce-`. + # + # To construct the HTTP request payload and the value of the content-type + # HTTP header, the payload format is defined as follows: + # 1) Use the output_payload_format_type on the Pipeline.Destination if it + # is set, else: + # 2) Use the input_payload_format_type on the Pipeline if it is set, + # else: + # 3) Treat the payload as opaque binary data. + # + # The `data` field of the message is converted to the payload format or + # left as-is for case 3) and then attached as the payload of the HTTP + # request. The `content-type` header on the HTTP request is set to the + # payload format type or left empty for case 3). However, if a mediation + # has updated the `datacontenttype` field on the message so that it is + # not the same as the payload format type but it is still a prefix of the + # payload format type, then the `content-type` header on the HTTP request + # is set to this `datacontenttype` value. For example, if the + # `datacontenttype` is "application/json" and the payload format type is + # "application/json; charset=utf-8", then the `content-type` header on + # the HTTP request is set to "application/json; charset=utf-8". + # + # If a non-empty binding expression is specified then this expression is + # used to modify the default CloudEvent HTTP Protocol Binding Binary + # Content representation. + # The result of the CEL expression must be a map of key/value pairs + # which is used as follows: + # - If a map named `headers` exists on the result of the expression, + # then its key/value pairs are directly mapped to the HTTP request + # headers. The headers values are constructed from the corresponding + # value type's canonical representation. If the `headers` field doesn't + # exist then the resulting HTTP request will be the headers of the + # CloudEvent HTTP Binding Binary Content Mode representation of the final + # message. Note: If the specified binding expression, has updated the + # `datacontenttype` field on the message so that it is not the same as + # the payload format type but it is still a prefix of the payload format + # type, then the `content-type` header in the `headers` map is set to + # this `datacontenttype` value. + # - If a field named `body` exists on the result of the expression then + # its value is directly mapped to the body of the request. If the value + # of the `body` field is of type bytes or string then it is used for + # the HTTP request body as-is, with no conversion. If the body field is + # of any other type then it is converted to a JSON string. If the body + # field does not exist then the resulting payload of the HTTP request + # will be data value of the CloudEvent HTTP Binding Binary Content Mode + # representation of the final message as described earlier. + # - Any other fields in the resulting expression will be ignored. + # + # The CEL expression may access the incoming CloudEvent message in its + # definition, as follows: + # - The `data` field of the incoming CloudEvent message can be accessed + # using the `message.data` value. Subfields of `message.data` may also be + # accessed if an input_payload_format has been specified on the Pipeline. + # - Each attribute of the incoming CloudEvent message can be accessed + # using the `message.` value, where is replaced with the + # name of the attribute. + # - Existing headers can be accessed in the CEL expression using the + # `headers` variable. The `headers` variable defines a map of key/value + # pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding + # Binary Content Mode representation of the final message as described + # earlier. For example, the following CEL expression can be used to + # construct an HTTP request by adding an additional header to the HTTP + # headers of the CloudEvent HTTP Binding Binary Content Mode + # representation of the final message and by overwriting the body of the + # request: + # + # ``` + # { + # "headers": headers.merge(\\{"new-header-key": "new-header-value"}), + # "body": "new-body" + # } + # ``` + # - The default binding for the message payload can be accessed using the + # `body` variable. It conatins a string representation of the message + # payload in the format specified by the `output_payload_format` field. + # If the `input_payload_format` field is not set, the `body` + # variable contains the same message payload bytes that were published. + # + # Additionally, the following CEL extension functions are provided for + # use in this CEL expression: + # - toBase64Url: + # map.toBase64Url() -> string + # - Converts a CelValue to a base64url encoded string + # - toJsonString: map.toJsonString() -> string + # - Converts a CelValue to a JSON string + # - merge: + # map1.merge(map2) -> map3 + # - Merges the passed CEL map with the existing CEL map the + # function is applied to. + # - If the same key exists in both maps, if the key's value is type + # map both maps are merged else the value from the passed map is + # used. + # - denormalize: + # map.denormalize() -> map + # - Denormalizes a CEL map such that every value of type map or key + # in the map is expanded to return a single level map. + # - The resulting keys are "." separated indices of the map keys. + # - For example: + # { + # "a": 1, + # "b": { + # "c": 2, + # "d": 3 + # } + # "e": [4, 5] + # } + # .denormalize() + # -> { + # "a": 1, + # "b.c": 2, + # "b.d": 3, + # "e.0": 4, + # "e.1": 5 + # } + # - setField: + # map.setField(key, value) -> message + # - Sets the field of the message with the given key to the + # given value. + # - If the field is not present it will be added. + # - If the field is present it will be overwritten. + # - The key can be a dot separated path to set a field in a nested + # message. + # - Key must be of type string. + # - Value may be any valid type. + # - removeFields: + # map.removeFields([key1, key2, ...]) -> message + # - Removes the fields of the map with the given keys. + # - The keys can be a dot separated path to remove a field in a + # nested message. + # - If a key is not found it will be ignored. + # - Keys must be of type string. + # - toMap: + # [map1, map2, ...].toMap() -> map + # - Converts a CEL list of CEL maps to a single CEL map + # - toCloudEventJsonWithPayloadFormat: + # message.toCloudEventJsonWithPayloadFormat() -> map + # - Converts a message to the corresponding structure of JSON + # format for CloudEvents. + # - It converts `data` to destination payload format + # specified in `output_payload_format`. If `output_payload_format` is + # not set, the data will remain unchanged. + # - It also sets the corresponding datacontenttype of + # the CloudEvent, as indicated by + # `output_payload_format`. If no + # `output_payload_format` is set it will use the value of the + # "datacontenttype" attribute on the CloudEvent if present, else + # remove "datacontenttype" attribute. + # - This function expects that the content of the message will + # adhere to the standard CloudEvent format. If it doesn't then this + # function will fail. + # - The result is a CEL map that corresponds to the JSON + # representation of the CloudEvent. To convert that data to a JSON + # string it can be chained with the toJsonString function. + # + # The Pipeline expects that the message it receives adheres to the + # standard CloudEvent format. If it doesn't then the outgoing message + # request may fail with a persistent error. + class HttpEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a config used to authenticate message requests. + # @!attribute [rw] google_oidc + # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OidcToken] + # Optional. This authenticate method will apply Google OIDC tokens + # signed by a Google Cloud service account to the requests. + # + # Note: The following fields are mutually exclusive: `google_oidc`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] oauth_token + # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OAuthToken] + # Optional. If specified, an [OAuth + # token](https://developers.google.com/identity/protocols/OAuth2) will + # be generated and attached as an `Authorization` header in the HTTP + # request. + # + # This type of authorization should generally only be used when calling + # Google APIs hosted on *.googleapis.com. + # + # Note: The following fields are mutually exclusive: `oauth_token`, `google_oidc`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class AuthenticationConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Represents a config used to authenticate with a Google OIDC token using + # a Google Cloud service account. Use this authentication method to + # invoke your Cloud Run and Cloud Functions destinations or HTTP + # endpoints that support Google OIDC. + # @!attribute [rw] service_account + # @return [::String] + # Required. Service account email used to generate the OIDC Token. + # The principal who calls this API must have + # iam.serviceAccounts.actAs permission in the service account. See + # https://cloud.google.com/iam/docs/understanding-service-accounts + # for more information. Eventarc service agents must have + # roles/roles/iam.serviceAccountTokenCreator role to allow the + # Pipeline to create OpenID tokens for authenticated requests. + # @!attribute [rw] audience + # @return [::String] + # Optional. Audience to be used to generate the OIDC Token. The + # audience claim identifies the recipient that the JWT is intended for. + # If unspecified, the destination URI will be used. + class OidcToken + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contains information needed for generating an + # [OAuth token](https://developers.google.com/identity/protocols/OAuth2). + # This type of authorization should generally only be used when calling + # Google APIs hosted on *.googleapis.com. + # @!attribute [rw] service_account + # @return [::String] + # Required. Service account email used to generate the [OAuth + # token](https://developers.google.com/identity/protocols/OAuth2). + # The principal who calls this API must have + # iam.serviceAccounts.actAs permission in the service account. See + # https://cloud.google.com/iam/docs/understanding-service-accounts + # for more information. Eventarc service agents must have + # roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline + # to create OAuth2 tokens for authenticated requests. + # @!attribute [rw] scope + # @return [::String] + # Optional. OAuth scope to be used for generating OAuth access token. + # If not specified, "https://www.googleapis.com/auth/cloud-platform" + # will be used. + class OAuthToken + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # Mediation defines different ways to modify the Pipeline. + # @!attribute [rw] transformation + # @return [::Google::Cloud::Eventarc::V1::Pipeline::Mediation::Transformation] + # Optional. How the Pipeline is to transform messages + class Mediation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Transformation defines the way to transform an incoming message. + # @!attribute [rw] transformation_template + # @return [::String] + # Optional. The CEL expression template to apply to transform messages. + # The following CEL extension functions are provided for + # use in this CEL expression: + # - merge: + # map1.merge(map2) -> map3 + # - Merges the passed CEL map with the existing CEL map the + # function is applied to. + # - If the same key exists in both maps, if the key's value is type + # map both maps are merged else the value from the passed map is + # used. + # - denormalize: + # map.denormalize() -> map + # - Denormalizes a CEL map such that every value of type map or key + # in the map is expanded to return a single level map. + # - The resulting keys are "." separated indices of the map keys. + # - For example: + # { + # "a": 1, + # "b": { + # "c": 2, + # "d": 3 + # } + # "e": [4, 5] + # } + # .denormalize() + # -> { + # "a": 1, + # "b.c": 2, + # "b.d": 3, + # "e.0": 4, + # "e.1": 5 + # } + # - setField: + # map.setField(key, value) -> message + # - Sets the field of the message with the given key to the + # given value. + # - If the field is not present it will be added. + # - If the field is present it will be overwritten. + # - The key can be a dot separated path to set a field in a nested + # message. + # - Key must be of type string. + # - Value may be any valid type. + # - removeFields: + # map.removeFields([key1, key2, ...]) -> message + # - Removes the fields of the map with the given keys. + # - The keys can be a dot separated path to remove a field in a + # nested message. + # - If a key is not found it will be ignored. + # - Keys must be of type string. + # - toMap: + # [map1, map2, ...].toMap() -> map + # - Converts a CEL list of CEL maps to a single CEL map + # - toDestinationPayloadFormat(): + # message.data.toDestinationPayloadFormat() -> string or bytes + # - Converts the message data to the destination payload format + # specified in Pipeline.Destination.output_payload_format + # - This function is meant to be applied to the message.data field. + # - If the destination payload format is not set, the function will + # return the message data unchanged. + # - toCloudEventJsonWithPayloadFormat: + # message.toCloudEventJsonWithPayloadFormat() -> map + # - Converts a message to the corresponding structure of JSON + # format for CloudEvents + # - This function applies toDestinationPayloadFormat() to the + # message data. It also sets the corresponding datacontenttype of + # the CloudEvent, as indicated by + # Pipeline.Destination.output_payload_format. If no + # output_payload_format is set it will use the existing + # datacontenttype on the CloudEvent if present, else leave + # datacontenttype absent. + # - This function expects that the content of the message will + # adhere to the standard CloudEvent format. If it doesn't then this + # function will fail. + # - The result is a CEL map that corresponds to the JSON + # representation of the CloudEvent. To convert that data to a JSON + # string it can be chained with the toJsonString function. + class Transformation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The retry policy configuration for the Pipeline. The pipeline + # exponentially backs off in case the destination is non responsive or + # returns a retryable error code. The default semantics are as follows: + # The backoff starts with a 5 second delay and doubles the + # delay after each failed attempt (10 seconds, 20 seconds, 40 seconds, etc.). + # The delay is capped at 60 seconds by default. + # Please note that if you set the min_retry_delay and max_retry_delay fields + # to the same value this will make the duration between retries constant. + # @!attribute [rw] max_attempts + # @return [::Integer] + # Optional. The maximum number of delivery attempts for any message. The + # value must be between 1 and 100. The default value for this field is 5. + # @!attribute [rw] min_retry_delay + # @return [::Google::Protobuf::Duration] + # Optional. The minimum amount of seconds to wait between retry attempts. + # The value must be between 1 and 600. The default value for this field + # is 5. + # @!attribute [rw] max_retry_delay + # @return [::Google::Protobuf::Duration] + # Optional. The maximum amount of seconds to wait between retry attempts. + # The value must be between 1 and 600. The default value for this field + # is 60. + class RetryPolicy + 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 [::String] + class AnnotationsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/trigger.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/trigger.rb new file mode 100644 index 000000000000..18327a1ae092 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/trigger.rb @@ -0,0 +1,316 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Eventarc + module V1 + # A representation of the trigger resource. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the trigger. Must be unique within the + # location of the project and must be in + # `projects/{project}/locations/{location}/triggers/{trigger}` format. + # @!attribute [r] uid + # @return [::String] + # Output only. Server-assigned unique identifier for the trigger. The value + # is a UUID4 string and guaranteed to remain unchanged until the resource is + # deleted. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The creation time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last-modified time. + # @!attribute [rw] event_filters + # @return [::Array<::Google::Cloud::Eventarc::V1::EventFilter>] + # Required. Unordered list. The list of filters that applies to event + # attributes. Only events that match all the provided filters are sent to the + # destination. + # @!attribute [rw] service_account + # @return [::String] + # Optional. The IAM service account email associated with the trigger. The + # service account represents the identity of the trigger. + # + # The `iam.serviceAccounts.actAs` permission must be granted on the service + # account to allow a principal to impersonate the service account. For more + # information, see the + # [Roles and permissions](/eventarc/docs/all-roles-permissions) page specific + # to the trigger destination. + # @!attribute [rw] destination + # @return [::Google::Cloud::Eventarc::V1::Destination] + # Required. Destination specifies where the events should be sent to. + # @!attribute [rw] transport + # @return [::Google::Cloud::Eventarc::V1::Transport] + # Optional. To deliver messages, Eventarc might use other Google Cloud + # products as a transport intermediary. This field contains a reference to + # that transport intermediary. This information can be used for debugging + # purposes. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. User labels attached to the triggers that can be used to group + # resources. + # @!attribute [rw] channel + # @return [::String] + # Optional. The name of the channel associated with the trigger in + # `projects/{project}/locations/{location}/channels/{channel}` format. + # You must provide a channel to receive events from Eventarc SaaS partners. + # @!attribute [r] conditions + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Eventarc::V1::StateCondition}] + # Output only. The reason(s) why a trigger is in FAILED state. + # @!attribute [rw] event_data_content_type + # @return [::String] + # Optional. EventDataContentType specifies the type of payload in MIME + # format that is expected from the CloudEvent data field. This is set to + # `application/json` if the value is not defined. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. Whether or not this Trigger satisfies the requirements of + # physical zone separation + # @!attribute [rw] retry_policy + # @return [::Google::Cloud::Eventarc::V1::Trigger::RetryPolicy] + # Optional. The retry policy to use in the Trigger. + # + # If unset, event delivery will be retried for up to 24 hours by default: + # https://cloud.google.com/eventarc/docs/retry-events + # @!attribute [r] etag + # @return [::String] + # Output only. This checksum is computed by the server based on the value of + # other fields, and might be sent only on create requests to ensure that the + # client has an up-to-date value before proceeding. + class Trigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The retry policy configuration for the Trigger. + # + # Can only be set with Cloud Run destinations. + # @!attribute [rw] max_attempts + # @return [::Integer] + # Optional. The maximum number of delivery attempts for any message. The + # only valid value is 1. + class RetryPolicy + 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::Eventarc::V1::StateCondition] + class ConditionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Filters events based on exact matches on the CloudEvents attributes. + # @!attribute [rw] attribute + # @return [::String] + # Required. The name of a CloudEvents attribute. Currently, only a subset of + # attributes are supported for filtering. You can [retrieve a specific + # provider's supported event + # types](/eventarc/docs/list-providers#describe-provider). + # + # All triggers MUST provide a filter for the 'type' attribute. + # @!attribute [rw] value + # @return [::String] + # Required. The value for the attribute. + # @!attribute [rw] operator + # @return [::String] + # Optional. The operator used for matching the events with the value of the + # filter. If not specified, only events that have an exact key-value pair + # specified in the filter are matched. The allowed values are `path_pattern` + # and `match-path-pattern`. `path_pattern` is only allowed for GCFv1 + # triggers. + class EventFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A condition that is part of the trigger state computation. + # @!attribute [rw] code + # @return [::Google::Rpc::Code] + # The canonical code of the condition. + # @!attribute [rw] message + # @return [::String] + # Human-readable message. + class StateCondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a target of an invocation over HTTP. + # @!attribute [rw] cloud_run + # @return [::Google::Cloud::Eventarc::V1::CloudRun] + # Cloud Run fully-managed resource that receives the events. The resource + # should be in the same project as the trigger. + # + # Note: The following fields are mutually exclusive: `cloud_run`, `cloud_function`, `gke`, `workflow`, `http_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] cloud_function + # @return [::String] + # The Cloud Function resource name. Cloud Functions V1 and V2 are + # supported. + # Format: `projects/{project}/locations/{location}/functions/{function}` + # + # This is a read-only field. Creating Cloud Functions V1/V2 triggers is + # only supported via the Cloud Functions product. An error will be returned + # if the user sets this value. + # + # Note: The following fields are mutually exclusive: `cloud_function`, `cloud_run`, `gke`, `workflow`, `http_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] gke + # @return [::Google::Cloud::Eventarc::V1::GKE] + # A GKE service capable of receiving events. The service should be running + # in the same project as the trigger. + # + # Note: The following fields are mutually exclusive: `gke`, `cloud_run`, `cloud_function`, `workflow`, `http_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] workflow + # @return [::String] + # The resource name of the Workflow whose Executions are triggered by + # the events. The Workflow resource should be deployed in the same project + # as the trigger. + # Format: `projects/{project}/locations/{location}/workflows/{workflow}` + # + # Note: The following fields are mutually exclusive: `workflow`, `cloud_run`, `cloud_function`, `gke`, `http_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] http_endpoint + # @return [::Google::Cloud::Eventarc::V1::HttpEndpoint] + # An HTTP endpoint destination described by an URI. + # + # Note: The following fields are mutually exclusive: `http_endpoint`, `cloud_run`, `cloud_function`, `gke`, `workflow`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] network_config + # @return [::Google::Cloud::Eventarc::V1::NetworkConfig] + # Optional. Network config is used to configure how Eventarc resolves and + # connect to a destination. + # This should only be used with HttpEndpoint destination type. + class Destination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the transport intermediaries created for the trigger to + # deliver events. + # @!attribute [rw] pubsub + # @return [::Google::Cloud::Eventarc::V1::Pubsub] + # The Pub/Sub topic and subscription used by Eventarc as a transport + # intermediary. + class Transport + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a Cloud Run destination. + # @!attribute [rw] service + # @return [::String] + # Required. The name of the Cloud Run service being addressed. See + # https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. + # + # Only services located in the same project as the trigger object + # can be addressed. + # @!attribute [rw] path + # @return [::String] + # Optional. The relative path on the Cloud Run service the events should be + # sent to. + # + # The value must conform to the definition of a URI path segment (section 3.3 + # of RFC2396). Examples: "/route", "route", "route/subroute". + # @!attribute [rw] region + # @return [::String] + # Required. The region the Cloud Run service is deployed in. + class CloudRun + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a GKE destination. + # @!attribute [rw] cluster + # @return [::String] + # Required. The name of the cluster the GKE service is running in. The + # cluster must be running in the same project as the trigger being created. + # @!attribute [rw] location + # @return [::String] + # Required. The name of the Google Compute Engine in which the cluster + # resides, which can either be compute zone (for example, us-central1-a) for + # the zonal clusters or region (for example, us-central1) for regional + # clusters. + # @!attribute [rw] namespace + # @return [::String] + # Required. The namespace the GKE service is running in. + # @!attribute [rw] service + # @return [::String] + # Required. Name of the GKE service. + # @!attribute [rw] path + # @return [::String] + # Optional. The relative path on the GKE service the events should be sent + # to. + # + # The value must conform to the definition of a URI path segment (section 3.3 + # of RFC2396). Examples: "/route", "route", "route/subroute". + class GKE + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a Pub/Sub transport. + # @!attribute [rw] topic + # @return [::String] + # Optional. The name of the Pub/Sub topic created and managed by Eventarc as + # a transport for the event delivery. Format: + # `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`. + # + # You can set an existing topic for triggers of the type + # `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide + # here is not deleted by Eventarc at trigger deletion. + # @!attribute [r] subscription + # @return [::String] + # Output only. The name of the Pub/Sub subscription created and managed by + # Eventarc as a transport for the event delivery. Format: + # `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`. + class Pubsub + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a HTTP endpoint destination. + # @!attribute [rw] uri + # @return [::String] + # Required. The URI of the HTTP endpoint. + # + # The value must be a RFC2396 URI string. + # Examples: `http://10.10.10.8:80/route`, + # `http://svc.us-central1.p.local:8080/`. + # Only HTTP and HTTPS protocols are supported. The host can be either a + # static IP addressable from the VPC specified by the network config, or + # an internal DNS hostname of the service resolvable via Cloud DNS. + class HttpEndpoint + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/rpc/code.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/rpc/code.rb new file mode 100644 index 000000000000..8cf36e815510 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/rpc/code.rb @@ -0,0 +1,185 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 canonical error codes for gRPC APIs. + # + # + # Sometimes multiple error codes may apply. Services should return + # the most specific error code that applies. For example, prefer + # `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. + # Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. + module Code + # Not an error; returned on success. + # + # HTTP Mapping: 200 OK + OK = 0 + + # The operation was cancelled, typically by the caller. + # + # HTTP Mapping: 499 Client Closed Request + CANCELLED = 1 + + # Unknown error. For example, this error may be returned when + # a `Status` value received from another address space belongs to + # an error space that is not known in this address space. Also + # errors raised by APIs that do not return enough error information + # may be converted to this error. + # + # HTTP Mapping: 500 Internal Server Error + UNKNOWN = 2 + + # The client specified an invalid argument. Note that this differs + # from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments + # that are problematic regardless of the state of the system + # (e.g., a malformed file name). + # + # HTTP Mapping: 400 Bad Request + INVALID_ARGUMENT = 3 + + # The deadline expired before the operation could complete. For operations + # that change the state of the system, this error may be returned + # even if the operation has completed successfully. For example, a + # successful response from a server could have been delayed long + # enough for the deadline to expire. + # + # HTTP Mapping: 504 Gateway Timeout + DEADLINE_EXCEEDED = 4 + + # Some requested entity (e.g., file or directory) was not found. + # + # Note to server developers: if a request is denied for an entire class + # of users, such as gradual feature rollout or undocumented allowlist, + # `NOT_FOUND` may be used. If a request is denied for some users within + # a class of users, such as user-based access control, `PERMISSION_DENIED` + # must be used. + # + # HTTP Mapping: 404 Not Found + NOT_FOUND = 5 + + # The entity that a client attempted to create (e.g., file or directory) + # already exists. + # + # HTTP Mapping: 409 Conflict + ALREADY_EXISTS = 6 + + # The caller does not have permission to execute the specified + # operation. `PERMISSION_DENIED` must not be used for rejections + # caused by exhausting some resource (use `RESOURCE_EXHAUSTED` + # instead for those errors). `PERMISSION_DENIED` must not be + # used if the caller can not be identified (use `UNAUTHENTICATED` + # instead for those errors). This error code does not imply the + # request is valid or the requested entity exists or satisfies + # other pre-conditions. + # + # HTTP Mapping: 403 Forbidden + PERMISSION_DENIED = 7 + + # The request does not have valid authentication credentials for the + # operation. + # + # HTTP Mapping: 401 Unauthorized + UNAUTHENTICATED = 16 + + # Some resource has been exhausted, perhaps a per-user quota, or + # perhaps the entire file system is out of space. + # + # HTTP Mapping: 429 Too Many Requests + RESOURCE_EXHAUSTED = 8 + + # The operation was rejected because the system is not in a state + # required for the operation's execution. For example, the directory + # to be deleted is non-empty, an rmdir operation is applied to + # a non-directory, etc. + # + # Service implementors can use the following guidelines to decide + # between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: + # (a) Use `UNAVAILABLE` if the client can retry just the failing call. + # (b) Use `ABORTED` if the client should retry at a higher level. For + # example, when a client-specified test-and-set fails, indicating the + # client should restart a read-modify-write sequence. + # (c) Use `FAILED_PRECONDITION` if the client should not retry until + # the system state has been explicitly fixed. For example, if an "rmdir" + # fails because the directory is non-empty, `FAILED_PRECONDITION` + # should be returned since the client should not retry unless + # the files are deleted from the directory. + # + # HTTP Mapping: 400 Bad Request + FAILED_PRECONDITION = 9 + + # The operation was aborted, typically due to a concurrency issue such as + # a sequencer check failure or transaction abort. + # + # See the guidelines above for deciding between `FAILED_PRECONDITION`, + # `ABORTED`, and `UNAVAILABLE`. + # + # HTTP Mapping: 409 Conflict + ABORTED = 10 + + # The operation was attempted past the valid range. E.g., seeking or + # reading past end-of-file. + # + # Unlike `INVALID_ARGUMENT`, this error indicates a problem that may + # be fixed if the system state changes. For example, a 32-bit file + # system will generate `INVALID_ARGUMENT` if asked to read at an + # offset that is not in the range [0,2^32-1], but it will generate + # `OUT_OF_RANGE` if asked to read from an offset past the current + # file size. + # + # There is a fair bit of overlap between `FAILED_PRECONDITION` and + # `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific + # error) when it applies so that callers who are iterating through + # a space can easily look for an `OUT_OF_RANGE` error to detect when + # they are done. + # + # HTTP Mapping: 400 Bad Request + OUT_OF_RANGE = 11 + + # The operation is not implemented or is not supported/enabled in this + # service. + # + # HTTP Mapping: 501 Not Implemented + UNIMPLEMENTED = 12 + + # Internal errors. This means that some invariants expected by the + # underlying system have been broken. This error code is reserved + # for serious errors. + # + # HTTP Mapping: 500 Internal Server Error + INTERNAL = 13 + + # The service is currently unavailable. This is most likely a + # transient condition, which can be corrected by retrying with + # a backoff. Note that it is not always safe to retry + # non-idempotent operations. + # + # See the guidelines above for deciding between `FAILED_PRECONDITION`, + # `ABORTED`, and `UNAVAILABLE`. + # + # HTTP Mapping: 503 Service Unavailable + UNAVAILABLE = 14 + + # Unrecoverable data loss or corruption. + # + # HTTP Mapping: 500 Internal Server Error + DATA_LOSS = 15 + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..3c630675d70b --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-eventarc-v1/snippets/Gemfile new file mode 100644 index 000000000000..e143611efab3 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1", path: "../" +else + gem "google-cloud-eventarc-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-eventarc-v1/snippets/eventarc/create_channel.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel.rb new file mode 100644 index 000000000000..e52873b445b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel.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 eventarc_v1_generated_Eventarc_CreateChannel_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the create_channel call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#create_channel. +# +def create_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::CreateChannelRequest.new + + # Call the create_channel method. + result = client.create_channel request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_CreateChannel_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel_connection.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel_connection.rb new file mode 100644 index 000000000000..1f7879290e07 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel_connection.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 eventarc_v1_generated_Eventarc_CreateChannelConnection_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the create_channel_connection call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#create_channel_connection. +# +def create_channel_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new + + # Call the create_channel_connection method. + result = client.create_channel_connection request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_CreateChannelConnection_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_enrollment.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_enrollment.rb new file mode 100644 index 000000000000..56107af79568 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_enrollment.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 eventarc_v1_generated_Eventarc_CreateEnrollment_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the create_enrollment call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#create_enrollment. +# +def create_enrollment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new + + # Call the create_enrollment method. + result = client.create_enrollment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_CreateEnrollment_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_google_api_source.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_google_api_source.rb new file mode 100644 index 000000000000..611a227863f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_google_api_source.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 eventarc_v1_generated_Eventarc_CreateGoogleApiSource_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the create_google_api_source call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#create_google_api_source. +# +def create_google_api_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new + + # Call the create_google_api_source method. + result = client.create_google_api_source request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_CreateGoogleApiSource_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_message_bus.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_message_bus.rb new file mode 100644 index 000000000000..1ba98014fae7 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_message_bus.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 eventarc_v1_generated_Eventarc_CreateMessageBus_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the create_message_bus call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#create_message_bus. +# +def create_message_bus + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new + + # Call the create_message_bus method. + result = client.create_message_bus request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_CreateMessageBus_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_pipeline.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_pipeline.rb new file mode 100644 index 000000000000..ee5052721991 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_pipeline.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 eventarc_v1_generated_Eventarc_CreatePipeline_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the create_pipeline call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#create_pipeline. +# +def create_pipeline + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::CreatePipelineRequest.new + + # Call the create_pipeline method. + result = client.create_pipeline request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_CreatePipeline_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_trigger.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_trigger.rb new file mode 100644 index 000000000000..1e98f1df6b20 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_trigger.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 eventarc_v1_generated_Eventarc_CreateTrigger_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the create_trigger call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#create_trigger. +# +def create_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::CreateTriggerRequest.new + + # Call the create_trigger method. + result = client.create_trigger request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_CreateTrigger_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel.rb new file mode 100644 index 000000000000..d186dabba8fe --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel.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 eventarc_v1_generated_Eventarc_DeleteChannel_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the delete_channel call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_channel. +# +def delete_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::DeleteChannelRequest.new + + # Call the delete_channel method. + result = client.delete_channel request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_DeleteChannel_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel_connection.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel_connection.rb new file mode 100644 index 000000000000..59e92852a499 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel_connection.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 eventarc_v1_generated_Eventarc_DeleteChannelConnection_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the delete_channel_connection call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_channel_connection. +# +def delete_channel_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.new + + # Call the delete_channel_connection method. + result = client.delete_channel_connection request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_DeleteChannelConnection_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_enrollment.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_enrollment.rb new file mode 100644 index 000000000000..c75e68e93057 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_enrollment.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 eventarc_v1_generated_Eventarc_DeleteEnrollment_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the delete_enrollment call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_enrollment. +# +def delete_enrollment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new + + # Call the delete_enrollment method. + result = client.delete_enrollment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_DeleteEnrollment_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_google_api_source.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_google_api_source.rb new file mode 100644 index 000000000000..e95796acbd9f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_google_api_source.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 eventarc_v1_generated_Eventarc_DeleteGoogleApiSource_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the delete_google_api_source call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_google_api_source. +# +def delete_google_api_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new + + # Call the delete_google_api_source method. + result = client.delete_google_api_source request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_DeleteGoogleApiSource_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_message_bus.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_message_bus.rb new file mode 100644 index 000000000000..f415da45923f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_message_bus.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 eventarc_v1_generated_Eventarc_DeleteMessageBus_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the delete_message_bus call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_message_bus. +# +def delete_message_bus + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new + + # Call the delete_message_bus method. + result = client.delete_message_bus request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_DeleteMessageBus_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_pipeline.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_pipeline.rb new file mode 100644 index 000000000000..baad77f185a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_pipeline.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 eventarc_v1_generated_Eventarc_DeletePipeline_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the delete_pipeline call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_pipeline. +# +def delete_pipeline + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::DeletePipelineRequest.new + + # Call the delete_pipeline method. + result = client.delete_pipeline request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_DeletePipeline_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_trigger.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_trigger.rb new file mode 100644 index 000000000000..6618c2f82d1a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_trigger.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 eventarc_v1_generated_Eventarc_DeleteTrigger_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the delete_trigger call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_trigger. +# +def delete_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new + + # Call the delete_trigger method. + result = client.delete_trigger request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_DeleteTrigger_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel.rb new file mode 100644 index 000000000000..7ee91d10c3ff --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel.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 eventarc_v1_generated_Eventarc_GetChannel_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the get_channel call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#get_channel. +# +def get_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::GetChannelRequest.new + + # Call the get_channel method. + result = client.get_channel request + + # The returned object is of type Google::Cloud::Eventarc::V1::Channel. + p result +end +# [END eventarc_v1_generated_Eventarc_GetChannel_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel_connection.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel_connection.rb new file mode 100644 index 000000000000..0df682daa6ee --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel_connection.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 eventarc_v1_generated_Eventarc_GetChannelConnection_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the get_channel_connection call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#get_channel_connection. +# +def get_channel_connection + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new + + # Call the get_channel_connection method. + result = client.get_channel_connection request + + # The returned object is of type Google::Cloud::Eventarc::V1::ChannelConnection. + p result +end +# [END eventarc_v1_generated_Eventarc_GetChannelConnection_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_enrollment.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_enrollment.rb new file mode 100644 index 000000000000..cc1f6373caff --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_enrollment.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 eventarc_v1_generated_Eventarc_GetEnrollment_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the get_enrollment call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#get_enrollment. +# +def get_enrollment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new + + # Call the get_enrollment method. + result = client.get_enrollment request + + # The returned object is of type Google::Cloud::Eventarc::V1::Enrollment. + p result +end +# [END eventarc_v1_generated_Eventarc_GetEnrollment_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_api_source.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_api_source.rb new file mode 100644 index 000000000000..6dfba4ea70f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_api_source.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 eventarc_v1_generated_Eventarc_GetGoogleApiSource_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the get_google_api_source call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#get_google_api_source. +# +def get_google_api_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new + + # Call the get_google_api_source method. + result = client.get_google_api_source request + + # The returned object is of type Google::Cloud::Eventarc::V1::GoogleApiSource. + p result +end +# [END eventarc_v1_generated_Eventarc_GetGoogleApiSource_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_channel_config.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_channel_config.rb new file mode 100644 index 000000000000..ca363afe5769 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_channel_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 eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the get_google_channel_config call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#get_google_channel_config. +# +def get_google_channel_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new + + # Call the get_google_channel_config method. + result = client.get_google_channel_config request + + # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig. + p result +end +# [END eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_message_bus.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_message_bus.rb new file mode 100644 index 000000000000..80e2d13a6d8e --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_message_bus.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 eventarc_v1_generated_Eventarc_GetMessageBus_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the get_message_bus call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#get_message_bus. +# +def get_message_bus + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::GetMessageBusRequest.new + + # Call the get_message_bus method. + result = client.get_message_bus request + + # The returned object is of type Google::Cloud::Eventarc::V1::MessageBus. + p result +end +# [END eventarc_v1_generated_Eventarc_GetMessageBus_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_pipeline.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_pipeline.rb new file mode 100644 index 000000000000..3887639b4a04 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_pipeline.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 eventarc_v1_generated_Eventarc_GetPipeline_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the get_pipeline call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#get_pipeline. +# +def get_pipeline + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::GetPipelineRequest.new + + # Call the get_pipeline method. + result = client.get_pipeline request + + # The returned object is of type Google::Cloud::Eventarc::V1::Pipeline. + p result +end +# [END eventarc_v1_generated_Eventarc_GetPipeline_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_provider.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_provider.rb new file mode 100644 index 000000000000..a46cfe24c89a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_provider.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 eventarc_v1_generated_Eventarc_GetProvider_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the get_provider call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#get_provider. +# +def get_provider + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::GetProviderRequest.new + + # Call the get_provider method. + result = client.get_provider request + + # The returned object is of type Google::Cloud::Eventarc::V1::Provider. + p result +end +# [END eventarc_v1_generated_Eventarc_GetProvider_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_trigger.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_trigger.rb new file mode 100644 index 000000000000..596557a484d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_trigger.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 eventarc_v1_generated_Eventarc_GetTrigger_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the get_trigger call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#get_trigger. +# +def get_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::GetTriggerRequest.new + + # Call the get_trigger method. + result = client.get_trigger request + + # The returned object is of type Google::Cloud::Eventarc::V1::Trigger. + p result +end +# [END eventarc_v1_generated_Eventarc_GetTrigger_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channel_connections.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channel_connections.rb new file mode 100644 index 000000000000..79a9f342c07f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channel_connections.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 eventarc_v1_generated_Eventarc_ListChannelConnections_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the list_channel_connections call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#list_channel_connections. +# +def list_channel_connections + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.new + + # Call the list_channel_connections method. + result = client.list_channel_connections request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Eventarc::V1::ChannelConnection. + p item + end +end +# [END eventarc_v1_generated_Eventarc_ListChannelConnections_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channels.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channels.rb new file mode 100644 index 000000000000..9df7d1a964d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channels.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 eventarc_v1_generated_Eventarc_ListChannels_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the list_channels call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#list_channels. +# +def list_channels + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::ListChannelsRequest.new + + # Call the list_channels method. + result = client.list_channels request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Eventarc::V1::Channel. + p item + end +end +# [END eventarc_v1_generated_Eventarc_ListChannels_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_enrollments.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_enrollments.rb new file mode 100644 index 000000000000..56f1f577c426 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_enrollments.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 eventarc_v1_generated_Eventarc_ListEnrollments_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the list_enrollments call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#list_enrollments. +# +def list_enrollments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new + + # Call the list_enrollments method. + result = client.list_enrollments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Eventarc::V1::Enrollment. + p item + end +end +# [END eventarc_v1_generated_Eventarc_ListEnrollments_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_google_api_sources.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_google_api_sources.rb new file mode 100644 index 000000000000..3343a1dca646 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_google_api_sources.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 eventarc_v1_generated_Eventarc_ListGoogleApiSources_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the list_google_api_sources call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#list_google_api_sources. +# +def list_google_api_sources + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new + + # Call the list_google_api_sources method. + result = client.list_google_api_sources request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Eventarc::V1::GoogleApiSource. + p item + end +end +# [END eventarc_v1_generated_Eventarc_ListGoogleApiSources_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_bus_enrollments.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_bus_enrollments.rb new file mode 100644 index 000000000000..e7ce554020b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_bus_enrollments.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 eventarc_v1_generated_Eventarc_ListMessageBusEnrollments_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the list_message_bus_enrollments call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#list_message_bus_enrollments. +# +def list_message_bus_enrollments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.new + + # Call the list_message_bus_enrollments method. + result = client.list_message_bus_enrollments request + + # The returned object is of type Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse. + p result +end +# [END eventarc_v1_generated_Eventarc_ListMessageBusEnrollments_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_buses.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_buses.rb new file mode 100644 index 000000000000..381e78f94431 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_buses.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 eventarc_v1_generated_Eventarc_ListMessageBuses_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the list_message_buses call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#list_message_buses. +# +def list_message_buses + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new + + # Call the list_message_buses method. + result = client.list_message_buses request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Eventarc::V1::MessageBus. + p item + end +end +# [END eventarc_v1_generated_Eventarc_ListMessageBuses_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_pipelines.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_pipelines.rb new file mode 100644 index 000000000000..3dc38e9cda85 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_pipelines.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 eventarc_v1_generated_Eventarc_ListPipelines_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the list_pipelines call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#list_pipelines. +# +def list_pipelines + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::ListPipelinesRequest.new + + # Call the list_pipelines method. + result = client.list_pipelines request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Eventarc::V1::Pipeline. + p item + end +end +# [END eventarc_v1_generated_Eventarc_ListPipelines_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_providers.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_providers.rb new file mode 100644 index 000000000000..1248afcfa292 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_providers.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 eventarc_v1_generated_Eventarc_ListProviders_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the list_providers call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#list_providers. +# +def list_providers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::ListProvidersRequest.new + + # Call the list_providers method. + result = client.list_providers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Eventarc::V1::Provider. + p item + end +end +# [END eventarc_v1_generated_Eventarc_ListProviders_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_triggers.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_triggers.rb new file mode 100644 index 000000000000..6545b1a107ae --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_triggers.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 eventarc_v1_generated_Eventarc_ListTriggers_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the list_triggers call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#list_triggers. +# +def list_triggers + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::ListTriggersRequest.new + + # Call the list_triggers method. + result = client.list_triggers request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Eventarc::V1::Trigger. + p item + end +end +# [END eventarc_v1_generated_Eventarc_ListTriggers_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_channel.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_channel.rb new file mode 100644 index 000000000000..e17d061026cb --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_channel.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 eventarc_v1_generated_Eventarc_UpdateChannel_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the update_channel call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#update_channel. +# +def update_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::UpdateChannelRequest.new + + # Call the update_channel method. + result = client.update_channel request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_UpdateChannel_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_enrollment.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_enrollment.rb new file mode 100644 index 000000000000..0dc904109e75 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_enrollment.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 eventarc_v1_generated_Eventarc_UpdateEnrollment_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the update_enrollment call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#update_enrollment. +# +def update_enrollment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new + + # Call the update_enrollment method. + result = client.update_enrollment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_UpdateEnrollment_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_api_source.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_api_source.rb new file mode 100644 index 000000000000..63e113924314 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_api_source.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 eventarc_v1_generated_Eventarc_UpdateGoogleApiSource_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the update_google_api_source call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#update_google_api_source. +# +def update_google_api_source + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new + + # Call the update_google_api_source method. + result = client.update_google_api_source request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_UpdateGoogleApiSource_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_channel_config.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_channel_config.rb new file mode 100644 index 000000000000..2c59db30626d --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_channel_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 eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the update_google_channel_config call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#update_google_channel_config. +# +def update_google_channel_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new + + # Call the update_google_channel_config method. + result = client.update_google_channel_config request + + # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig. + p result +end +# [END eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_message_bus.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_message_bus.rb new file mode 100644 index 000000000000..11b11952f8ef --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_message_bus.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 eventarc_v1_generated_Eventarc_UpdateMessageBus_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the update_message_bus call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#update_message_bus. +# +def update_message_bus + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new + + # Call the update_message_bus method. + result = client.update_message_bus request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_UpdateMessageBus_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_pipeline.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_pipeline.rb new file mode 100644 index 000000000000..1516700496c1 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_pipeline.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 eventarc_v1_generated_Eventarc_UpdatePipeline_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the update_pipeline call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#update_pipeline. +# +def update_pipeline + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new + + # Call the update_pipeline method. + result = client.update_pipeline request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_UpdatePipeline_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_trigger.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_trigger.rb new file mode 100644 index 000000000000..d2705277387b --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_trigger.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 eventarc_v1_generated_Eventarc_UpdateTrigger_sync] +require "google/cloud/eventarc/v1" + +## +# Snippet for the update_trigger call in the Eventarc service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Eventarc::V1::Eventarc::Client#update_trigger. +# +def update_trigger + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Eventarc::V1::Eventarc::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new + + # Call the update_trigger method. + result = client.update_trigger request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 eventarc_v1_generated_Eventarc_UpdateTrigger_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/snippet_metadata_google.cloud.eventarc.v1.json b/owl-bot-staging/google-cloud-eventarc-v1/snippets/snippet_metadata_google.cloud.eventarc.v1.json new file mode 100644 index 000000000000..d46127cd2377 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/snippets/snippet_metadata_google.cloud.eventarc.v1.json @@ -0,0 +1,1575 @@ +{ + "client_library": { + "name": "google-cloud-eventarc-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.eventarc.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "eventarc_v1_generated_Eventarc_GetTrigger_sync", + "title": "Snippet for the get_trigger call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_trigger.", + "file": "eventarc/get_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_trigger", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::GetTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::Trigger", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "GetTrigger", + "full_name": "google.cloud.eventarc.v1.Eventarc.GetTrigger", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_ListTriggers_sync", + "title": "Snippet for the list_triggers call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_triggers.", + "file": "eventarc/list_triggers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_triggers", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_triggers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::ListTriggersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::ListTriggersResponse", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "ListTriggers", + "full_name": "google.cloud.eventarc.v1.Eventarc.ListTriggers", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_CreateTrigger_sync", + "title": "Snippet for the create_trigger call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_trigger.", + "file": "eventarc/create_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_trigger", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::CreateTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "CreateTrigger", + "full_name": "google.cloud.eventarc.v1.Eventarc.CreateTrigger", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_UpdateTrigger_sync", + "title": "Snippet for the update_trigger call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_trigger.", + "file": "eventarc/update_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_trigger", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::UpdateTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "UpdateTrigger", + "full_name": "google.cloud.eventarc.v1.Eventarc.UpdateTrigger", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_DeleteTrigger_sync", + "title": "Snippet for the delete_trigger call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_trigger.", + "file": "eventarc/delete_trigger.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_trigger", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_trigger", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::DeleteTriggerRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "DeleteTrigger", + "full_name": "google.cloud.eventarc.v1.Eventarc.DeleteTrigger", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_GetChannel_sync", + "title": "Snippet for the get_channel call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_channel.", + "file": "eventarc/get_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_channel", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::GetChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::Channel", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "GetChannel", + "full_name": "google.cloud.eventarc.v1.Eventarc.GetChannel", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_ListChannels_sync", + "title": "Snippet for the list_channels call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_channels.", + "file": "eventarc/list_channels.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_channels", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_channels", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::ListChannelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::ListChannelsResponse", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "ListChannels", + "full_name": "google.cloud.eventarc.v1.Eventarc.ListChannels", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_CreateChannel_sync", + "title": "Snippet for the create_channel call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_channel.", + "file": "eventarc/create_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_channel", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::CreateChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "CreateChannel", + "full_name": "google.cloud.eventarc.v1.Eventarc.CreateChannel", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_UpdateChannel_sync", + "title": "Snippet for the update_channel call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_channel.", + "file": "eventarc/update_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_channel", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::UpdateChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "UpdateChannel", + "full_name": "google.cloud.eventarc.v1.Eventarc.UpdateChannel", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_DeleteChannel_sync", + "title": "Snippet for the delete_channel call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_channel.", + "file": "eventarc/delete_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_channel", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::DeleteChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "DeleteChannel", + "full_name": "google.cloud.eventarc.v1.Eventarc.DeleteChannel", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_GetProvider_sync", + "title": "Snippet for the get_provider call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_provider.", + "file": "eventarc/get_provider.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_provider", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_provider", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::GetProviderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::Provider", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "GetProvider", + "full_name": "google.cloud.eventarc.v1.Eventarc.GetProvider", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_ListProviders_sync", + "title": "Snippet for the list_providers call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_providers.", + "file": "eventarc/list_providers.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_providers", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_providers", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::ListProvidersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::ListProvidersResponse", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "ListProviders", + "full_name": "google.cloud.eventarc.v1.Eventarc.ListProviders", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_GetChannelConnection_sync", + "title": "Snippet for the get_channel_connection call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_channel_connection.", + "file": "eventarc/get_channel_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_channel_connection", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_channel_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::ChannelConnection", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "GetChannelConnection", + "full_name": "google.cloud.eventarc.v1.Eventarc.GetChannelConnection", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_ListChannelConnections_sync", + "title": "Snippet for the list_channel_connections call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_channel_connections.", + "file": "eventarc/list_channel_connections.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_channel_connections", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_channel_connections", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "ListChannelConnections", + "full_name": "google.cloud.eventarc.v1.Eventarc.ListChannelConnections", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_CreateChannelConnection_sync", + "title": "Snippet for the create_channel_connection call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_channel_connection.", + "file": "eventarc/create_channel_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_channel_connection", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_channel_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "CreateChannelConnection", + "full_name": "google.cloud.eventarc.v1.Eventarc.CreateChannelConnection", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_DeleteChannelConnection_sync", + "title": "Snippet for the delete_channel_connection call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_channel_connection.", + "file": "eventarc/delete_channel_connection.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_channel_connection", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_channel_connection", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "DeleteChannelConnection", + "full_name": "google.cloud.eventarc.v1.Eventarc.DeleteChannelConnection", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_sync", + "title": "Snippet for the get_google_channel_config call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_google_channel_config.", + "file": "eventarc/get_google_channel_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_google_channel_config", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_google_channel_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::GoogleChannelConfig", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "GetGoogleChannelConfig", + "full_name": "google.cloud.eventarc.v1.Eventarc.GetGoogleChannelConfig", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_sync", + "title": "Snippet for the update_google_channel_config call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_google_channel_config.", + "file": "eventarc/update_google_channel_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_google_channel_config", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_google_channel_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::GoogleChannelConfig", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "UpdateGoogleChannelConfig", + "full_name": "google.cloud.eventarc.v1.Eventarc.UpdateGoogleChannelConfig", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_GetMessageBus_sync", + "title": "Snippet for the get_message_bus call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_message_bus.", + "file": "eventarc/get_message_bus.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_message_bus", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_message_bus", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::GetMessageBusRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::MessageBus", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "GetMessageBus", + "full_name": "google.cloud.eventarc.v1.Eventarc.GetMessageBus", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_ListMessageBuses_sync", + "title": "Snippet for the list_message_buses call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_message_buses.", + "file": "eventarc/list_message_buses.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_message_buses", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_message_buses", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::ListMessageBusesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::ListMessageBusesResponse", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "ListMessageBuses", + "full_name": "google.cloud.eventarc.v1.Eventarc.ListMessageBuses", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_ListMessageBusEnrollments_sync", + "title": "Snippet for the list_message_bus_enrollments call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_message_bus_enrollments.", + "file": "eventarc/list_message_bus_enrollments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_message_bus_enrollments", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_message_bus_enrollments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "ListMessageBusEnrollments", + "full_name": "google.cloud.eventarc.v1.Eventarc.ListMessageBusEnrollments", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_CreateMessageBus_sync", + "title": "Snippet for the create_message_bus call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_message_bus.", + "file": "eventarc/create_message_bus.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_message_bus", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_message_bus", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::CreateMessageBusRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "CreateMessageBus", + "full_name": "google.cloud.eventarc.v1.Eventarc.CreateMessageBus", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_UpdateMessageBus_sync", + "title": "Snippet for the update_message_bus call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_message_bus.", + "file": "eventarc/update_message_bus.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_message_bus", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_message_bus", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "UpdateMessageBus", + "full_name": "google.cloud.eventarc.v1.Eventarc.UpdateMessageBus", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_DeleteMessageBus_sync", + "title": "Snippet for the delete_message_bus call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_message_bus.", + "file": "eventarc/delete_message_bus.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_message_bus", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_message_bus", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "DeleteMessageBus", + "full_name": "google.cloud.eventarc.v1.Eventarc.DeleteMessageBus", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_GetEnrollment_sync", + "title": "Snippet for the get_enrollment call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_enrollment.", + "file": "eventarc/get_enrollment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_enrollment", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_enrollment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::GetEnrollmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::Enrollment", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "GetEnrollment", + "full_name": "google.cloud.eventarc.v1.Eventarc.GetEnrollment", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_ListEnrollments_sync", + "title": "Snippet for the list_enrollments call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_enrollments.", + "file": "eventarc/list_enrollments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_enrollments", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_enrollments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "ListEnrollments", + "full_name": "google.cloud.eventarc.v1.Eventarc.ListEnrollments", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_CreateEnrollment_sync", + "title": "Snippet for the create_enrollment call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_enrollment.", + "file": "eventarc/create_enrollment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_enrollment", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_enrollment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "CreateEnrollment", + "full_name": "google.cloud.eventarc.v1.Eventarc.CreateEnrollment", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_UpdateEnrollment_sync", + "title": "Snippet for the update_enrollment call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_enrollment.", + "file": "eventarc/update_enrollment.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_enrollment", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_enrollment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "UpdateEnrollment", + "full_name": "google.cloud.eventarc.v1.Eventarc.UpdateEnrollment", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_DeleteEnrollment_sync", + "title": "Snippet for the delete_enrollment call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_enrollment.", + "file": "eventarc/delete_enrollment.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_enrollment", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_enrollment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "DeleteEnrollment", + "full_name": "google.cloud.eventarc.v1.Eventarc.DeleteEnrollment", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_GetPipeline_sync", + "title": "Snippet for the get_pipeline call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_pipeline.", + "file": "eventarc/get_pipeline.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_pipeline", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_pipeline", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::GetPipelineRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::Pipeline", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "GetPipeline", + "full_name": "google.cloud.eventarc.v1.Eventarc.GetPipeline", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_ListPipelines_sync", + "title": "Snippet for the list_pipelines call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_pipelines.", + "file": "eventarc/list_pipelines.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_pipelines", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_pipelines", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::ListPipelinesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::ListPipelinesResponse", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "ListPipelines", + "full_name": "google.cloud.eventarc.v1.Eventarc.ListPipelines", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_CreatePipeline_sync", + "title": "Snippet for the create_pipeline call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_pipeline.", + "file": "eventarc/create_pipeline.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_pipeline", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_pipeline", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::CreatePipelineRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "CreatePipeline", + "full_name": "google.cloud.eventarc.v1.Eventarc.CreatePipeline", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_UpdatePipeline_sync", + "title": "Snippet for the update_pipeline call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_pipeline.", + "file": "eventarc/update_pipeline.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_pipeline", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_pipeline", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::UpdatePipelineRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "UpdatePipeline", + "full_name": "google.cloud.eventarc.v1.Eventarc.UpdatePipeline", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_DeletePipeline_sync", + "title": "Snippet for the delete_pipeline call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_pipeline.", + "file": "eventarc/delete_pipeline.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_pipeline", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_pipeline", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::DeletePipelineRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "DeletePipeline", + "full_name": "google.cloud.eventarc.v1.Eventarc.DeletePipeline", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_GetGoogleApiSource_sync", + "title": "Snippet for the get_google_api_source call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_google_api_source.", + "file": "eventarc/get_google_api_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_google_api_source", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_google_api_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::GoogleApiSource", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "GetGoogleApiSource", + "full_name": "google.cloud.eventarc.v1.Eventarc.GetGoogleApiSource", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_ListGoogleApiSources_sync", + "title": "Snippet for the list_google_api_sources call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_google_api_sources.", + "file": "eventarc/list_google_api_sources.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_google_api_sources", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_google_api_sources", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "ListGoogleApiSources", + "full_name": "google.cloud.eventarc.v1.Eventarc.ListGoogleApiSources", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_CreateGoogleApiSource_sync", + "title": "Snippet for the create_google_api_source call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_google_api_source.", + "file": "eventarc/create_google_api_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_google_api_source", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_google_api_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "CreateGoogleApiSource", + "full_name": "google.cloud.eventarc.v1.Eventarc.CreateGoogleApiSource", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_UpdateGoogleApiSource_sync", + "title": "Snippet for the update_google_api_source call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_google_api_source.", + "file": "eventarc/update_google_api_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_google_api_source", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_google_api_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "UpdateGoogleApiSource", + "full_name": "google.cloud.eventarc.v1.Eventarc.UpdateGoogleApiSource", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "eventarc_v1_generated_Eventarc_DeleteGoogleApiSource_sync", + "title": "Snippet for the delete_google_api_source call in the Eventarc service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_google_api_source.", + "file": "eventarc/delete_google_api_source.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_google_api_source", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_google_api_source", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "Eventarc::Client", + "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" + }, + "method": { + "short_name": "DeleteGoogleApiSource", + "full_name": "google.cloud.eventarc.v1.Eventarc.DeleteGoogleApiSource", + "service": { + "short_name": "Eventarc", + "full_name": "google.cloud.eventarc.v1.Eventarc" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_operations_test.rb b/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_operations_test.rb new file mode 100644 index 000000000000..29b2e4229dca --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_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/eventarc/v1/eventarc_pb" +require "google/cloud/eventarc/v1/eventarc_services_pb" +require "google/cloud/eventarc/v1/eventarc" + +class ::Google::Cloud::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_paths_test.rb b/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_paths_test.rb new file mode 100644 index 000000000000..88e88b635c57 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_paths_test.rb @@ -0,0 +1,244 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/v1/eventarc" + +class ::Google::Cloud::Eventarc::V1::Eventarc::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_channel_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.channel_path project: "value0", location: "value1", channel: "value2" + assert_equal "projects/value0/locations/value1/channels/value2", path + end + end + + def test_channel_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::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.channel_connection_path project: "value0", location: "value1", channel_connection: "value2" + assert_equal "projects/value0/locations/value1/channelConnections/value2", path + end + end + + def test_cloud_function_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.cloud_function_path project: "value0", location: "value1", function: "value2" + assert_equal "projects/value0/locations/value1/functions/value2", path + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + end + end + + def test_enrollment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.enrollment_path project: "value0", location: "value1", enrollment: "value2" + assert_equal "projects/value0/locations/value1/enrollments/value2", path + end + end + + def test_google_api_source_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.google_api_source_path project: "value0", location: "value1", google_api_source: "value2" + assert_equal "projects/value0/locations/value1/googleApiSources/value2", path + end + end + + def test_google_channel_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::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.google_channel_config_path project: "value0", location: "value1" + assert_equal "projects/value0/locations/value1/googleChannelConfig", 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::Eventarc::V1::Eventarc::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_message_bus_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.message_bus_path project: "value0", location: "value1", message_bus: "value2" + assert_equal "projects/value0/locations/value1/messageBuses/value2", path + end + end + + def test_network_attachment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.network_attachment_path project: "value0", region: "value1", networkattachment: "value2" + assert_equal "projects/value0/regions/value1/networkAttachments/value2", path + end + end + + def test_pipeline_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.pipeline_path project: "value0", location: "value1", pipeline: "value2" + assert_equal "projects/value0/locations/value1/pipelines/value2", path + end + end + + def test_provider_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.provider_path project: "value0", location: "value1", provider: "value2" + assert_equal "projects/value0/locations/value1/providers/value2", path + end + end + + def test_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + end + end + + def test_service_account_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_account_path project: "value0", service_account: "value1" + assert_equal "projects/value0/serviceAccounts/value1", path + end + end + + def test_topic_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.topic_path project: "value0", topic: "value1" + assert_equal "projects/value0/topics/value1", path + end + end + + def test_trigger_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.trigger_path project: "value0", location: "value1", trigger: "value2" + assert_equal "projects/value0/locations/value1/triggers/value2", path + end + end + + def test_workflow_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.workflow_path project: "value0", location: "value1", workflow: "value2" + assert_equal "projects/value0/locations/value1/workflows/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_rest_test.rb b/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_rest_test.rb new file mode 100644 index 000000000000..2123c7230b43 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_rest_test.rb @@ -0,0 +1,2290 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/v1/eventarc_pb" +require "google/cloud/eventarc/v1/eventarc/rest" + + +class ::Google::Cloud::Eventarc::V1::Eventarc::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_get_trigger + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::Trigger.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_trigger_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_trigger({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_trigger name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_trigger ::Google::Cloud::Eventarc::V1::GetTriggerRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_trigger({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_trigger(::Google::Cloud::Eventarc::V1::GetTriggerRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_trigger_client_stub.call_count + end + end + end + + def test_list_triggers + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::ListTriggersResponse.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" + order_by = "hello world" + filter = "hello world" + + list_triggers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_triggers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_triggers_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_triggers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_triggers parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_triggers ::Google::Cloud::Eventarc::V1::ListTriggersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_triggers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_triggers(::Google::Cloud::Eventarc::V1::ListTriggersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_triggers_client_stub.call_count + end + end + end + + def test_create_trigger + # 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" + trigger = {} + trigger_id = "hello world" + validate_only = true + + create_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_trigger_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_trigger({ parent: parent, trigger: trigger, trigger_id: trigger_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_trigger parent: parent, trigger: trigger, trigger_id: trigger_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_trigger ::Google::Cloud::Eventarc::V1::CreateTriggerRequest.new(parent: parent, trigger: trigger, trigger_id: trigger_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_trigger({ parent: parent, trigger: trigger, trigger_id: trigger_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_trigger(::Google::Cloud::Eventarc::V1::CreateTriggerRequest.new(parent: parent, trigger: trigger, trigger_id: trigger_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_trigger_client_stub.call_count + end + end + end + + def test_update_trigger + # 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. + trigger = {} + update_mask = {} + allow_missing = true + validate_only = true + + update_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_trigger_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_trigger({ trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_trigger trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_trigger ::Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new(trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_trigger({ trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_trigger(::Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new(trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_trigger_client_stub.call_count + end + end + end + + def test_delete_trigger + # 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" + allow_missing = true + validate_only = true + + delete_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_trigger_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_trigger_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_trigger({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_trigger name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_trigger ::Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_trigger({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_trigger(::Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_trigger_client_stub.call_count + end + end + end + + def test_get_channel + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::Channel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_channel_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_channel({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_channel name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_channel ::Google::Cloud::Eventarc::V1::GetChannelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_channel({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_channel(::Google::Cloud::Eventarc::V1::GetChannelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_channel_client_stub.call_count + end + end + end + + def test_list_channels + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::ListChannelsResponse.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" + order_by = "hello world" + + list_channels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_channels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_channels_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_channels({ parent: parent, 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_channels parent: parent, 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_channels ::Google::Cloud::Eventarc::V1::ListChannelsRequest.new(parent: parent, 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_channels({ parent: parent, 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_channels(::Google::Cloud::Eventarc::V1::ListChannelsRequest.new(parent: parent, 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_channels_client_stub.call_count + end + end + end + + def test_create_channel + # 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" + channel = {} + channel_id = "hello world" + validate_only = true + + create_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_channel_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_channel({ parent: parent, channel: channel, channel_id: channel_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_channel parent: parent, channel: channel, channel_id: channel_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_channel ::Google::Cloud::Eventarc::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_channel({ parent: parent, channel: channel, channel_id: channel_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_channel(::Google::Cloud::Eventarc::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_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_channel_client_stub.call_count + end + end + end + + def test_update_channel + # 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. + channel = {} + update_mask = {} + validate_only = true + + update_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_channel_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_channel({ channel: channel, update_mask: update_mask, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_channel channel: channel, update_mask: update_mask, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_channel ::Google::Cloud::Eventarc::V1::UpdateChannelRequest.new(channel: channel, 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_channel({ channel: channel, 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_channel(::Google::Cloud::Eventarc::V1::UpdateChannelRequest.new(channel: channel, 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_channel_client_stub.call_count + end + end + end + + def test_delete_channel + # 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" + validate_only = true + + delete_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_channel_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_channel({ name: name, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_channel name: name, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_channel ::Google::Cloud::Eventarc::V1::DeleteChannelRequest.new(name: name, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_channel({ name: name, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_channel(::Google::Cloud::Eventarc::V1::DeleteChannelRequest.new(name: name, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_channel_client_stub.call_count + end + end + end + + def test_get_provider + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::Provider.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_provider_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_provider_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_provider_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_provider({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_provider name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_provider ::Google::Cloud::Eventarc::V1::GetProviderRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_provider({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_provider(::Google::Cloud::Eventarc::V1::GetProviderRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_provider_client_stub.call_count + end + end + end + + def test_list_providers + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::ListProvidersResponse.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" + order_by = "hello world" + filter = "hello world" + + list_providers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_providers_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_providers_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_providers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_providers parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_providers ::Google::Cloud::Eventarc::V1::ListProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_providers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_providers(::Google::Cloud::Eventarc::V1::ListProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_providers_client_stub.call_count + end + end + end + + def test_get_channel_connection + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::ChannelConnection.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_channel_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_channel_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_channel_connection_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_channel_connection({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_channel_connection name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_channel_connection ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_channel_connection({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_channel_connection(::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_channel_connection_client_stub.call_count + end + end + end + + def test_list_channel_connections + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse.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_channel_connections_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_channel_connections_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_channel_connections_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_channel_connections({ 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_channel_connections 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_channel_connections ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.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_channel_connections({ 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_channel_connections(::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.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_channel_connections_client_stub.call_count + end + end + end + + def test_create_channel_connection + # 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" + channel_connection = {} + channel_connection_id = "hello world" + + create_channel_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_channel_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_channel_connection_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_channel_connection({ parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_channel_connection parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_channel_connection ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new(parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_channel_connection({ parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_channel_connection(::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new(parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_channel_connection_client_stub.call_count + end + end + end + + def test_delete_channel_connection + # 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_channel_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_channel_connection_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_channel_connection_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_channel_connection({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_channel_connection name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_channel_connection ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_channel_connection({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_channel_connection(::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_channel_connection_client_stub.call_count + end + end + end + + def test_get_google_channel_config + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::GoogleChannelConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_google_channel_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::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_google_channel_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_google_channel_config_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_google_channel_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_google_channel_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_google_channel_config ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_google_channel_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_google_channel_config(::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_google_channel_config_client_stub.call_count + end + end + end + + def test_update_google_channel_config + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::GoogleChannelConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + google_channel_config = {} + update_mask = {} + + update_google_channel_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::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_google_channel_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_google_channel_config_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_google_channel_config({ google_channel_config: google_channel_config, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_google_channel_config google_channel_config: google_channel_config, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_google_channel_config ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new(google_channel_config: google_channel_config, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_google_channel_config({ google_channel_config: google_channel_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_google_channel_config(::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new(google_channel_config: google_channel_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_google_channel_config_client_stub.call_count + end + end + end + + def test_get_message_bus + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::MessageBus.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_message_bus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_message_bus_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_message_bus_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_message_bus({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_message_bus name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_message_bus ::Google::Cloud::Eventarc::V1::GetMessageBusRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_message_bus({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_message_bus(::Google::Cloud::Eventarc::V1::GetMessageBusRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_message_bus_client_stub.call_count + end + end + end + + def test_list_message_buses + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::ListMessageBusesResponse.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" + order_by = "hello world" + filter = "hello world" + + list_message_buses_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_message_buses_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_message_buses_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_message_buses({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_message_buses parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_message_buses ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_message_buses({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_message_buses(::Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_message_buses_client_stub.call_count + end + end + end + + def test_list_message_bus_enrollments + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse.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_message_bus_enrollments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_message_bus_enrollments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_message_bus_enrollments_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_message_bus_enrollments({ 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_message_bus_enrollments 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_message_bus_enrollments ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.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_message_bus_enrollments({ 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_message_bus_enrollments(::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.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_message_bus_enrollments_client_stub.call_count + end + end + end + + def test_create_message_bus + # 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" + message_bus = {} + message_bus_id = "hello world" + validate_only = true + + create_message_bus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_message_bus_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_message_bus_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_message_bus({ parent: parent, message_bus: message_bus, message_bus_id: message_bus_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_message_bus parent: parent, message_bus: message_bus, message_bus_id: message_bus_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_message_bus ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new(parent: parent, message_bus: message_bus, message_bus_id: message_bus_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_message_bus({ parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus(::Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new(parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus_client_stub.call_count + end + end + end + + def test_update_message_bus + # 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. + message_bus = {} + update_mask = {} + allow_missing = true + validate_only = true + + update_message_bus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_message_bus_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_message_bus_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_message_bus({ message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_message_bus message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_message_bus ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new(message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_message_bus({ message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_message_bus(::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new(message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_message_bus_client_stub.call_count + end + end + end + + def test_delete_message_bus + # 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" + allow_missing = true + validate_only = true + + delete_message_bus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_message_bus_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_message_bus_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_message_bus({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_message_bus name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_message_bus ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_message_bus({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_message_bus(::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_message_bus_client_stub.call_count + end + end + end + + def test_get_enrollment + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::Enrollment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_enrollment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_enrollment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_enrollment_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_enrollment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_enrollment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_enrollment ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_enrollment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_enrollment(::Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_enrollment_client_stub.call_count + end + end + end + + def test_list_enrollments + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse.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" + order_by = "hello world" + filter = "hello world" + + list_enrollments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_enrollments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_enrollments_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_enrollments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_enrollments parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_enrollments ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_enrollments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_enrollments(::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_enrollments_client_stub.call_count + end + end + end + + def test_create_enrollment + # 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" + enrollment = {} + enrollment_id = "hello world" + validate_only = true + + create_enrollment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_enrollment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_enrollment_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_enrollment({ parent: parent, enrollment: enrollment, enrollment_id: enrollment_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_enrollment parent: parent, enrollment: enrollment, enrollment_id: enrollment_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_enrollment ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new(parent: parent, enrollment: enrollment, enrollment_id: enrollment_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_enrollment({ parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment(::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new(parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment_client_stub.call_count + end + end + end + + def test_update_enrollment + # 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. + enrollment = {} + update_mask = {} + allow_missing = true + validate_only = true + + update_enrollment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_enrollment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_enrollment_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_enrollment({ enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_enrollment enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_enrollment ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new(enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_enrollment({ enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_enrollment(::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new(enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_enrollment_client_stub.call_count + end + end + end + + def test_delete_enrollment + # 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" + allow_missing = true + validate_only = true + + delete_enrollment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_enrollment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_enrollment_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_enrollment({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_enrollment name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_enrollment ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_enrollment({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_enrollment(::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_enrollment_client_stub.call_count + end + end + end + + def test_get_pipeline + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::Pipeline.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_pipeline_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_pipeline_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_pipeline_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_pipeline({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_pipeline name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_pipeline ::Google::Cloud::Eventarc::V1::GetPipelineRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_pipeline({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_pipeline(::Google::Cloud::Eventarc::V1::GetPipelineRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_pipeline_client_stub.call_count + end + end + end + + def test_list_pipelines + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::ListPipelinesResponse.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" + order_by = "hello world" + filter = "hello world" + + list_pipelines_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_pipelines_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_pipelines_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_pipelines({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_pipelines parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_pipelines ::Google::Cloud::Eventarc::V1::ListPipelinesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_pipelines({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_pipelines(::Google::Cloud::Eventarc::V1::ListPipelinesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_pipelines_client_stub.call_count + end + end + end + + def test_create_pipeline + # 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" + pipeline = {} + pipeline_id = "hello world" + validate_only = true + + create_pipeline_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_pipeline_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_pipeline_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_pipeline({ parent: parent, pipeline: pipeline, pipeline_id: pipeline_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_pipeline parent: parent, pipeline: pipeline, pipeline_id: pipeline_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_pipeline ::Google::Cloud::Eventarc::V1::CreatePipelineRequest.new(parent: parent, pipeline: pipeline, pipeline_id: pipeline_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_pipeline({ parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline(::Google::Cloud::Eventarc::V1::CreatePipelineRequest.new(parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline_client_stub.call_count + end + end + end + + def test_update_pipeline + # 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. + pipeline = {} + update_mask = {} + allow_missing = true + validate_only = true + + update_pipeline_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_pipeline_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_pipeline_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_pipeline({ pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_pipeline pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_pipeline ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new(pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_pipeline({ pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_pipeline(::Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new(pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_pipeline_client_stub.call_count + end + end + end + + def test_delete_pipeline + # 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" + allow_missing = true + validate_only = true + + delete_pipeline_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_pipeline_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_pipeline_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_pipeline({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_pipeline name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_pipeline ::Google::Cloud::Eventarc::V1::DeletePipelineRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_pipeline({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_pipeline(::Google::Cloud::Eventarc::V1::DeletePipelineRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_pipeline_client_stub.call_count + end + end + end + + def test_get_google_api_source + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::GoogleApiSource.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_google_api_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_google_api_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_google_api_source_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_google_api_source({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_google_api_source name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_google_api_source ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_google_api_source({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_google_api_source(::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_google_api_source_client_stub.call_count + end + end + end + + def test_list_google_api_sources + # Create test objects. + client_result = ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse.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" + order_by = "hello world" + filter = "hello world" + + list_google_api_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_google_api_sources_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_google_api_sources_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_google_api_sources({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_google_api_sources parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_google_api_sources ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_google_api_sources({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_google_api_sources(::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_google_api_sources_client_stub.call_count + end + end + end + + def test_create_google_api_source + # 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" + google_api_source = {} + google_api_source_id = "hello world" + validate_only = true + + create_google_api_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_google_api_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_google_api_source_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_google_api_source({ parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_id, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_google_api_source parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_id, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_google_api_source ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new(parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_id, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_google_api_source({ parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source(::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new(parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source_client_stub.call_count + end + end + end + + def test_update_google_api_source + # 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. + google_api_source = {} + update_mask = {} + allow_missing = true + validate_only = true + + update_google_api_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_google_api_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_google_api_source_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_google_api_source({ google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_google_api_source google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_google_api_source ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new(google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_google_api_source({ google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_google_api_source(::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new(google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_google_api_source_client_stub.call_count + end + end + end + + def test_delete_google_api_source + # 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" + allow_missing = true + validate_only = true + + delete_google_api_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_google_api_source_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_google_api_source_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_google_api_source({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_google_api_source name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_google_api_source ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_google_api_source({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_google_api_source(::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_google_api_source_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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_test.rb b/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_test.rb new file mode 100644 index 000000000000..804e79cbaa58 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_test.rb @@ -0,0 +1,2690 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc/v1/eventarc_pb" +require "google/cloud/eventarc/v1/eventarc" + +class ::Google::Cloud::Eventarc::V1::Eventarc::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_get_trigger + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::Trigger.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_trigger, name + assert_kind_of ::Google::Cloud::Eventarc::V1::GetTriggerRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_trigger_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_trigger({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_trigger name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_trigger ::Google::Cloud::Eventarc::V1::GetTriggerRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_trigger({ 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_trigger(::Google::Cloud::Eventarc::V1::GetTriggerRequest.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_trigger_client_stub.call_rpc_count + end + end + + def test_list_triggers + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::ListTriggersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + order_by = "hello world" + filter = "hello world" + + list_triggers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_triggers, name + assert_kind_of ::Google::Cloud::Eventarc::V1::ListTriggersRequest, 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["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_triggers_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_triggers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_triggers parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_triggers ::Google::Cloud::Eventarc::V1::ListTriggersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_triggers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_triggers(::Google::Cloud::Eventarc::V1::ListTriggersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_triggers_client_stub.call_rpc_count + end + end + + def test_create_trigger + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + trigger = {} + trigger_id = "hello world" + validate_only = true + + create_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_trigger, name + assert_kind_of ::Google::Cloud::Eventarc::V1::CreateTriggerRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Trigger), request["trigger"] + assert_equal "hello world", request["trigger_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_trigger_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_trigger({ parent: parent, trigger: trigger, trigger_id: trigger_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_trigger parent: parent, trigger: trigger, trigger_id: trigger_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_trigger ::Google::Cloud::Eventarc::V1::CreateTriggerRequest.new(parent: parent, trigger: trigger, trigger_id: trigger_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_trigger({ parent: parent, trigger: trigger, trigger_id: trigger_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_trigger(::Google::Cloud::Eventarc::V1::CreateTriggerRequest.new(parent: parent, trigger: trigger, trigger_id: trigger_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_trigger_client_stub.call_rpc_count + end + end + + def test_update_trigger + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + trigger = {} + update_mask = {} + allow_missing = true + validate_only = true + + update_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_trigger, name + assert_kind_of ::Google::Cloud::Eventarc::V1::UpdateTriggerRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Trigger), request["trigger"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_trigger_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_trigger({ trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_trigger trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_trigger ::Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new(trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_trigger({ trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_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_trigger(::Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new(trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_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_trigger_client_stub.call_rpc_count + end + end + + def test_delete_trigger + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + allow_missing = true + validate_only = true + + delete_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_trigger, name + assert_kind_of ::Google::Cloud::Eventarc::V1::DeleteTriggerRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_trigger_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_trigger({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_trigger name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_trigger ::Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_trigger({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_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_trigger(::Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_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_trigger_client_stub.call_rpc_count + end + end + + def test_get_channel + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::Channel.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_channel, name + assert_kind_of ::Google::Cloud::Eventarc::V1::GetChannelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_channel_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_channel({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_channel name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_channel ::Google::Cloud::Eventarc::V1::GetChannelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_channel({ 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_channel(::Google::Cloud::Eventarc::V1::GetChannelRequest.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_channel_client_stub.call_rpc_count + end + end + + def test_list_channels + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::ListChannelsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + order_by = "hello world" + + list_channels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_channels, name + assert_kind_of ::Google::Cloud::Eventarc::V1::ListChannelsRequest, 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["order_by"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_channels_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_channels({ parent: parent, 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_channels parent: parent, 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_channels ::Google::Cloud::Eventarc::V1::ListChannelsRequest.new(parent: parent, 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_channels({ parent: parent, 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_channels(::Google::Cloud::Eventarc::V1::ListChannelsRequest.new(parent: parent, 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_channels_client_stub.call_rpc_count + end + end + + def test_create_channel + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + channel = {} + channel_id = "hello world" + validate_only = true + + create_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_channel, name + assert_kind_of ::Google::Cloud::Eventarc::V1::CreateChannelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Channel), request["channel"] + assert_equal "hello world", request["channel_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_channel_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_channel({ parent: parent, channel: channel, channel_id: channel_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_channel parent: parent, channel: channel, channel_id: channel_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_channel ::Google::Cloud::Eventarc::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_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_channel({ parent: parent, channel: channel, channel_id: channel_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_channel(::Google::Cloud::Eventarc::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_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_channel_client_stub.call_rpc_count + end + end + + def test_update_channel + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + channel = {} + update_mask = {} + validate_only = true + + update_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_channel, name + assert_kind_of ::Google::Cloud::Eventarc::V1::UpdateChannelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Channel), request["channel"] + 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_channel_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_channel({ channel: channel, 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_channel channel: channel, 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_channel ::Google::Cloud::Eventarc::V1::UpdateChannelRequest.new(channel: channel, 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_channel({ channel: channel, 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_channel(::Google::Cloud::Eventarc::V1::UpdateChannelRequest.new(channel: channel, 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_channel_client_stub.call_rpc_count + end + end + + def test_delete_channel + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + validate_only = true + + delete_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_channel, name + assert_kind_of ::Google::Cloud::Eventarc::V1::DeleteChannelRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_channel_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_channel({ name: name, validate_only: validate_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_channel name: name, validate_only: validate_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_channel ::Google::Cloud::Eventarc::V1::DeleteChannelRequest.new(name: name, validate_only: validate_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_channel({ name: name, validate_only: validate_only }, grpc_options) do |response, operation| + assert_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_channel(::Google::Cloud::Eventarc::V1::DeleteChannelRequest.new(name: name, validate_only: validate_only), grpc_options) do |response, operation| + assert_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_channel_client_stub.call_rpc_count + end + end + + def test_get_provider + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::Provider.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_provider_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_provider, name + assert_kind_of ::Google::Cloud::Eventarc::V1::GetProviderRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_provider_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_provider({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_provider name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_provider ::Google::Cloud::Eventarc::V1::GetProviderRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_provider({ 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_provider(::Google::Cloud::Eventarc::V1::GetProviderRequest.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_provider_client_stub.call_rpc_count + end + end + + def test_list_providers + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::ListProvidersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + order_by = "hello world" + filter = "hello world" + + list_providers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_providers, name + assert_kind_of ::Google::Cloud::Eventarc::V1::ListProvidersRequest, 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["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_providers_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_providers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_providers parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_providers ::Google::Cloud::Eventarc::V1::ListProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_providers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_providers(::Google::Cloud::Eventarc::V1::ListProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_providers_client_stub.call_rpc_count + end + end + + def test_get_channel_connection + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::ChannelConnection.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_channel_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_channel_connection, name + assert_kind_of ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_channel_connection_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_channel_connection({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_channel_connection name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_channel_connection ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_channel_connection({ 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_channel_connection(::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.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_channel_connection_client_stub.call_rpc_count + end + end + + def test_list_channel_connections + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_channel_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_channel_connections, name + assert_kind_of ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest, 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_channel_connections_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_channel_connections({ 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_channel_connections 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_channel_connections ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.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_channel_connections({ 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_channel_connections(::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.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_channel_connections_client_stub.call_rpc_count + end + end + + def test_create_channel_connection + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + channel_connection = {} + channel_connection_id = "hello world" + + create_channel_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_channel_connection, name + assert_kind_of ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::ChannelConnection), request["channel_connection"] + assert_equal "hello world", request["channel_connection_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_channel_connection_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_channel_connection({ parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id }) do |response, 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_channel_connection parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id do |response, 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_channel_connection ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new(parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id) do |response, operation| + assert_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_channel_connection({ parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id }, grpc_options) do |response, operation| + assert_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_channel_connection(::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new(parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id), grpc_options) do |response, operation| + assert_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_channel_connection_client_stub.call_rpc_count + end + end + + def test_delete_channel_connection + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_channel_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_channel_connection, name + assert_kind_of ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_channel_connection_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_channel_connection({ 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_channel_connection 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_channel_connection ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.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_channel_connection({ 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_channel_connection(::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.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_channel_connection_client_stub.call_rpc_count + end + end + + def test_get_google_channel_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::GoogleChannelConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_google_channel_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_google_channel_config, name + assert_kind_of ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_google_channel_config_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_google_channel_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_google_channel_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_google_channel_config ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_google_channel_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_google_channel_config(::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.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_google_channel_config_client_stub.call_rpc_count + end + end + + def test_update_google_channel_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::GoogleChannelConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + google_channel_config = {} + update_mask = {} + + update_google_channel_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_google_channel_config, name + assert_kind_of ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::GoogleChannelConfig), request["google_channel_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_google_channel_config_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_google_channel_config({ google_channel_config: google_channel_config, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_google_channel_config google_channel_config: google_channel_config, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_google_channel_config ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new(google_channel_config: google_channel_config, 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_google_channel_config({ google_channel_config: google_channel_config, 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_google_channel_config(::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new(google_channel_config: google_channel_config, 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_google_channel_config_client_stub.call_rpc_count + end + end + + def test_get_message_bus + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::MessageBus.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_message_bus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_message_bus, name + assert_kind_of ::Google::Cloud::Eventarc::V1::GetMessageBusRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_message_bus_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_message_bus({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_message_bus name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_message_bus ::Google::Cloud::Eventarc::V1::GetMessageBusRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_message_bus({ 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_message_bus(::Google::Cloud::Eventarc::V1::GetMessageBusRequest.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_message_bus_client_stub.call_rpc_count + end + end + + def test_list_message_buses + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::ListMessageBusesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + order_by = "hello world" + filter = "hello world" + + list_message_buses_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_message_buses, name + assert_kind_of ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest, 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["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_message_buses_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_message_buses({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_message_buses parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_message_buses ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_message_buses({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_message_buses(::Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_message_buses_client_stub.call_rpc_count + end + end + + def test_list_message_bus_enrollments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_message_bus_enrollments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_message_bus_enrollments, name + assert_kind_of ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest, 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_message_bus_enrollments_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_message_bus_enrollments({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_message_bus_enrollments parent: parent, page_size: page_size, page_token: page_token do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_message_bus_enrollments ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_message_bus_enrollments({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_message_bus_enrollments(::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_message_bus_enrollments_client_stub.call_rpc_count + end + end + + def test_create_message_bus + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + message_bus = {} + message_bus_id = "hello world" + validate_only = true + + create_message_bus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_message_bus, name + assert_kind_of ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::MessageBus), request["message_bus"] + assert_equal "hello world", request["message_bus_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_message_bus_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_message_bus({ parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new(parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus({ parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus(::Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new(parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus_client_stub.call_rpc_count + end + end + + def test_update_message_bus + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + message_bus = {} + update_mask = {} + allow_missing = true + validate_only = true + + update_message_bus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_message_bus, name + assert_kind_of ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::MessageBus), request["message_bus"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_message_bus_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_message_bus({ message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_message_bus message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_message_bus ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new(message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_message_bus({ message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_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_message_bus(::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new(message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_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_message_bus_client_stub.call_rpc_count + end + end + + def test_delete_message_bus + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + allow_missing = true + validate_only = true + + delete_message_bus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_message_bus, name + assert_kind_of ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_message_bus_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_message_bus({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_message_bus name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_message_bus ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_message_bus({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_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_message_bus(::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_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_message_bus_client_stub.call_rpc_count + end + end + + def test_get_enrollment + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::Enrollment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_enrollment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_enrollment, name + assert_kind_of ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_enrollment_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_enrollment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_enrollment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_enrollment ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_enrollment({ 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_enrollment(::Google::Cloud::Eventarc::V1::GetEnrollmentRequest.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_enrollment_client_stub.call_rpc_count + end + end + + def test_list_enrollments + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + order_by = "hello world" + filter = "hello world" + + list_enrollments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_enrollments, name + assert_kind_of ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest, 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["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_enrollments_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_enrollments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_enrollments parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_enrollments ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_enrollments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_enrollments(::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_enrollments_client_stub.call_rpc_count + end + end + + def test_create_enrollment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + enrollment = {} + enrollment_id = "hello world" + validate_only = true + + create_enrollment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_enrollment, name + assert_kind_of ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Enrollment), request["enrollment"] + assert_equal "hello world", request["enrollment_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_enrollment_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_enrollment({ parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new(parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment({ parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment(::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new(parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment_client_stub.call_rpc_count + end + end + + def test_update_enrollment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + enrollment = {} + update_mask = {} + allow_missing = true + validate_only = true + + update_enrollment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_enrollment, name + assert_kind_of ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Enrollment), request["enrollment"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_enrollment_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_enrollment({ enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_enrollment enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_enrollment ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new(enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_enrollment({ enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_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_enrollment(::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new(enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_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_enrollment_client_stub.call_rpc_count + end + end + + def test_delete_enrollment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + allow_missing = true + validate_only = true + + delete_enrollment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_enrollment, name + assert_kind_of ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_enrollment_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_enrollment({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_enrollment name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_enrollment ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_enrollment({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_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_enrollment(::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_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_enrollment_client_stub.call_rpc_count + end + end + + def test_get_pipeline + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::Pipeline.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_pipeline_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_pipeline, name + assert_kind_of ::Google::Cloud::Eventarc::V1::GetPipelineRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_pipeline_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_pipeline({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_pipeline name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_pipeline ::Google::Cloud::Eventarc::V1::GetPipelineRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_pipeline({ 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_pipeline(::Google::Cloud::Eventarc::V1::GetPipelineRequest.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_pipeline_client_stub.call_rpc_count + end + end + + def test_list_pipelines + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::ListPipelinesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + order_by = "hello world" + filter = "hello world" + + list_pipelines_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_pipelines, name + assert_kind_of ::Google::Cloud::Eventarc::V1::ListPipelinesRequest, 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["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_pipelines_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_pipelines({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_pipelines parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_pipelines ::Google::Cloud::Eventarc::V1::ListPipelinesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_pipelines({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_pipelines(::Google::Cloud::Eventarc::V1::ListPipelinesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_pipelines_client_stub.call_rpc_count + end + end + + def test_create_pipeline + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + pipeline = {} + pipeline_id = "hello world" + validate_only = true + + create_pipeline_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_pipeline, name + assert_kind_of ::Google::Cloud::Eventarc::V1::CreatePipelineRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Pipeline), request["pipeline"] + assert_equal "hello world", request["pipeline_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_pipeline_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_pipeline({ parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline ::Google::Cloud::Eventarc::V1::CreatePipelineRequest.new(parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline({ parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline(::Google::Cloud::Eventarc::V1::CreatePipelineRequest.new(parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline_client_stub.call_rpc_count + end + end + + def test_update_pipeline + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + pipeline = {} + update_mask = {} + allow_missing = true + validate_only = true + + update_pipeline_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_pipeline, name + assert_kind_of ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Pipeline), request["pipeline"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_pipeline_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_pipeline({ pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_pipeline pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_pipeline ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new(pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_pipeline({ pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_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_pipeline(::Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new(pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_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_pipeline_client_stub.call_rpc_count + end + end + + def test_delete_pipeline + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + allow_missing = true + validate_only = true + + delete_pipeline_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_pipeline, name + assert_kind_of ::Google::Cloud::Eventarc::V1::DeletePipelineRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_pipeline_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_pipeline({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_pipeline name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_pipeline ::Google::Cloud::Eventarc::V1::DeletePipelineRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_pipeline({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_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_pipeline(::Google::Cloud::Eventarc::V1::DeletePipelineRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_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_pipeline_client_stub.call_rpc_count + end + end + + def test_get_google_api_source + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::GoogleApiSource.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_google_api_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_google_api_source, name + assert_kind_of ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_google_api_source_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_google_api_source({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_google_api_source name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_google_api_source ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_google_api_source({ 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_google_api_source(::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.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_google_api_source_client_stub.call_rpc_count + end + end + + def test_list_google_api_sources + # Create GRPC objects. + grpc_response = ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + order_by = "hello world" + filter = "hello world" + + list_google_api_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_google_api_sources, name + assert_kind_of ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest, 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["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_google_api_sources_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_google_api_sources({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_google_api_sources parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_google_api_sources ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_google_api_sources({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_google_api_sources(::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_google_api_sources_client_stub.call_rpc_count + end + end + + def test_create_google_api_source + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + google_api_source = {} + google_api_source_id = "hello world" + validate_only = true + + create_google_api_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_google_api_source, name + assert_kind_of ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::GoogleApiSource), request["google_api_source"] + assert_equal "hello world", request["google_api_source_id"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_google_api_source_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_google_api_source({ parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new(parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source({ parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source(::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new(parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source_client_stub.call_rpc_count + end + end + + def test_update_google_api_source + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + google_api_source = {} + update_mask = {} + allow_missing = true + validate_only = true + + update_google_api_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_google_api_source, name + assert_kind_of ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::GoogleApiSource), request["google_api_source"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_google_api_source_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_google_api_source({ google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_google_api_source google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_google_api_source ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new(google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_google_api_source({ google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_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_google_api_source(::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new(google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_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_google_api_source_client_stub.call_rpc_count + end + end + + def test_delete_google_api_source + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + allow_missing = true + validate_only = true + + delete_google_api_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_google_api_source, name + assert_kind_of ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["allow_missing"] + assert_equal true, request["validate_only"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_google_api_source_client_stub do + # Create client + client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_google_api_source({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_google_api_source name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_google_api_source ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_google_api_source({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| + assert_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_google_api_source(::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| + assert_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_google_api_source_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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Eventarc::V1::Eventarc::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/test/helper.rb b/owl-bot-staging/google-cloud-eventarc-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-eventarc/.gitignore b/owl-bot-staging/google-cloud-eventarc/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/.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-eventarc/.repo-metadata.json b/owl-bot-staging/google-cloud-eventarc/.repo-metadata.json new file mode 100644 index 000000000000..8e1620ff3e29 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "eventarc.googleapis.com", + "api_shortname": "eventarc", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc/latest", + "distribution_name": "google-cloud-eventarc", + "is_cloud": true, + "language": "ruby", + "name": "eventarc", + "name_pretty": "Eventarc API", + "product_documentation": "https://cloud.google.com/eventarc/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution.", + "ruby-cloud-env-prefix": "EVENTARC", + "ruby-cloud-product-url": "https://cloud.google.com/eventarc/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-eventarc/.rubocop.yml b/owl-bot-staging/google-cloud-eventarc/.rubocop.yml new file mode 100644 index 000000000000..2ea1eb29dd8e --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-eventarc.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-eventarc.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-eventarc/.toys.rb b/owl-bot-staging/google-cloud-eventarc/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/.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-eventarc/.yardopts b/owl-bot-staging/google-cloud-eventarc/.yardopts new file mode 100644 index 000000000000..ccda875d4e7f --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Eventarc API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-eventarc/AUTHENTICATION.md b/owl-bot-staging/google-cloud-eventarc/AUTHENTICATION.md new file mode 100644 index 000000000000..00ef6b0b71d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-eventarc 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-eventarc 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/eventarc" + +client = Google::Cloud::Eventarc.eventarc do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/eventarc" + +Google::Cloud::Eventarc.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Eventarc.eventarc +``` + +### 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-eventarc +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/eventarc" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Eventarc.eventarc +``` + +### 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-eventarc/CHANGELOG.md b/owl-bot-staging/google-cloud-eventarc/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-eventarc/Gemfile b/owl-bot-staging/google-cloud-eventarc/Gemfile new file mode 100644 index 000000000000..fb28bedf019d --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-eventarc-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-eventarc.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-eventarc/LICENSE.md b/owl-bot-staging/google-cloud-eventarc/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/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-eventarc/README.md b/owl-bot-staging/google-cloud-eventarc/README.md new file mode 100644 index 000000000000..b86a86443f9b --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Eventarc API + +API Client library for the Eventarc API + +Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-eventarc-v*`. +The gem `google-cloud-eventarc` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc/latest) +for this library, google-cloud-eventarc, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-eventarc-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/eventarc/) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-eventarc +``` + +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/eventarc.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/eventarc" + +client = Google::Cloud::Eventarc.eventarc +request = ::Google::Cloud::Eventarc::V1::GetTriggerRequest.new # (request fields as keyword arguments...) +response = client.get_trigger request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-eventarc-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest). + +## 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-eventarc`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-eventarc-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-eventarc`. +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-eventarc-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-eventarc/Rakefile b/owl-bot-staging/google-cloud-eventarc/Rakefile new file mode 100644 index 000000000000..5297ff200fb6 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/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 = true +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-eventarc acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["EVENTARC_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["EVENTARC_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["EVENTARC_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 EVENTARC_TEST_PROJECT=test123 EVENTARC_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/eventarc/v1/eventarc/credentials" + ::Google::Cloud::Eventarc::V1::Eventarc::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["EVENTARC_PROJECT"] = project + ENV["EVENTARC_TEST_PROJECT"] = project + ENV["EVENTARC_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-eventarc 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-eventarc 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-eventarc 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-eventarc gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-eventarc" + header "google-cloud-eventarc rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-eventarc yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-eventarc 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-eventarc 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-eventarc 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-eventarc/google-cloud-eventarc.gemspec b/owl-bot-staging/google-cloud-eventarc/google-cloud-eventarc.gemspec new file mode 100644 index 000000000000..8d08faf6aa80 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/google-cloud-eventarc.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/eventarc/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-eventarc" + gem.version = Google::Cloud::Eventarc::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution." + gem.summary = "API Client library for the Eventarc API" + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-eventarc-v1", "~> 2.0" +end diff --git a/owl-bot-staging/google-cloud-eventarc/lib/google-cloud-eventarc.rb b/owl-bot-staging/google-cloud-eventarc/lib/google-cloud-eventarc.rb new file mode 100644 index 000000000000..fdd3280ec5db --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/lib/google-cloud-eventarc.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/eventarc" unless defined? Google::Cloud::Eventarc::VERSION diff --git a/owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc.rb b/owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc.rb new file mode 100644 index 000000000000..61e274cfafe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc.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! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/eventarc/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :eventarc do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Eventarc + ## + # Create a new client object for Eventarc. + # + # By default, this returns an instance of + # [Google::Cloud::Eventarc::V1::Eventarc::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest/Google-Cloud-Eventarc-V1-Eventarc-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the Eventarc service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the Eventarc service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Eventarc.eventarc_available?}. + # + # ## About Eventarc + # + # Eventarc allows users to subscribe to various events that are provided by + # Google Cloud services and forward them to supported destinations. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.eventarc version: :v1, transport: :grpc, &block + require "google/cloud/eventarc/#{version.to_s.downcase}" + + package_name = Google::Cloud::Eventarc + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Eventarc.const_get(package_name).const_get(:Eventarc) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the Eventarc service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Eventarc.eventarc}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the Eventarc service, + # or if the versioned client gem needs an update to support the Eventarc service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.eventarc_available? version: :v1, transport: :grpc + require "google/cloud/eventarc/#{version.to_s.downcase}" + package_name = Google::Cloud::Eventarc + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Eventarc.const_get package_name + return false unless service_module.const_defined? :Eventarc + service_module = service_module.const_get :Eventarc + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-eventarc library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # 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 [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.eventarc if block_given? + + ::Google::Cloud.configure.eventarc + end + end + end +end + +helper_path = ::File.join __dir__, "eventarc", "helpers.rb" +require "google/cloud/eventarc/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc/version.rb b/owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc/version.rb new file mode 100644 index 000000000000..874e8afab7ee --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc/version.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! + + +module Google + module Cloud + module Eventarc + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/client_test.rb b/owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/client_test.rb new file mode 100644 index 000000000000..34da15f12546 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 "google/cloud/eventarc" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Eventarc::ClientConstructionMinitest < 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_eventarc_grpc + skip unless Google::Cloud::Eventarc.eventarc_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Eventarc.eventarc transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Eventarc::V1::Eventarc::Client, client + end + end + + def test_eventarc_rest + skip unless Google::Cloud::Eventarc.eventarc_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Eventarc.eventarc transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Eventarc::V1::Eventarc::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/version_test.rb b/owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/version_test.rb new file mode 100644 index 000000000000..450891c59514 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/version_test.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 "helper" +require "google/cloud/eventarc/version" + +class Google::Cloud::Eventarc::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Eventarc::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-eventarc/test/helper.rb b/owl-bot-staging/google-cloud-eventarc/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-eventarc/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-filestore-v1/.gitignore b/owl-bot-staging/google-cloud-filestore-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-filestore-v1/.repo-metadata.json new file mode 100644 index 000000000000..243280341247 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "file.googleapis.com", + "api_shortname": "file", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-filestore-v1/latest", + "distribution_name": "google-cloud-filestore-v1", + "is_cloud": true, + "language": "ruby", + "name": "file", + "name_pretty": "Filestore V1 API", + "product_documentation": "https://cloud.google.com/filestore/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Filestore instances are fully managed NFS file servers on Google Cloud for use with applications running on Compute Engine virtual machine (VM) instances, Google Kubernetes Engine clusters, external datastores such as Google Cloud VMware Engine, or your on-premises machines. Note that google-cloud-filestore-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-filestore instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/filestore/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-filestore-v1/.rubocop.yml b/owl-bot-staging/google-cloud-filestore-v1/.rubocop.yml new file mode 100644 index 000000000000..b050e479d838 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-filestore-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-filestore-v1.rb" diff --git a/owl-bot-staging/google-cloud-filestore-v1/.toys.rb b/owl-bot-staging/google-cloud-filestore-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1/.yardopts b/owl-bot-staging/google-cloud-filestore-v1/.yardopts new file mode 100644 index 000000000000..b31e8f0b92ae --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Filestore 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-filestore-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-filestore-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..3a7eefb2a452 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-filestore-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-filestore-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/filestore/v1" + +client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/filestore/v1" + +::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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-filestore-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/filestore/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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-filestore-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-filestore-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-filestore-v1/Gemfile b/owl-bot-staging/google-cloud-filestore-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-filestore-v1/LICENSE.md b/owl-bot-staging/google-cloud-filestore-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1/README.md b/owl-bot-staging/google-cloud-filestore-v1/README.md new file mode 100644 index 000000000000..8b13d4363d75 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Filestore V1 API + +The Cloud Filestore API is used for creating and managing cloud file servers. + +Filestore instances are fully managed NFS file servers on Google Cloud for use with applications running on Compute Engine virtual machine (VM) instances, Google Kubernetes Engine clusters, external datastores such as Google Cloud VMware Engine, or your on-premises machines. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Filestore V1 API. Most users should consider using +the main client gem, +[google-cloud-filestore](https://rubygems.org/gems/google-cloud-filestore). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-filestore-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/file.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/filestore/v1" + +client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new +request = ::Google::Cloud::Filestore::V1::ListInstancesRequest.new # (request fields as keyword arguments...) +response = client.list_instances request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-filestore-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/filestore/) +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/filestore/v1" +require "logger" + +client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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-filestore`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-filestore-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-filestore`. +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-filestore-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-filestore-v1/Rakefile b/owl-bot-staging/google-cloud-filestore-v1/Rakefile new file mode 100644 index 000000000000..f1944707be9c --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-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/filestore/v1/cloud_filestore_manager/credentials" + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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-filestore-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-filestore-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-filestore-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-filestore-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-filestore-v1" + header "google-cloud-filestore-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-filestore-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-filestore-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-filestore-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-filestore-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-filestore-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-filestore-v1/gapic_metadata.json new file mode 100644 index 000000000000..f92d517e1ccf --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/gapic_metadata.json @@ -0,0 +1,108 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.filestore.v1", + "libraryPackage": "::Google::Cloud::Filestore::V1", + "services": { + "CloudFilestoreManager": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client", + "rpcs": { + "ListInstances": { + "methods": [ + "list_instances" + ] + }, + "GetInstance": { + "methods": [ + "get_instance" + ] + }, + "CreateInstance": { + "methods": [ + "create_instance" + ] + }, + "UpdateInstance": { + "methods": [ + "update_instance" + ] + }, + "RestoreInstance": { + "methods": [ + "restore_instance" + ] + }, + "RevertInstance": { + "methods": [ + "revert_instance" + ] + }, + "DeleteInstance": { + "methods": [ + "delete_instance" + ] + }, + "ListSnapshots": { + "methods": [ + "list_snapshots" + ] + }, + "GetSnapshot": { + "methods": [ + "get_snapshot" + ] + }, + "CreateSnapshot": { + "methods": [ + "create_snapshot" + ] + }, + "DeleteSnapshot": { + "methods": [ + "delete_snapshot" + ] + }, + "UpdateSnapshot": { + "methods": [ + "update_snapshot" + ] + }, + "ListBackups": { + "methods": [ + "list_backups" + ] + }, + "GetBackup": { + "methods": [ + "get_backup" + ] + }, + "CreateBackup": { + "methods": [ + "create_backup" + ] + }, + "DeleteBackup": { + "methods": [ + "delete_backup" + ] + }, + "UpdateBackup": { + "methods": [ + "update_backup" + ] + }, + "PromoteReplica": { + "methods": [ + "promote_replica" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-filestore-v1/google-cloud-filestore-v1.gemspec b/owl-bot-staging/google-cloud-filestore-v1/google-cloud-filestore-v1.gemspec new file mode 100644 index 000000000000..e2d8f36173d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/google-cloud-filestore-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/filestore/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-filestore-v1" + gem.version = Google::Cloud::Filestore::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Filestore instances are fully managed NFS file servers on Google Cloud for use with applications running on Compute Engine virtual machine (VM) instances, Google Kubernetes Engine clusters, external datastores such as Google Cloud VMware Engine, or your on-premises machines. Note that google-cloud-filestore-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-filestore instead. See the readme for more details." + gem.summary = "The Cloud Filestore API is used for creating and managing cloud file servers." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-common", "~> 1.0" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google-cloud-filestore-v1.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google-cloud-filestore-v1.rb new file mode 100644 index 000000000000..5fd86d8c1673 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/lib/google-cloud-filestore-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/filestore/v1" diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1.rb new file mode 100644 index 000000000000..1f249415fa15 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1.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/filestore/v1/cloud_filestore_manager" +require "google/cloud/filestore/v1/version" + +module Google + module Cloud + module Filestore + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/filestore/v1" + # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/filestore/v1" + # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/filestore/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/bindings_override.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/bindings_override.rb new file mode 100644 index 000000000000..40e678f62b3a --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/bindings_override.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! + +require "gapic/rest" + +module Google + module Cloud + module Filestore + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/filestore/v1/rest" + # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Filestore"] + 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 + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager.rb new file mode 100644 index 000000000000..6f062a0ff291 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager.rb @@ -0,0 +1,74 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/filestore/v1/version" + +require "google/cloud/filestore/v1/cloud_filestore_manager/credentials" +require "google/cloud/filestore/v1/cloud_filestore_manager/paths" +require "google/cloud/filestore/v1/cloud_filestore_manager/operations" +require "google/cloud/filestore/v1/cloud_filestore_manager/client" +require "google/cloud/filestore/v1/cloud_filestore_manager/rest" + +module Google + module Cloud + module Filestore + module V1 + ## + # Configures and manages Filestore resources. + # + # Filestore Manager v1. + # + # The `file.googleapis.com` service implements the Filestore API and + # defines the following resource model for managing instances: + # * The service works with a collection of cloud projects, named: `/projects/*` + # * Each project has a collection of available locations, named: `/locations/*` + # * Each location has a collection of instances and backups, named: + # `/instances/*` and `/backups/*` respectively. + # * As such, Filestore instances are resources of the form: + # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}` + # and backups are resources of the form: + # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}` + # + # Note that location_id must be a Google Cloud `zone` for instances, but + # a Google Cloud `region` for backups; for example: + # * `projects/12345/locations/us-central1-c/instances/my-filestore` + # * `projects/12345/locations/us-central1/backups/my-backup` + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/filestore/v1/cloud_filestore_manager" + # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/filestore/v1/cloud_filestore_manager/rest" + # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + module CloudFilestoreManager + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_filestore_manager", "helpers.rb" +require "google/cloud/filestore/v1/cloud_filestore_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb new file mode 100644 index 000000000000..55786589ef8d --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb @@ -0,0 +1,2370 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/filestore/v1/cloud_filestore_service_pb" +require "google/cloud/location" + +module Google + module Cloud + module Filestore + module V1 + module CloudFilestoreManager + ## + # Client for the CloudFilestoreManager service. + # + # Configures and manages Filestore resources. + # + # Filestore Manager v1. + # + # The `file.googleapis.com` service implements the Filestore API and + # defines the following resource model for managing instances: + # * The service works with a collection of cloud projects, named: `/projects/*` + # * Each project has a collection of available locations, named: `/locations/*` + # * Each location has a collection of instances and backups, named: + # `/instances/*` and `/backups/*` respectively. + # * As such, Filestore instances are resources of the form: + # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}` + # and backups are resources of the form: + # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}` + # + # Note that location_id must be a Google Cloud `zone` for instances, but + # a Google Cloud `region` for backups; for example: + # * `projects/12345/locations/us-central1-c/instances/my-filestore` + # * `projects/12345/locations/us-central1/backups/my-backup` + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "file.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_filestore_manager_stub + + ## + # Configure the CloudFilestoreManager Client class. + # + # See {::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudFilestoreManager clients + # ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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", "Filestore", "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.list_instances.timeout = 60.0 + default_config.rpcs.list_instances.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_instance.timeout = 60.0 + default_config.rpcs.get_instance.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_instance.timeout = 60_000.0 + + default_config.rpcs.update_instance.timeout = 14_400.0 + + default_config.rpcs.restore_instance.timeout = 60_000.0 + + default_config.rpcs.delete_instance.timeout = 600.0 + + default_config.rpcs.list_backups.timeout = 60.0 + default_config.rpcs.list_backups.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup.timeout = 60.0 + default_config.rpcs.get_backup.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_backup.timeout = 60_000.0 + + default_config.rpcs.delete_backup.timeout = 600.0 + + default_config.rpcs.update_backup.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudFilestoreManager 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::Filestore::V1::CloudFilestoreManager::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 + @cloud_filestore_manager_stub.universe_domain + end + + ## + # Create a new CloudFilestoreManager client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudFilestoreManager 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/filestore/v1/cloud_filestore_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 + + @cloud_filestore_manager_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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 + ) + + @cloud_filestore_manager_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 = @cloud_filestore_manager_stub.endpoint + config.universe_domain = @cloud_filestore_manager_stub.universe_domain + config.logger = @cloud_filestore_manager_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Filestore::V1::CloudFilestoreManager::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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_filestore_manager_stub.logger + end + + # Service calls + + ## + # Lists all instances in a project for either a specified location + # or for all locations. + # + # @overload list_instances(request, options = nil) + # Pass arguments to `list_instances` via a request object, either of type + # {::Google::Cloud::Filestore::V1::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::ListInstancesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_instances(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_instances` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve instance + # information, in the format `projects/{project_id}/locations/{location}`. In + # Cloud Filestore, locations map to Google Cloud zones, for example + # **us-west1-b**. To retrieve instance information for all locations, use "-" + # for the + # `{location}` value. + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value to use if there are additional + # results to retrieve for this list request. + # @param order_by [::String] + # Sort results. Supported values are "name", "name desc" or "" (unsorted). + # @param filter [::String] + # List filter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Filestore::V1::Instance>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Filestore::V1::Instance>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::ListInstancesRequest.new + # + # # Call the list_instances method. + # result = client.list_instances request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Filestore::V1::Instance. + # p item + # end + # + def list_instances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListInstancesRequest + + # Converts hash and nil to 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_instances.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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_instances.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_instances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :list_instances, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_filestore_manager_stub, :list_instances, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a specific instance. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::Filestore::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_instance(name: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The instance resource name, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Filestore::V1::Instance] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Filestore::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::Filestore::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetInstanceRequest + + # Converts hash and nil to 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :get_instance, 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 instance. + # When creating from a backup, the capacity of the new instance needs to be + # equal to or larger than the capacity of the backup (and also equal to or + # larger than the minimum capacity of the tier). + # + # @overload create_instance(request, options = nil) + # Pass arguments to `create_instance` via a request object, either of type + # {::Google::Cloud::Filestore::V1::CreateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::CreateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_instance(parent: nil, instance_id: nil, instance: nil) + # Pass arguments to `create_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance's project and location, in the format + # `projects/{project_id}/locations/{location}`. In Filestore, + # locations map to Google Cloud zones, for example **us-west1-b**. + # @param instance_id [::String] + # Required. The name of the instance to create. + # The name must be unique for the specified project and location. + # @param instance [::Google::Cloud::Filestore::V1::Instance, ::Hash] + # Required. An {::Google::Cloud::Filestore::V1::Instance instance 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/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::CreateInstanceRequest.new + # + # # Call the create_instance method. + # result = client.create_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateInstanceRequest + + # Converts hash and nil to 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :create_instance, 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 the settings of a specific instance. + # + # @overload update_instance(request, options = nil) + # Pass arguments to `update_instance` via a request object, either of type + # {::Google::Cloud::Filestore::V1::UpdateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::UpdateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_instance(update_mask: nil, instance: nil) + # Pass arguments to `update_instance` via keyword arguments. Note that at + # least one keyword argument is 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] + # Mask of fields to update. At least one path must be supplied in this + # field. The elements of the repeated paths field may only include these + # fields: + # + # * "description" + # * "file_shares" + # * "labels" + # * "performance_config" + # * "deletion_protection_enabled" + # * "deletion_protection_reason" + # @param instance [::Google::Cloud::Filestore::V1::Instance, ::Hash] + # Only fields specified in update_mask are updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::UpdateInstanceRequest.new + # + # # Call the update_instance method. + # result = client.update_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateInstanceRequest + + # Converts hash and nil to 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.instance&.name + header_params["instance.name"] = request.instance.name + end + + request_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_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :update_instance, 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 + + ## + # Restores an existing instance's file share from a backup. + # + # The capacity of the instance needs to be equal to or larger than the + # capacity of the backup (and also equal to or larger than the minimum + # capacity of the tier). + # + # @overload restore_instance(request, options = nil) + # Pass arguments to `restore_instance` via a request object, either of type + # {::Google::Cloud::Filestore::V1::RestoreInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::RestoreInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload restore_instance(name: nil, file_share: nil, source_backup: nil) + # Pass arguments to `restore_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the instance, in the format + # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. + # @param file_share [::String] + # Required. Name of the file share in the Filestore instance that the backup + # is being restored to. + # @param source_backup [::String] + # The resource name of the backup, in the format + # `projects/{project_number}/locations/{location_id}/backups/{backup_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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::RestoreInstanceRequest.new + # + # # Call the restore_instance method. + # result = client.restore_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::RestoreInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.restore_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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.restore_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restore_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :restore_instance, 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 + + ## + # Revert an existing instance's file system to a specified snapshot. + # + # @overload revert_instance(request, options = nil) + # Pass arguments to `revert_instance` via a request object, either of type + # {::Google::Cloud::Filestore::V1::RevertInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::RevertInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload revert_instance(name: nil, target_snapshot_id: nil) + # Pass arguments to `revert_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the instance, in the format + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. + # @param target_snapshot_id [::String] + # Required. The snapshot resource ID, in the format 'my-snapshot', where the + # specified ID is the \\{snapshot_id} of the fully qualified name like + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::RevertInstanceRequest.new + # + # # Call the revert_instance method. + # result = client.revert_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def revert_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::RevertInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.revert_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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.revert_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.revert_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :revert_instance, 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 instance. + # + # @overload delete_instance(request, options = nil) + # Pass arguments to `delete_instance` via a request object, either of type + # {::Google::Cloud::Filestore::V1::DeleteInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::DeleteInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_instance(name: nil, force: nil) + # Pass arguments to `delete_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The instance resource name, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}` + # @param force [::Boolean] + # If set to true, all snapshots of the instance will also be deleted. + # (Otherwise, the request will only work if the instance has no snapshots.) + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::DeleteInstanceRequest.new + # + # # Call the delete_instance method. + # result = client.delete_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteInstanceRequest + + # Converts hash and nil to 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :delete_instance, 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 all snapshots in a project for either a specified location + # or for all locations. + # + # @overload list_snapshots(request, options = nil) + # Pass arguments to `list_snapshots` via a request object, either of type + # {::Google::Cloud::Filestore::V1::ListSnapshotsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::ListSnapshotsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_snapshots(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil, return_partial_success: nil) + # Pass arguments to `list_snapshots` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance for which to retrieve snapshot information, + # in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}`. + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value to use if there are additional + # results to retrieve for this list request. + # @param order_by [::String] + # Sort results. Supported values are "name", "name desc" or "" (unsorted). + # @param filter [::String] + # List filter. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Filestore::V1::Snapshot>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Filestore::V1::Snapshot>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::ListSnapshotsRequest.new + # + # # Call the list_snapshots method. + # result = client.list_snapshots request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Filestore::V1::Snapshot. + # p item + # end + # + def list_snapshots request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListSnapshotsRequest + + # Converts hash and nil to 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_snapshots.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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_snapshots.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_snapshots.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :list_snapshots, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_filestore_manager_stub, :list_snapshots, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a specific snapshot. + # + # @overload get_snapshot(request, options = nil) + # Pass arguments to `get_snapshot` via a request object, either of type + # {::Google::Cloud::Filestore::V1::GetSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::GetSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_snapshot(name: nil) + # Pass arguments to `get_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The snapshot resource name, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Filestore::V1::Snapshot] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Filestore::V1::Snapshot] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::GetSnapshotRequest.new + # + # # Call the get_snapshot method. + # result = client.get_snapshot request + # + # # The returned object is of type Google::Cloud::Filestore::V1::Snapshot. + # p result + # + def get_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetSnapshotRequest + + # Converts hash and nil to 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_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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_snapshot.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :get_snapshot, 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 snapshot. + # + # @overload create_snapshot(request, options = nil) + # Pass arguments to `create_snapshot` via a request object, either of type + # {::Google::Cloud::Filestore::V1::CreateSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::CreateSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_snapshot(parent: nil, snapshot_id: nil, snapshot: nil) + # Pass arguments to `create_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The Filestore Instance to create the snapshots of, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}` + # @param snapshot_id [::String] + # Required. The ID to use for the snapshot. + # The ID must be unique within the specified instance. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + # @param snapshot [::Google::Cloud::Filestore::V1::Snapshot, ::Hash] + # Required. A snapshot 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/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::CreateSnapshotRequest.new + # + # # Call the create_snapshot method. + # result = client.create_snapshot request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateSnapshotRequest + + # Converts hash and nil to 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_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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_snapshot.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :create_snapshot, 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 snapshot. + # + # @overload delete_snapshot(request, options = nil) + # Pass arguments to `delete_snapshot` via a request object, either of type + # {::Google::Cloud::Filestore::V1::DeleteSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::DeleteSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_snapshot(name: nil) + # Pass arguments to `delete_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The snapshot resource name, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::DeleteSnapshotRequest.new + # + # # Call the delete_snapshot method. + # result = client.delete_snapshot request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteSnapshotRequest + + # Converts hash and nil to 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_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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_snapshot.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :delete_snapshot, 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 the settings of a specific snapshot. + # + # @overload update_snapshot(request, options = nil) + # Pass arguments to `update_snapshot` via a request object, either of type + # {::Google::Cloud::Filestore::V1::UpdateSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::UpdateSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_snapshot(update_mask: nil, snapshot: nil) + # Pass arguments to `update_snapshot` via keyword arguments. Note that at + # least one keyword argument is 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. At least one path must be supplied in + # this field. + # @param snapshot [::Google::Cloud::Filestore::V1::Snapshot, ::Hash] + # Required. A snapshot 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/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new + # + # # Call the update_snapshot method. + # result = client.update_snapshot request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateSnapshotRequest + + # Converts hash and nil to 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_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.snapshot&.name + header_params["snapshot.name"] = request.snapshot.name + end + + request_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_snapshot.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :update_snapshot, 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 all backups in a project for either a specified location or for all + # locations. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::Filestore::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::ListBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backups(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backup + # information, in the format + # `projects/{project_number}/locations/{location}`. In Filestore, backup + # locations map to Google Cloud regions, for example **us-west1**. To + # retrieve backup information for all locations, use "-" for the + # `{location}` value. + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value to use if there are additional + # results to retrieve for this list request. + # @param order_by [::String] + # Sort results. Supported values are "name", "name desc" or "" (unsorted). + # @param filter [::String] + # List filter. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Filestore::V1::Backup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Filestore::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::ListBackupsRequest.new + # + # # Call the list_backups method. + # result = client.list_backups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Filestore::V1::Backup. + # p item + # end + # + def list_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListBackupsRequest + + # Converts hash and nil to 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_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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_backups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :list_backups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_filestore_manager_stub, :list_backups, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the details of a specific backup. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::Filestore::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::GetBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup(name: nil) + # Pass arguments to `get_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The backup resource name, in the format + # `projects/{project_number}/locations/{location}/backups/{backup_id}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Filestore::V1::Backup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Filestore::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::Filestore::V1::Backup. + # p result + # + def get_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetBackupRequest + + # Converts hash and nil to 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :get_backup, 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 backup. + # + # @overload create_backup(request, options = nil) + # Pass arguments to `create_backup` via a request object, either of type + # {::Google::Cloud::Filestore::V1::CreateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::CreateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup(parent: nil, backup: nil, backup_id: nil) + # Pass arguments to `create_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The backup's project and location, in the format + # `projects/{project_number}/locations/{location}`. In Filestore, + # backup locations map to Google Cloud regions, for example **us-west1**. + # @param backup [::Google::Cloud::Filestore::V1::Backup, ::Hash] + # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource} + # @param backup_id [::String] + # Required. The ID to use for the backup. + # The ID must be unique within the specified project and location. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + # Values that do not match this pattern will trigger an INVALID_ARGUMENT + # 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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::CreateBackupRequest.new + # + # # Call the create_backup method. + # result = client.create_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateBackupRequest + + # Converts hash and nil to 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :create_backup, 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 backup. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::Filestore::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::DeleteBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup(name: nil) + # Pass arguments to `delete_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The backup resource name, in the format + # `projects/{project_number}/locations/{location}/backups/{backup_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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteBackupRequest + + # Converts hash and nil to 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :delete_backup, 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 the settings of a specific backup. + # + # @overload update_backup(request, options = nil) + # Pass arguments to `update_backup` via a request object, either of type + # {::Google::Cloud::Filestore::V1::UpdateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::UpdateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup(backup: nil, update_mask: nil) + # Pass arguments to `update_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup [::Google::Cloud::Filestore::V1::Backup, ::Hash] + # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::UpdateBackupRequest.new + # + # # Call the update_backup method. + # result = client.update_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateBackupRequest + + # Converts hash and nil to 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup&.name + header_params["backup.name"] = request.backup.name + end + + request_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_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :update_backup, 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 + + ## + # Promote the standby instance (replica). + # + # @overload promote_replica(request, options = nil) + # Pass arguments to `promote_replica` via a request object, either of type + # {::Google::Cloud::Filestore::V1::PromoteReplicaRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::PromoteReplicaRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload promote_replica(name: nil, peer_instance: nil) + # Pass arguments to `promote_replica` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the instance, in the format + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. + # @param peer_instance [::String] + # Optional. The resource name of the peer instance to promote, in the format + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. + # The peer instance is required if the operation is called on an active + # instance. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::PromoteReplicaRequest.new + # + # # Call the promote_replica method. + # result = client.promote_replica request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def promote_replica request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::PromoteReplicaRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.promote_replica.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION + metadata[:"x-goog-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.promote_replica.timeout, + metadata: metadata, + retry_policy: @config.rpcs.promote_replica.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.call_rpc :promote_replica, 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 CloudFilestoreManager API. + # + # This class represents the configuration for CloudFilestoreManager, + # 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::Filestore::V1::CloudFilestoreManager::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_instances to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.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::Filestore::V1::CloudFilestoreManager::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 = "file.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 CloudFilestoreManager 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_instances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instances + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + ## + # RPC-specific configuration for `create_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance + ## + # RPC-specific configuration for `update_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance + ## + # RPC-specific configuration for `restore_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_instance + ## + # RPC-specific configuration for `revert_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :revert_instance + ## + # RPC-specific configuration for `delete_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance + ## + # RPC-specific configuration for `list_snapshots` + # @return [::Gapic::Config::Method] + # + attr_reader :list_snapshots + ## + # RPC-specific configuration for `get_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :get_snapshot + ## + # RPC-specific configuration for `create_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :create_snapshot + ## + # RPC-specific configuration for `delete_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_snapshot + ## + # RPC-specific configuration for `update_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :update_snapshot + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `get_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup + ## + # RPC-specific configuration for `create_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup + ## + # RPC-specific configuration for `delete_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup + ## + # RPC-specific configuration for `update_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup + ## + # RPC-specific configuration for `promote_replica` + # @return [::Gapic::Config::Method] + # + attr_reader :promote_replica + + # @private + def initialize parent_rpcs = nil + list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances + @list_instances = ::Gapic::Config::Method.new list_instances_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance + @create_instance = ::Gapic::Config::Method.new create_instance_config + update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance + @update_instance = ::Gapic::Config::Method.new update_instance_config + restore_instance_config = parent_rpcs.restore_instance if parent_rpcs.respond_to? :restore_instance + @restore_instance = ::Gapic::Config::Method.new restore_instance_config + revert_instance_config = parent_rpcs.revert_instance if parent_rpcs.respond_to? :revert_instance + @revert_instance = ::Gapic::Config::Method.new revert_instance_config + delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance + @delete_instance = ::Gapic::Config::Method.new delete_instance_config + list_snapshots_config = parent_rpcs.list_snapshots if parent_rpcs.respond_to? :list_snapshots + @list_snapshots = ::Gapic::Config::Method.new list_snapshots_config + get_snapshot_config = parent_rpcs.get_snapshot if parent_rpcs.respond_to? :get_snapshot + @get_snapshot = ::Gapic::Config::Method.new get_snapshot_config + create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot + @create_snapshot = ::Gapic::Config::Method.new create_snapshot_config + delete_snapshot_config = parent_rpcs.delete_snapshot if parent_rpcs.respond_to? :delete_snapshot + @delete_snapshot = ::Gapic::Config::Method.new delete_snapshot_config + update_snapshot_config = parent_rpcs.update_snapshot if parent_rpcs.respond_to? :update_snapshot + @update_snapshot = ::Gapic::Config::Method.new update_snapshot_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup + @get_backup = ::Gapic::Config::Method.new get_backup_config + create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup + @create_backup = ::Gapic::Config::Method.new create_backup_config + delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup + @delete_backup = ::Gapic::Config::Method.new delete_backup_config + update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup + @update_backup = ::Gapic::Config::Method.new update_backup_config + promote_replica_config = parent_rpcs.promote_replica if parent_rpcs.respond_to? :promote_replica + @promote_replica = ::Gapic::Config::Method.new promote_replica_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/credentials.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/credentials.rb new file mode 100644 index 000000000000..e61817cc4f70 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/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 Filestore + module V1 + module CloudFilestoreManager + # Credentials for the CloudFilestoreManager 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-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/operations.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/operations.rb new file mode 100644 index 000000000000..120b5f2b7b64 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/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 Filestore + module V1 + module CloudFilestoreManager + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "file.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CloudFilestoreManager 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 CloudFilestoreManager 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::Filestore::V1::VERSION + metadata[:"x-goog-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::Filestore::V1::VERSION + metadata[:"x-goog-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::Filestore::V1::VERSION + metadata[:"x-goog-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::Filestore::V1::VERSION + metadata[:"x-goog-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::Filestore::V1::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 = "file.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-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/paths.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/paths.rb new file mode 100644 index 000000000000..0dcc7297d477 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/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 Filestore + module V1 + module CloudFilestoreManager + # Path helper methods for the CloudFilestoreManager API. + module Paths + ## + # Create a fully-qualified Backup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backups/{backup}` + # + # @param project [String] + # @param location [String] + # @param backup [String] + # + # @return [::String] + def backup_path project:, location:, backup: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backups/#{backup}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + 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 Snapshot resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}/snapshots/{snapshot}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # @param snapshot [String] + # + # @return [::String] + def snapshot_path project:, location:, instance:, snapshot: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}/snapshots/#{snapshot}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest.rb new file mode 100644 index 000000000000..eb63a8c99ffe --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest.rb @@ -0,0 +1,72 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/filestore/v1/version" +require "google/cloud/filestore/v1/bindings_override" + +require "google/cloud/filestore/v1/cloud_filestore_manager/credentials" +require "google/cloud/filestore/v1/cloud_filestore_manager/paths" +require "google/cloud/filestore/v1/cloud_filestore_manager/rest/operations" +require "google/cloud/filestore/v1/cloud_filestore_manager/rest/client" + +module Google + module Cloud + module Filestore + module V1 + ## + # Configures and manages Filestore resources. + # + # Filestore Manager v1. + # + # The `file.googleapis.com` service implements the Filestore API and + # defines the following resource model for managing instances: + # * The service works with a collection of cloud projects, named: `/projects/*` + # * Each project has a collection of available locations, named: `/locations/*` + # * Each location has a collection of instances and backups, named: + # `/instances/*` and `/backups/*` respectively. + # * As such, Filestore instances are resources of the form: + # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}` + # and backups are resources of the form: + # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}` + # + # Note that location_id must be a Google Cloud `zone` for instances, but + # a Google Cloud `region` for backups; for example: + # * `projects/12345/locations/us-central1-c/instances/my-filestore` + # * `projects/12345/locations/us-central1/backups/my-backup` + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/filestore/v1/cloud_filestore_manager/rest" + # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + module CloudFilestoreManager + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/filestore/v1/cloud_filestore_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb new file mode 100644 index 000000000000..6f7581359108 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb @@ -0,0 +1,2209 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/filestore/v1/cloud_filestore_service_pb" +require "google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Filestore + module V1 + module CloudFilestoreManager + module Rest + ## + # REST client for the CloudFilestoreManager service. + # + # Configures and manages Filestore resources. + # + # Filestore Manager v1. + # + # The `file.googleapis.com` service implements the Filestore API and + # defines the following resource model for managing instances: + # * The service works with a collection of cloud projects, named: `/projects/*` + # * Each project has a collection of available locations, named: `/locations/*` + # * Each location has a collection of instances and backups, named: + # `/instances/*` and `/backups/*` respectively. + # * As such, Filestore instances are resources of the form: + # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}` + # and backups are resources of the form: + # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}` + # + # Note that location_id must be a Google Cloud `zone` for instances, but + # a Google Cloud `region` for backups; for example: + # * `projects/12345/locations/us-central1-c/instances/my-filestore` + # * `projects/12345/locations/us-central1/backups/my-backup` + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "file.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_filestore_manager_stub + + ## + # Configure the CloudFilestoreManager Client class. + # + # See {::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudFilestoreManager clients + # ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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", "Filestore", "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.list_instances.timeout = 60.0 + default_config.rpcs.list_instances.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_instance.timeout = 60.0 + default_config.rpcs.get_instance.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_instance.timeout = 60_000.0 + + default_config.rpcs.update_instance.timeout = 14_400.0 + + default_config.rpcs.restore_instance.timeout = 60_000.0 + + default_config.rpcs.delete_instance.timeout = 600.0 + + default_config.rpcs.list_backups.timeout = 60.0 + default_config.rpcs.list_backups.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup.timeout = 60.0 + default_config.rpcs.get_backup.retry_policy = { + initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_backup.timeout = 60_000.0 + + default_config.rpcs.delete_backup.timeout = 600.0 + + default_config.rpcs.update_backup.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudFilestoreManager 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::Filestore::V1::CloudFilestoreManager::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 + @cloud_filestore_manager_stub.universe_domain + end + + ## + # Create a new CloudFilestoreManager REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudFilestoreManager 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::Filestore::V1::CloudFilestoreManager::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 + + @cloud_filestore_manager_stub = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_filestore_manager_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 = @cloud_filestore_manager_stub.endpoint + config.universe_domain = @cloud_filestore_manager_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @cloud_filestore_manager_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Filestore::V1::CloudFilestoreManager::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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @cloud_filestore_manager_stub.logger + end + + # Service calls + + ## + # Lists all instances in a project for either a specified location + # or for all locations. + # + # @overload list_instances(request, options = nil) + # Pass arguments to `list_instances` via a request object, either of type + # {::Google::Cloud::Filestore::V1::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::ListInstancesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_instances(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_instances` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve instance + # information, in the format `projects/{project_id}/locations/{location}`. In + # Cloud Filestore, locations map to Google Cloud zones, for example + # **us-west1-b**. To retrieve instance information for all locations, use "-" + # for the + # `{location}` value. + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value to use if there are additional + # results to retrieve for this list request. + # @param order_by [::String] + # Sort results. Supported values are "name", "name desc" or "" (unsorted). + # @param filter [::String] + # List filter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Instance>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Instance>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::ListInstancesRequest.new + # + # # Call the list_instances method. + # result = client.list_instances request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Filestore::V1::Instance. + # p item + # end + # + def list_instances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListInstancesRequest + + # Converts hash and nil to an 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_instances.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_instances.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_instances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.list_instances request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_filestore_manager_stub, :list_instances, "instances", 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 details of a specific instance. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::Filestore::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_instance(name: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The instance resource name, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Filestore::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Filestore::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::Filestore::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetInstanceRequest + + # Converts hash and nil to an 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.get_instance 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 instance. + # When creating from a backup, the capacity of the new instance needs to be + # equal to or larger than the capacity of the backup (and also equal to or + # larger than the minimum capacity of the tier). + # + # @overload create_instance(request, options = nil) + # Pass arguments to `create_instance` via a request object, either of type + # {::Google::Cloud::Filestore::V1::CreateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::CreateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_instance(parent: nil, instance_id: nil, instance: nil) + # Pass arguments to `create_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance's project and location, in the format + # `projects/{project_id}/locations/{location}`. In Filestore, + # locations map to Google Cloud zones, for example **us-west1-b**. + # @param instance_id [::String] + # Required. The name of the instance to create. + # The name must be unique for the specified project and location. + # @param instance [::Google::Cloud::Filestore::V1::Instance, ::Hash] + # Required. An {::Google::Cloud::Filestore::V1::Instance instance 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/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::CreateInstanceRequest.new + # + # # Call the create_instance method. + # result = client.create_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateInstanceRequest + + # Converts hash and nil to an 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.create_instance 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 the settings of a specific instance. + # + # @overload update_instance(request, options = nil) + # Pass arguments to `update_instance` via a request object, either of type + # {::Google::Cloud::Filestore::V1::UpdateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::UpdateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_instance(update_mask: nil, instance: nil) + # Pass arguments to `update_instance` via keyword arguments. Note that at + # least one keyword argument is 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] + # Mask of fields to update. At least one path must be supplied in this + # field. The elements of the repeated paths field may only include these + # fields: + # + # * "description" + # * "file_shares" + # * "labels" + # * "performance_config" + # * "deletion_protection_enabled" + # * "deletion_protection_reason" + # @param instance [::Google::Cloud::Filestore::V1::Instance, ::Hash] + # Only fields specified in update_mask are updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::UpdateInstanceRequest.new + # + # # Call the update_instance method. + # result = client.update_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateInstanceRequest + + # Converts hash and nil to an 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.update_instance 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 + + ## + # Restores an existing instance's file share from a backup. + # + # The capacity of the instance needs to be equal to or larger than the + # capacity of the backup (and also equal to or larger than the minimum + # capacity of the tier). + # + # @overload restore_instance(request, options = nil) + # Pass arguments to `restore_instance` via a request object, either of type + # {::Google::Cloud::Filestore::V1::RestoreInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::RestoreInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload restore_instance(name: nil, file_share: nil, source_backup: nil) + # Pass arguments to `restore_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the instance, in the format + # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. + # @param file_share [::String] + # Required. Name of the file share in the Filestore instance that the backup + # is being restored to. + # @param source_backup [::String] + # The resource name of the backup, in the format + # `projects/{project_number}/locations/{location_id}/backups/{backup_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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::RestoreInstanceRequest.new + # + # # Call the restore_instance method. + # result = client.restore_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::RestoreInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.restore_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.restore_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restore_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.restore_instance 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 + + ## + # Revert an existing instance's file system to a specified snapshot. + # + # @overload revert_instance(request, options = nil) + # Pass arguments to `revert_instance` via a request object, either of type + # {::Google::Cloud::Filestore::V1::RevertInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::RevertInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload revert_instance(name: nil, target_snapshot_id: nil) + # Pass arguments to `revert_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the instance, in the format + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. + # @param target_snapshot_id [::String] + # Required. The snapshot resource ID, in the format 'my-snapshot', where the + # specified ID is the \\{snapshot_id} of the fully qualified name like + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::RevertInstanceRequest.new + # + # # Call the revert_instance method. + # result = client.revert_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def revert_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::RevertInstanceRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.revert_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.revert_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.revert_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.revert_instance 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 instance. + # + # @overload delete_instance(request, options = nil) + # Pass arguments to `delete_instance` via a request object, either of type + # {::Google::Cloud::Filestore::V1::DeleteInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::DeleteInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_instance(name: nil, force: nil) + # Pass arguments to `delete_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The instance resource name, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}` + # @param force [::Boolean] + # If set to true, all snapshots of the instance will also be deleted. + # (Otherwise, the request will only work if the instance has no snapshots.) + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::DeleteInstanceRequest.new + # + # # Call the delete_instance method. + # result = client.delete_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteInstanceRequest + + # Converts hash and nil to an 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.delete_instance 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 all snapshots in a project for either a specified location + # or for all locations. + # + # @overload list_snapshots(request, options = nil) + # Pass arguments to `list_snapshots` via a request object, either of type + # {::Google::Cloud::Filestore::V1::ListSnapshotsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::ListSnapshotsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_snapshots(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil, return_partial_success: nil) + # Pass arguments to `list_snapshots` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The instance for which to retrieve snapshot information, + # in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}`. + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value to use if there are additional + # results to retrieve for this list request. + # @param order_by [::String] + # Sort results. Supported values are "name", "name desc" or "" (unsorted). + # @param filter [::String] + # List filter. + # @param return_partial_success [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Snapshot>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Snapshot>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::ListSnapshotsRequest.new + # + # # Call the list_snapshots method. + # result = client.list_snapshots request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Filestore::V1::Snapshot. + # p item + # end + # + def list_snapshots request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListSnapshotsRequest + + # Converts hash and nil to an 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_snapshots.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_snapshots.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_snapshots.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.list_snapshots request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_filestore_manager_stub, :list_snapshots, "snapshots", 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 details of a specific snapshot. + # + # @overload get_snapshot(request, options = nil) + # Pass arguments to `get_snapshot` via a request object, either of type + # {::Google::Cloud::Filestore::V1::GetSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::GetSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_snapshot(name: nil) + # Pass arguments to `get_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The snapshot resource name, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Filestore::V1::Snapshot] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Filestore::V1::Snapshot] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::GetSnapshotRequest.new + # + # # Call the get_snapshot method. + # result = client.get_snapshot request + # + # # The returned object is of type Google::Cloud::Filestore::V1::Snapshot. + # p result + # + def get_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetSnapshotRequest + + # Converts hash and nil to an 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_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_snapshot.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.get_snapshot 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 snapshot. + # + # @overload create_snapshot(request, options = nil) + # Pass arguments to `create_snapshot` via a request object, either of type + # {::Google::Cloud::Filestore::V1::CreateSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::CreateSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_snapshot(parent: nil, snapshot_id: nil, snapshot: nil) + # Pass arguments to `create_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The Filestore Instance to create the snapshots of, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}` + # @param snapshot_id [::String] + # Required. The ID to use for the snapshot. + # The ID must be unique within the specified instance. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + # @param snapshot [::Google::Cloud::Filestore::V1::Snapshot, ::Hash] + # Required. A snapshot 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/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::CreateSnapshotRequest.new + # + # # Call the create_snapshot method. + # result = client.create_snapshot request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateSnapshotRequest + + # Converts hash and nil to an 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_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_snapshot.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.create_snapshot 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 snapshot. + # + # @overload delete_snapshot(request, options = nil) + # Pass arguments to `delete_snapshot` via a request object, either of type + # {::Google::Cloud::Filestore::V1::DeleteSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::DeleteSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_snapshot(name: nil) + # Pass arguments to `delete_snapshot` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The snapshot resource name, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::DeleteSnapshotRequest.new + # + # # Call the delete_snapshot method. + # result = client.delete_snapshot request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteSnapshotRequest + + # Converts hash and nil to an 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_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_snapshot.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.delete_snapshot 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 the settings of a specific snapshot. + # + # @overload update_snapshot(request, options = nil) + # Pass arguments to `update_snapshot` via a request object, either of type + # {::Google::Cloud::Filestore::V1::UpdateSnapshotRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::UpdateSnapshotRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_snapshot(update_mask: nil, snapshot: nil) + # Pass arguments to `update_snapshot` via keyword arguments. Note that at + # least one keyword argument is 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. At least one path must be supplied in + # this field. + # @param snapshot [::Google::Cloud::Filestore::V1::Snapshot, ::Hash] + # Required. A snapshot 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/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new + # + # # Call the update_snapshot method. + # result = client.update_snapshot request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_snapshot request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateSnapshotRequest + + # Converts hash and nil to an 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_snapshot.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_snapshot.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_snapshot.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.update_snapshot 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 all backups in a project for either a specified location or for all + # locations. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::Filestore::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::ListBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backups(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) + # Pass arguments to `list_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location for which to retrieve backup + # information, in the format + # `projects/{project_number}/locations/{location}`. In Filestore, backup + # locations map to Google Cloud regions, for example **us-west1**. To + # retrieve backup information for all locations, use "-" for the + # `{location}` value. + # @param page_size [::Integer] + # The maximum number of items to return. + # @param page_token [::String] + # The next_page_token value to use if there are additional + # results to retrieve for this list request. + # @param order_by [::String] + # Sort results. Supported values are "name", "name desc" or "" (unsorted). + # @param filter [::String] + # List filter. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Backup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::ListBackupsRequest.new + # + # # Call the list_backups method. + # result = client.list_backups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Filestore::V1::Backup. + # p item + # end + # + def list_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListBackupsRequest + + # Converts hash and nil to an 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_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.list_backups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_filestore_manager_stub, :list_backups, "backups", 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 details of a specific backup. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::Filestore::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::GetBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup(name: nil) + # Pass arguments to `get_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The backup resource name, in the format + # `projects/{project_number}/locations/{location}/backups/{backup_id}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Filestore::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Filestore::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::Filestore::V1::Backup. + # p result + # + def get_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetBackupRequest + + # Converts hash and nil to an 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.get_backup 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 backup. + # + # @overload create_backup(request, options = nil) + # Pass arguments to `create_backup` via a request object, either of type + # {::Google::Cloud::Filestore::V1::CreateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::CreateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup(parent: nil, backup: nil, backup_id: nil) + # Pass arguments to `create_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The backup's project and location, in the format + # `projects/{project_number}/locations/{location}`. In Filestore, + # backup locations map to Google Cloud regions, for example **us-west1**. + # @param backup [::Google::Cloud::Filestore::V1::Backup, ::Hash] + # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource} + # @param backup_id [::String] + # Required. The ID to use for the backup. + # The ID must be unique within the specified project and location. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + # Values that do not match this pattern will trigger an INVALID_ARGUMENT + # 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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::CreateBackupRequest.new + # + # # Call the create_backup method. + # result = client.create_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateBackupRequest + + # Converts hash and nil to an 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.create_backup 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 backup. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::Filestore::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::DeleteBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup(name: nil) + # Pass arguments to `delete_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The backup resource name, in the format + # `projects/{project_number}/locations/{location}/backups/{backup_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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteBackupRequest + + # Converts hash and nil to an 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.delete_backup 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 the settings of a specific backup. + # + # @overload update_backup(request, options = nil) + # Pass arguments to `update_backup` via a request object, either of type + # {::Google::Cloud::Filestore::V1::UpdateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::UpdateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup(backup: nil, update_mask: nil) + # Pass arguments to `update_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup [::Google::Cloud::Filestore::V1::Backup, ::Hash] + # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource} + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::UpdateBackupRequest.new + # + # # Call the update_backup method. + # result = client.update_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateBackupRequest + + # Converts hash and nil to an 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.update_backup 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 + + ## + # Promote the standby instance (replica). + # + # @overload promote_replica(request, options = nil) + # Pass arguments to `promote_replica` via a request object, either of type + # {::Google::Cloud::Filestore::V1::PromoteReplicaRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Filestore::V1::PromoteReplicaRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload promote_replica(name: nil, peer_instance: nil) + # Pass arguments to `promote_replica` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the instance, in the format + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. + # @param peer_instance [::String] + # Optional. The resource name of the peer instance to promote, in the format + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. + # The peer instance is required if the operation is called on an active + # instance. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/filestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Filestore::V1::PromoteReplicaRequest.new + # + # # Call the promote_replica method. + # result = client.promote_replica request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def promote_replica request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::PromoteReplicaRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.promote_replica.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.promote_replica.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.promote_replica.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_filestore_manager_stub.promote_replica 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 CloudFilestoreManager REST API. + # + # This class represents the configuration for CloudFilestoreManager 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::Filestore::V1::CloudFilestoreManager::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_instances to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.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 = "file.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 CloudFilestoreManager 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_instances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instances + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + ## + # RPC-specific configuration for `create_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance + ## + # RPC-specific configuration for `update_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance + ## + # RPC-specific configuration for `restore_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_instance + ## + # RPC-specific configuration for `revert_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :revert_instance + ## + # RPC-specific configuration for `delete_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance + ## + # RPC-specific configuration for `list_snapshots` + # @return [::Gapic::Config::Method] + # + attr_reader :list_snapshots + ## + # RPC-specific configuration for `get_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :get_snapshot + ## + # RPC-specific configuration for `create_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :create_snapshot + ## + # RPC-specific configuration for `delete_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_snapshot + ## + # RPC-specific configuration for `update_snapshot` + # @return [::Gapic::Config::Method] + # + attr_reader :update_snapshot + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `get_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup + ## + # RPC-specific configuration for `create_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup + ## + # RPC-specific configuration for `delete_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup + ## + # RPC-specific configuration for `update_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup + ## + # RPC-specific configuration for `promote_replica` + # @return [::Gapic::Config::Method] + # + attr_reader :promote_replica + + # @private + def initialize parent_rpcs = nil + list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances + @list_instances = ::Gapic::Config::Method.new list_instances_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance + @create_instance = ::Gapic::Config::Method.new create_instance_config + update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance + @update_instance = ::Gapic::Config::Method.new update_instance_config + restore_instance_config = parent_rpcs.restore_instance if parent_rpcs.respond_to? :restore_instance + @restore_instance = ::Gapic::Config::Method.new restore_instance_config + revert_instance_config = parent_rpcs.revert_instance if parent_rpcs.respond_to? :revert_instance + @revert_instance = ::Gapic::Config::Method.new revert_instance_config + delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance + @delete_instance = ::Gapic::Config::Method.new delete_instance_config + list_snapshots_config = parent_rpcs.list_snapshots if parent_rpcs.respond_to? :list_snapshots + @list_snapshots = ::Gapic::Config::Method.new list_snapshots_config + get_snapshot_config = parent_rpcs.get_snapshot if parent_rpcs.respond_to? :get_snapshot + @get_snapshot = ::Gapic::Config::Method.new get_snapshot_config + create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot + @create_snapshot = ::Gapic::Config::Method.new create_snapshot_config + delete_snapshot_config = parent_rpcs.delete_snapshot if parent_rpcs.respond_to? :delete_snapshot + @delete_snapshot = ::Gapic::Config::Method.new delete_snapshot_config + update_snapshot_config = parent_rpcs.update_snapshot if parent_rpcs.respond_to? :update_snapshot + @update_snapshot = ::Gapic::Config::Method.new update_snapshot_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup + @get_backup = ::Gapic::Config::Method.new get_backup_config + create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup + @create_backup = ::Gapic::Config::Method.new create_backup_config + delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup + @delete_backup = ::Gapic::Config::Method.new delete_backup_config + update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup + @update_backup = ::Gapic::Config::Method.new update_backup_config + promote_replica_config = parent_rpcs.promote_replica if parent_rpcs.respond_to? :promote_replica + @promote_replica = ::Gapic::Config::Method.new promote_replica_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb new file mode 100644 index 000000000000..41d713ea2f87 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Filestore + module V1 + module CloudFilestoreManager + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "file.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CloudFilestoreManager 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 CloudFilestoreManager 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::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Filestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "file.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] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub.rb new file mode 100644 index 000000000000..657d34323a55 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub.rb @@ -0,0 +1,1188 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/filestore/v1/cloud_filestore_service_pb" + +module Google + module Cloud + module Filestore + module V1 + module CloudFilestoreManager + module Rest + ## + # REST service stub for the CloudFilestoreManager 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 list_instances REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::ListInstancesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Filestore::V1::ListInstancesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Filestore::V1::ListInstancesResponse] + # A result object deserialized from the server's reply + def list_instances request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_instances", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Filestore::V1::ListInstancesResponse.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_instance REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::GetInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Filestore::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Filestore::V1::Instance] + # A result object deserialized from the server's reply + def get_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Filestore::V1::Instance.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_instance REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::CreateInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_instance", + 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_instance REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::UpdateInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_instance", + 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 restore_instance REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::RestoreInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def restore_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restore_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "restore_instance", + 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 revert_instance REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::RevertInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def revert_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_revert_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "revert_instance", + 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_instance REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::DeleteInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_instance", + 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_snapshots REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::ListSnapshotsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Filestore::V1::ListSnapshotsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Filestore::V1::ListSnapshotsResponse] + # A result object deserialized from the server's reply + def list_snapshots request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_snapshots_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_snapshots", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Filestore::V1::ListSnapshotsResponse.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_snapshot REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::GetSnapshotRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Filestore::V1::Snapshot] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Filestore::V1::Snapshot] + # A result object deserialized from the server's reply + def get_snapshot request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_snapshot_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_snapshot", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Filestore::V1::Snapshot.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_snapshot REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::CreateSnapshotRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_snapshot request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_snapshot_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_snapshot", + 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_snapshot REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::DeleteSnapshotRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_snapshot request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_snapshot_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_snapshot", + 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_snapshot REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::UpdateSnapshotRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_snapshot request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_snapshot_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_snapshot", + 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_backups REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::ListBackupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Filestore::V1::ListBackupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Filestore::V1::ListBackupsResponse] + # A result object deserialized from the server's reply + def list_backups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Filestore::V1::ListBackupsResponse.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_backup REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::GetBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Filestore::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Filestore::V1::Backup] + # A result object deserialized from the server's reply + def get_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Filestore::V1::Backup.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_backup REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::CreateBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup", + 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_backup REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::DeleteBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup", + 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_backup REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::UpdateBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup", + 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 promote_replica REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::PromoteReplicaRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def promote_replica request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_promote_replica_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "promote_replica", + 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 list_instances REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::ListInstancesRequest] + # 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_instances_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/instances", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_instance REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::GetInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_instance REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::CreateInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/instances", + body: "instance", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_instance REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::UpdateInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{instance.name}", + body: "instance", + matches: [ + ["instance.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restore_instance REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::RestoreInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_restore_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:restore", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the revert_instance REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::RevertInstanceRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_revert_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:revert", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_instance REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::DeleteInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_snapshots REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::ListSnapshotsRequest] + # 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_snapshots_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/snapshots", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_snapshot REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::GetSnapshotRequest] + # 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_snapshot_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/snapshots/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_snapshot REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::CreateSnapshotRequest] + # 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_snapshot_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/snapshots", + body: "snapshot", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_snapshot REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::DeleteSnapshotRequest] + # 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_snapshot_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/snapshots/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_snapshot REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::UpdateSnapshotRequest] + # 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_snapshot_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{snapshot.name}", + body: "snapshot", + matches: [ + ["snapshot.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/snapshots/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backups REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::ListBackupsRequest] + # 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_backups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::GetBackupRequest] + # 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_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::CreateBackupRequest] + # 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_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backups", + body: "backup", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::DeleteBackupRequest] + # 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_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::UpdateBackupRequest] + # 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_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup.name}", + body: "backup", + matches: [ + ["backup.name", %r{^projects/[^/]+/locations/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the promote_replica REST call + # + # @param request_pb [::Google::Cloud::Filestore::V1::PromoteReplicaRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_promote_replica_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:promoteReplica", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_service_pb.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_service_pb.rb new file mode 100644 index 000000000000..d1ac74b616b4 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_service_pb.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/filestore/v1/cloud_filestore_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/common/operation_metadata_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' + + +descriptor_data = "\n7google/cloud/filestore/v1/cloud_filestore_service.proto\x12\x19google.cloud.filestore.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/common/operation_metadata.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x80\x03\n\rNetworkConfig\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x43\n\x05modes\x18\x03 \x03(\x0e\x32\x34.google.cloud.filestore.v1.NetworkConfig.AddressMode\x12\x19\n\x11reserved_ip_range\x18\x04 \x01(\t\x12\x19\n\x0cip_addresses\x18\x05 \x03(\tB\x03\xe0\x41\x03\x12J\n\x0c\x63onnect_mode\x18\x06 \x01(\x0e\x32\x34.google.cloud.filestore.v1.NetworkConfig.ConnectMode\":\n\x0b\x41\x64\x64ressMode\x12\x1c\n\x18\x41\x44\x44RESS_MODE_UNSPECIFIED\x10\x00\x12\r\n\tMODE_IPV4\x10\x01\"[\n\x0b\x43onnectMode\x12\x1c\n\x18\x43ONNECT_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x44IRECT_PEERING\x10\x01\x12\x1a\n\x16PRIVATE_SERVICE_ACCESS\x10\x02\"\xc1\x01\n\x0f\x46ileShareConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x63\x61pacity_gb\x18\x02 \x01(\x03\x12\x38\n\rsource_backup\x18\x08 \x01(\tB\x1f\xfa\x41\x1c\n\x1a\x66ile.googleapis.com/BackupH\x00\x12G\n\x12nfs_export_options\x18\x07 \x03(\x0b\x32+.google.cloud.filestore.v1.NfsExportOptionsB\x08\n\x06source\"\xfd\x02\n\x10NfsExportOptions\x12\x11\n\tip_ranges\x18\x01 \x03(\t\x12K\n\x0b\x61\x63\x63\x65ss_mode\x18\x02 \x01(\x0e\x32\x36.google.cloud.filestore.v1.NfsExportOptions.AccessMode\x12K\n\x0bsquash_mode\x18\x03 \x01(\x0e\x32\x36.google.cloud.filestore.v1.NfsExportOptions.SquashMode\x12\x10\n\x08\x61non_uid\x18\x04 \x01(\x03\x12\x10\n\x08\x61non_gid\x18\x05 \x01(\x03\"H\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\r\n\tREAD_ONLY\x10\x01\x12\x0e\n\nREAD_WRITE\x10\x02\"N\n\nSquashMode\x12\x1b\n\x17SQUASH_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_ROOT_SQUASH\x10\x01\x12\x0f\n\x0bROOT_SQUASH\x10\x02\"\xd4\x03\n\rReplicaConfig\x12\x42\n\x05state\x18\x01 \x01(\x0e\x32..google.cloud.filestore.v1.ReplicaConfig.StateB\x03\xe0\x41\x03\x12P\n\rstate_reasons\x18\x02 \x03(\x0e\x32\x34.google.cloud.filestore.v1.ReplicaConfig.StateReasonB\x03\xe0\x41\x03\x12;\n\rpeer_instance\x18\x03 \x01(\tB$\xe0\x41\x01\xfa\x41\x1e\n\x1c\x66ile.googleapis.com/Instance\x12>\n\x15last_active_sync_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x03\x12\x0c\n\x08REMOVING\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\"]\n\x0bStateReason\x12\x1c\n\x18STATE_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19PEER_INSTANCE_UNREACHABLE\x10\x01\x12\x11\n\rREMOVE_FAILED\x10\x02\"\xc5\x01\n\x0bReplication\x12>\n\x04role\x18\x01 \x01(\x0e\x32+.google.cloud.filestore.v1.Replication.RoleB\x03\xe0\x41\x01\x12?\n\x08replicas\x18\x02 \x03(\x0b\x32(.google.cloud.filestore.v1.ReplicaConfigB\x03\xe0\x41\x01\"5\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07STANDBY\x10\x02\"\xd6\x11\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12=\n\x05state\x18\x05 \x01(\x0e\x32).google.cloud.filestore.v1.Instance.StateB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\x04tier\x18\x08 \x01(\x0e\x32(.google.cloud.filestore.v1.Instance.Tier\x12?\n\x06labels\x18\t \x03(\x0b\x32/.google.cloud.filestore.v1.Instance.LabelsEntry\x12?\n\x0b\x66ile_shares\x18\n \x03(\x0b\x32*.google.cloud.filestore.v1.FileShareConfig\x12:\n\x08networks\x18\x0b \x03(\x0b\x32(.google.cloud.filestore.v1.NetworkConfig\x12\x0c\n\x04\x65tag\x18\x0c \x01(\t\x12\x36\n\rsatisfies_pzs\x18\r \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x0e \x01(\t\x12U\n\x12suspension_reasons\x18\x0f \x03(\x0e\x32\x34.google.cloud.filestore.v1.Instance.SuspensionReasonB\x03\xe0\x41\x03\x12@\n\x0breplication\x18\x13 \x01(\x0b\x32&.google.cloud.filestore.v1.ReplicationB\x03\xe0\x41\x01\x12\x46\n\x04tags\x18\x14 \x03(\x0b\x32-.google.cloud.filestore.v1.Instance.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x12G\n\x08protocol\x18\x15 \x01(\x0e\x32\x30.google.cloud.filestore.v1.Instance.FileProtocolB\x03\xe0\x41\x05\x12)\n\x1c\x63ustom_performance_supported\x18\x17 \x01(\x08\x42\x03\xe0\x41\x03\x12V\n\x12performance_config\x18\x18 \x01(\x0b\x32\x35.google.cloud.filestore.v1.Instance.PerformanceConfigB\x03\xe0\x41\x01\x12V\n\x12performance_limits\x18\x19 \x01(\x0b\x32\x35.google.cloud.filestore.v1.Instance.PerformanceLimitsB\x03\xe0\x41\x03\x12(\n\x1b\x64\x65letion_protection_enabled\x18\x1a \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1a\x64\x65letion_protection_reason\x18\x1b \x01(\tB\x03\xe0\x41\x01\x1a)\n\tIOPSPerTB\x12\x1c\n\x0fmax_iops_per_tb\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x1a\"\n\tFixedIOPS\x12\x15\n\x08max_iops\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x1a\xa6\x01\n\x11PerformanceConfig\x12\x44\n\x0biops_per_tb\x18\x04 \x01(\x0b\x32-.google.cloud.filestore.v1.Instance.IOPSPerTBH\x00\x12\x43\n\nfixed_iops\x18\x02 \x01(\x0b\x32-.google.cloud.filestore.v1.Instance.FixedIOPSH\x00\x42\x06\n\x04mode\x1a\xb0\x01\n\x11PerformanceLimits\x12\x15\n\x08max_iops\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rmax_read_iops\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0emax_write_iops\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12$\n\x17max_read_throughput_bps\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12%\n\x18max_write_throughput_bps\x18\x06 \x01(\x03\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\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb9\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\r\n\tREPAIRING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\t\n\x05\x45RROR\x10\x06\x12\r\n\tRESTORING\x10\x07\x12\r\n\tSUSPENDED\x10\x08\x12\x0e\n\nSUSPENDING\x10\t\x12\x0c\n\x08RESUMING\x10\n\x12\r\n\tREVERTING\x10\x0c\x12\r\n\tPROMOTING\x10\r\"\x92\x01\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0b\n\x07PREMIUM\x10\x02\x12\r\n\tBASIC_HDD\x10\x03\x12\r\n\tBASIC_SSD\x10\x04\x12\x12\n\x0eHIGH_SCALE_SSD\x10\x05\x12\x0e\n\nENTERPRISE\x10\x06\x12\t\n\x05ZONAL\x10\x07\x12\x0c\n\x08REGIONAL\x10\x08\"H\n\x10SuspensionReason\x12!\n\x1dSUSPENSION_REASON_UNSPECIFIED\x10\x00\x12\x11\n\rKMS_KEY_ISSUE\x10\x01\"G\n\x0c\x46ileProtocol\x12\x1d\n\x19\x46ILE_PROTOCOL_UNSPECIFIED\x10\x00\x12\n\n\x06NFS_V3\x10\x01\x12\x0c\n\x08NFS_V4_1\x10\x02:_\xea\x41\\\n\x1c\x66ile.googleapis.com/Instance\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\x9f\x01\n\x0bGetInstance\x12-.google.cloud.filestore.v1.GetInstanceRequest\x1a#.google.cloud.filestore.v1.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xf5\x01\n\x0e\x43reateInstance\x12\x30.google.cloud.filestore.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41\x31\n\x08Instance\x12%google.cloud.common.OperationMetadata\xda\x41\x1bparent,instance,instance_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xf7\x01\n\x0eUpdateInstance\x12\x30.google.cloud.filestore.v1.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x93\x01\xca\x41\x31\n\x08Instance\x12%google.cloud.common.OperationMetadata\xda\x41\x14instance,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xd9\x01\n\x0fRestoreInstance\x12\x31.google.cloud.filestore.v1.RestoreInstanceRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41\x31\n\x08Instance\x12%google.cloud.common.OperationMetadata\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/locations/*/instances/*}:restore:\x01*\x12\xd6\x01\n\x0eRevertInstance\x12\x30.google.cloud.filestore.v1.RevertInstanceRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x31\n\x08Instance\x12%google.cloud.common.OperationMetadata\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/locations/*/instances/*}:revert:\x01*\x12\xe0\x01\n\x0e\x44\x65leteInstance\x12\x30.google.cloud.filestore.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41>\n\x15google.protobuf.Empty\x12%google.cloud.common.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xbe\x01\n\rListSnapshots\x12/.google.cloud.filestore.v1.ListSnapshotsRequest\x1a\x30.google.cloud.filestore.v1.ListSnapshotsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/instances/*}/snapshots\x12\xab\x01\n\x0bGetSnapshot\x12-.google.cloud.filestore.v1.GetSnapshotRequest\x1a#.google.cloud.filestore.v1.Snapshot\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/instances/*/snapshots/*}\x12\x81\x02\n\x0e\x43reateSnapshot\x12\x30.google.cloud.filestore.v1.CreateSnapshotRequest\x1a\x1d.google.longrunning.Operation\"\x9d\x01\xca\x41\x31\n\x08Snapshot\x12%google.cloud.common.OperationMetadata\xda\x41\x1bparent,snapshot,snapshot_id\x82\xd3\xe4\x93\x02\x45\"9/v1/{parent=projects/*/locations/*/instances/*}/snapshots:\x08snapshot\x12\xed\x01\n\x0e\x44\x65leteSnapshot\x12\x30.google.cloud.filestore.v1.DeleteSnapshotRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41>\n\x15google.protobuf.Empty\x12%google.cloud.common.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/instances/*/snapshots/*}\x12\x83\x02\n\x0eUpdateSnapshot\x12\x30.google.cloud.filestore.v1.UpdateSnapshotRequest\x1a\x1d.google.longrunning.Operation\"\x9f\x01\xca\x41\x31\n\x08Snapshot\x12%google.cloud.common.OperationMetadata\xda\x41\x14snapshot,update_mask\x82\xd3\xe4\x93\x02N2B/v1/{snapshot.name=projects/*/locations/*/instances/*/snapshots/*}:\x08snapshot\x12\xaa\x01\n\x0bListBackups\x12-.google.cloud.filestore.v1.ListBackupsRequest\x1a..google.cloud.filestore.v1.ListBackupsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/backups\x12\x97\x01\n\tGetBackup\x12+.google.cloud.filestore.v1.GetBackupRequest\x1a!.google.cloud.filestore.v1.Backup\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/backups/*}\x12\xe7\x01\n\x0c\x43reateBackup\x12..google.cloud.filestore.v1.CreateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41/\n\x06\x42\x61\x63kup\x12%google.cloud.common.OperationMetadata\xda\x41\x17parent,backup,backup_id\x82\xd3\xe4\x93\x02\x35\"+/v1/{parent=projects/*/locations/*}/backups:\x06\x62\x61\x63kup\x12\xda\x01\n\x0c\x44\x65leteBackup\x12..google.cloud.filestore.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41>\n\x15google.protobuf.Empty\x12%google.cloud.common.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/backups/*}\x12\xe9\x01\n\x0cUpdateBackup\x12..google.cloud.filestore.v1.UpdateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41/\n\x06\x42\x61\x63kup\x12%google.cloud.common.OperationMetadata\xda\x41\x12\x62\x61\x63kup,update_mask\x82\xd3\xe4\x93\x02<22/v1/{backup.name=projects/*/locations/*/backups/*}:\x06\x62\x61\x63kup\x12\xde\x01\n\x0ePromoteReplica\x12\x30.google.cloud.filestore.v1.PromoteReplicaRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x31\n\x08Instance\x12%google.cloud.common.OperationMetadata\x82\xd3\xe4\x93\x02\x41\"] + # 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-filestore-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/cloud/common/operation_metadata.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/common/operation_metadata.rb new file mode 100644 index 000000000000..83480730321c --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/common/operation_metadata.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! + + +module Google + module Cloud + module Common + # Represents the metadata of the 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_detail + # @return [::String] + # Output only. Human-readable status of the operation, if any. + # @!attribute [r] cancel_requested + # @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][] 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 + end + end +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/filestore/v1/cloud_filestore_service.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/filestore/v1/cloud_filestore_service.rb new file mode 100644 index 000000000000..a67165ecf833 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/filestore/v1/cloud_filestore_service.rb @@ -0,0 +1,1103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Filestore + module V1 + # Network configuration for the instance. + # @!attribute [rw] network + # @return [::String] + # The name of the Google Compute Engine + # [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the + # instance is connected. + # @!attribute [rw] modes + # @return [::Array<::Google::Cloud::Filestore::V1::NetworkConfig::AddressMode>] + # Internet protocol versions for which the instance has IP addresses + # assigned. For this version, only MODE_IPV4 is supported. + # @!attribute [rw] reserved_ip_range + # @return [::String] + # Optional, reserved_ip_range can have one of the following two types of + # values. + # + # * CIDR range value when using DIRECT_PEERING connect mode. + # * [Allocated IP address + # range](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address) + # when using PRIVATE_SERVICE_ACCESS connect mode. + # + # When the name of an allocated IP address range is specified, it must be one + # of the ranges associated with the private service access connection. + # When specified as a direct CIDR value, it must be a /29 CIDR block for + # Basic tier, a /24 CIDR block for High Scale tier, or a /26 CIDR block for + # Enterprise tier in one of the [internal IP address + # ranges](https://www.arin.net/reference/research/statistics/address_filters/) + # that identifies the range of IP addresses reserved for this instance. For + # example, 10.0.0.0/29, 192.168.0.0/24 or 192.168.0.0/26, respectively. The + # range you specify can't overlap with either existing subnets or assigned IP + # address ranges for other Filestore instances in the selected VPC + # network. + # @!attribute [r] ip_addresses + # @return [::Array<::String>] + # Output only. IPv4 addresses in the format + # `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format + # `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. + # @!attribute [rw] connect_mode + # @return [::Google::Cloud::Filestore::V1::NetworkConfig::ConnectMode] + # The network connect mode of the Filestore instance. + # If not provided, the connect mode defaults to DIRECT_PEERING. + class NetworkConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Internet protocol versions supported by Filestore. + module AddressMode + # Internet protocol not set. + ADDRESS_MODE_UNSPECIFIED = 0 + + # Use the IPv4 internet protocol. + MODE_IPV4 = 1 + end + + # Available connection modes. + module ConnectMode + # Not set. + CONNECT_MODE_UNSPECIFIED = 0 + + # Connect via direct peering to the Filestore service. + DIRECT_PEERING = 1 + + # Connect to your Filestore instance using Private Service + # Access. Private services access provides an IP address range for multiple + # Google Cloud services, including Filestore. + PRIVATE_SERVICE_ACCESS = 2 + end + end + + # File share configuration for the instance. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the file share. Must use 1-16 characters for the + # basic service tier and 1-63 characters for all other service tiers. + # Must use lowercase letters, numbers, or underscores `[a-z0-9_]`. Must + # start with a letter. Immutable. + # @!attribute [rw] capacity_gb + # @return [::Integer] + # File share capacity in gigabytes (GB). + # Filestore defines 1 GB as 1024^3 bytes. + # @!attribute [rw] source_backup + # @return [::String] + # The resource name of the backup, in the format + # `projects/{project_number}/locations/{location_id}/backups/{backup_id}`, + # that this file share has been restored from. + # @!attribute [rw] nfs_export_options + # @return [::Array<::Google::Cloud::Filestore::V1::NfsExportOptions>] + # Nfs Export Options. + # There is a limit of 10 export options per file share. + class FileShareConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # NFS export options specifications. + # @!attribute [rw] ip_ranges + # @return [::Array<::String>] + # List of either an IPv4 addresses in the format + # `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format + # `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the + # file share. + # Overlapping IP ranges are not allowed, both within and across + # NfsExportOptions. An error will be returned. + # The limit is 64 IP ranges/addresses for each FileShareConfig among all + # NfsExportOptions. + # @!attribute [rw] access_mode + # @return [::Google::Cloud::Filestore::V1::NfsExportOptions::AccessMode] + # Either READ_ONLY, for allowing only read requests on the exported + # directory, or READ_WRITE, for allowing both read and write requests. + # The default is READ_WRITE. + # @!attribute [rw] squash_mode + # @return [::Google::Cloud::Filestore::V1::NfsExportOptions::SquashMode] + # Either NO_ROOT_SQUASH, for allowing root access on the exported directory, + # or ROOT_SQUASH, for not allowing root access. The default is + # NO_ROOT_SQUASH. + # @!attribute [rw] anon_uid + # @return [::Integer] + # An integer representing the anonymous user id with a default value of + # 65534. + # Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be + # returned if this field is specified for other squash_mode settings. + # @!attribute [rw] anon_gid + # @return [::Integer] + # An integer representing the anonymous group id with a default value of + # 65534. + # Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be + # returned if this field is specified for other squash_mode settings. + class NfsExportOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The access mode. + module AccessMode + # AccessMode not set. + ACCESS_MODE_UNSPECIFIED = 0 + + # The client can only read the file share. + READ_ONLY = 1 + + # The client can read and write the file share (default). + READ_WRITE = 2 + end + + # The squash mode. + module SquashMode + # SquashMode not set. + SQUASH_MODE_UNSPECIFIED = 0 + + # The Root user has root access to the file share (default). + NO_ROOT_SQUASH = 1 + + # The Root user has squashed access to the anonymous uid/gid. + ROOT_SQUASH = 2 + end + end + + # Replica configuration for the instance. + # @!attribute [r] state + # @return [::Google::Cloud::Filestore::V1::ReplicaConfig::State] + # Output only. The replica state. + # @!attribute [r] state_reasons + # @return [::Array<::Google::Cloud::Filestore::V1::ReplicaConfig::StateReason>] + # Output only. Additional information about the replication state, if + # available. + # @!attribute [rw] peer_instance + # @return [::String] + # Optional. The peer instance. + # @!attribute [r] last_active_sync_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of the latest replication snapshot taken on the + # active instance and is already replicated safely. + class ReplicaConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The replica state. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The replica is being created. + CREATING = 1 + + # The replica is ready. + READY = 3 + + # The replica is being removed. + REMOVING = 4 + + # The replica is experiencing an issue and might be unusable. You can get + # further details from the `stateReasons` field of the `ReplicaConfig` + # object. + FAILED = 5 + end + + # Additional information about the replication state, if available. + module StateReason + # Reason not specified. + STATE_REASON_UNSPECIFIED = 0 + + # The peer instance is unreachable. + PEER_INSTANCE_UNREACHABLE = 1 + + # The remove replica peer instance operation failed. + REMOVE_FAILED = 2 + end + end + + # Replication specifications. + # @!attribute [rw] role + # @return [::Google::Cloud::Filestore::V1::Replication::Role] + # Optional. The replication role. + # @!attribute [rw] replicas + # @return [::Array<::Google::Cloud::Filestore::V1::ReplicaConfig>] + # Optional. Replication configuration for the replica instance associated + # with this instance. Only a single replica is supported. + class Replication + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Replication role. + module Role + # Role not set. + ROLE_UNSPECIFIED = 0 + + # The instance is the `ACTIVE` replication member, functions as + # the replication source instance. + ACTIVE = 1 + + # The instance is the `STANDBY` replication member, functions as + # the replication destination instance. + STANDBY = 2 + end + end + + # A Filestore instance. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the instance, in the format + # `projects/{project}/locations/{location}/instances/{instance}`. + # @!attribute [rw] description + # @return [::String] + # The description of the instance (2048 characters or less). + # @!attribute [r] state + # @return [::Google::Cloud::Filestore::V1::Instance::State] + # Output only. The instance state. + # @!attribute [r] status_message + # @return [::String] + # Output only. Additional information about the instance state, if available. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the instance was created. + # @!attribute [rw] tier + # @return [::Google::Cloud::Filestore::V1::Instance::Tier] + # The service tier of the instance. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Resource labels to represent user provided metadata. + # @!attribute [rw] file_shares + # @return [::Array<::Google::Cloud::Filestore::V1::FileShareConfig>] + # File system shares on the instance. + # For this version, only a single file share is supported. + # @!attribute [rw] networks + # @return [::Array<::Google::Cloud::Filestore::V1::NetworkConfig>] + # VPC networks to which the instance is connected. + # For this version, only a single network is supported. + # @!attribute [rw] etag + # @return [::String] + # Server-specified ETag for the instance resource to prevent simultaneous + # updates from overwriting each other. + # @!attribute [r] satisfies_pzs + # @return [::Google::Protobuf::BoolValue] + # Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. Reserved for future use. + # @!attribute [rw] kms_key_name + # @return [::String] + # KMS key name used for data encryption. + # @!attribute [r] suspension_reasons + # @return [::Array<::Google::Cloud::Filestore::V1::Instance::SuspensionReason>] + # Output only. Field indicates all the reasons the instance is in "SUSPENDED" + # state. + # @!attribute [rw] replication + # @return [::Google::Cloud::Filestore::V1::Replication] + # Optional. Replication configuration. + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Input only. Immutable. Tag key-value pairs bound to this + # resource. Each key must be a namespaced name and each value a short name. + # Example: + # "123456789012/environment" : "production", + # "123456789013/costCenter" : "marketing" + # See the documentation for more information: + # - Namespaced name: + # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key + # - Short name: + # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value + # @!attribute [rw] protocol + # @return [::Google::Cloud::Filestore::V1::Instance::FileProtocol] + # Immutable. The protocol indicates the access protocol for all shares in the + # instance. This field is immutable and it cannot be changed after the + # instance has been created. Default value: `NFS_V3`. + # @!attribute [r] custom_performance_supported + # @return [::Boolean] + # Output only. Indicates whether this instance supports configuring its + # performance. If true, the user can configure the instance's performance by + # using the 'performance_config' field. + # @!attribute [rw] performance_config + # @return [::Google::Cloud::Filestore::V1::Instance::PerformanceConfig] + # Optional. Used to configure performance. + # @!attribute [r] performance_limits + # @return [::Google::Cloud::Filestore::V1::Instance::PerformanceLimits] + # Output only. Used for getting performance limits. + # @!attribute [rw] deletion_protection_enabled + # @return [::Boolean] + # Optional. Indicates whether the instance is protected against deletion. + # @!attribute [rw] deletion_protection_reason + # @return [::String] + # Optional. The reason for enabling deletion protection. + class Instance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # IOPS per TB. + # Filestore defines TB as 1024^4 bytes (TiB). + # @!attribute [rw] max_iops_per_tb + # @return [::Integer] + # Required. Maximum IOPS per TiB. + class IOPSPerTB + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Fixed IOPS (input/output operations per second) parameters. + # @!attribute [rw] max_iops + # @return [::Integer] + # Required. Maximum IOPS. + class FixedIOPS + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Used for setting the performance configuration. + # If the user doesn't specify PerformanceConfig, automatically provision + # the default performance settings as described in + # https://cloud.google.com/filestore/docs/performance. Larger instances will + # be linearly set to more IOPS. If the instance's capacity is increased or + # decreased, its performance will be automatically adjusted upwards or + # downwards accordingly (respectively). + # @!attribute [rw] iops_per_tb + # @return [::Google::Cloud::Filestore::V1::Instance::IOPSPerTB] + # Provision IOPS dynamically based on the capacity of the instance. + # Provisioned IOPS will be calculated by multiplying the capacity of the + # instance in TiB by the `iops_per_tb` value. For example, for a 2 TiB + # instance with an `iops_per_tb` value of 17000 the provisioned IOPS will + # be 34000. + # + # If the calculated value is outside the supported range for the + # instance's capacity during instance creation, instance creation will + # fail with an `InvalidArgument` error. Similarly, if an instance + # capacity update would result in a value outside the supported range, + # the update will fail with an `InvalidArgument` error. + # + # Note: The following fields are mutually exclusive: `iops_per_tb`, `fixed_iops`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] fixed_iops + # @return [::Google::Cloud::Filestore::V1::Instance::FixedIOPS] + # Choose a fixed provisioned IOPS value for the instance, which will + # remain constant regardless of instance capacity. Value must be a + # multiple of 1000. + # + # If the chosen value is outside the supported range for the instance's + # capacity during instance creation, instance creation will fail with an + # `InvalidArgument` error. Similarly, if an instance capacity update + # would result in a value outside the supported range, the update will + # fail with an `InvalidArgument` error. + # + # Note: The following fields are mutually exclusive: `fixed_iops`, `iops_per_tb`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class PerformanceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The enforced performance limits, calculated from the instance's performance + # configuration. + # @!attribute [r] max_iops + # @return [::Integer] + # Output only. The max IOPS. + # @!attribute [r] max_read_iops + # @return [::Integer] + # Output only. The max read IOPS. + # @!attribute [r] max_write_iops + # @return [::Integer] + # Output only. The max write IOPS. + # @!attribute [r] max_read_throughput_bps + # @return [::Integer] + # Output only. The max read throughput in bytes per second. + # @!attribute [r] max_write_throughput_bps + # @return [::Integer] + # Output only. The max write throughput in bytes per second. + class PerformanceLimits + 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 [::String] + class TagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The instance state. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # The instance is being created. + CREATING = 1 + + # The instance is available for use. + READY = 2 + + # Work is being done on the instance. You can get further details from the + # `statusMessage` field of the `Instance` resource. + REPAIRING = 3 + + # The instance is shutting down. + DELETING = 4 + + # The instance is experiencing an issue and might be unusable. You can get + # further details from the `statusMessage` field of the `Instance` + # resource. + ERROR = 6 + + # The instance is restoring a backup to an existing file share and may be + # unusable during this time. + RESTORING = 7 + + # The instance is suspended. You can get further details from + # the `suspension_reasons` field of the `Instance` resource. + SUSPENDED = 8 + + # The instance is in the process of becoming suspended. + SUSPENDING = 9 + + # The instance is in the process of becoming active. + RESUMING = 10 + + # The instance is reverting to a snapshot. + REVERTING = 12 + + # The replica instance is being promoted. + PROMOTING = 13 + end + + # Available service tiers. + module Tier + # Not set. + TIER_UNSPECIFIED = 0 + + # STANDARD tier. BASIC_HDD is the preferred term for this tier. + STANDARD = 1 + + # PREMIUM tier. BASIC_SSD is the preferred term for this tier. + PREMIUM = 2 + + # BASIC instances offer a maximum capacity of 63.9 TB. + # BASIC_HDD is an alias for STANDARD Tier, offering economical + # performance backed by HDD. + BASIC_HDD = 3 + + # BASIC instances offer a maximum capacity of 63.9 TB. + # BASIC_SSD is an alias for PREMIUM Tier, and offers improved + # performance backed by SSD. + BASIC_SSD = 4 + + # HIGH_SCALE instances offer expanded capacity and performance scaling + # capabilities. + HIGH_SCALE_SSD = 5 + + # ENTERPRISE instances offer the features and availability needed for + # mission-critical workloads. + ENTERPRISE = 6 + + # ZONAL instances offer expanded capacity and performance scaling + # capabilities. + ZONAL = 7 + + # REGIONAL instances offer the features and availability needed for + # mission-critical workloads. + REGIONAL = 8 + end + + # SuspensionReason contains the possible reasons for a suspension. + module SuspensionReason + # Not set. + SUSPENSION_REASON_UNSPECIFIED = 0 + + # The KMS key used by the instance is either revoked or denied access to. + KMS_KEY_ISSUE = 1 + end + + # File access protocol. + module FileProtocol + # FILE_PROTOCOL_UNSPECIFIED serves a "not set" default value when + # a FileProtocol is a separate field in a message. + FILE_PROTOCOL_UNSPECIFIED = 0 + + # NFS 3.0. + NFS_V3 = 1 + + # NFS 4.1. + NFS_V4_1 = 2 + end + end + + # CreateInstanceRequest creates an instance. + # @!attribute [rw] parent + # @return [::String] + # Required. The instance's project and location, in the format + # `projects/{project_id}/locations/{location}`. In Filestore, + # locations map to Google Cloud zones, for example **us-west1-b**. + # @!attribute [rw] instance_id + # @return [::String] + # Required. The name of the instance to create. + # The name must be unique for the specified project and location. + # @!attribute [rw] instance + # @return [::Google::Cloud::Filestore::V1::Instance] + # Required. An {::Google::Cloud::Filestore::V1::Instance instance resource} + class CreateInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetInstanceRequest gets the state of an instance. + # @!attribute [rw] name + # @return [::String] + # Required. The instance resource name, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}`. + class GetInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # UpdateInstanceRequest updates the settings of an instance. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Mask of fields to update. At least one path must be supplied in this + # field. The elements of the repeated paths field may only include these + # fields: + # + # * "description" + # * "file_shares" + # * "labels" + # * "performance_config" + # * "deletion_protection_enabled" + # * "deletion_protection_reason" + # @!attribute [rw] instance + # @return [::Google::Cloud::Filestore::V1::Instance] + # Only fields specified in update_mask are updated. + class UpdateInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RestoreInstanceRequest restores an existing instance's file share from a + # backup. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the instance, in the format + # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. + # @!attribute [rw] file_share + # @return [::String] + # Required. Name of the file share in the Filestore instance that the backup + # is being restored to. + # @!attribute [rw] source_backup + # @return [::String] + # The resource name of the backup, in the format + # `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. + class RestoreInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RevertInstanceRequest reverts the given instance's file share to the + # specified snapshot. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the instance, in the format + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. + # @!attribute [rw] target_snapshot_id + # @return [::String] + # Required. The snapshot resource ID, in the format 'my-snapshot', where the + # specified ID is the \\{snapshot_id} of the fully qualified name like + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}` + class RevertInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteInstanceRequest deletes an instance. + # @!attribute [rw] name + # @return [::String] + # Required. The instance resource name, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}` + # @!attribute [rw] force + # @return [::Boolean] + # If set to true, all snapshots of the instance will also be deleted. + # (Otherwise, the request will only work if the instance has no snapshots.) + class DeleteInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListInstancesRequest lists instances. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve instance + # information, in the format `projects/{project_id}/locations/{location}`. In + # Cloud Filestore, locations map to Google Cloud zones, for example + # **us-west1-b**. To retrieve instance information for all locations, use "-" + # for the + # `{location}` value. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value to use if there are additional + # results to retrieve for this list request. + # @!attribute [rw] order_by + # @return [::String] + # Sort results. Supported values are "name", "name desc" or "" (unsorted). + # @!attribute [rw] filter + # @return [::String] + # List filter. + class ListInstancesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListInstancesResponse is the result of ListInstancesRequest. + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::Filestore::V1::Instance>] + # A list of instances in the project for the specified location. + # + # If the `{location}` value in the request is "-", the response contains a + # list of instances from all locations. If any location is unreachable, the + # response will only return instances in reachable locations and the + # "unreachable" field will be populated with a list of unreachable locations. + # @!attribute [rw] next_page_token + # @return [::String] + # The token you can use to retrieve the next page of results. Not returned + # if there are no more results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that could not be reached. + class ListInstancesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Filestore snapshot. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the snapshot, in the format + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`. + # @!attribute [rw] description + # @return [::String] + # A description of the snapshot with 2048 characters or less. + # Requests with longer descriptions will be rejected. + # @!attribute [r] state + # @return [::Google::Cloud::Filestore::V1::Snapshot::State] + # Output only. The snapshot state. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the snapshot was created. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Resource labels to represent user provided metadata. + # @!attribute [r] filesystem_used_bytes + # @return [::Integer] + # Output only. The amount of bytes needed to allocate a full copy of the + # snapshot content + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Input only. Immutable. Tag key-value pairs bound to this + # resource. Each key must be a namespaced name and each value a short name. + # Example: + # "123456789012/environment" : "production", + # "123456789013/costCenter" : "marketing" + # See the documentation for more information: + # - Namespaced name: + # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key + # - Short name: + # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value + class Snapshot + 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 TagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The snapshot state. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # Snapshot is being created. + CREATING = 1 + + # Snapshot is available for use. + READY = 2 + + # Snapshot is being deleted. + DELETING = 3 + end + end + + # CreateSnapshotRequest creates a snapshot. + # @!attribute [rw] parent + # @return [::String] + # Required. The Filestore Instance to create the snapshots of, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}` + # @!attribute [rw] snapshot_id + # @return [::String] + # Required. The ID to use for the snapshot. + # The ID must be unique within the specified instance. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + # @!attribute [rw] snapshot + # @return [::Google::Cloud::Filestore::V1::Snapshot] + # Required. A snapshot resource. + class CreateSnapshotRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetSnapshotRequest gets the state of a snapshot. + # @!attribute [rw] name + # @return [::String] + # Required. The snapshot resource name, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` + class GetSnapshotRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteSnapshotRequest deletes a snapshot. + # @!attribute [rw] name + # @return [::String] + # Required. The snapshot resource name, in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` + class DeleteSnapshotRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # UpdateSnapshotRequest updates description and/or labels for a snapshot. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. + # @!attribute [rw] snapshot + # @return [::Google::Cloud::Filestore::V1::Snapshot] + # Required. A snapshot resource. + class UpdateSnapshotRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListSnapshotsRequest lists snapshots. + # @!attribute [rw] parent + # @return [::String] + # Required. The instance for which to retrieve snapshot information, + # in the format + # `projects/{project_id}/locations/{location}/instances/{instance_id}`. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value to use if there are additional + # results to retrieve for this list request. + # @!attribute [rw] order_by + # @return [::String] + # Sort results. Supported values are "name", "name desc" or "" (unsorted). + # @!attribute [rw] filter + # @return [::String] + # List filter. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If true, allow partial responses for multi-regional Aggregated + # List requests. + class ListSnapshotsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListSnapshotsResponse is the result of ListSnapshotsRequest. + # @!attribute [rw] snapshots + # @return [::Array<::Google::Cloud::Filestore::V1::Snapshot>] + # A list of snapshots in the project for the specified instance. + # @!attribute [rw] next_page_token + # @return [::String] + # The token you can use to retrieve the next page of results. Not returned + # if there are no more results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that could not be reached. + class ListSnapshotsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A Filestore backup. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the backup, in the format + # `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. + # @!attribute [rw] description + # @return [::String] + # A description of the backup with 2048 characters or less. + # Requests with longer descriptions will be rejected. + # @!attribute [r] state + # @return [::Google::Cloud::Filestore::V1::Backup::State] + # Output only. The backup state. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the backup was created. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Resource labels to represent user provided metadata. + # @!attribute [r] capacity_gb + # @return [::Integer] + # Output only. Capacity of the source file share when the backup was created. + # @!attribute [r] storage_bytes + # @return [::Integer] + # Output only. The size of the storage used by the backup. As backups share + # storage, this number is expected to change with backup creation/deletion. + # @!attribute [rw] source_instance + # @return [::String] + # The resource name of the source Filestore instance, in the format + # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, + # used to create this backup. + # @!attribute [rw] source_file_share + # @return [::String] + # Name of the file share in the source Filestore instance that the + # backup is created from. + # @!attribute [r] source_instance_tier + # @return [::Google::Cloud::Filestore::V1::Instance::Tier] + # Output only. The service tier of the source Filestore instance that this + # backup is created from. + # @!attribute [r] download_bytes + # @return [::Integer] + # Output only. Amount of bytes that will be downloaded if the backup is + # restored. This may be different than storage bytes, since sequential + # backups of the same disk will share storage. + # @!attribute [r] satisfies_pzs + # @return [::Google::Protobuf::BoolValue] + # Output only. Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. Reserved for future use. + # @!attribute [rw] kms_key + # @return [::String] + # Immutable. KMS key name used for data encryption. + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Input only. Immutable. Tag key-value pairs bound to this + # resource. Each key must be a namespaced name and each value a short name. + # Example: + # "123456789012/environment" : "production", + # "123456789013/costCenter" : "marketing" + # See the documentation for more information: + # - Namespaced name: + # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key + # - Short name: + # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value + # @!attribute [r] file_system_protocol + # @return [::Google::Cloud::Filestore::V1::Instance::FileProtocol] + # Output only. The file system protocol of the source Filestore instance that + # this backup is created from. + class Backup + 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 TagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The backup state. + module State + # State not set. + STATE_UNSPECIFIED = 0 + + # Backup is being created. + CREATING = 1 + + # Backup has been taken and the operation is being finalized. At this + # point, changes to the file share will not be reflected in the backup. + FINALIZING = 2 + + # Backup is available for use. + READY = 3 + + # Backup is being deleted. + DELETING = 4 + + # Backup is not valid and cannot be used for creating new instances or + # restoring existing instances. + INVALID = 5 + end + end + + # CreateBackupRequest creates a backup. + # @!attribute [rw] parent + # @return [::String] + # Required. The backup's project and location, in the format + # `projects/{project_number}/locations/{location}`. In Filestore, + # backup locations map to Google Cloud regions, for example **us-west1**. + # @!attribute [rw] backup + # @return [::Google::Cloud::Filestore::V1::Backup] + # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource} + # @!attribute [rw] backup_id + # @return [::String] + # Required. The ID to use for the backup. + # The ID must be unique within the specified project and location. + # + # This value must start with a lowercase letter followed by up to 62 + # lowercase letters, numbers, or hyphens, and cannot end with a hyphen. + # Values that do not match this pattern will trigger an INVALID_ARGUMENT + # error. + class CreateBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # DeleteBackupRequest deletes a backup. + # @!attribute [rw] name + # @return [::String] + # Required. The backup resource name, in the format + # `projects/{project_number}/locations/{location}/backups/{backup_id}` + class DeleteBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # UpdateBackupRequest updates description and/or labels for a backup. + # @!attribute [rw] backup + # @return [::Google::Cloud::Filestore::V1::Backup] + # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource} + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. Mask of fields to update. At least one path must be supplied in + # this field. + class UpdateBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # PromoteReplicaRequest promotes a Filestore standby instance (replica). + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the instance, in the format + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. + # @!attribute [rw] peer_instance + # @return [::String] + # Optional. The resource name of the peer instance to promote, in the format + # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. + # The peer instance is required if the operation is called on an active + # instance. + class PromoteReplicaRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # GetBackupRequest gets the state of a backup. + # @!attribute [rw] name + # @return [::String] + # Required. The backup resource name, in the format + # `projects/{project_number}/locations/{location}/backups/{backup_id}`. + class GetBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListBackupsRequest lists backups. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location for which to retrieve backup + # information, in the format + # `projects/{project_number}/locations/{location}`. In Filestore, backup + # locations map to Google Cloud regions, for example **us-west1**. To + # retrieve backup information for all locations, use "-" for the + # `{location}` value. + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of items to return. + # @!attribute [rw] page_token + # @return [::String] + # The next_page_token value to use if there are additional + # results to retrieve for this list request. + # @!attribute [rw] order_by + # @return [::String] + # Sort results. Supported values are "name", "name desc" or "" (unsorted). + # @!attribute [rw] filter + # @return [::String] + # List filter. + class ListBackupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # ListBackupsResponse is the result of ListBackupsRequest. + # @!attribute [rw] backups + # @return [::Array<::Google::Cloud::Filestore::V1::Backup>] + # A list of backups in the project for the specified location. + # + # If the `{location}` value in the request is "-", the response contains a + # list of backups from all locations. If any location is unreachable, the + # response will only return backups in reachable locations and the + # "unreachable" field will be populated with a list of unreachable + # locations. + # @!attribute [rw] next_page_token + # @return [::String] + # The token you can use to retrieve the next page of results. Not returned + # if there are no more results in the list. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that could not be reached. + class ListBackupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..1b485b0c3456 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-filestore-v1/snippets/Gemfile new file mode 100644 index 000000000000..61ffa1bbd3f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-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-filestore-v1", path: "../" +else + gem "google-cloud-filestore-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-filestore-v1/snippets/cloud_filestore_manager/create_backup.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_backup.rb new file mode 100644 index 000000000000..7aacd3a36e8c --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_backup.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 file_v1_generated_CloudFilestoreManager_CreateBackup_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the create_backup call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_backup. +# +def create_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::CreateBackupRequest.new + + # Call the create_backup method. + result = client.create_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 file_v1_generated_CloudFilestoreManager_CreateBackup_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_instance.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_instance.rb new file mode 100644 index 000000000000..83121c6eb4da --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_instance.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 file_v1_generated_CloudFilestoreManager_CreateInstance_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the create_instance call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_instance. +# +def create_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::CreateInstanceRequest.new + + # Call the create_instance method. + result = client.create_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 file_v1_generated_CloudFilestoreManager_CreateInstance_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_snapshot.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_snapshot.rb new file mode 100644 index 000000000000..88dbda268ef0 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_snapshot.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 file_v1_generated_CloudFilestoreManager_CreateSnapshot_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the create_snapshot call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_snapshot. +# +def create_snapshot + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::CreateSnapshotRequest.new + + # Call the create_snapshot method. + result = client.create_snapshot request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 file_v1_generated_CloudFilestoreManager_CreateSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_backup.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_backup.rb new file mode 100644 index 000000000000..e4a4ef1bef31 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_backup.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 file_v1_generated_CloudFilestoreManager_DeleteBackup_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the delete_backup call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_backup. +# +def delete_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::DeleteBackupRequest.new + + # Call the delete_backup method. + result = client.delete_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 file_v1_generated_CloudFilestoreManager_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_instance.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_instance.rb new file mode 100644 index 000000000000..f27bf08a7815 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_instance.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 file_v1_generated_CloudFilestoreManager_DeleteInstance_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the delete_instance call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_instance. +# +def delete_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::DeleteInstanceRequest.new + + # Call the delete_instance method. + result = client.delete_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 file_v1_generated_CloudFilestoreManager_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_snapshot.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_snapshot.rb new file mode 100644 index 000000000000..b2e23a15be9d --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_snapshot.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 file_v1_generated_CloudFilestoreManager_DeleteSnapshot_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the delete_snapshot call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_snapshot. +# +def delete_snapshot + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::DeleteSnapshotRequest.new + + # Call the delete_snapshot method. + result = client.delete_snapshot request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 file_v1_generated_CloudFilestoreManager_DeleteSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_backup.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_backup.rb new file mode 100644 index 000000000000..d78c757f6458 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_backup.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 file_v1_generated_CloudFilestoreManager_GetBackup_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the get_backup call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_backup. +# +def get_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::GetBackupRequest.new + + # Call the get_backup method. + result = client.get_backup request + + # The returned object is of type Google::Cloud::Filestore::V1::Backup. + p result +end +# [END file_v1_generated_CloudFilestoreManager_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_instance.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_instance.rb new file mode 100644 index 000000000000..b61508279746 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_instance.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 file_v1_generated_CloudFilestoreManager_GetInstance_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the get_instance call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_instance. +# +def get_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::GetInstanceRequest.new + + # Call the get_instance method. + result = client.get_instance request + + # The returned object is of type Google::Cloud::Filestore::V1::Instance. + p result +end +# [END file_v1_generated_CloudFilestoreManager_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_snapshot.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_snapshot.rb new file mode 100644 index 000000000000..b6083bb99115 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_snapshot.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 file_v1_generated_CloudFilestoreManager_GetSnapshot_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the get_snapshot call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_snapshot. +# +def get_snapshot + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::GetSnapshotRequest.new + + # Call the get_snapshot method. + result = client.get_snapshot request + + # The returned object is of type Google::Cloud::Filestore::V1::Snapshot. + p result +end +# [END file_v1_generated_CloudFilestoreManager_GetSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_backups.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_backups.rb new file mode 100644 index 000000000000..9ab3985122b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_backups.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 file_v1_generated_CloudFilestoreManager_ListBackups_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the list_backups call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_backups. +# +def list_backups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::ListBackupsRequest.new + + # Call the list_backups method. + result = client.list_backups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Filestore::V1::Backup. + p item + end +end +# [END file_v1_generated_CloudFilestoreManager_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_instances.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_instances.rb new file mode 100644 index 000000000000..785486e4f16a --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_instances.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 file_v1_generated_CloudFilestoreManager_ListInstances_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the list_instances call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_instances. +# +def list_instances + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::ListInstancesRequest.new + + # Call the list_instances method. + result = client.list_instances request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Filestore::V1::Instance. + p item + end +end +# [END file_v1_generated_CloudFilestoreManager_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_snapshots.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_snapshots.rb new file mode 100644 index 000000000000..f333a737f939 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_snapshots.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 file_v1_generated_CloudFilestoreManager_ListSnapshots_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the list_snapshots call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_snapshots. +# +def list_snapshots + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::ListSnapshotsRequest.new + + # Call the list_snapshots method. + result = client.list_snapshots request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Filestore::V1::Snapshot. + p item + end +end +# [END file_v1_generated_CloudFilestoreManager_ListSnapshots_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/promote_replica.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/promote_replica.rb new file mode 100644 index 000000000000..958f1542d557 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/promote_replica.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 file_v1_generated_CloudFilestoreManager_PromoteReplica_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the promote_replica call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#promote_replica. +# +def promote_replica + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::PromoteReplicaRequest.new + + # Call the promote_replica method. + result = client.promote_replica request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 file_v1_generated_CloudFilestoreManager_PromoteReplica_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/restore_instance.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/restore_instance.rb new file mode 100644 index 000000000000..a814126831f6 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/restore_instance.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 file_v1_generated_CloudFilestoreManager_RestoreInstance_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the restore_instance call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#restore_instance. +# +def restore_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::RestoreInstanceRequest.new + + # Call the restore_instance method. + result = client.restore_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 file_v1_generated_CloudFilestoreManager_RestoreInstance_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/revert_instance.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/revert_instance.rb new file mode 100644 index 000000000000..65a32a9705ab --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/revert_instance.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 file_v1_generated_CloudFilestoreManager_RevertInstance_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the revert_instance call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#revert_instance. +# +def revert_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::RevertInstanceRequest.new + + # Call the revert_instance method. + result = client.revert_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 file_v1_generated_CloudFilestoreManager_RevertInstance_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_backup.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_backup.rb new file mode 100644 index 000000000000..ec463df2cee6 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_backup.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 file_v1_generated_CloudFilestoreManager_UpdateBackup_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the update_backup call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_backup. +# +def update_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::UpdateBackupRequest.new + + # Call the update_backup method. + result = client.update_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 file_v1_generated_CloudFilestoreManager_UpdateBackup_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_instance.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_instance.rb new file mode 100644 index 000000000000..ba6523f90897 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_instance.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 file_v1_generated_CloudFilestoreManager_UpdateInstance_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the update_instance call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_instance. +# +def update_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::UpdateInstanceRequest.new + + # Call the update_instance method. + result = client.update_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 file_v1_generated_CloudFilestoreManager_UpdateInstance_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_snapshot.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_snapshot.rb new file mode 100644 index 000000000000..9308e78837af --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_snapshot.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 file_v1_generated_CloudFilestoreManager_UpdateSnapshot_sync] +require "google/cloud/filestore/v1" + +## +# Snippet for the update_snapshot call in the CloudFilestoreManager service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_snapshot. +# +def update_snapshot + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new + + # Call the update_snapshot method. + result = client.update_snapshot request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 file_v1_generated_CloudFilestoreManager_UpdateSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/snippet_metadata_google.cloud.filestore.v1.json b/owl-bot-staging/google-cloud-filestore-v1/snippets/snippet_metadata_google.cloud.filestore.v1.json new file mode 100644 index 000000000000..bf273bf9552b --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/snippets/snippet_metadata_google.cloud.filestore.v1.json @@ -0,0 +1,735 @@ +{ + "client_library": { + "name": "google-cloud-filestore-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.filestore.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "file_v1_generated_CloudFilestoreManager_ListInstances_sync", + "title": "Snippet for the list_instances call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_instances.", + "file": "cloud_filestore_manager/list_instances.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_instances", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_instances", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::ListInstancesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Filestore::V1::ListInstancesResponse", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "ListInstances", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.ListInstances", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_GetInstance_sync", + "title": "Snippet for the get_instance call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_instance.", + "file": "cloud_filestore_manager/get_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::GetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Filestore::V1::Instance", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "GetInstance", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.GetInstance", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_CreateInstance_sync", + "title": "Snippet for the create_instance call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_instance.", + "file": "cloud_filestore_manager/create_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_instance", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::CreateInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "CreateInstance", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.CreateInstance", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_UpdateInstance_sync", + "title": "Snippet for the update_instance call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_instance.", + "file": "cloud_filestore_manager/update_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_instance", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::UpdateInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "UpdateInstance", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.UpdateInstance", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_RestoreInstance_sync", + "title": "Snippet for the restore_instance call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#restore_instance.", + "file": "cloud_filestore_manager/restore_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "restore_instance", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#restore_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::RestoreInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "RestoreInstance", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.RestoreInstance", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_RevertInstance_sync", + "title": "Snippet for the revert_instance call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#revert_instance.", + "file": "cloud_filestore_manager/revert_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "revert_instance", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#revert_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::RevertInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "RevertInstance", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.RevertInstance", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_DeleteInstance_sync", + "title": "Snippet for the delete_instance call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_instance.", + "file": "cloud_filestore_manager/delete_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_instance", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::DeleteInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "DeleteInstance", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.DeleteInstance", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_ListSnapshots_sync", + "title": "Snippet for the list_snapshots call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_snapshots.", + "file": "cloud_filestore_manager/list_snapshots.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_snapshots", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_snapshots", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::ListSnapshotsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Filestore::V1::ListSnapshotsResponse", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "ListSnapshots", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.ListSnapshots", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_GetSnapshot_sync", + "title": "Snippet for the get_snapshot call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_snapshot.", + "file": "cloud_filestore_manager/get_snapshot.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_snapshot", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_snapshot", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::GetSnapshotRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Filestore::V1::Snapshot", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "GetSnapshot", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.GetSnapshot", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_CreateSnapshot_sync", + "title": "Snippet for the create_snapshot call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_snapshot.", + "file": "cloud_filestore_manager/create_snapshot.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_snapshot", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_snapshot", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::CreateSnapshotRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "CreateSnapshot", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.CreateSnapshot", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_DeleteSnapshot_sync", + "title": "Snippet for the delete_snapshot call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_snapshot.", + "file": "cloud_filestore_manager/delete_snapshot.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_snapshot", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_snapshot", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::DeleteSnapshotRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "DeleteSnapshot", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.DeleteSnapshot", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_UpdateSnapshot_sync", + "title": "Snippet for the update_snapshot call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_snapshot.", + "file": "cloud_filestore_manager/update_snapshot.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_snapshot", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_snapshot", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::UpdateSnapshotRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "UpdateSnapshot", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.UpdateSnapshot", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_ListBackups_sync", + "title": "Snippet for the list_backups call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_backups.", + "file": "cloud_filestore_manager/list_backups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backups", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_backups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::ListBackupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Filestore::V1::ListBackupsResponse", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "ListBackups", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.ListBackups", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_GetBackup_sync", + "title": "Snippet for the get_backup call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_backup.", + "file": "cloud_filestore_manager/get_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::GetBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Filestore::V1::Backup", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "GetBackup", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.GetBackup", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_CreateBackup_sync", + "title": "Snippet for the create_backup call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_backup.", + "file": "cloud_filestore_manager/create_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::CreateBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "CreateBackup", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.CreateBackup", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_DeleteBackup_sync", + "title": "Snippet for the delete_backup call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_backup.", + "file": "cloud_filestore_manager/delete_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::DeleteBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "DeleteBackup", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.DeleteBackup", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_UpdateBackup_sync", + "title": "Snippet for the update_backup call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_backup.", + "file": "cloud_filestore_manager/update_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::UpdateBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "UpdateBackup", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.UpdateBackup", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "file_v1_generated_CloudFilestoreManager_PromoteReplica_sync", + "title": "Snippet for the promote_replica call in the CloudFilestoreManager service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#promote_replica.", + "file": "cloud_filestore_manager/promote_replica.rb", + "language": "RUBY", + "client_method": { + "short_name": "promote_replica", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#promote_replica", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Filestore::V1::PromoteReplicaRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFilestoreManager::Client", + "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" + }, + "method": { + "short_name": "PromoteReplica", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.PromoteReplica", + "service": { + "short_name": "CloudFilestoreManager", + "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_operations_test.rb b/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_operations_test.rb new file mode 100644 index 000000000000..b889ba28a9a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_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/filestore/v1/cloud_filestore_service_pb" +require "google/cloud/filestore/v1/cloud_filestore_service_services_pb" +require "google/cloud/filestore/v1/cloud_filestore_manager" + +class ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_paths_test.rb b/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_paths_test.rb new file mode 100644 index 000000000000..a5c47fd514a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_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/filestore/v1/cloud_filestore_manager" + +class ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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_backup_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_path project: "value0", location: "value1", backup: "value2" + assert_equal "projects/value0/locations/value1/backups/value2", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/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::Filestore::V1::CloudFilestoreManager::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_snapshot_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.snapshot_path project: "value0", location: "value1", instance: "value2", snapshot: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/snapshots/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_rest_test.rb b/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_rest_test.rb new file mode 100644 index 000000000000..6cdd95e52a97 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_rest_test.rb @@ -0,0 +1,1098 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/filestore/v1/cloud_filestore_service_pb" +require "google/cloud/filestore/v1/cloud_filestore_manager/rest" + + +class ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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_list_instances + # Create test objects. + client_result = ::Google::Cloud::Filestore::V1::ListInstancesResponse.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" + order_by = "hello world" + filter = "hello world" + + list_instances_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_instances parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_instances ::Google::Cloud::Filestore::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_instances(::Google::Cloud::Filestore::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_instances_client_stub.call_count + end + end + end + + def test_get_instance + # Create test objects. + client_result = ::Google::Cloud::Filestore::V1::Instance.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_instance ::Google::Cloud::Filestore::V1::GetInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::Filestore::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_instance_client_stub.call_count + end + end + end + + def test_create_instance + # 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" + instance_id = "hello world" + instance = {} + + create_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_create_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_instance_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_instance parent: parent, instance_id: instance_id, instance: instance do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_instance ::Google::Cloud::Filestore::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_instance(::Google::Cloud::Filestore::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_instance_client_stub.call_count + end + end + end + + def test_update_instance + # 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 = {} + instance = {} + + update_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_update_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_instance_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_instance({ update_mask: update_mask, instance: instance }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_instance update_mask: update_mask, instance: instance do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_instance ::Google::Cloud::Filestore::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_instance({ update_mask: update_mask, instance: instance }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_instance(::Google::Cloud::Filestore::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_instance_client_stub.call_count + end + end + end + + def test_restore_instance + # 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" + file_share = "hello world" + source_backup = "hello world" + + restore_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_restore_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restore_instance_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.restore_instance({ name: name, file_share: file_share, source_backup: source_backup }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.restore_instance name: name, file_share: file_share, source_backup: source_backup do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.restore_instance ::Google::Cloud::Filestore::V1::RestoreInstanceRequest.new(name: name, file_share: file_share, source_backup: source_backup) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.restore_instance({ name: name, file_share: file_share, source_backup: source_backup }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.restore_instance(::Google::Cloud::Filestore::V1::RestoreInstanceRequest.new(name: name, file_share: file_share, source_backup: source_backup), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restore_instance_client_stub.call_count + end + end + end + + def test_revert_instance + # 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" + target_snapshot_id = "hello world" + + revert_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_revert_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, revert_instance_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.revert_instance({ name: name, target_snapshot_id: target_snapshot_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.revert_instance name: name, target_snapshot_id: target_snapshot_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.revert_instance ::Google::Cloud::Filestore::V1::RevertInstanceRequest.new(name: name, target_snapshot_id: target_snapshot_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.revert_instance({ name: name, target_snapshot_id: target_snapshot_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.revert_instance(::Google::Cloud::Filestore::V1::RevertInstanceRequest.new(name: name, target_snapshot_id: target_snapshot_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, revert_instance_client_stub.call_count + end + end + end + + def test_delete_instance + # 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_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_instance({ name: name, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_instance name: name, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_instance ::Google::Cloud::Filestore::V1::DeleteInstanceRequest.new(name: name, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_instance({ name: name, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_instance(::Google::Cloud::Filestore::V1::DeleteInstanceRequest.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_instance_client_stub.call_count + end + end + end + + def test_list_snapshots + # Create test objects. + client_result = ::Google::Cloud::Filestore::V1::ListSnapshotsResponse.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" + order_by = "hello world" + filter = "hello world" + return_partial_success = true + + list_snapshots_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_list_snapshots_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_snapshots_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_snapshots({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_snapshots parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_snapshots ::Google::Cloud::Filestore::V1::ListSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_snapshots({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_snapshots(::Google::Cloud::Filestore::V1::ListSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_snapshots_client_stub.call_count + end + end + end + + def test_get_snapshot + # Create test objects. + client_result = ::Google::Cloud::Filestore::V1::Snapshot.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_get_snapshot_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_snapshot_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_snapshot({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_snapshot name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_snapshot ::Google::Cloud::Filestore::V1::GetSnapshotRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_snapshot({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_snapshot(::Google::Cloud::Filestore::V1::GetSnapshotRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_snapshot_client_stub.call_count + end + end + end + + def test_create_snapshot + # 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" + snapshot_id = "hello world" + snapshot = {} + + create_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_create_snapshot_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_snapshot_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_snapshot({ parent: parent, snapshot_id: snapshot_id, snapshot: snapshot }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_snapshot parent: parent, snapshot_id: snapshot_id, snapshot: snapshot do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_snapshot ::Google::Cloud::Filestore::V1::CreateSnapshotRequest.new(parent: parent, snapshot_id: snapshot_id, snapshot: snapshot) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_snapshot({ parent: parent, snapshot_id: snapshot_id, snapshot: snapshot }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_snapshot(::Google::Cloud::Filestore::V1::CreateSnapshotRequest.new(parent: parent, snapshot_id: snapshot_id, snapshot: snapshot), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_snapshot_client_stub.call_count + end + end + end + + def test_delete_snapshot + # 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_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_delete_snapshot_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_snapshot_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_snapshot({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_snapshot name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_snapshot ::Google::Cloud::Filestore::V1::DeleteSnapshotRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_snapshot({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_snapshot(::Google::Cloud::Filestore::V1::DeleteSnapshotRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_snapshot_client_stub.call_count + end + end + end + + def test_update_snapshot + # 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 = {} + snapshot = {} + + update_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_update_snapshot_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_snapshot_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_snapshot({ update_mask: update_mask, snapshot: snapshot }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_snapshot update_mask: update_mask, snapshot: snapshot do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_snapshot ::Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new(update_mask: update_mask, snapshot: snapshot) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_snapshot({ update_mask: update_mask, snapshot: snapshot }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_snapshot(::Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new(update_mask: update_mask, snapshot: snapshot), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_snapshot_client_stub.call_count + end + end + end + + def test_list_backups + # Create test objects. + client_result = ::Google::Cloud::Filestore::V1::ListBackupsResponse.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" + order_by = "hello world" + filter = "hello world" + + list_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backups parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backups ::Google::Cloud::Filestore::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backups(::Google::Cloud::Filestore::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backups_client_stub.call_count + end + end + end + + def test_get_backup + # Create test objects. + client_result = ::Google::Cloud::Filestore::V1::Backup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup ::Google::Cloud::Filestore::V1::GetBackupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup(::Google::Cloud::Filestore::V1::GetBackupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_client_stub.call_count + end + end + end + + def test_create_backup + # 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" + backup = {} + backup_id = "hello world" + + create_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_create_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_backup({ parent: parent, backup: backup, backup_id: backup_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_backup parent: parent, backup: backup, backup_id: backup_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_backup ::Google::Cloud::Filestore::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_backup({ parent: parent, backup: backup, backup_id: backup_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_backup(::Google::Cloud::Filestore::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_client_stub.call_count + end + end + end + + def test_delete_backup + # 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_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup ::Google::Cloud::Filestore::V1::DeleteBackupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup(::Google::Cloud::Filestore::V1::DeleteBackupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_client_stub.call_count + end + end + end + + def test_update_backup + # 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. + backup = {} + update_mask = {} + + update_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_update_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup({ backup: backup, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup backup: backup, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup ::Google::Cloud::Filestore::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup({ backup: backup, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup(::Google::Cloud::Filestore::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_client_stub.call_count + end + end + end + + def test_promote_replica + # 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" + peer_instance = "hello world" + + promote_replica_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_promote_replica_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, promote_replica_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.promote_replica({ name: name, peer_instance: peer_instance }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.promote_replica name: name, peer_instance: peer_instance do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.promote_replica ::Google::Cloud::Filestore::V1::PromoteReplicaRequest.new(name: name, peer_instance: peer_instance) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.promote_replica({ name: name, peer_instance: peer_instance }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.promote_replica(::Google::Cloud::Filestore::V1::PromoteReplicaRequest.new(name: name, peer_instance: peer_instance), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, promote_replica_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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_test.rb b/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_test.rb new file mode 100644 index 000000000000..7accada76fb9 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_test.rb @@ -0,0 +1,1292 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/filestore/v1/cloud_filestore_service_pb" +require "google/cloud/filestore/v1/cloud_filestore_manager" + +class ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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_list_instances + # Create GRPC objects. + grpc_response = ::Google::Cloud::Filestore::V1::ListInstancesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + order_by = "hello world" + filter = "hello world" + + list_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_instances, name + assert_kind_of ::Google::Cloud::Filestore::V1::ListInstancesRequest, 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["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_instances_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_instances parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_instances ::Google::Cloud::Filestore::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_instances({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_instances(::Google::Cloud::Filestore::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_instances_client_stub.call_rpc_count + end + end + + def test_get_instance + # Create GRPC objects. + grpc_response = ::Google::Cloud::Filestore::V1::Instance.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_instance, name + assert_kind_of ::Google::Cloud::Filestore::V1::GetInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_instance({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_instance name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_instance ::Google::Cloud::Filestore::V1::GetInstanceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_instance({ 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_instance(::Google::Cloud::Filestore::V1::GetInstanceRequest.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_instance_client_stub.call_rpc_count + end + end + + def test_create_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + instance_id = "hello world" + instance = {} + + create_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_instance, name + assert_kind_of ::Google::Cloud::Filestore::V1::CreateInstanceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["instance_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Filestore::V1::Instance), request["instance"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_instance_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |response, 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_instance parent: parent, instance_id: instance_id, instance: instance do |response, 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_instance ::Google::Cloud::Filestore::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |response, operation| + assert_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_instance({ parent: parent, instance_id: instance_id, instance: instance }, grpc_options) do |response, operation| + assert_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_instance(::Google::Cloud::Filestore::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), grpc_options) do |response, operation| + assert_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_instance_client_stub.call_rpc_count + end + end + + def test_update_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + instance = {} + + update_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_instance, name + assert_kind_of ::Google::Cloud::Filestore::V1::UpdateInstanceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Filestore::V1::Instance), request["instance"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_instance_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_instance({ update_mask: update_mask, instance: instance }) do |response, 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_instance update_mask: update_mask, instance: instance do |response, 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_instance ::Google::Cloud::Filestore::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance) do |response, operation| + assert_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_instance({ update_mask: update_mask, instance: instance }, grpc_options) do |response, operation| + assert_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_instance(::Google::Cloud::Filestore::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance), grpc_options) do |response, operation| + assert_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_instance_client_stub.call_rpc_count + end + end + + def test_restore_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + file_share = "hello world" + source_backup = "hello world" + + restore_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restore_instance, name + assert_kind_of ::Google::Cloud::Filestore::V1::RestoreInstanceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["file_share"] + assert_equal "hello world", request["source_backup"] + assert_equal :source_backup, request.source + refute_nil options + end + + Gapic::ServiceStub.stub :new, restore_instance_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.restore_instance({ name: name, file_share: file_share, source_backup: source_backup }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.restore_instance name: name, file_share: file_share, source_backup: source_backup do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.restore_instance ::Google::Cloud::Filestore::V1::RestoreInstanceRequest.new(name: name, file_share: file_share, source_backup: source_backup) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.restore_instance({ name: name, file_share: file_share, source_backup: source_backup }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.restore_instance(::Google::Cloud::Filestore::V1::RestoreInstanceRequest.new(name: name, file_share: file_share, source_backup: source_backup), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, restore_instance_client_stub.call_rpc_count + end + end + + def test_revert_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + target_snapshot_id = "hello world" + + revert_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :revert_instance, name + assert_kind_of ::Google::Cloud::Filestore::V1::RevertInstanceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["target_snapshot_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, revert_instance_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.revert_instance({ name: name, target_snapshot_id: target_snapshot_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.revert_instance name: name, target_snapshot_id: target_snapshot_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.revert_instance ::Google::Cloud::Filestore::V1::RevertInstanceRequest.new(name: name, target_snapshot_id: target_snapshot_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.revert_instance({ name: name, target_snapshot_id: target_snapshot_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.revert_instance(::Google::Cloud::Filestore::V1::RevertInstanceRequest.new(name: name, target_snapshot_id: target_snapshot_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, revert_instance_client_stub.call_rpc_count + end + end + + def test_delete_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_instance, name + assert_kind_of ::Google::Cloud::Filestore::V1::DeleteInstanceRequest, request + assert_equal "hello world", request["name"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_instance_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_instance({ 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_instance 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_instance ::Google::Cloud::Filestore::V1::DeleteInstanceRequest.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_instance({ 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_instance(::Google::Cloud::Filestore::V1::DeleteInstanceRequest.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_instance_client_stub.call_rpc_count + end + end + + def test_list_snapshots + # Create GRPC objects. + grpc_response = ::Google::Cloud::Filestore::V1::ListSnapshotsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + order_by = "hello world" + filter = "hello world" + return_partial_success = true + + list_snapshots_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_snapshots, name + assert_kind_of ::Google::Cloud::Filestore::V1::ListSnapshotsRequest, 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["order_by"] + assert_equal "hello world", request["filter"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_snapshots_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_snapshots({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, 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_snapshots parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, 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_snapshots ::Google::Cloud::Filestore::V1::ListSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, 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_snapshots({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, 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_snapshots(::Google::Cloud::Filestore::V1::ListSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, 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_snapshots_client_stub.call_rpc_count + end + end + + def test_get_snapshot + # Create GRPC objects. + grpc_response = ::Google::Cloud::Filestore::V1::Snapshot.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_snapshot, name + assert_kind_of ::Google::Cloud::Filestore::V1::GetSnapshotRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_snapshot_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_snapshot({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_snapshot name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_snapshot ::Google::Cloud::Filestore::V1::GetSnapshotRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_snapshot({ 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_snapshot(::Google::Cloud::Filestore::V1::GetSnapshotRequest.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_snapshot_client_stub.call_rpc_count + end + end + + def test_create_snapshot + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + snapshot_id = "hello world" + snapshot = {} + + create_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_snapshot, name + assert_kind_of ::Google::Cloud::Filestore::V1::CreateSnapshotRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["snapshot_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Filestore::V1::Snapshot), request["snapshot"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_snapshot_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_snapshot({ parent: parent, snapshot_id: snapshot_id, snapshot: snapshot }) do |response, 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_snapshot parent: parent, snapshot_id: snapshot_id, snapshot: snapshot do |response, 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_snapshot ::Google::Cloud::Filestore::V1::CreateSnapshotRequest.new(parent: parent, snapshot_id: snapshot_id, snapshot: snapshot) do |response, operation| + assert_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_snapshot({ parent: parent, snapshot_id: snapshot_id, snapshot: snapshot }, grpc_options) do |response, operation| + assert_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_snapshot(::Google::Cloud::Filestore::V1::CreateSnapshotRequest.new(parent: parent, snapshot_id: snapshot_id, snapshot: snapshot), grpc_options) do |response, operation| + assert_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_snapshot_client_stub.call_rpc_count + end + end + + def test_delete_snapshot + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_snapshot, name + assert_kind_of ::Google::Cloud::Filestore::V1::DeleteSnapshotRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_snapshot_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_snapshot({ 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_snapshot 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_snapshot ::Google::Cloud::Filestore::V1::DeleteSnapshotRequest.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_snapshot({ 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_snapshot(::Google::Cloud::Filestore::V1::DeleteSnapshotRequest.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_snapshot_client_stub.call_rpc_count + end + end + + def test_update_snapshot + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + snapshot = {} + + update_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_snapshot, name + assert_kind_of ::Google::Cloud::Filestore::V1::UpdateSnapshotRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Filestore::V1::Snapshot), request["snapshot"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_snapshot_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_snapshot({ update_mask: update_mask, snapshot: snapshot }) do |response, 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_snapshot update_mask: update_mask, snapshot: snapshot do |response, 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_snapshot ::Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new(update_mask: update_mask, snapshot: snapshot) do |response, operation| + assert_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_snapshot({ update_mask: update_mask, snapshot: snapshot }, grpc_options) do |response, operation| + assert_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_snapshot(::Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new(update_mask: update_mask, snapshot: snapshot), grpc_options) do |response, operation| + assert_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_snapshot_client_stub.call_rpc_count + end + end + + def test_list_backups + # Create GRPC objects. + grpc_response = ::Google::Cloud::Filestore::V1::ListBackupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + order_by = "hello world" + filter = "hello world" + + list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backups, name + assert_kind_of ::Google::Cloud::Filestore::V1::ListBackupsRequest, 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["order_by"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backups_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_backups parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_backups ::Google::Cloud::Filestore::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_backups({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_backups(::Google::Cloud::Filestore::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_backups_client_stub.call_rpc_count + end + end + + def test_get_backup + # Create GRPC objects. + grpc_response = ::Google::Cloud::Filestore::V1::Backup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup, name + assert_kind_of ::Google::Cloud::Filestore::V1::GetBackupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup ::Google::Cloud::Filestore::V1::GetBackupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup({ 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_backup(::Google::Cloud::Filestore::V1::GetBackupRequest.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_backup_client_stub.call_rpc_count + end + end + + def test_create_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup = {} + backup_id = "hello world" + + create_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup, name + assert_kind_of ::Google::Cloud::Filestore::V1::CreateBackupRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Filestore::V1::Backup), request["backup"] + assert_equal "hello world", request["backup_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_backup({ parent: parent, backup: backup, backup_id: backup_id }) do |response, 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_backup parent: parent, backup: backup, backup_id: backup_id do |response, 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_backup ::Google::Cloud::Filestore::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id) do |response, operation| + assert_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_backup({ parent: parent, backup: backup, backup_id: backup_id }, grpc_options) do |response, operation| + assert_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_backup(::Google::Cloud::Filestore::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id), grpc_options) do |response, operation| + assert_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_backup_client_stub.call_rpc_count + end + end + + def test_delete_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup, name + assert_kind_of ::Google::Cloud::Filestore::V1::DeleteBackupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup({ 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_backup 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_backup ::Google::Cloud::Filestore::V1::DeleteBackupRequest.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_backup({ 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_backup(::Google::Cloud::Filestore::V1::DeleteBackupRequest.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_backup_client_stub.call_rpc_count + end + end + + def test_update_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + backup = {} + update_mask = {} + + update_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup, name + assert_kind_of ::Google::Cloud::Filestore::V1::UpdateBackupRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Filestore::V1::Backup), request["backup"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup({ backup: backup, 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_backup backup: backup, 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_backup ::Google::Cloud::Filestore::V1::UpdateBackupRequest.new(backup: backup, 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_backup({ backup: backup, 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_backup(::Google::Cloud::Filestore::V1::UpdateBackupRequest.new(backup: backup, 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_backup_client_stub.call_rpc_count + end + end + + def test_promote_replica + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + peer_instance = "hello world" + + promote_replica_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :promote_replica, name + assert_kind_of ::Google::Cloud::Filestore::V1::PromoteReplicaRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["peer_instance"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, promote_replica_client_stub do + # Create client + client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.promote_replica({ name: name, peer_instance: peer_instance }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.promote_replica name: name, peer_instance: peer_instance do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.promote_replica ::Google::Cloud::Filestore::V1::PromoteReplicaRequest.new(name: name, peer_instance: peer_instance) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.promote_replica({ name: name, peer_instance: peer_instance }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.promote_replica(::Google::Cloud::Filestore::V1::PromoteReplicaRequest.new(name: name, peer_instance: peer_instance), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, promote_replica_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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-filestore-v1/test/helper.rb b/owl-bot-staging/google-cloud-filestore-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-filestore/.gitignore b/owl-bot-staging/google-cloud-filestore/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/.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-filestore/.repo-metadata.json b/owl-bot-staging/google-cloud-filestore/.repo-metadata.json new file mode 100644 index 000000000000..b2d7db6d605c --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "file.googleapis.com", + "api_shortname": "file", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-filestore/latest", + "distribution_name": "google-cloud-filestore", + "is_cloud": true, + "language": "ruby", + "name": "file", + "name_pretty": "Filestore API", + "product_documentation": "https://cloud.google.com/filestore/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Filestore instances are fully managed NFS file servers on Google Cloud for use with applications running on Compute Engine virtual machines (VMs) instances or Google Kubernetes Engine clusters.", + "ruby-cloud-product-url": "https://cloud.google.com/filestore/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-filestore/.rubocop.yml b/owl-bot-staging/google-cloud-filestore/.rubocop.yml new file mode 100644 index 000000000000..2b3d473f54d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-filestore.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-filestore.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-filestore/.toys.rb b/owl-bot-staging/google-cloud-filestore/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/.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-filestore/.yardopts b/owl-bot-staging/google-cloud-filestore/.yardopts new file mode 100644 index 000000000000..469fa0606ccc --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Filestore API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-filestore/AUTHENTICATION.md b/owl-bot-staging/google-cloud-filestore/AUTHENTICATION.md new file mode 100644 index 000000000000..ce8085556ee5 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-filestore 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-filestore 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/filestore" + +client = Google::Cloud::Filestore.cloud_filestore_manager do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/filestore" + +Google::Cloud::Filestore.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Filestore.cloud_filestore_manager +``` + +### 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-filestore +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/filestore" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Filestore.cloud_filestore_manager +``` + +### 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-filestore/CHANGELOG.md b/owl-bot-staging/google-cloud-filestore/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-filestore/Gemfile b/owl-bot-staging/google-cloud-filestore/Gemfile new file mode 100644 index 000000000000..4ac4716636a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-filestore-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-filestore.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-filestore/LICENSE.md b/owl-bot-staging/google-cloud-filestore/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/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-filestore/README.md b/owl-bot-staging/google-cloud-filestore/README.md new file mode 100644 index 000000000000..11cd2f82152b --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Filestore API + +API Client library for the Filestore API + +Filestore instances are fully managed NFS file servers on Google Cloud for use with applications running on Compute Engine virtual machines (VMs) instances or Google Kubernetes Engine clusters. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-filestore-v*`. +The gem `google-cloud-filestore` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-filestore/latest) +for this library, google-cloud-filestore, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-filestore-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-filestore-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/filestore/) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-filestore +``` + +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/file.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/filestore" + +client = Google::Cloud::Filestore.cloud_filestore_manager +request = ::Google::Cloud::Filestore::V1::ListInstancesRequest.new # (request fields as keyword arguments...) +response = client.list_instances request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-filestore-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-filestore-v1/latest). + +## 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-filestore`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-filestore-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-filestore`. +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-filestore-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-filestore/Rakefile b/owl-bot-staging/google-cloud-filestore/Rakefile new file mode 100644 index 000000000000..11fc05975069 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/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 = true +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-filestore 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/filestore/v1/cloud_filestore_manager/credentials" + ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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-filestore 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-filestore 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-filestore 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-filestore gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-filestore" + header "google-cloud-filestore rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-filestore yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-filestore 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-filestore 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-filestore 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-filestore/google-cloud-filestore.gemspec b/owl-bot-staging/google-cloud-filestore/google-cloud-filestore.gemspec new file mode 100644 index 000000000000..09669e84f791 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/google-cloud-filestore.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/filestore/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-filestore" + gem.version = Google::Cloud::Filestore::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Filestore instances are fully managed NFS file servers on Google Cloud for use with applications running on Compute Engine virtual machines (VMs) instances or Google Kubernetes Engine clusters." + gem.summary = "API Client library for the Filestore API" + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-filestore-v1", "~> 2.0" +end diff --git a/owl-bot-staging/google-cloud-filestore/lib/google-cloud-filestore.rb b/owl-bot-staging/google-cloud-filestore/lib/google-cloud-filestore.rb new file mode 100644 index 000000000000..44c4f810a057 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/lib/google-cloud-filestore.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/filestore" unless defined? Google::Cloud::Filestore::VERSION diff --git a/owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore.rb b/owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore.rb new file mode 100644 index 000000000000..20d0cbe845ff --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore.rb @@ -0,0 +1,174 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/filestore/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :filestore do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Filestore + ## + # Create a new client object for CloudFilestoreManager. + # + # By default, this returns an instance of + # [Google::Cloud::Filestore::V1::CloudFilestoreManager::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-filestore-v1/latest/Google-Cloud-Filestore-V1-CloudFilestoreManager-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the CloudFilestoreManager service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the CloudFilestoreManager service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Filestore.cloud_filestore_manager_available?}. + # + # ## About CloudFilestoreManager + # + # Configures and manages Filestore resources. + # + # Filestore Manager v1. + # + # The `file.googleapis.com` service implements the Filestore API and + # defines the following resource model for managing instances: + # * The service works with a collection of cloud projects, named: `/projects/*` + # * Each project has a collection of available locations, named: `/locations/*` + # * Each location has a collection of instances and backups, named: + # `/instances/*` and `/backups/*` respectively. + # * As such, Filestore instances are resources of the form: + # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}` + # and backups are resources of the form: + # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}` + # + # Note that location_id must be a Google Cloud `zone` for instances, but + # a Google Cloud `region` for backups; for example: + # * `projects/12345/locations/us-central1-c/instances/my-filestore` + # * `projects/12345/locations/us-central1/backups/my-backup` + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.cloud_filestore_manager version: :v1, transport: :grpc, &block + require "google/cloud/filestore/#{version.to_s.downcase}" + + package_name = Google::Cloud::Filestore + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Filestore.const_get(package_name).const_get(:CloudFilestoreManager) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the CloudFilestoreManager service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Filestore.cloud_filestore_manager}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the CloudFilestoreManager service, + # or if the versioned client gem needs an update to support the CloudFilestoreManager service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.cloud_filestore_manager_available? version: :v1, transport: :grpc + require "google/cloud/filestore/#{version.to_s.downcase}" + package_name = Google::Cloud::Filestore + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Filestore.const_get package_name + return false unless service_module.const_defined? :CloudFilestoreManager + service_module = service_module.const_get :CloudFilestoreManager + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-filestore library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # 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 [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.filestore if block_given? + + ::Google::Cloud.configure.filestore + end + end + end +end + +helper_path = ::File.join __dir__, "filestore", "helpers.rb" +require "google/cloud/filestore/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore/version.rb b/owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore/version.rb new file mode 100644 index 000000000000..e3b570ed9265 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore/version.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! + + +module Google + module Cloud + module Filestore + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/client_test.rb b/owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/client_test.rb new file mode 100644 index 000000000000..ff67c59a90d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 "google/cloud/filestore" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Filestore::ClientConstructionMinitest < 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_cloud_filestore_manager_grpc + skip unless Google::Cloud::Filestore.cloud_filestore_manager_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Filestore.cloud_filestore_manager transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client, client + end + end + + def test_cloud_filestore_manager_rest + skip unless Google::Cloud::Filestore.cloud_filestore_manager_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Filestore.cloud_filestore_manager transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/version_test.rb b/owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/version_test.rb new file mode 100644 index 000000000000..454b2ed51ccd --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/version_test.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 "helper" +require "google/cloud/filestore/version" + +class Google::Cloud::Filestore::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Filestore::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-filestore/test/helper.rb b/owl-bot-staging/google-cloud-filestore/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-filestore/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-financial_services-v1/.gitignore b/owl-bot-staging/google-cloud-financial_services-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-financial_services-v1/.repo-metadata.json new file mode 100644 index 000000000000..3d76ae801e6f --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "financialservices.googleapis.com", + "api_shortname": "financialservices", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services-v1/latest", + "distribution_name": "google-cloud-financial_services-v1", + "is_cloud": true, + "language": "ruby", + "name": "financialservices", + "name_pretty": "Financial Services V1 API", + "product_documentation": "https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-financial_services-v1 is the official client library for the Financial Services V1 API. Note that google-cloud-financial_services-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-financial_services instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-financial_services-v1/.rubocop.yml b/owl-bot-staging/google-cloud-financial_services-v1/.rubocop.yml new file mode 100644 index 000000000000..98a6d860878b --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-financial_services-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-financial_services-v1.rb" diff --git a/owl-bot-staging/google-cloud-financial_services-v1/.toys.rb b/owl-bot-staging/google-cloud-financial_services-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/.yardopts b/owl-bot-staging/google-cloud-financial_services-v1/.yardopts new file mode 100644 index 000000000000..9311fd01686a --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Financial Services 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-financial_services-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-financial_services-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..24c00c23958e --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-financial_services-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-financial_services-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/financial_services/v1" + +client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/financial_services/v1" + +::Google::Cloud::FinancialServices::V1::AML::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::FinancialServices::V1::AML::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-financial_services-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/financial_services/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::FinancialServices::V1::AML::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-financial_services-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-financial_services-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-financial_services-v1/Gemfile b/owl-bot-staging/google-cloud-financial_services-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-financial_services-v1/LICENSE.md b/owl-bot-staging/google-cloud-financial_services-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/README.md b/owl-bot-staging/google-cloud-financial_services-v1/README.md new file mode 100644 index 000000000000..78c342fdbcea --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Financial Services V1 API + +API Client library for the Financial Services V1 API + +google-cloud-financial_services-v1 is the official client library for the Financial Services V1 API. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Financial Services V1 API. Most users should consider using +the main client gem, +[google-cloud-financial_services](https://rubygems.org/gems/google-cloud-financial_services). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-financial_services-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/financialservices.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/financial_services/v1" + +client = ::Google::Cloud::FinancialServices::V1::AML::Client.new +request = ::Google::Cloud::FinancialServices::V1::ListInstancesRequest.new # (request fields as keyword arguments...) +response = client.list_instances request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview) +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/financial_services/v1" +require "logger" + +client = ::Google::Cloud::FinancialServices::V1::AML::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-financial_services`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-financial_services-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-financial_services`. +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-financial_services-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-financial_services-v1/Rakefile b/owl-bot-staging/google-cloud-financial_services-v1/Rakefile new file mode 100644 index 000000000000..8d6acfa45c3f --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-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/financial_services/v1/aml/credentials" + ::Google::Cloud::FinancialServices::V1::AML::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-financial_services-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-financial_services-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-financial_services-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-financial_services-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-financial_services-v1" + header "google-cloud-financial_services-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-financial_services-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-financial_services-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-financial_services-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-financial_services-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-financial_services-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-financial_services-v1/gapic_metadata.json new file mode 100644 index 000000000000..ccfe3e1e260c --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/gapic_metadata.json @@ -0,0 +1,208 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.financialservices.v1", + "libraryPackage": "::Google::Cloud::FinancialServices::V1", + "services": { + "AML": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::FinancialServices::V1::AML::Client", + "rpcs": { + "ListInstances": { + "methods": [ + "list_instances" + ] + }, + "GetInstance": { + "methods": [ + "get_instance" + ] + }, + "CreateInstance": { + "methods": [ + "create_instance" + ] + }, + "UpdateInstance": { + "methods": [ + "update_instance" + ] + }, + "DeleteInstance": { + "methods": [ + "delete_instance" + ] + }, + "ImportRegisteredParties": { + "methods": [ + "import_registered_parties" + ] + }, + "ExportRegisteredParties": { + "methods": [ + "export_registered_parties" + ] + }, + "ListDatasets": { + "methods": [ + "list_datasets" + ] + }, + "GetDataset": { + "methods": [ + "get_dataset" + ] + }, + "CreateDataset": { + "methods": [ + "create_dataset" + ] + }, + "UpdateDataset": { + "methods": [ + "update_dataset" + ] + }, + "DeleteDataset": { + "methods": [ + "delete_dataset" + ] + }, + "ListModels": { + "methods": [ + "list_models" + ] + }, + "GetModel": { + "methods": [ + "get_model" + ] + }, + "CreateModel": { + "methods": [ + "create_model" + ] + }, + "UpdateModel": { + "methods": [ + "update_model" + ] + }, + "ExportModelMetadata": { + "methods": [ + "export_model_metadata" + ] + }, + "DeleteModel": { + "methods": [ + "delete_model" + ] + }, + "ListEngineConfigs": { + "methods": [ + "list_engine_configs" + ] + }, + "GetEngineConfig": { + "methods": [ + "get_engine_config" + ] + }, + "CreateEngineConfig": { + "methods": [ + "create_engine_config" + ] + }, + "UpdateEngineConfig": { + "methods": [ + "update_engine_config" + ] + }, + "ExportEngineConfigMetadata": { + "methods": [ + "export_engine_config_metadata" + ] + }, + "DeleteEngineConfig": { + "methods": [ + "delete_engine_config" + ] + }, + "GetEngineVersion": { + "methods": [ + "get_engine_version" + ] + }, + "ListEngineVersions": { + "methods": [ + "list_engine_versions" + ] + }, + "ListPredictionResults": { + "methods": [ + "list_prediction_results" + ] + }, + "GetPredictionResult": { + "methods": [ + "get_prediction_result" + ] + }, + "CreatePredictionResult": { + "methods": [ + "create_prediction_result" + ] + }, + "UpdatePredictionResult": { + "methods": [ + "update_prediction_result" + ] + }, + "ExportPredictionResultMetadata": { + "methods": [ + "export_prediction_result_metadata" + ] + }, + "DeletePredictionResult": { + "methods": [ + "delete_prediction_result" + ] + }, + "ListBacktestResults": { + "methods": [ + "list_backtest_results" + ] + }, + "GetBacktestResult": { + "methods": [ + "get_backtest_result" + ] + }, + "CreateBacktestResult": { + "methods": [ + "create_backtest_result" + ] + }, + "UpdateBacktestResult": { + "methods": [ + "update_backtest_result" + ] + }, + "ExportBacktestResultMetadata": { + "methods": [ + "export_backtest_result_metadata" + ] + }, + "DeleteBacktestResult": { + "methods": [ + "delete_backtest_result" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-financial_services-v1/google-cloud-financial_services-v1.gemspec b/owl-bot-staging/google-cloud-financial_services-v1/google-cloud-financial_services-v1.gemspec new file mode 100644 index 000000000000..8dd4d5119752 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/google-cloud-financial_services-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/financial_services/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-financial_services-v1" + gem.version = Google::Cloud::FinancialServices::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-financial_services-v1 is the official client library for the Financial Services V1 API. Note that google-cloud-financial_services-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-financial_services instead. See the readme for more details." + gem.summary = "API Client library for the Financial Services V1 API" + 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.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google-cloud-financial_services-v1.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google-cloud-financial_services-v1.rb new file mode 100644 index 000000000000..e3b069acc38d --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google-cloud-financial_services-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/financial_services/v1" diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1.rb new file mode 100644 index 000000000000..ed8c4f8eaba8 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1.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/financial_services/v1/aml" +require "google/cloud/financial_services/v1/version" + +module Google + module Cloud + module FinancialServices + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/financial_services/v1" + # client = ::Google::Cloud::FinancialServices::V1::AML::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/financial_services/v1" + # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/financial_services/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml.rb new file mode 100644 index 000000000000..5fdaea94400c --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml.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/financial_services/v1/version" + +require "google/cloud/financial_services/v1/aml/credentials" +require "google/cloud/financial_services/v1/aml/paths" +require "google/cloud/financial_services/v1/aml/operations" +require "google/cloud/financial_services/v1/aml/client" +require "google/cloud/financial_services/v1/aml/rest" + +module Google + module Cloud + module FinancialServices + module V1 + ## + # The AML (Anti Money Laundering) service allows users to perform REST + # operations on aml. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/financial_services/v1/aml" + # client = ::Google::Cloud::FinancialServices::V1::AML::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/financial_services/v1/aml/rest" + # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + module AML + end + end + end + end +end + +helper_path = ::File.join __dir__, "aml", "helpers.rb" +require "google/cloud/financial_services/v1/aml/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/client.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/client.rb new file mode 100644 index 000000000000..edf36dc21bec --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/client.rb @@ -0,0 +1,4704 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/financialservices/v1/service_pb" +require "google/cloud/location" + +module Google + module Cloud + module FinancialServices + module V1 + module AML + ## + # Client for the AML service. + # + # The AML (Anti Money Laundering) service allows users to perform REST + # operations on aml. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "financialservices.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :aml_stub + + ## + # Configure the AML Client class. + # + # See {::Google::Cloud::FinancialServices::V1::AML::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AML clients + # ::Google::Cloud::FinancialServices::V1::AML::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", "FinancialServices", "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.list_instances.timeout = 10.0 + + default_config.rpcs.get_instance.timeout = 10.0 + + default_config.rpcs.create_instance.timeout = 120.0 + + default_config.rpcs.update_instance.timeout = 120.0 + + default_config.rpcs.delete_instance.timeout = 120.0 + + default_config.rpcs.import_registered_parties.timeout = 120.0 + + default_config.rpcs.export_registered_parties.timeout = 120.0 + + default_config.rpcs.list_datasets.timeout = 10.0 + + default_config.rpcs.get_dataset.timeout = 10.0 + + default_config.rpcs.create_dataset.timeout = 120.0 + + default_config.rpcs.update_dataset.timeout = 120.0 + + default_config.rpcs.delete_dataset.timeout = 120.0 + + default_config.rpcs.list_models.timeout = 10.0 + + default_config.rpcs.get_model.timeout = 10.0 + + default_config.rpcs.create_model.timeout = 120.0 + + default_config.rpcs.update_model.timeout = 120.0 + + default_config.rpcs.export_model_metadata.timeout = 120.0 + + default_config.rpcs.delete_model.timeout = 120.0 + + default_config.rpcs.list_engine_configs.timeout = 10.0 + + default_config.rpcs.get_engine_config.timeout = 10.0 + + default_config.rpcs.update_engine_config.timeout = 120.0 + + default_config.rpcs.export_engine_config_metadata.timeout = 120.0 + + default_config.rpcs.delete_engine_config.timeout = 120.0 + + default_config.rpcs.get_engine_version.timeout = 10.0 + + default_config.rpcs.list_engine_versions.timeout = 10.0 + + default_config.rpcs.list_prediction_results.timeout = 10.0 + + default_config.rpcs.get_prediction_result.timeout = 10.0 + + default_config.rpcs.create_prediction_result.timeout = 120.0 + + default_config.rpcs.update_prediction_result.timeout = 120.0 + + default_config.rpcs.export_prediction_result_metadata.timeout = 120.0 + + default_config.rpcs.delete_prediction_result.timeout = 120.0 + + default_config.rpcs.list_backtest_results.timeout = 10.0 + + default_config.rpcs.get_backtest_result.timeout = 10.0 + + default_config.rpcs.create_backtest_result.timeout = 120.0 + + default_config.rpcs.update_backtest_result.timeout = 120.0 + + default_config.rpcs.export_backtest_result_metadata.timeout = 120.0 + + default_config.rpcs.delete_backtest_result.timeout = 120.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AML 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::FinancialServices::V1::AML::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 + @aml_stub.universe_domain + end + + ## + # Create a new AML client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AML 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/financialservices/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 + + @aml_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::FinancialServices::V1::AML::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 + ) + + @aml_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 = @aml_stub.endpoint + config.universe_domain = @aml_stub.universe_domain + config.logger = @aml_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::FinancialServices::V1::AML::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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @aml_stub.logger + end + + # Service calls + + ## + # Lists instances. + # + # @overload list_instances(request, options = nil) + # Pass arguments to `list_instances` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListInstancesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_instances` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the Instance is the location for that Instance. + # Every location has exactly one instance. + # @param page_size [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @param page_token [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListInstancesResponse. It should be copied here to retrieve the + # next page of resources. This will be empty for the first instance of + # ListInstancesRequest. + # @param filter [::String] + # Specify a filter to narrow search results. + # @param order_by [::String] + # Specify a field to use for ordering. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListInstancesRequest.new + # + # # Call the list_instances method. + # result = client.list_instances request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::FinancialServices::V1::Instance. + # p item + # end + # + def list_instances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListInstancesRequest + + # Converts hash and nil to 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_instances.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_instances.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_instances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :list_instances, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @aml_stub, :list_instances, 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 instance. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_instance(name: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Instance. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::FinancialServices::V1::Instance] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::FinancialServices::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetInstanceRequest + + # Converts hash and nil to 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :get_instance, 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 instance. + # + # @overload create_instance(request, options = nil) + # Pass arguments to `create_instance` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::CreateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::CreateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) + # Pass arguments to `create_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the Instance is the location for that Instance. + # Every location has exactly one instance. + # @param instance_id [::String] + # Required. The resource id of the instance. + # @param instance [::Google::Cloud::FinancialServices::V1::Instance, ::Hash] + # Required. The instance that will be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new + # + # # Call the create_instance method. + # result = client.create_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest + + # Converts hash and nil to 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :create_instance, 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 the parameters of a single Instance. + # + # @overload update_instance(request, options = nil) + # Pass arguments to `update_instance` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_instance(update_mask: nil, instance: nil, request_id: nil) + # Pass arguments to `update_instance` via keyword arguments. Note that at + # least one keyword argument is 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] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Instance resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param instance [::Google::Cloud::FinancialServices::V1::Instance, ::Hash] + # Required. The new value of the instance fields that will be updated + # according to the update_mask + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new + # + # # Call the update_instance method. + # result = client.update_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest + + # Converts hash and nil to 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.instance&.name + header_params["instance.name"] = request.instance.name + end + + request_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_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :update_instance, 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 instance. + # + # @overload delete_instance(request, options = nil) + # Pass arguments to `delete_instance` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_instance(name: nil, request_id: nil) + # Pass arguments to `delete_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Instance. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new + # + # # Call the delete_instance method. + # result = client.delete_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest + + # Converts hash and nil to 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_instance.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :delete_instance, 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 + + ## + # Imports the list of registered parties. See + # [Create and manage + # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#import-registered-parties) + # for information on the input schema and response for this method. + # + # @overload import_registered_parties(request, options = nil) + # Pass arguments to `import_registered_parties` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_registered_parties(name: nil, party_tables: nil, mode: nil, validate_only: nil, line_of_business: nil) + # Pass arguments to `import_registered_parties` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The full path to the Instance resource in this API. + # format: `projects/{project}/locations/{location}/instances/{instance}` + # @param party_tables [::Array<::String>] + # Optional. List of BigQuery tables. Union of tables will be taken if there + # is more than one table. VPC-SC restrictions apply. format: + # `bq://{project}.{bqDatasetID}.{bqTableID}` Use of `datasets` is preferred + # over the latter due to its simplicity and the reduced risk of errors + # `party_tables` and `datasets` must not be provided at the + # same time + # @param mode [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest::UpdateMode] + # Required. Mode of the request. + # @param validate_only [::Boolean] + # Optional. If the request will not register the parties, just determine what + # would happen. + # @param line_of_business [::Google::Cloud::FinancialServices::V1::LineOfBusiness] + # Required. LineOfBusiness for the specified registered parties. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new + # + # # Call the import_registered_parties method. + # result = client.import_registered_parties request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_registered_parties request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_registered_parties.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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.import_registered_parties.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_registered_parties.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :import_registered_parties, 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 + + ## + # Exports the list of registered parties. See + # [Create and manage + # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#export-registered-parties) + # for information on the output schema for this method. + # + # @overload export_registered_parties(request, options = nil) + # Pass arguments to `export_registered_parties` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_registered_parties(name: nil, dataset: nil, line_of_business: nil) + # Pass arguments to `export_registered_parties` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The full path to the Instance resource in this API. + # format: `projects/{project}/locations/{location}/instances/{instance}` + # @param dataset [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] + # Required. The location to output the RegisteredParties. + # @param line_of_business [::Google::Cloud::FinancialServices::V1::LineOfBusiness] + # Required. LineOfBusiness to get RegisteredParties from. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new + # + # # Call the export_registered_parties method. + # result = client.export_registered_parties request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_registered_parties request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_registered_parties.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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.export_registered_parties.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_registered_parties.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :export_registered_parties, 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 datasets. + # + # @overload list_datasets(request, options = nil) + # Pass arguments to `list_datasets` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_datasets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the Dataset is the Instance. + # @param page_size [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @param page_token [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListDatasetResponse. It should be copied here to retrieve the + # next page of resources. Empty will give the first page of + # ListDatasetRequest, and the last page will return an empty page_token. + # @param filter [::String] + # Specify a filter to narrow search results. + # @param order_by [::String] + # Specify a field to use for ordering. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListDatasetsRequest.new + # + # # Call the list_datasets method. + # result = client.list_datasets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::FinancialServices::V1::Dataset. + # p item + # end + # + def list_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest + + # Converts hash and nil to 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_datasets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_datasets.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :list_datasets, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @aml_stub, :list_datasets, 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 a dataset. + # + # @overload get_dataset(request, options = nil) + # Pass arguments to `get_dataset` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_dataset(name: nil) + # Pass arguments to `get_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Dataset + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::FinancialServices::V1::Dataset] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::FinancialServices::V1::Dataset] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetDatasetRequest.new + # + # # Call the get_dataset method. + # result = client.get_dataset request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::Dataset. + # p result + # + def get_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetDatasetRequest + + # Converts hash and nil to 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :get_dataset, 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 dataset. + # + # @overload create_dataset(request, options = nil) + # Pass arguments to `create_dataset` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::CreateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::CreateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dataset(parent: nil, dataset_id: nil, dataset: nil, request_id: nil) + # Pass arguments to `create_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the Dataset is the Instance. + # @param dataset_id [::String] + # Required. The resource id of the dataset + # @param dataset [::Google::Cloud::FinancialServices::V1::Dataset, ::Hash] + # Required. The dataset that will be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new + # + # # Call the create_dataset method. + # result = client.create_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest + + # Converts hash and nil to 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :create_dataset, 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 the parameters of a single Dataset. + # + # @overload update_dataset(request, options = nil) + # Pass arguments to `update_dataset` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dataset(update_mask: nil, dataset: nil, request_id: nil) + # Pass arguments to `update_dataset` via keyword arguments. Note that at + # least one keyword argument is 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] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Dataset resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param dataset [::Google::Cloud::FinancialServices::V1::Dataset, ::Hash] + # Required. The new value of the dataset fields that will be updated + # according to the update_mask. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new + # + # # Call the update_dataset method. + # result = client.update_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest + + # Converts hash and nil to 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.dataset&.name + header_params["dataset.name"] = request.dataset.name + end + + request_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_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :update_dataset, 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 dataset. + # + # @overload delete_dataset(request, options = nil) + # Pass arguments to `delete_dataset` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_dataset(name: nil, request_id: nil) + # Pass arguments to `delete_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Dataset. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new + # + # # Call the delete_dataset method. + # result = client.delete_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest + + # Converts hash and nil to 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_dataset.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :delete_dataset, 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 models. + # + # @overload list_models(request, options = nil) + # Pass arguments to `list_models` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListModelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_models(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_models` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the Model is the Instance. + # @param page_size [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @param page_token [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListModelsResponse. It should be copied here to retrieve the next + # page of resources. Empty will give the first page of ListModelsRequest, and + # the last page will return an empty page_token. + # @param filter [::String] + # Specify a filter to narrow search results. + # @param order_by [::String] + # Specify a field to use for ordering. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListModelsRequest.new + # + # # Call the list_models method. + # result = client.list_models request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::FinancialServices::V1::Model. + # p item + # end + # + def list_models request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListModelsRequest + + # Converts hash and nil to 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_models.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_models.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_models.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :list_models, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @aml_stub, :list_models, 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 a model. + # + # @overload get_model(request, options = nil) + # Pass arguments to `get_model` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_model(name: nil) + # Pass arguments to `get_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Model + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::FinancialServices::V1::Model] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::FinancialServices::V1::Model] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetModelRequest.new + # + # # Call the get_model method. + # result = client.get_model request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::Model. + # p result + # + def get_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetModelRequest + + # Converts hash and nil to 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :get_model, 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 model. + # + # @overload create_model(request, options = nil) + # Pass arguments to `create_model` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::CreateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::CreateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_model(parent: nil, model_id: nil, model: nil, request_id: nil) + # Pass arguments to `create_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the Model is the Instance. + # @param model_id [::String] + # Required. The resource id of the Model + # @param model [::Google::Cloud::FinancialServices::V1::Model, ::Hash] + # Required. The Model that will be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::CreateModelRequest.new + # + # # Call the create_model method. + # result = client.create_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateModelRequest + + # Converts hash and nil to 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :create_model, 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 the parameters of a single Model. + # + # @overload update_model(request, options = nil) + # Pass arguments to `update_model` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::UpdateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::UpdateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_model(update_mask: nil, model: nil, request_id: nil) + # Pass arguments to `update_model` via keyword arguments. Note that at + # least one keyword argument is 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] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Model resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param model [::Google::Cloud::FinancialServices::V1::Model, ::Hash] + # Required. The new value of the Model fields that will be updated according + # to the update_mask. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::UpdateModelRequest.new + # + # # Call the update_model method. + # result = client.update_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateModelRequest + + # Converts hash and nil to 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.model&.name + header_params["model.name"] = request.model.name + end + + request_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_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :update_model, 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 + + ## + # Export governance information for a Model resource. For + # information on the exported fields, see + # [AML output data + # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#model). + # + # @overload export_model_metadata(request, options = nil) + # Pass arguments to `export_model_metadata` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_model_metadata(model: nil, structured_metadata_destination: nil) + # Pass arguments to `export_model_metadata` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param model [::String] + # Required. The resource name of the Model. + # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] + # Required. BigQuery output where the metadata will be written. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new + # + # # Call the export_model_metadata method. + # result = client.export_model_metadata request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_model_metadata request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_model_metadata.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.model + header_params["model"] = request.model + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_model_metadata.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_model_metadata.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :export_model_metadata, 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 model. + # + # @overload delete_model(request, options = nil) + # Pass arguments to `delete_model` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::DeleteModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::DeleteModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_model(name: nil, request_id: nil) + # Pass arguments to `delete_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Model. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::DeleteModelRequest.new + # + # # Call the delete_model method. + # result = client.delete_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteModelRequest + + # Converts hash and nil to 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_model.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :delete_model, 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 engine configs. + # + # @overload list_engine_configs(request, options = nil) + # Pass arguments to `list_engine_configs` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_engine_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_engine_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 parent of the EngineConfig is the Instance. + # @param page_size [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @param page_token [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListEngineConfigsResponse. It should be copied here to retrieve + # the next page of resources. Empty will give the first page of + # ListEngineConfigsRequest, and the last page will return an empty + # page_token. + # @param filter [::String] + # Specify a filter to narrow search results. + # @param order_by [::String] + # Specify a field to use for ordering. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.new + # + # # Call the list_engine_configs method. + # result = client.list_engine_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::FinancialServices::V1::EngineConfig. + # p item + # end + # + def list_engine_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest + + # Converts hash and nil to 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_engine_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::FinancialServices::V1::VERSION + metadata[:"x-goog-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_engine_configs.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_engine_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :list_engine_configs, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @aml_stub, :list_engine_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 + + ## + # Gets an engine config. + # + # @overload get_engine_config(request, options = nil) + # Pass arguments to `get_engine_config` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_engine_config(name: nil) + # Pass arguments to `get_engine_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 resource name of the EngineConfig + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::FinancialServices::V1::EngineConfig] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::FinancialServices::V1::EngineConfig] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new + # + # # Call the get_engine_config method. + # result = client.get_engine_config request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::EngineConfig. + # p result + # + def get_engine_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest + + # Converts hash and nil to 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_engine_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::FinancialServices::V1::VERSION + metadata[:"x-goog-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_engine_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_engine_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :get_engine_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 + + ## + # Creates an engine config. + # + # @overload create_engine_config(request, options = nil) + # Pass arguments to `create_engine_config` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_engine_config(parent: nil, engine_config_id: nil, engine_config: nil, request_id: nil) + # Pass arguments to `create_engine_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 parent of the EngineConfig is the Instance. + # @param engine_config_id [::String] + # Required. The resource id of the EngineConfig + # @param engine_config [::Google::Cloud::FinancialServices::V1::EngineConfig, ::Hash] + # Required. The EngineConfig that will be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new + # + # # Call the create_engine_config method. + # result = client.create_engine_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_engine_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest + + # Converts hash and nil to 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_engine_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::FinancialServices::V1::VERSION + metadata[:"x-goog-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_engine_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_engine_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :create_engine_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 + + ## + # Updates the parameters of a single EngineConfig. + # + # @overload update_engine_config(request, options = nil) + # Pass arguments to `update_engine_config` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_engine_config(update_mask: nil, engine_config: nil, request_id: nil) + # Pass arguments to `update_engine_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # EngineConfig resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param engine_config [::Google::Cloud::FinancialServices::V1::EngineConfig, ::Hash] + # Required. The new value of the EngineConfig fields that will be updated + # according to the update_mask. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new + # + # # Call the update_engine_config method. + # result = client.update_engine_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_engine_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest + + # Converts hash and nil to 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_engine_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::FinancialServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.engine_config&.name + header_params["engine_config.name"] = request.engine_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_engine_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_engine_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :update_engine_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 + + ## + # Export governance information for an EngineConfig resource. For + # information on the exported fields, see + # [AML output data + # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#engine-config). + # + # @overload export_engine_config_metadata(request, options = nil) + # Pass arguments to `export_engine_config_metadata` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_engine_config_metadata(engine_config: nil, structured_metadata_destination: nil) + # Pass arguments to `export_engine_config_metadata` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param engine_config [::String] + # Required. The resource name of the EngineConfig. + # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] + # Required. BigQuery output where the metadata will be written. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new + # + # # Call the export_engine_config_metadata method. + # result = client.export_engine_config_metadata request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_engine_config_metadata request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_engine_config_metadata.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.engine_config + header_params["engine_config"] = request.engine_config + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_engine_config_metadata.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_engine_config_metadata.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :export_engine_config_metadata, 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 engine config. + # + # @overload delete_engine_config(request, options = nil) + # Pass arguments to `delete_engine_config` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_engine_config(name: nil, request_id: nil) + # Pass arguments to `delete_engine_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 resource name of the EngineConfig. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new + # + # # Call the delete_engine_config method. + # result = client.delete_engine_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_engine_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest + + # Converts hash and nil to 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_engine_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::FinancialServices::V1::VERSION + metadata[:"x-goog-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_engine_config.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_engine_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :delete_engine_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 + + ## + # Gets a single EngineVersion. + # + # @overload get_engine_version(request, options = nil) + # Pass arguments to `get_engine_version` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_engine_version(name: nil) + # Pass arguments to `get_engine_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EngineVersion + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::FinancialServices::V1::EngineVersion] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::FinancialServices::V1::EngineVersion] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new + # + # # Call the get_engine_version method. + # result = client.get_engine_version request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::EngineVersion. + # p result + # + def get_engine_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest + + # Converts hash and nil to 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_engine_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_engine_version.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_engine_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :get_engine_version, 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 EngineVersions for given location. + # + # @overload list_engine_versions(request, options = nil) + # Pass arguments to `list_engine_versions` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_engine_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_engine_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the EngineVersion is the Instance. + # @param page_size [::Integer] + # Optional. The number of resources to be included in the response. The + # response contains a next_page_token, which can be used to retrieve the next + # page of resources. + # @param page_token [::String] + # Optional. In case of paginated results, this is the token that was returned + # in the previous ListEngineVersionsResponse. It should be copied here to + # retrieve the next page of resources. Empty will give the first page of + # ListEngineVersionsRequest, and the last page will return an empty + # page_token. + # @param filter [::String] + # Optional. Specify a filter to narrow search results. + # If empty or unset will default to "state!=DEPRECATED", + # to view deprecated versions use "state:*" or any other filter. + # @param order_by [::String] + # Optional. Specify a field to use for ordering. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.new + # + # # Call the list_engine_versions method. + # result = client.list_engine_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::FinancialServices::V1::EngineVersion. + # p item + # end + # + def list_engine_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest + + # Converts hash and nil to 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_engine_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_engine_versions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_engine_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :list_engine_versions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @aml_stub, :list_engine_versions, 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 + + ## + # List PredictionResults. + # + # @overload list_prediction_results(request, options = nil) + # Pass arguments to `list_prediction_results` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_prediction_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_prediction_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the PredictionResult is the Instance. + # @param page_size [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @param page_token [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListPredictionResultsResponse. It should be copied here to + # retrieve the next page of resources. Empty will give the first page of + # ListPredictionResultsRequest, and the last page will return an empty + # page_token. + # @param filter [::String] + # Specify a filter to narrow search results. + # @param order_by [::String] + # Specify a field to use for ordering. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.new + # + # # Call the list_prediction_results method. + # result = client.list_prediction_results request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::FinancialServices::V1::PredictionResult. + # p item + # end + # + def list_prediction_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest + + # Converts hash and nil to 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_prediction_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_prediction_results.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_prediction_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :list_prediction_results, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @aml_stub, :list_prediction_results, 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 a PredictionResult. + # + # @overload get_prediction_result(request, options = nil) + # Pass arguments to `get_prediction_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_prediction_result(name: nil) + # Pass arguments to `get_prediction_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the PredictionResult + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::FinancialServices::V1::PredictionResult] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::FinancialServices::V1::PredictionResult] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new + # + # # Call the get_prediction_result method. + # result = client.get_prediction_result request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::PredictionResult. + # p result + # + def get_prediction_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest + + # Converts hash and nil to 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_prediction_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_prediction_result.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_prediction_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :get_prediction_result, 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 PredictionResult. + # + # @overload create_prediction_result(request, options = nil) + # Pass arguments to `create_prediction_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_prediction_result(parent: nil, prediction_result_id: nil, prediction_result: nil, request_id: nil) + # Pass arguments to `create_prediction_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the PredictionResult is the Instance. + # @param prediction_result_id [::String] + # Required. The resource id of the PredictionResult + # @param prediction_result [::Google::Cloud::FinancialServices::V1::PredictionResult, ::Hash] + # Required. The PredictionResult that will be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new + # + # # Call the create_prediction_result method. + # result = client.create_prediction_result request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_prediction_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest + + # Converts hash and nil to 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_prediction_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_prediction_result.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_prediction_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :create_prediction_result, 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 the parameters of a single PredictionResult. + # + # @overload update_prediction_result(request, options = nil) + # Pass arguments to `update_prediction_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_prediction_result(update_mask: nil, prediction_result: nil, request_id: nil) + # Pass arguments to `update_prediction_result` via keyword arguments. Note that at + # least one keyword argument is 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] + # Optional. Field mask is used to specify the fields to be overwritten in the + # PredictionResult resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param prediction_result [::Google::Cloud::FinancialServices::V1::PredictionResult, ::Hash] + # Required. The new value of the PredictionResult fields that will be updated + # according to the update_mask. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new + # + # # Call the update_prediction_result method. + # result = client.update_prediction_result request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_prediction_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest + + # Converts hash and nil to 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_prediction_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.prediction_result&.name + header_params["prediction_result.name"] = request.prediction_result.name + end + + request_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_prediction_result.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_prediction_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :update_prediction_result, 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 + + ## + # Export governance information for a PredictionResult resource. For + # information on the exported fields, see + # [AML output data + # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#prediction-results). + # + # @overload export_prediction_result_metadata(request, options = nil) + # Pass arguments to `export_prediction_result_metadata` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_prediction_result_metadata(prediction_result: nil, structured_metadata_destination: nil) + # Pass arguments to `export_prediction_result_metadata` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param prediction_result [::String] + # Required. The resource name of the PredictionResult. + # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] + # Required. BigQuery output where the metadata will be written. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new + # + # # Call the export_prediction_result_metadata method. + # result = client.export_prediction_result_metadata request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_prediction_result_metadata request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_prediction_result_metadata.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.prediction_result + header_params["prediction_result"] = request.prediction_result + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_prediction_result_metadata.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_prediction_result_metadata.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :export_prediction_result_metadata, 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 PredictionResult. + # + # @overload delete_prediction_result(request, options = nil) + # Pass arguments to `delete_prediction_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_prediction_result(name: nil, request_id: nil) + # Pass arguments to `delete_prediction_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the PredictionResult. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new + # + # # Call the delete_prediction_result method. + # result = client.delete_prediction_result request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_prediction_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest + + # Converts hash and nil to 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_prediction_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_prediction_result.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_prediction_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :delete_prediction_result, 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 BacktestResults. + # + # @overload list_backtest_results(request, options = nil) + # Pass arguments to `list_backtest_results` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backtest_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backtest_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the BacktestResult is the Instance. + # @param page_size [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @param page_token [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListBacktestResultsResponse. It should be copied here to + # retrieve the next page of resources. Empty will give the first page of + # ListBacktestResultsRequest, and the last page will return an empty + # page_token. + # @param filter [::String] + # Specify a filter to narrow search results. + # @param order_by [::String] + # Specify a field to use for ordering. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.new + # + # # Call the list_backtest_results method. + # result = client.list_backtest_results request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::FinancialServices::V1::BacktestResult. + # p item + # end + # + def list_backtest_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest + + # Converts hash and nil to 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_backtest_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_backtest_results.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backtest_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :list_backtest_results, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @aml_stub, :list_backtest_results, 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 a BacktestResult. + # + # @overload get_backtest_result(request, options = nil) + # Pass arguments to `get_backtest_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backtest_result(name: nil) + # Pass arguments to `get_backtest_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the BacktestResult + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::FinancialServices::V1::BacktestResult] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::FinancialServices::V1::BacktestResult] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new + # + # # Call the get_backtest_result method. + # result = client.get_backtest_result request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::BacktestResult. + # p result + # + def get_backtest_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest + + # Converts hash and nil to 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_backtest_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_backtest_result.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backtest_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :get_backtest_result, 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 BacktestResult. + # + # @overload create_backtest_result(request, options = nil) + # Pass arguments to `create_backtest_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backtest_result(parent: nil, backtest_result_id: nil, backtest_result: nil, request_id: nil) + # Pass arguments to `create_backtest_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the BacktestResult is the Instance. + # @param backtest_result_id [::String] + # Required. The resource id of the BacktestResult + # @param backtest_result [::Google::Cloud::FinancialServices::V1::BacktestResult, ::Hash] + # Required. The BacktestResult that will be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new + # + # # Call the create_backtest_result method. + # result = client.create_backtest_result request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backtest_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest + + # Converts hash and nil to 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_backtest_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_backtest_result.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backtest_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :create_backtest_result, 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 the parameters of a single BacktestResult. + # + # @overload update_backtest_result(request, options = nil) + # Pass arguments to `update_backtest_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backtest_result(update_mask: nil, backtest_result: nil, request_id: nil) + # Pass arguments to `update_backtest_result` via keyword arguments. Note that at + # least one keyword argument is 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] + # Optional. Field mask is used to specify the fields to be overwritten in the + # BacktestResult resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param backtest_result [::Google::Cloud::FinancialServices::V1::BacktestResult, ::Hash] + # Required. The new value of the BacktestResult fields that will be updated + # according to the update_mask. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new + # + # # Call the update_backtest_result method. + # result = client.update_backtest_result request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backtest_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest + + # Converts hash and nil to 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_backtest_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backtest_result&.name + header_params["backtest_result.name"] = request.backtest_result.name + end + + request_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_backtest_result.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backtest_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :update_backtest_result, 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 + + ## + # Export governance information for a BacktestResult resource. For + # information on the exported fields, see + # [AML output data + # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#backtest-results). + # + # @overload export_backtest_result_metadata(request, options = nil) + # Pass arguments to `export_backtest_result_metadata` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_backtest_result_metadata(backtest_result: nil, structured_metadata_destination: nil) + # Pass arguments to `export_backtest_result_metadata` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backtest_result [::String] + # Required. The resource name of the BacktestResult. + # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] + # Required. BigQuery output where the metadata will be written. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new + # + # # Call the export_backtest_result_metadata method. + # result = client.export_backtest_result_metadata request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_backtest_result_metadata request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_backtest_result_metadata.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backtest_result + header_params["backtest_result"] = request.backtest_result + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.export_backtest_result_metadata.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_backtest_result_metadata.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :export_backtest_result_metadata, 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 BacktestResult. + # + # @overload delete_backtest_result(request, options = nil) + # Pass arguments to `delete_backtest_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backtest_result(name: nil, request_id: nil) + # Pass arguments to `delete_backtest_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the BacktestResult. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new + # + # # Call the delete_backtest_result method. + # result = client.delete_backtest_result request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backtest_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest + + # Converts hash and nil to 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_backtest_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION + metadata[:"x-goog-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_backtest_result.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backtest_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.call_rpc :delete_backtest_result, 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 AML API. + # + # This class represents the configuration for AML, + # 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::FinancialServices::V1::AML::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_instances to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::FinancialServices::V1::AML::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.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::FinancialServices::V1::AML::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 = "financialservices.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 AML 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_instances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instances + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + ## + # RPC-specific configuration for `create_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance + ## + # RPC-specific configuration for `update_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance + ## + # RPC-specific configuration for `delete_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance + ## + # RPC-specific configuration for `import_registered_parties` + # @return [::Gapic::Config::Method] + # + attr_reader :import_registered_parties + ## + # RPC-specific configuration for `export_registered_parties` + # @return [::Gapic::Config::Method] + # + attr_reader :export_registered_parties + ## + # RPC-specific configuration for `list_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_datasets + ## + # RPC-specific configuration for `get_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dataset + ## + # RPC-specific configuration for `create_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dataset + ## + # RPC-specific configuration for `update_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dataset + ## + # RPC-specific configuration for `delete_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dataset + ## + # RPC-specific configuration for `list_models` + # @return [::Gapic::Config::Method] + # + attr_reader :list_models + ## + # RPC-specific configuration for `get_model` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model + ## + # RPC-specific configuration for `create_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_model + ## + # RPC-specific configuration for `update_model` + # @return [::Gapic::Config::Method] + # + attr_reader :update_model + ## + # RPC-specific configuration for `export_model_metadata` + # @return [::Gapic::Config::Method] + # + attr_reader :export_model_metadata + ## + # RPC-specific configuration for `delete_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_model + ## + # RPC-specific configuration for `list_engine_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_engine_configs + ## + # RPC-specific configuration for `get_engine_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_engine_config + ## + # RPC-specific configuration for `create_engine_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_engine_config + ## + # RPC-specific configuration for `update_engine_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_engine_config + ## + # RPC-specific configuration for `export_engine_config_metadata` + # @return [::Gapic::Config::Method] + # + attr_reader :export_engine_config_metadata + ## + # RPC-specific configuration for `delete_engine_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_engine_config + ## + # RPC-specific configuration for `get_engine_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_engine_version + ## + # RPC-specific configuration for `list_engine_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_engine_versions + ## + # RPC-specific configuration for `list_prediction_results` + # @return [::Gapic::Config::Method] + # + attr_reader :list_prediction_results + ## + # RPC-specific configuration for `get_prediction_result` + # @return [::Gapic::Config::Method] + # + attr_reader :get_prediction_result + ## + # RPC-specific configuration for `create_prediction_result` + # @return [::Gapic::Config::Method] + # + attr_reader :create_prediction_result + ## + # RPC-specific configuration for `update_prediction_result` + # @return [::Gapic::Config::Method] + # + attr_reader :update_prediction_result + ## + # RPC-specific configuration for `export_prediction_result_metadata` + # @return [::Gapic::Config::Method] + # + attr_reader :export_prediction_result_metadata + ## + # RPC-specific configuration for `delete_prediction_result` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_prediction_result + ## + # RPC-specific configuration for `list_backtest_results` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backtest_results + ## + # RPC-specific configuration for `get_backtest_result` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backtest_result + ## + # RPC-specific configuration for `create_backtest_result` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backtest_result + ## + # RPC-specific configuration for `update_backtest_result` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backtest_result + ## + # RPC-specific configuration for `export_backtest_result_metadata` + # @return [::Gapic::Config::Method] + # + attr_reader :export_backtest_result_metadata + ## + # RPC-specific configuration for `delete_backtest_result` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backtest_result + + # @private + def initialize parent_rpcs = nil + list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances + @list_instances = ::Gapic::Config::Method.new list_instances_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance + @create_instance = ::Gapic::Config::Method.new create_instance_config + update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance + @update_instance = ::Gapic::Config::Method.new update_instance_config + delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance + @delete_instance = ::Gapic::Config::Method.new delete_instance_config + import_registered_parties_config = parent_rpcs.import_registered_parties if parent_rpcs.respond_to? :import_registered_parties + @import_registered_parties = ::Gapic::Config::Method.new import_registered_parties_config + export_registered_parties_config = parent_rpcs.export_registered_parties if parent_rpcs.respond_to? :export_registered_parties + @export_registered_parties = ::Gapic::Config::Method.new export_registered_parties_config + list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets + @list_datasets = ::Gapic::Config::Method.new list_datasets_config + get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset + @get_dataset = ::Gapic::Config::Method.new get_dataset_config + create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset + @create_dataset = ::Gapic::Config::Method.new create_dataset_config + update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset + @update_dataset = ::Gapic::Config::Method.new update_dataset_config + delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset + @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config + list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models + @list_models = ::Gapic::Config::Method.new list_models_config + get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model + @get_model = ::Gapic::Config::Method.new get_model_config + create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model + @create_model = ::Gapic::Config::Method.new create_model_config + update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model + @update_model = ::Gapic::Config::Method.new update_model_config + export_model_metadata_config = parent_rpcs.export_model_metadata if parent_rpcs.respond_to? :export_model_metadata + @export_model_metadata = ::Gapic::Config::Method.new export_model_metadata_config + delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model + @delete_model = ::Gapic::Config::Method.new delete_model_config + list_engine_configs_config = parent_rpcs.list_engine_configs if parent_rpcs.respond_to? :list_engine_configs + @list_engine_configs = ::Gapic::Config::Method.new list_engine_configs_config + get_engine_config_config = parent_rpcs.get_engine_config if parent_rpcs.respond_to? :get_engine_config + @get_engine_config = ::Gapic::Config::Method.new get_engine_config_config + create_engine_config_config = parent_rpcs.create_engine_config if parent_rpcs.respond_to? :create_engine_config + @create_engine_config = ::Gapic::Config::Method.new create_engine_config_config + update_engine_config_config = parent_rpcs.update_engine_config if parent_rpcs.respond_to? :update_engine_config + @update_engine_config = ::Gapic::Config::Method.new update_engine_config_config + export_engine_config_metadata_config = parent_rpcs.export_engine_config_metadata if parent_rpcs.respond_to? :export_engine_config_metadata + @export_engine_config_metadata = ::Gapic::Config::Method.new export_engine_config_metadata_config + delete_engine_config_config = parent_rpcs.delete_engine_config if parent_rpcs.respond_to? :delete_engine_config + @delete_engine_config = ::Gapic::Config::Method.new delete_engine_config_config + get_engine_version_config = parent_rpcs.get_engine_version if parent_rpcs.respond_to? :get_engine_version + @get_engine_version = ::Gapic::Config::Method.new get_engine_version_config + list_engine_versions_config = parent_rpcs.list_engine_versions if parent_rpcs.respond_to? :list_engine_versions + @list_engine_versions = ::Gapic::Config::Method.new list_engine_versions_config + list_prediction_results_config = parent_rpcs.list_prediction_results if parent_rpcs.respond_to? :list_prediction_results + @list_prediction_results = ::Gapic::Config::Method.new list_prediction_results_config + get_prediction_result_config = parent_rpcs.get_prediction_result if parent_rpcs.respond_to? :get_prediction_result + @get_prediction_result = ::Gapic::Config::Method.new get_prediction_result_config + create_prediction_result_config = parent_rpcs.create_prediction_result if parent_rpcs.respond_to? :create_prediction_result + @create_prediction_result = ::Gapic::Config::Method.new create_prediction_result_config + update_prediction_result_config = parent_rpcs.update_prediction_result if parent_rpcs.respond_to? :update_prediction_result + @update_prediction_result = ::Gapic::Config::Method.new update_prediction_result_config + export_prediction_result_metadata_config = parent_rpcs.export_prediction_result_metadata if parent_rpcs.respond_to? :export_prediction_result_metadata + @export_prediction_result_metadata = ::Gapic::Config::Method.new export_prediction_result_metadata_config + delete_prediction_result_config = parent_rpcs.delete_prediction_result if parent_rpcs.respond_to? :delete_prediction_result + @delete_prediction_result = ::Gapic::Config::Method.new delete_prediction_result_config + list_backtest_results_config = parent_rpcs.list_backtest_results if parent_rpcs.respond_to? :list_backtest_results + @list_backtest_results = ::Gapic::Config::Method.new list_backtest_results_config + get_backtest_result_config = parent_rpcs.get_backtest_result if parent_rpcs.respond_to? :get_backtest_result + @get_backtest_result = ::Gapic::Config::Method.new get_backtest_result_config + create_backtest_result_config = parent_rpcs.create_backtest_result if parent_rpcs.respond_to? :create_backtest_result + @create_backtest_result = ::Gapic::Config::Method.new create_backtest_result_config + update_backtest_result_config = parent_rpcs.update_backtest_result if parent_rpcs.respond_to? :update_backtest_result + @update_backtest_result = ::Gapic::Config::Method.new update_backtest_result_config + export_backtest_result_metadata_config = parent_rpcs.export_backtest_result_metadata if parent_rpcs.respond_to? :export_backtest_result_metadata + @export_backtest_result_metadata = ::Gapic::Config::Method.new export_backtest_result_metadata_config + delete_backtest_result_config = parent_rpcs.delete_backtest_result if parent_rpcs.respond_to? :delete_backtest_result + @delete_backtest_result = ::Gapic::Config::Method.new delete_backtest_result_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/credentials.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/credentials.rb new file mode 100644 index 000000000000..eff44d9363a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/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 FinancialServices + module V1 + module AML + # Credentials for the AML 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-financial_services-v1/lib/google/cloud/financial_services/v1/aml/operations.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/operations.rb new file mode 100644 index 000000000000..401594313496 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/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 FinancialServices + module V1 + module AML + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "financialservices.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AML 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 AML 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::FinancialServices::V1::VERSION + metadata[:"x-goog-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::FinancialServices::V1::VERSION + metadata[:"x-goog-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::FinancialServices::V1::VERSION + metadata[:"x-goog-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::FinancialServices::V1::VERSION + metadata[:"x-goog-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::FinancialServices::V1::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 = "financialservices.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-financial_services-v1/lib/google/cloud/financial_services/v1/aml/paths.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/paths.rb new file mode 100644 index 000000000000..aa766eab06fa --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/paths.rb @@ -0,0 +1,195 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 FinancialServices + module V1 + module AML + # Path helper methods for the AML API. + module Paths + ## + # Create a fully-qualified BacktestResult resource string. + # + # The resource will be in the following format: + # + # `projects/{project_num}/locations/{location}/instances/{instance}/backtestResults/{backtest_result}` + # + # @param project_num [String] + # @param location [String] + # @param instance [String] + # @param backtest_result [String] + # + # @return [::String] + def backtest_result_path project_num:, location:, instance:, backtest_result: + raise ::ArgumentError, "project_num cannot contain /" if project_num.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project_num}/locations/#{location}/instances/#{instance}/backtestResults/#{backtest_result}" + end + + ## + # Create a fully-qualified Dataset resource string. + # + # The resource will be in the following format: + # + # `projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}` + # + # @param project_num [String] + # @param location [String] + # @param instance [String] + # @param dataset [String] + # + # @return [::String] + def dataset_path project_num:, location:, instance:, dataset: + raise ::ArgumentError, "project_num cannot contain /" if project_num.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project_num}/locations/#{location}/instances/#{instance}/datasets/#{dataset}" + end + + ## + # Create a fully-qualified EngineConfig resource string. + # + # The resource will be in the following format: + # + # `projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engine_config}` + # + # @param project_num [String] + # @param location [String] + # @param instance [String] + # @param engine_config [String] + # + # @return [::String] + def engine_config_path project_num:, location:, instance:, engine_config: + raise ::ArgumentError, "project_num cannot contain /" if project_num.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project_num}/locations/#{location}/instances/#{instance}/engineConfigs/#{engine_config}" + end + + ## + # Create a fully-qualified EngineVersion resource string. + # + # The resource will be in the following format: + # + # `projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}` + # + # @param project_num [String] + # @param location [String] + # @param instance [String] + # @param engine_version [String] + # + # @return [::String] + def engine_version_path project_num:, location:, instance:, engine_version: + raise ::ArgumentError, "project_num cannot contain /" if project_num.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project_num}/locations/#{location}/instances/#{instance}/engineVersions/#{engine_version}" + end + + ## + # Create a fully-qualified Instance resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/instances/{instance}` + # + # @param project [String] + # @param location [String] + # @param instance [String] + # + # @return [::String] + def instance_path project:, location:, instance: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/instances/#{instance}" + 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 Model resource string. + # + # The resource will be in the following format: + # + # `projects/{project_num}/locations/{location}/instances/{instance}/models/{model}` + # + # @param project_num [String] + # @param location [String] + # @param instance [String] + # @param model [String] + # + # @return [::String] + def model_path project_num:, location:, instance:, model: + raise ::ArgumentError, "project_num cannot contain /" if project_num.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project_num}/locations/#{location}/instances/#{instance}/models/#{model}" + end + + ## + # Create a fully-qualified PredictionResult resource string. + # + # The resource will be in the following format: + # + # `projects/{project_num}/locations/{location}/instances/{instance}/predictionResults/{prediction_result}` + # + # @param project_num [String] + # @param location [String] + # @param instance [String] + # @param prediction_result [String] + # + # @return [::String] + def prediction_result_path project_num:, location:, instance:, prediction_result: + raise ::ArgumentError, "project_num cannot contain /" if project_num.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" + + "projects/#{project_num}/locations/#{location}/instances/#{instance}/predictionResults/#{prediction_result}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest.rb new file mode 100644 index 000000000000..22d348f5112f --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/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/financial_services/v1/version" +require "google/cloud/financial_services/v1/bindings_override" + +require "google/cloud/financial_services/v1/aml/credentials" +require "google/cloud/financial_services/v1/aml/paths" +require "google/cloud/financial_services/v1/aml/rest/operations" +require "google/cloud/financial_services/v1/aml/rest/client" + +module Google + module Cloud + module FinancialServices + module V1 + ## + # The AML (Anti Money Laundering) service allows users to perform REST + # operations on aml. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/financial_services/v1/aml/rest" + # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + module AML + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/financial_services/v1/aml/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/client.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/client.rb new file mode 100644 index 000000000000..6d299f9ec841 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/client.rb @@ -0,0 +1,4403 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/financialservices/v1/service_pb" +require "google/cloud/financial_services/v1/aml/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module FinancialServices + module V1 + module AML + module Rest + ## + # REST client for the AML service. + # + # The AML (Anti Money Laundering) service allows users to perform REST + # operations on aml. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "financialservices.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :aml_stub + + ## + # Configure the AML Client class. + # + # See {::Google::Cloud::FinancialServices::V1::AML::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all AML clients + # ::Google::Cloud::FinancialServices::V1::AML::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", "FinancialServices", "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.list_instances.timeout = 10.0 + + default_config.rpcs.get_instance.timeout = 10.0 + + default_config.rpcs.create_instance.timeout = 120.0 + + default_config.rpcs.update_instance.timeout = 120.0 + + default_config.rpcs.delete_instance.timeout = 120.0 + + default_config.rpcs.import_registered_parties.timeout = 120.0 + + default_config.rpcs.export_registered_parties.timeout = 120.0 + + default_config.rpcs.list_datasets.timeout = 10.0 + + default_config.rpcs.get_dataset.timeout = 10.0 + + default_config.rpcs.create_dataset.timeout = 120.0 + + default_config.rpcs.update_dataset.timeout = 120.0 + + default_config.rpcs.delete_dataset.timeout = 120.0 + + default_config.rpcs.list_models.timeout = 10.0 + + default_config.rpcs.get_model.timeout = 10.0 + + default_config.rpcs.create_model.timeout = 120.0 + + default_config.rpcs.update_model.timeout = 120.0 + + default_config.rpcs.export_model_metadata.timeout = 120.0 + + default_config.rpcs.delete_model.timeout = 120.0 + + default_config.rpcs.list_engine_configs.timeout = 10.0 + + default_config.rpcs.get_engine_config.timeout = 10.0 + + default_config.rpcs.update_engine_config.timeout = 120.0 + + default_config.rpcs.export_engine_config_metadata.timeout = 120.0 + + default_config.rpcs.delete_engine_config.timeout = 120.0 + + default_config.rpcs.get_engine_version.timeout = 10.0 + + default_config.rpcs.list_engine_versions.timeout = 10.0 + + default_config.rpcs.list_prediction_results.timeout = 10.0 + + default_config.rpcs.get_prediction_result.timeout = 10.0 + + default_config.rpcs.create_prediction_result.timeout = 120.0 + + default_config.rpcs.update_prediction_result.timeout = 120.0 + + default_config.rpcs.export_prediction_result_metadata.timeout = 120.0 + + default_config.rpcs.delete_prediction_result.timeout = 120.0 + + default_config.rpcs.list_backtest_results.timeout = 10.0 + + default_config.rpcs.get_backtest_result.timeout = 10.0 + + default_config.rpcs.create_backtest_result.timeout = 120.0 + + default_config.rpcs.update_backtest_result.timeout = 120.0 + + default_config.rpcs.export_backtest_result_metadata.timeout = 120.0 + + default_config.rpcs.delete_backtest_result.timeout = 120.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the AML 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::FinancialServices::V1::AML::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 + @aml_stub.universe_domain + end + + ## + # Create a new AML REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the AML 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::FinancialServices::V1::AML::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 + + @aml_stub = ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @aml_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 = @aml_stub.endpoint + config.universe_domain = @aml_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @aml_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::FinancialServices::V1::AML::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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @aml_stub.logger + end + + # Service calls + + ## + # Lists instances. + # + # @overload list_instances(request, options = nil) + # Pass arguments to `list_instances` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListInstancesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListInstancesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_instances` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the Instance is the location for that Instance. + # Every location has exactly one instance. + # @param page_size [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @param page_token [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListInstancesResponse. It should be copied here to retrieve the + # next page of resources. This will be empty for the first instance of + # ListInstancesRequest. + # @param filter [::String] + # Specify a filter to narrow search results. + # @param order_by [::String] + # Specify a field to use for ordering. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListInstancesRequest.new + # + # # Call the list_instances method. + # result = client.list_instances request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::FinancialServices::V1::Instance. + # p item + # end + # + def list_instances request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListInstancesRequest + + # Converts hash and nil to an 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_instances.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_instances.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_instances.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.list_instances request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_instances, "instances", 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 instance. + # + # @overload get_instance(request, options = nil) + # Pass arguments to `get_instance` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_instance(name: nil) + # Pass arguments to `get_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Instance. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::Instance] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetInstanceRequest.new + # + # # Call the get_instance method. + # result = client.get_instance request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::Instance. + # p result + # + def get_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetInstanceRequest + + # Converts hash and nil to an 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.get_instance 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 instance. + # + # @overload create_instance(request, options = nil) + # Pass arguments to `create_instance` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::CreateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::CreateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) + # Pass arguments to `create_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the Instance is the location for that Instance. + # Every location has exactly one instance. + # @param instance_id [::String] + # Required. The resource id of the instance. + # @param instance [::Google::Cloud::FinancialServices::V1::Instance, ::Hash] + # Required. The instance that will be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new + # + # # Call the create_instance method. + # result = client.create_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest + + # Converts hash and nil to an 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.create_instance 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 the parameters of a single Instance. + # + # @overload update_instance(request, options = nil) + # Pass arguments to `update_instance` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_instance(update_mask: nil, instance: nil, request_id: nil) + # Pass arguments to `update_instance` via keyword arguments. Note that at + # least one keyword argument is 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] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Instance resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param instance [::Google::Cloud::FinancialServices::V1::Instance, ::Hash] + # Required. The new value of the instance fields that will be updated + # according to the update_mask + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new + # + # # Call the update_instance method. + # result = client.update_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest + + # Converts hash and nil to an 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.update_instance 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 instance. + # + # @overload delete_instance(request, options = nil) + # Pass arguments to `delete_instance` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_instance(name: nil, request_id: nil) + # Pass arguments to `delete_instance` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Instance. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new + # + # # Call the delete_instance method. + # result = client.delete_instance request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_instance request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest + + # Converts hash and nil to an 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_instance.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_instance.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.delete_instance 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 + + ## + # Imports the list of registered parties. See + # [Create and manage + # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#import-registered-parties) + # for information on the input schema and response for this method. + # + # @overload import_registered_parties(request, options = nil) + # Pass arguments to `import_registered_parties` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_registered_parties(name: nil, party_tables: nil, mode: nil, validate_only: nil, line_of_business: nil) + # Pass arguments to `import_registered_parties` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The full path to the Instance resource in this API. + # format: `projects/{project}/locations/{location}/instances/{instance}` + # @param party_tables [::Array<::String>] + # Optional. List of BigQuery tables. Union of tables will be taken if there + # is more than one table. VPC-SC restrictions apply. format: + # `bq://{project}.{bqDatasetID}.{bqTableID}` Use of `datasets` is preferred + # over the latter due to its simplicity and the reduced risk of errors + # `party_tables` and `datasets` must not be provided at the + # same time + # @param mode [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest::UpdateMode] + # Required. Mode of the request. + # @param validate_only [::Boolean] + # Optional. If the request will not register the parties, just determine what + # would happen. + # @param line_of_business [::Google::Cloud::FinancialServices::V1::LineOfBusiness] + # Required. LineOfBusiness for the specified registered parties. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new + # + # # Call the import_registered_parties method. + # result = client.import_registered_parties request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_registered_parties request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_registered_parties.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.import_registered_parties.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_registered_parties.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.import_registered_parties 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 + + ## + # Exports the list of registered parties. See + # [Create and manage + # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#export-registered-parties) + # for information on the output schema for this method. + # + # @overload export_registered_parties(request, options = nil) + # Pass arguments to `export_registered_parties` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_registered_parties(name: nil, dataset: nil, line_of_business: nil) + # Pass arguments to `export_registered_parties` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The full path to the Instance resource in this API. + # format: `projects/{project}/locations/{location}/instances/{instance}` + # @param dataset [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] + # Required. The location to output the RegisteredParties. + # @param line_of_business [::Google::Cloud::FinancialServices::V1::LineOfBusiness] + # Required. LineOfBusiness to get RegisteredParties from. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new + # + # # Call the export_registered_parties method. + # result = client.export_registered_parties request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_registered_parties request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_registered_parties.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_registered_parties.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_registered_parties.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.export_registered_parties 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 datasets. + # + # @overload list_datasets(request, options = nil) + # Pass arguments to `list_datasets` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListDatasetsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListDatasetsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_datasets` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the Dataset is the Instance. + # @param page_size [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @param page_token [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListDatasetResponse. It should be copied here to retrieve the + # next page of resources. Empty will give the first page of + # ListDatasetRequest, and the last page will return an empty page_token. + # @param filter [::String] + # Specify a filter to narrow search results. + # @param order_by [::String] + # Specify a field to use for ordering. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListDatasetsRequest.new + # + # # Call the list_datasets method. + # result = client.list_datasets request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::FinancialServices::V1::Dataset. + # p item + # end + # + def list_datasets request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest + + # Converts hash and nil to an 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_datasets.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_datasets.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_datasets.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.list_datasets request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_datasets, "datasets", 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 a dataset. + # + # @overload get_dataset(request, options = nil) + # Pass arguments to `get_dataset` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_dataset(name: nil) + # Pass arguments to `get_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Dataset + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::Dataset] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetDatasetRequest.new + # + # # Call the get_dataset method. + # result = client.get_dataset request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::Dataset. + # p result + # + def get_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetDatasetRequest + + # Converts hash and nil to an 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.get_dataset 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 dataset. + # + # @overload create_dataset(request, options = nil) + # Pass arguments to `create_dataset` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::CreateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::CreateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dataset(parent: nil, dataset_id: nil, dataset: nil, request_id: nil) + # Pass arguments to `create_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the Dataset is the Instance. + # @param dataset_id [::String] + # Required. The resource id of the dataset + # @param dataset [::Google::Cloud::FinancialServices::V1::Dataset, ::Hash] + # Required. The dataset that will be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new + # + # # Call the create_dataset method. + # result = client.create_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest + + # Converts hash and nil to an 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.create_dataset 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 the parameters of a single Dataset. + # + # @overload update_dataset(request, options = nil) + # Pass arguments to `update_dataset` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_dataset(update_mask: nil, dataset: nil, request_id: nil) + # Pass arguments to `update_dataset` via keyword arguments. Note that at + # least one keyword argument is 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] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Dataset resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param dataset [::Google::Cloud::FinancialServices::V1::Dataset, ::Hash] + # Required. The new value of the dataset fields that will be updated + # according to the update_mask. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new + # + # # Call the update_dataset method. + # result = client.update_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest + + # Converts hash and nil to an 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.update_dataset 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 dataset. + # + # @overload delete_dataset(request, options = nil) + # Pass arguments to `delete_dataset` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_dataset(name: nil, request_id: nil) + # Pass arguments to `delete_dataset` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Dataset. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new + # + # # Call the delete_dataset method. + # result = client.delete_dataset request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_dataset request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest + + # Converts hash and nil to an 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_dataset.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_dataset.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.delete_dataset 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 models. + # + # @overload list_models(request, options = nil) + # Pass arguments to `list_models` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListModelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListModelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_models(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_models` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the Model is the Instance. + # @param page_size [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @param page_token [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListModelsResponse. It should be copied here to retrieve the next + # page of resources. Empty will give the first page of ListModelsRequest, and + # the last page will return an empty page_token. + # @param filter [::String] + # Specify a filter to narrow search results. + # @param order_by [::String] + # Specify a field to use for ordering. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListModelsRequest.new + # + # # Call the list_models method. + # result = client.list_models request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::FinancialServices::V1::Model. + # p item + # end + # + def list_models request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListModelsRequest + + # Converts hash and nil to an 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_models.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_models.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_models.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.list_models request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_models, "models", 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 a model. + # + # @overload get_model(request, options = nil) + # Pass arguments to `get_model` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_model(name: nil) + # Pass arguments to `get_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Model + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::Model] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetModelRequest.new + # + # # Call the get_model method. + # result = client.get_model request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::Model. + # p result + # + def get_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetModelRequest + + # Converts hash and nil to an 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.get_model 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 model. + # + # @overload create_model(request, options = nil) + # Pass arguments to `create_model` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::CreateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::CreateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_model(parent: nil, model_id: nil, model: nil, request_id: nil) + # Pass arguments to `create_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the Model is the Instance. + # @param model_id [::String] + # Required. The resource id of the Model + # @param model [::Google::Cloud::FinancialServices::V1::Model, ::Hash] + # Required. The Model that will be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::CreateModelRequest.new + # + # # Call the create_model method. + # result = client.create_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateModelRequest + + # Converts hash and nil to an 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.create_model 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 the parameters of a single Model. + # + # @overload update_model(request, options = nil) + # Pass arguments to `update_model` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::UpdateModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::UpdateModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_model(update_mask: nil, model: nil, request_id: nil) + # Pass arguments to `update_model` via keyword arguments. Note that at + # least one keyword argument is 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] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Model resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param model [::Google::Cloud::FinancialServices::V1::Model, ::Hash] + # Required. The new value of the Model fields that will be updated according + # to the update_mask. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::UpdateModelRequest.new + # + # # Call the update_model method. + # result = client.update_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateModelRequest + + # Converts hash and nil to an 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.update_model 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 + + ## + # Export governance information for a Model resource. For + # information on the exported fields, see + # [AML output data + # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#model). + # + # @overload export_model_metadata(request, options = nil) + # Pass arguments to `export_model_metadata` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_model_metadata(model: nil, structured_metadata_destination: nil) + # Pass arguments to `export_model_metadata` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param model [::String] + # Required. The resource name of the Model. + # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] + # Required. BigQuery output where the metadata will be written. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new + # + # # Call the export_model_metadata method. + # result = client.export_model_metadata request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_model_metadata request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_model_metadata.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_model_metadata.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_model_metadata.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.export_model_metadata 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 model. + # + # @overload delete_model(request, options = nil) + # Pass arguments to `delete_model` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::DeleteModelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::DeleteModelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_model(name: nil, request_id: nil) + # Pass arguments to `delete_model` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Model. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::DeleteModelRequest.new + # + # # Call the delete_model method. + # result = client.delete_model request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_model request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteModelRequest + + # Converts hash and nil to an 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_model.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_model.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_model.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.delete_model 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 engine configs. + # + # @overload list_engine_configs(request, options = nil) + # Pass arguments to `list_engine_configs` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_engine_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_engine_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 parent of the EngineConfig is the Instance. + # @param page_size [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @param page_token [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListEngineConfigsResponse. It should be copied here to retrieve + # the next page of resources. Empty will give the first page of + # ListEngineConfigsRequest, and the last page will return an empty + # page_token. + # @param filter [::String] + # Specify a filter to narrow search results. + # @param order_by [::String] + # Specify a field to use for ordering. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.new + # + # # Call the list_engine_configs method. + # result = client.list_engine_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::FinancialServices::V1::EngineConfig. + # p item + # end + # + def list_engine_configs request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest + + # Converts hash and nil to an 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_engine_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::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_engine_configs.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_engine_configs.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.list_engine_configs request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_engine_configs, "engine_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 + + ## + # Gets an engine config. + # + # @overload get_engine_config(request, options = nil) + # Pass arguments to `get_engine_config` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_engine_config(name: nil) + # Pass arguments to `get_engine_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 resource name of the EngineConfig + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::EngineConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::EngineConfig] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new + # + # # Call the get_engine_config method. + # result = client.get_engine_config request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::EngineConfig. + # p result + # + def get_engine_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest + + # Converts hash and nil to an 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_engine_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::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_engine_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_engine_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.get_engine_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 + + ## + # Creates an engine config. + # + # @overload create_engine_config(request, options = nil) + # Pass arguments to `create_engine_config` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_engine_config(parent: nil, engine_config_id: nil, engine_config: nil, request_id: nil) + # Pass arguments to `create_engine_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 parent of the EngineConfig is the Instance. + # @param engine_config_id [::String] + # Required. The resource id of the EngineConfig + # @param engine_config [::Google::Cloud::FinancialServices::V1::EngineConfig, ::Hash] + # Required. The EngineConfig that will be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new + # + # # Call the create_engine_config method. + # result = client.create_engine_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_engine_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest + + # Converts hash and nil to an 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_engine_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::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_engine_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_engine_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.create_engine_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 + + ## + # Updates the parameters of a single EngineConfig. + # + # @overload update_engine_config(request, options = nil) + # Pass arguments to `update_engine_config` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_engine_config(update_mask: nil, engine_config: nil, request_id: nil) + # Pass arguments to `update_engine_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. Field mask is used to specify the fields to be overwritten in the + # EngineConfig resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param engine_config [::Google::Cloud::FinancialServices::V1::EngineConfig, ::Hash] + # Required. The new value of the EngineConfig fields that will be updated + # according to the update_mask. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new + # + # # Call the update_engine_config method. + # result = client.update_engine_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_engine_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest + + # Converts hash and nil to an 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_engine_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::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_engine_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_engine_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.update_engine_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 + + ## + # Export governance information for an EngineConfig resource. For + # information on the exported fields, see + # [AML output data + # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#engine-config). + # + # @overload export_engine_config_metadata(request, options = nil) + # Pass arguments to `export_engine_config_metadata` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_engine_config_metadata(engine_config: nil, structured_metadata_destination: nil) + # Pass arguments to `export_engine_config_metadata` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param engine_config [::String] + # Required. The resource name of the EngineConfig. + # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] + # Required. BigQuery output where the metadata will be written. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new + # + # # Call the export_engine_config_metadata method. + # result = client.export_engine_config_metadata request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_engine_config_metadata request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_engine_config_metadata.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_engine_config_metadata.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_engine_config_metadata.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.export_engine_config_metadata 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 engine config. + # + # @overload delete_engine_config(request, options = nil) + # Pass arguments to `delete_engine_config` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_engine_config(name: nil, request_id: nil) + # Pass arguments to `delete_engine_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 resource name of the EngineConfig. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new + # + # # Call the delete_engine_config method. + # result = client.delete_engine_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_engine_config request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest + + # Converts hash and nil to an 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_engine_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::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_engine_config.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_engine_config.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.delete_engine_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 + + ## + # Gets a single EngineVersion. + # + # @overload get_engine_version(request, options = nil) + # Pass arguments to `get_engine_version` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_engine_version(name: nil) + # Pass arguments to `get_engine_version` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the EngineVersion + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::EngineVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::EngineVersion] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new + # + # # Call the get_engine_version method. + # result = client.get_engine_version request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::EngineVersion. + # p result + # + def get_engine_version request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest + + # Converts hash and nil to an 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_engine_version.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_engine_version.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_engine_version.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.get_engine_version 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 EngineVersions for given location. + # + # @overload list_engine_versions(request, options = nil) + # Pass arguments to `list_engine_versions` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_engine_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_engine_versions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the EngineVersion is the Instance. + # @param page_size [::Integer] + # Optional. The number of resources to be included in the response. The + # response contains a next_page_token, which can be used to retrieve the next + # page of resources. + # @param page_token [::String] + # Optional. In case of paginated results, this is the token that was returned + # in the previous ListEngineVersionsResponse. It should be copied here to + # retrieve the next page of resources. Empty will give the first page of + # ListEngineVersionsRequest, and the last page will return an empty + # page_token. + # @param filter [::String] + # Optional. Specify a filter to narrow search results. + # If empty or unset will default to "state!=DEPRECATED", + # to view deprecated versions use "state:*" or any other filter. + # @param order_by [::String] + # Optional. Specify a field to use for ordering. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.new + # + # # Call the list_engine_versions method. + # result = client.list_engine_versions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::FinancialServices::V1::EngineVersion. + # p item + # end + # + def list_engine_versions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest + + # Converts hash and nil to an 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_engine_versions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_engine_versions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_engine_versions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.list_engine_versions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_engine_versions, "engine_versions", 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 + + ## + # List PredictionResults. + # + # @overload list_prediction_results(request, options = nil) + # Pass arguments to `list_prediction_results` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_prediction_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_prediction_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the PredictionResult is the Instance. + # @param page_size [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @param page_token [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListPredictionResultsResponse. It should be copied here to + # retrieve the next page of resources. Empty will give the first page of + # ListPredictionResultsRequest, and the last page will return an empty + # page_token. + # @param filter [::String] + # Specify a filter to narrow search results. + # @param order_by [::String] + # Specify a field to use for ordering. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.new + # + # # Call the list_prediction_results method. + # result = client.list_prediction_results request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::FinancialServices::V1::PredictionResult. + # p item + # end + # + def list_prediction_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest + + # Converts hash and nil to an 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_prediction_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_prediction_results.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_prediction_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.list_prediction_results request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_prediction_results, "prediction_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 + + ## + # Gets a PredictionResult. + # + # @overload get_prediction_result(request, options = nil) + # Pass arguments to `get_prediction_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_prediction_result(name: nil) + # Pass arguments to `get_prediction_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the PredictionResult + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::PredictionResult] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::PredictionResult] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new + # + # # Call the get_prediction_result method. + # result = client.get_prediction_result request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::PredictionResult. + # p result + # + def get_prediction_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest + + # Converts hash and nil to an 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_prediction_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_prediction_result.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_prediction_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.get_prediction_result 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 PredictionResult. + # + # @overload create_prediction_result(request, options = nil) + # Pass arguments to `create_prediction_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_prediction_result(parent: nil, prediction_result_id: nil, prediction_result: nil, request_id: nil) + # Pass arguments to `create_prediction_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the PredictionResult is the Instance. + # @param prediction_result_id [::String] + # Required. The resource id of the PredictionResult + # @param prediction_result [::Google::Cloud::FinancialServices::V1::PredictionResult, ::Hash] + # Required. The PredictionResult that will be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new + # + # # Call the create_prediction_result method. + # result = client.create_prediction_result request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_prediction_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest + + # Converts hash and nil to an 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_prediction_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_prediction_result.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_prediction_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.create_prediction_result 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 the parameters of a single PredictionResult. + # + # @overload update_prediction_result(request, options = nil) + # Pass arguments to `update_prediction_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_prediction_result(update_mask: nil, prediction_result: nil, request_id: nil) + # Pass arguments to `update_prediction_result` via keyword arguments. Note that at + # least one keyword argument is 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] + # Optional. Field mask is used to specify the fields to be overwritten in the + # PredictionResult resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param prediction_result [::Google::Cloud::FinancialServices::V1::PredictionResult, ::Hash] + # Required. The new value of the PredictionResult fields that will be updated + # according to the update_mask. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new + # + # # Call the update_prediction_result method. + # result = client.update_prediction_result request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_prediction_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest + + # Converts hash and nil to an 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_prediction_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_prediction_result.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_prediction_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.update_prediction_result 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 + + ## + # Export governance information for a PredictionResult resource. For + # information on the exported fields, see + # [AML output data + # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#prediction-results). + # + # @overload export_prediction_result_metadata(request, options = nil) + # Pass arguments to `export_prediction_result_metadata` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_prediction_result_metadata(prediction_result: nil, structured_metadata_destination: nil) + # Pass arguments to `export_prediction_result_metadata` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param prediction_result [::String] + # Required. The resource name of the PredictionResult. + # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] + # Required. BigQuery output where the metadata will be written. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new + # + # # Call the export_prediction_result_metadata method. + # result = client.export_prediction_result_metadata request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_prediction_result_metadata request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_prediction_result_metadata.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_prediction_result_metadata.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_prediction_result_metadata.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.export_prediction_result_metadata 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 PredictionResult. + # + # @overload delete_prediction_result(request, options = nil) + # Pass arguments to `delete_prediction_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_prediction_result(name: nil, request_id: nil) + # Pass arguments to `delete_prediction_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the PredictionResult. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new + # + # # Call the delete_prediction_result method. + # result = client.delete_prediction_result request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_prediction_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest + + # Converts hash and nil to an 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_prediction_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_prediction_result.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_prediction_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.delete_prediction_result 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 BacktestResults. + # + # @overload list_backtest_results(request, options = nil) + # Pass arguments to `list_backtest_results` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backtest_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backtest_results` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the BacktestResult is the Instance. + # @param page_size [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @param page_token [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListBacktestResultsResponse. It should be copied here to + # retrieve the next page of resources. Empty will give the first page of + # ListBacktestResultsRequest, and the last page will return an empty + # page_token. + # @param filter [::String] + # Specify a filter to narrow search results. + # @param order_by [::String] + # Specify a field to use for ordering. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.new + # + # # Call the list_backtest_results method. + # result = client.list_backtest_results request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::FinancialServices::V1::BacktestResult. + # p item + # end + # + def list_backtest_results request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest + + # Converts hash and nil to an 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_backtest_results.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backtest_results.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backtest_results.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.list_backtest_results request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_backtest_results, "backtest_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 + + ## + # Gets a BacktestResult. + # + # @overload get_backtest_result(request, options = nil) + # Pass arguments to `get_backtest_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backtest_result(name: nil) + # Pass arguments to `get_backtest_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the BacktestResult + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::BacktestResult] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::BacktestResult] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new + # + # # Call the get_backtest_result method. + # result = client.get_backtest_result request + # + # # The returned object is of type Google::Cloud::FinancialServices::V1::BacktestResult. + # p result + # + def get_backtest_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest + + # Converts hash and nil to an 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_backtest_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backtest_result.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backtest_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.get_backtest_result 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 BacktestResult. + # + # @overload create_backtest_result(request, options = nil) + # Pass arguments to `create_backtest_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backtest_result(parent: nil, backtest_result_id: nil, backtest_result: nil, request_id: nil) + # Pass arguments to `create_backtest_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 of the BacktestResult is the Instance. + # @param backtest_result_id [::String] + # Required. The resource id of the BacktestResult + # @param backtest_result [::Google::Cloud::FinancialServices::V1::BacktestResult, ::Hash] + # Required. The BacktestResult that will be created. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new + # + # # Call the create_backtest_result method. + # result = client.create_backtest_result request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backtest_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest + + # Converts hash and nil to an 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_backtest_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backtest_result.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backtest_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.create_backtest_result 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 the parameters of a single BacktestResult. + # + # @overload update_backtest_result(request, options = nil) + # Pass arguments to `update_backtest_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backtest_result(update_mask: nil, backtest_result: nil, request_id: nil) + # Pass arguments to `update_backtest_result` via keyword arguments. Note that at + # least one keyword argument is 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] + # Optional. Field mask is used to specify the fields to be overwritten in the + # BacktestResult resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @param backtest_result [::Google::Cloud::FinancialServices::V1::BacktestResult, ::Hash] + # Required. The new value of the BacktestResult fields that will be updated + # according to the update_mask. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new + # + # # Call the update_backtest_result method. + # result = client.update_backtest_result request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backtest_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest + + # Converts hash and nil to an 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_backtest_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backtest_result.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backtest_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.update_backtest_result 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 + + ## + # Export governance information for a BacktestResult resource. For + # information on the exported fields, see + # [AML output data + # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#backtest-results). + # + # @overload export_backtest_result_metadata(request, options = nil) + # Pass arguments to `export_backtest_result_metadata` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_backtest_result_metadata(backtest_result: nil, structured_metadata_destination: nil) + # Pass arguments to `export_backtest_result_metadata` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backtest_result [::String] + # Required. The resource name of the BacktestResult. + # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] + # Required. BigQuery output where the metadata will be written. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new + # + # # Call the export_backtest_result_metadata method. + # result = client.export_backtest_result_metadata request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_backtest_result_metadata request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_backtest_result_metadata.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_backtest_result_metadata.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_backtest_result_metadata.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.export_backtest_result_metadata 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 BacktestResult. + # + # @overload delete_backtest_result(request, options = nil) + # Pass arguments to `delete_backtest_result` via a request object, either of type + # {::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backtest_result(name: nil, request_id: nil) + # Pass arguments to `delete_backtest_result` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the BacktestResult. + # @param request_id [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/financial_services/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new + # + # # Call the delete_backtest_result method. + # result = client.delete_backtest_result request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backtest_result request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest + + # Converts hash and nil to an 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_backtest_result.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backtest_result.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backtest_result.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @aml_stub.delete_backtest_result 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 AML REST API. + # + # This class represents the configuration for AML 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::FinancialServices::V1::AML::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_instances to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_instances.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 = "financialservices.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 AML 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_instances` + # @return [::Gapic::Config::Method] + # + attr_reader :list_instances + ## + # RPC-specific configuration for `get_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :get_instance + ## + # RPC-specific configuration for `create_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :create_instance + ## + # RPC-specific configuration for `update_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :update_instance + ## + # RPC-specific configuration for `delete_instance` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_instance + ## + # RPC-specific configuration for `import_registered_parties` + # @return [::Gapic::Config::Method] + # + attr_reader :import_registered_parties + ## + # RPC-specific configuration for `export_registered_parties` + # @return [::Gapic::Config::Method] + # + attr_reader :export_registered_parties + ## + # RPC-specific configuration for `list_datasets` + # @return [::Gapic::Config::Method] + # + attr_reader :list_datasets + ## + # RPC-specific configuration for `get_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :get_dataset + ## + # RPC-specific configuration for `create_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :create_dataset + ## + # RPC-specific configuration for `update_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :update_dataset + ## + # RPC-specific configuration for `delete_dataset` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_dataset + ## + # RPC-specific configuration for `list_models` + # @return [::Gapic::Config::Method] + # + attr_reader :list_models + ## + # RPC-specific configuration for `get_model` + # @return [::Gapic::Config::Method] + # + attr_reader :get_model + ## + # RPC-specific configuration for `create_model` + # @return [::Gapic::Config::Method] + # + attr_reader :create_model + ## + # RPC-specific configuration for `update_model` + # @return [::Gapic::Config::Method] + # + attr_reader :update_model + ## + # RPC-specific configuration for `export_model_metadata` + # @return [::Gapic::Config::Method] + # + attr_reader :export_model_metadata + ## + # RPC-specific configuration for `delete_model` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_model + ## + # RPC-specific configuration for `list_engine_configs` + # @return [::Gapic::Config::Method] + # + attr_reader :list_engine_configs + ## + # RPC-specific configuration for `get_engine_config` + # @return [::Gapic::Config::Method] + # + attr_reader :get_engine_config + ## + # RPC-specific configuration for `create_engine_config` + # @return [::Gapic::Config::Method] + # + attr_reader :create_engine_config + ## + # RPC-specific configuration for `update_engine_config` + # @return [::Gapic::Config::Method] + # + attr_reader :update_engine_config + ## + # RPC-specific configuration for `export_engine_config_metadata` + # @return [::Gapic::Config::Method] + # + attr_reader :export_engine_config_metadata + ## + # RPC-specific configuration for `delete_engine_config` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_engine_config + ## + # RPC-specific configuration for `get_engine_version` + # @return [::Gapic::Config::Method] + # + attr_reader :get_engine_version + ## + # RPC-specific configuration for `list_engine_versions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_engine_versions + ## + # RPC-specific configuration for `list_prediction_results` + # @return [::Gapic::Config::Method] + # + attr_reader :list_prediction_results + ## + # RPC-specific configuration for `get_prediction_result` + # @return [::Gapic::Config::Method] + # + attr_reader :get_prediction_result + ## + # RPC-specific configuration for `create_prediction_result` + # @return [::Gapic::Config::Method] + # + attr_reader :create_prediction_result + ## + # RPC-specific configuration for `update_prediction_result` + # @return [::Gapic::Config::Method] + # + attr_reader :update_prediction_result + ## + # RPC-specific configuration for `export_prediction_result_metadata` + # @return [::Gapic::Config::Method] + # + attr_reader :export_prediction_result_metadata + ## + # RPC-specific configuration for `delete_prediction_result` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_prediction_result + ## + # RPC-specific configuration for `list_backtest_results` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backtest_results + ## + # RPC-specific configuration for `get_backtest_result` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backtest_result + ## + # RPC-specific configuration for `create_backtest_result` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backtest_result + ## + # RPC-specific configuration for `update_backtest_result` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backtest_result + ## + # RPC-specific configuration for `export_backtest_result_metadata` + # @return [::Gapic::Config::Method] + # + attr_reader :export_backtest_result_metadata + ## + # RPC-specific configuration for `delete_backtest_result` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backtest_result + + # @private + def initialize parent_rpcs = nil + list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances + @list_instances = ::Gapic::Config::Method.new list_instances_config + get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance + @get_instance = ::Gapic::Config::Method.new get_instance_config + create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance + @create_instance = ::Gapic::Config::Method.new create_instance_config + update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance + @update_instance = ::Gapic::Config::Method.new update_instance_config + delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance + @delete_instance = ::Gapic::Config::Method.new delete_instance_config + import_registered_parties_config = parent_rpcs.import_registered_parties if parent_rpcs.respond_to? :import_registered_parties + @import_registered_parties = ::Gapic::Config::Method.new import_registered_parties_config + export_registered_parties_config = parent_rpcs.export_registered_parties if parent_rpcs.respond_to? :export_registered_parties + @export_registered_parties = ::Gapic::Config::Method.new export_registered_parties_config + list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets + @list_datasets = ::Gapic::Config::Method.new list_datasets_config + get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset + @get_dataset = ::Gapic::Config::Method.new get_dataset_config + create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset + @create_dataset = ::Gapic::Config::Method.new create_dataset_config + update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset + @update_dataset = ::Gapic::Config::Method.new update_dataset_config + delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset + @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config + list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models + @list_models = ::Gapic::Config::Method.new list_models_config + get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model + @get_model = ::Gapic::Config::Method.new get_model_config + create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model + @create_model = ::Gapic::Config::Method.new create_model_config + update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model + @update_model = ::Gapic::Config::Method.new update_model_config + export_model_metadata_config = parent_rpcs.export_model_metadata if parent_rpcs.respond_to? :export_model_metadata + @export_model_metadata = ::Gapic::Config::Method.new export_model_metadata_config + delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model + @delete_model = ::Gapic::Config::Method.new delete_model_config + list_engine_configs_config = parent_rpcs.list_engine_configs if parent_rpcs.respond_to? :list_engine_configs + @list_engine_configs = ::Gapic::Config::Method.new list_engine_configs_config + get_engine_config_config = parent_rpcs.get_engine_config if parent_rpcs.respond_to? :get_engine_config + @get_engine_config = ::Gapic::Config::Method.new get_engine_config_config + create_engine_config_config = parent_rpcs.create_engine_config if parent_rpcs.respond_to? :create_engine_config + @create_engine_config = ::Gapic::Config::Method.new create_engine_config_config + update_engine_config_config = parent_rpcs.update_engine_config if parent_rpcs.respond_to? :update_engine_config + @update_engine_config = ::Gapic::Config::Method.new update_engine_config_config + export_engine_config_metadata_config = parent_rpcs.export_engine_config_metadata if parent_rpcs.respond_to? :export_engine_config_metadata + @export_engine_config_metadata = ::Gapic::Config::Method.new export_engine_config_metadata_config + delete_engine_config_config = parent_rpcs.delete_engine_config if parent_rpcs.respond_to? :delete_engine_config + @delete_engine_config = ::Gapic::Config::Method.new delete_engine_config_config + get_engine_version_config = parent_rpcs.get_engine_version if parent_rpcs.respond_to? :get_engine_version + @get_engine_version = ::Gapic::Config::Method.new get_engine_version_config + list_engine_versions_config = parent_rpcs.list_engine_versions if parent_rpcs.respond_to? :list_engine_versions + @list_engine_versions = ::Gapic::Config::Method.new list_engine_versions_config + list_prediction_results_config = parent_rpcs.list_prediction_results if parent_rpcs.respond_to? :list_prediction_results + @list_prediction_results = ::Gapic::Config::Method.new list_prediction_results_config + get_prediction_result_config = parent_rpcs.get_prediction_result if parent_rpcs.respond_to? :get_prediction_result + @get_prediction_result = ::Gapic::Config::Method.new get_prediction_result_config + create_prediction_result_config = parent_rpcs.create_prediction_result if parent_rpcs.respond_to? :create_prediction_result + @create_prediction_result = ::Gapic::Config::Method.new create_prediction_result_config + update_prediction_result_config = parent_rpcs.update_prediction_result if parent_rpcs.respond_to? :update_prediction_result + @update_prediction_result = ::Gapic::Config::Method.new update_prediction_result_config + export_prediction_result_metadata_config = parent_rpcs.export_prediction_result_metadata if parent_rpcs.respond_to? :export_prediction_result_metadata + @export_prediction_result_metadata = ::Gapic::Config::Method.new export_prediction_result_metadata_config + delete_prediction_result_config = parent_rpcs.delete_prediction_result if parent_rpcs.respond_to? :delete_prediction_result + @delete_prediction_result = ::Gapic::Config::Method.new delete_prediction_result_config + list_backtest_results_config = parent_rpcs.list_backtest_results if parent_rpcs.respond_to? :list_backtest_results + @list_backtest_results = ::Gapic::Config::Method.new list_backtest_results_config + get_backtest_result_config = parent_rpcs.get_backtest_result if parent_rpcs.respond_to? :get_backtest_result + @get_backtest_result = ::Gapic::Config::Method.new get_backtest_result_config + create_backtest_result_config = parent_rpcs.create_backtest_result if parent_rpcs.respond_to? :create_backtest_result + @create_backtest_result = ::Gapic::Config::Method.new create_backtest_result_config + update_backtest_result_config = parent_rpcs.update_backtest_result if parent_rpcs.respond_to? :update_backtest_result + @update_backtest_result = ::Gapic::Config::Method.new update_backtest_result_config + export_backtest_result_metadata_config = parent_rpcs.export_backtest_result_metadata if parent_rpcs.respond_to? :export_backtest_result_metadata + @export_backtest_result_metadata = ::Gapic::Config::Method.new export_backtest_result_metadata_config + delete_backtest_result_config = parent_rpcs.delete_backtest_result if parent_rpcs.respond_to? :delete_backtest_result + @delete_backtest_result = ::Gapic::Config::Method.new delete_backtest_result_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/operations.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/operations.rb new file mode 100644 index 000000000000..5e33de2276b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 FinancialServices + module V1 + module AML + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "financialservices.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the AML 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 AML 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::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::FinancialServices::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "financialservices.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] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/service_stub.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/service_stub.rb new file mode 100644 index 000000000000..e1e14d02b765 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/service_stub.rb @@ -0,0 +1,2417 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/financialservices/v1/service_pb" + +module Google + module Cloud + module FinancialServices + module V1 + module AML + module Rest + ## + # REST service stub for the AML 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 list_instances REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListInstancesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListInstancesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::ListInstancesResponse] + # A result object deserialized from the server's reply + def list_instances request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_instances", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::ListInstancesResponse.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_instance REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::Instance] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::Instance] + # A result object deserialized from the server's reply + def get_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_instance", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::Instance.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_instance REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_instance", + 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_instance REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_instance", + 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_instance REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_instance request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_instance", + 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 import_registered_parties REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_registered_parties request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_registered_parties_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_registered_parties", + 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 export_registered_parties REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_registered_parties request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_registered_parties_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_registered_parties", + 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_datasets REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListDatasetsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListDatasetsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::ListDatasetsResponse] + # A result object deserialized from the server's reply + def list_datasets request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_datasets_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_datasets", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::ListDatasetsResponse.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_dataset REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::Dataset] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::Dataset] + # A result object deserialized from the server's reply + def get_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dataset", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::Dataset.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_dataset REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dataset", + 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_dataset REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dataset", + 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_dataset REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_dataset request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_dataset_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_dataset", + 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_models REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListModelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListModelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::ListModelsResponse] + # A result object deserialized from the server's reply + def list_models request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_models_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_models", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::ListModelsResponse.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_model REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::Model] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::Model] + # A result object deserialized from the server's reply + def get_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_model", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::Model.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_model REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_model", + 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_model REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_model", + 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 export_model_metadata REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_model_metadata request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_model_metadata_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_model_metadata", + 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_model REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteModelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_model request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_model_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_model", + 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_engine_configs REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse] + # A result object deserialized from the server's reply + def list_engine_configs request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_engine_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_engine_configs", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse.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_engine_config REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::EngineConfig] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::EngineConfig] + # A result object deserialized from the server's reply + def get_engine_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_engine_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_engine_config", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::EngineConfig.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_engine_config REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_engine_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_engine_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_engine_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_engine_config REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_engine_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_engine_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_engine_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 export_engine_config_metadata REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_engine_config_metadata request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_engine_config_metadata_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_engine_config_metadata", + 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_engine_config REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_engine_config request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_engine_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_engine_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 get_engine_version REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::EngineVersion] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::EngineVersion] + # A result object deserialized from the server's reply + def get_engine_version request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_engine_version_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_engine_version", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::EngineVersion.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_engine_versions REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse] + # A result object deserialized from the server's reply + def list_engine_versions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_engine_versions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_engine_versions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse.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_prediction_results REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse] + # A result object deserialized from the server's reply + def list_prediction_results request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_prediction_results_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_prediction_results", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse.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_prediction_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::PredictionResult] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::PredictionResult] + # A result object deserialized from the server's reply + def get_prediction_result request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_prediction_result_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_prediction_result", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::PredictionResult.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_prediction_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_prediction_result request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_prediction_result_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_prediction_result", + 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_prediction_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_prediction_result request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_prediction_result_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_prediction_result", + 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 export_prediction_result_metadata REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_prediction_result_metadata request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_prediction_result_metadata_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_prediction_result_metadata", + 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_prediction_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_prediction_result request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_prediction_result_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_prediction_result", + 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_backtest_results REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse] + # A result object deserialized from the server's reply + def list_backtest_results request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backtest_results_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backtest_results", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse.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_backtest_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::FinancialServices::V1::BacktestResult] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::FinancialServices::V1::BacktestResult] + # A result object deserialized from the server's reply + def get_backtest_result request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backtest_result_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backtest_result", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::FinancialServices::V1::BacktestResult.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_backtest_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backtest_result request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backtest_result_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backtest_result", + 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_backtest_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backtest_result request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backtest_result_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backtest_result", + 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 export_backtest_result_metadata REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_backtest_result_metadata request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_backtest_result_metadata_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_backtest_result_metadata", + 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_backtest_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backtest_result request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backtest_result_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backtest_result", + 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 list_instances REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListInstancesRequest] + # 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_instances_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/instances", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_instance REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_instance REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/instances", + body: "instance", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_instance REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{instance.name}", + body: "instance", + matches: [ + ["instance.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_instance REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest] + # 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_instance_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_registered_parties REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_registered_parties_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:importRegisteredParties", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_registered_parties REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_registered_parties_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:exportRegisteredParties", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_datasets REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListDatasetsRequest] + # 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_datasets_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/datasets", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_dataset REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetDatasetRequest] + # 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_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_dataset REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateDatasetRequest] + # 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_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/datasets", + body: "dataset", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_dataset REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest] + # 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_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{dataset.name}", + body: "dataset", + matches: [ + ["dataset.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_dataset REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest] + # 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_dataset_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/datasets/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_models REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListModelsRequest] + # 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_models_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/models", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_model REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetModelRequest] + # 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_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_model REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateModelRequest] + # 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_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/models", + body: "model", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_model REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateModelRequest] + # 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_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{model.name}", + body: "model", + matches: [ + ["model.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_model_metadata REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_model_metadata_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{model}:exportMetadata", + body: "*", + matches: [ + ["model", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_model REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteModelRequest] + # 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_model_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/models/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_engine_configs REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest] + # 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_engine_configs_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/engineConfigs", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_engine_config REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest] + # 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_engine_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/engineConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_engine_config REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest] + # 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_engine_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/engineConfigs", + body: "engine_config", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_engine_config REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest] + # 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_engine_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{engine_config.name}", + body: "engine_config", + matches: [ + ["engine_config.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/engineConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_engine_config_metadata REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_engine_config_metadata_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{engine_config}:exportMetadata", + body: "*", + matches: [ + ["engine_config", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/engineConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_engine_config REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest] + # 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_engine_config_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/engineConfigs/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_engine_version REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest] + # 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_engine_version_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/engineVersions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_engine_versions REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest] + # 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_engine_versions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/engineVersions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_prediction_results REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest] + # 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_prediction_results_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/predictionResults", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_prediction_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest] + # 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_prediction_result_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/predictionResults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_prediction_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest] + # 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_prediction_result_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/predictionResults", + body: "prediction_result", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_prediction_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest] + # 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_prediction_result_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{prediction_result.name}", + body: "prediction_result", + matches: [ + ["prediction_result.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/predictionResults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_prediction_result_metadata REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_prediction_result_metadata_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{prediction_result}:exportMetadata", + body: "*", + matches: [ + ["prediction_result", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/predictionResults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_prediction_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest] + # 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_prediction_result_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/predictionResults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backtest_results REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest] + # 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_backtest_results_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backtestResults", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backtest_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest] + # 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_backtest_result_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/backtestResults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backtest_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest] + # 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_backtest_result_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backtestResults", + body: "backtest_result", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backtest_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest] + # 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_backtest_result_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backtest_result.name}", + body: "backtest_result", + matches: [ + ["backtest_result.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/backtestResults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_backtest_result_metadata REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_backtest_result_metadata_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{backtest_result}:exportMetadata", + body: "*", + matches: [ + ["backtest_result", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/backtestResults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backtest_result REST call + # + # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest] + # 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_backtest_result_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/backtestResults/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/bindings_override.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/bindings_override.rb new file mode 100644 index 000000000000..c052705e72c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/bindings_override.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! + +require "gapic/rest" + +module Google + module Cloud + module FinancialServices + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/financial_services/v1/rest" + # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "FinancialServices"] + 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 + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/rest.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/rest.rb new file mode 100644 index 000000000000..41874560658b --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/financial_services/v1/aml/rest" +require "google/cloud/financial_services/v1/bindings_override" +require "google/cloud/financial_services/v1/version" + +module Google + module Cloud + module FinancialServices + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/financial_services/v1/rest" + # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/version.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/version.rb new file mode 100644 index 000000000000..95392d8da6ce --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/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 FinancialServices + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/backtest_result_pb.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/backtest_result_pb.rb new file mode 100644 index 000000000000..ad5f6b05f7d5 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/backtest_result_pb.rb @@ -0,0 +1,62 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/financialservices/v1/backtest_result.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/financialservices/v1/bigquery_destination_pb' +require 'google/cloud/financialservices/v1/line_of_business_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n7google/cloud/financialservices/v1/backtest_result.proto\x12!google.cloud.financialservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(financialservices.googleapis.com/Dataset\"\xcd\x01\n\x14\x43reateDatasetRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)financialservices.googleapis.com/Instance\x12\x17\n\ndataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x07\x64\x61taset\x18\x03 \x01(\x0b\x32*.google.cloud.financialservices.v1.DatasetB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa7\x01\n\x14UpdateDatasetRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12@\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32*.google.cloud.financialservices.v1.DatasetB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"o\n\x14\x44\x65leteDatasetRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(financialservices.googleapis.com/Dataset\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\xfb\x01\n%com.google.cloud.financialservices.v1B\x0c\x44\x61tasetProtoP\x01ZScloud.google.com/go/financialservices/apiv1/financialservicespb;financialservicespb\xaa\x02!Google.Cloud.FinancialServices.V1\xca\x02!Google\\Cloud\\FinancialServices\\V1\xea\x02$Google::Cloud::FinancialServices::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.type.Interval", "google/type/interval.proto"], + ["google.type.TimeZone", "google/type/datetime.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module FinancialServices + module V1 + Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.Dataset").msgclass + Dataset::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.Dataset.State").enummodule + ListDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ListDatasetsRequest").msgclass + ListDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ListDatasetsResponse").msgclass + GetDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.GetDatasetRequest").msgclass + CreateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.CreateDatasetRequest").msgclass + UpdateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.UpdateDatasetRequest").msgclass + DeleteDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.DeleteDatasetRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/engine_config_pb.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/engine_config_pb.rb new file mode 100644 index 000000000000..bc32c25a895c --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/engine_config_pb.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/financialservices/v1/engine_config.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/financialservices/v1/bigquery_destination_pb' +require 'google/cloud/financialservices/v1/line_of_business_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n5google/cloud/financialservices/v1/engine_config.proto\x12!google.cloud.financialservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\n\tinstances\x18\x01 \x03(\x0b\x32+.google.cloud.financialservices.v1.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x12GetInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)financialservices.googleapis.com/Instance\"\xc9\x01\n\x15\x43reateInstanceRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\x08instance\x18\x03 \x01(\x0b\x32+.google.cloud.financialservices.v1.InstanceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n\x15UpdateInstanceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x42\n\x08instance\x18\x02 \x01(\x0b\x32+.google.cloud.financialservices.v1.InstanceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"q\n\x15\x44\x65leteInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)financialservices.googleapis.com/Instance\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8f\x03\n\x1eImportRegisteredPartiesRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)financialservices.googleapis.com/Instance\x12\x19\n\x0cparty_tables\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12_\n\x04mode\x18\x03 \x01(\x0e\x32L.google.cloud.financialservices.v1.ImportRegisteredPartiesRequest.UpdateModeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12P\n\x10line_of_business\x18\x05 \x01(\x0e\x32\x31.google.cloud.financialservices.v1.LineOfBusinessB\x03\xe0\x41\x02\"B\n\nUpdateMode\x12\x1b\n\x17UPDATE_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07REPLACE\x10\x01\x12\n\n\x06\x41PPEND\x10\x02\"\xe4\x01\n\x1fImportRegisteredPartiesResponse\x12\x15\n\rparties_added\x18\x01 \x01(\x03\x12\x17\n\x0fparties_removed\x18\x02 \x01(\x03\x12\x15\n\rparties_total\x18\x03 \x01(\x03\x12 \n\x18parties_failed_to_remove\x18\x04 \x01(\x03\x12\x18\n\x10parties_uptiered\x18\x05 \x01(\x03\x12\x1a\n\x12parties_downtiered\x18\x06 \x01(\x03\x12\"\n\x1aparties_failed_to_downtier\x18\x07 \x01(\x03\"\x81\x02\n\x1e\x45xportRegisteredPartiesRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)financialservices.googleapis.com/Instance\x12L\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32\x36.google.cloud.financialservices.v1.BigQueryDestinationB\x03\xe0\x41\x02\x12P\n\x10line_of_business\x18\x03 \x01(\x0e\x32\x31.google.cloud.financialservices.v1.LineOfBusinessB\x03\xe0\x41\x02\"!\n\x1f\x45xportRegisteredPartiesResponseB\xfc\x01\n%com.google.cloud.financialservices.v1B\rInstanceProtoP\x01ZScloud.google.com/go/financialservices/apiv1/financialservicespb;financialservicespb\xaa\x02!Google.Cloud.FinancialServices.V1\xca\x02!Google\\Cloud\\FinancialServices\\V1\xea\x02$Google::Cloud::FinancialServices::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.cloud.financialservices.v1.BigQueryDestination", "google/cloud/financialservices/v1/bigquery_destination.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module FinancialServices + module V1 + Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.Instance").msgclass + Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.Instance.State").enummodule + ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ListInstancesRequest").msgclass + ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ListInstancesResponse").msgclass + GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.GetInstanceRequest").msgclass + CreateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.CreateInstanceRequest").msgclass + UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.UpdateInstanceRequest").msgclass + DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.DeleteInstanceRequest").msgclass + ImportRegisteredPartiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ImportRegisteredPartiesRequest").msgclass + ImportRegisteredPartiesRequest::UpdateMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ImportRegisteredPartiesRequest.UpdateMode").enummodule + ImportRegisteredPartiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ImportRegisteredPartiesResponse").msgclass + ExportRegisteredPartiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ExportRegisteredPartiesRequest").msgclass + ExportRegisteredPartiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ExportRegisteredPartiesResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/line_of_business_pb.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/line_of_business_pb.rb new file mode 100644 index 000000000000..49d9ea8515c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/line_of_business_pb.rb @@ -0,0 +1,42 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/financialservices/v1/line_of_business.proto + +require 'google/protobuf' + + +descriptor_data = "\n8google/cloud/financialservices/v1/line_of_business.proto\x12!google.cloud.financialservices.v1*N\n\x0eLineOfBusiness\x12 \n\x1cLINE_OF_BUSINESS_UNSPECIFIED\x10\x00\x12\x0e\n\nCOMMERCIAL\x10\x01\x12\n\n\x06RETAIL\x10\x02\x42\x82\x02\n%com.google.cloud.financialservices.v1B\x13LineOfBusinessProtoP\x01ZScloud.google.com/go/financialservices/apiv1/financialservicespb;financialservicespb\xaa\x02!Google.Cloud.FinancialServices.V1\xca\x02!Google\\Cloud\\FinancialServices\\V1\xea\x02$Google::Cloud::FinancialServices::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module FinancialServices + module V1 + LineOfBusiness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.LineOfBusiness").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/model_pb.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/model_pb.rb new file mode 100644 index 000000000000..852de5b79e07 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/model_pb.rb @@ -0,0 +1,61 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/financialservices/v1/model.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/financialservices/v1/bigquery_destination_pb' +require 'google/cloud/financialservices/v1/line_of_business_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n-google/cloud/financialservices/v1/model.proto\x12!google.cloud.financialservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xaf\x01\n\x0bGetInstance\x12\x35.google.cloud.financialservices.v1.GetInstanceRequest\x1a+.google.cloud.financialservices.v1.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xe8\x01\n\x0e\x43reateInstance\x12\x38.google.cloud.financialservices.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x1bparent,instance,instance_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xea\x01\n\x0eUpdateInstance\x12\x38.google.cloud.financialservices.v1.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x14instance,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xd4\x01\n\x0e\x44\x65leteInstance\x12\x38.google.cloud.financialservices.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xaf\x02\n\x17ImportRegisteredParties\x12\x41.google.cloud.financialservices.v1.ImportRegisteredPartiesRequest\x1a\x1d.google.longrunning.Operation\"\xb1\x01\xca\x41\x34\n\x1fImportRegisteredPartiesResponse\x12\x11OperationMetadata\xda\x41\'name,mode,line_of_business,party_tables\x82\xd3\xe4\x93\x02J\"E/v1/{name=projects/*/locations/*/instances/*}:importRegisteredParties:\x01*\x12\xa5\x02\n\x17\x45xportRegisteredParties\x12\x41.google.cloud.financialservices.v1.ExportRegisteredPartiesRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41\x34\n\x1f\x45xportRegisteredPartiesResponse\x12\x11OperationMetadata\xda\x41\x1dname,dataset,line_of_business\x82\xd3\xe4\x93\x02J\"E/v1/{name=projects/*/locations/*/instances/*}:exportRegisteredParties:\x01*\x12\xca\x01\n\x0cListDatasets\x12\x36.google.cloud.financialservices.v1.ListDatasetsRequest\x1a\x37.google.cloud.financialservices.v1.ListDatasetsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/instances/*}/datasets\x12\xb7\x01\n\nGetDataset\x12\x34.google.cloud.financialservices.v1.GetDatasetRequest\x1a*.google.cloud.financialservices.v1.Dataset\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/instances/*/datasets/*}\x12\xee\x01\n\rCreateDataset\x12\x37.google.cloud.financialservices.v1.CreateDatasetRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41\x1c\n\x07\x44\x61taset\x12\x11OperationMetadata\xda\x41\x19parent,dataset,dataset_id\x82\xd3\xe4\x93\x02\x43\"8/v1/{parent=projects/*/locations/*/instances/*}/datasets:\x07\x64\x61taset\x12\xf0\x01\n\rUpdateDataset\x12\x37.google.cloud.financialservices.v1.UpdateDatasetRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41\x1c\n\x07\x44\x61taset\x12\x11OperationMetadata\xda\x41\x13\x64\x61taset,update_mask\x82\xd3\xe4\x93\x02K2@/v1/{dataset.name=projects/*/locations/*/instances/*/datasets/*}:\x07\x64\x61taset\x12\xdd\x01\n\rDeleteDataset\x12\x37.google.cloud.financialservices.v1.DeleteDatasetRequest\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/*/instances/*/datasets/*}\x12\xc2\x01\n\nListModels\x12\x34.google.cloud.financialservices.v1.ListModelsRequest\x1a\x35.google.cloud.financialservices.v1.ListModelsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*/instances/*}/models\x12\xaf\x01\n\x08GetModel\x12\x32.google.cloud.financialservices.v1.GetModelRequest\x1a(.google.cloud.financialservices.v1.Model\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/instances/*/models/*}\x12\xdf\x01\n\x0b\x43reateModel\x12\x35.google.cloud.financialservices.v1.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\xda\x41\x15parent,model,model_id\x82\xd3\xe4\x93\x02?\"6/v1/{parent=projects/*/locations/*/instances/*}/models:\x05model\x12\xe1\x01\n\x0bUpdateModel\x12\x35.google.cloud.financialservices.v1.UpdateModelRequest\x1a\x1d.google.longrunning.Operation\"|\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\xda\x41\x11model,update_mask\x82\xd3\xe4\x93\x02\x45\x32/v1/{name=projects/*/locations/*/instances/*/engineVersions/*}\x12\xe2\x01\n\x12ListEngineVersions\x12<.google.cloud.financialservices.v1.ListEngineVersionsRequest\x1a=.google.cloud.financialservices.v1.ListEngineVersionsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/instances/*}/engineVersions\x12\xee\x01\n\x15ListPredictionResults\x12?.google.cloud.financialservices.v1.ListPredictionResultsRequest\x1a@.google.cloud.financialservices.v1.ListPredictionResultsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/instances/*}/predictionResults\x12\xdb\x01\n\x13GetPredictionResult\x12=.google.cloud.financialservices.v1.GetPredictionResultRequest\x1a\x33.google.cloud.financialservices.v1.PredictionResult\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/instances/*/predictionResults/*}\x12\xb0\x02\n\x16\x43reatePredictionResult\x12@.google.cloud.financialservices.v1.CreatePredictionResultRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41%\n\x10PredictionResult\x12\x11OperationMetadata\xda\x41-parent,prediction_result,prediction_result_id\x82\xd3\xe4\x93\x02V\"A/v1/{parent=projects/*/locations/*/instances/*}/predictionResults:\x11prediction_result\x12\xb2\x02\n\x16UpdatePredictionResult\x12@.google.cloud.financialservices.v1.UpdatePredictionResultRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41%\n\x10PredictionResult\x12\x11OperationMetadata\xda\x41\x1dprediction_result,update_mask\x82\xd3\xe4\x93\x02h2S/v1/{prediction_result.name=projects/*/locations/*/instances/*/predictionResults/*}:\x11prediction_result\x12\xe6\x02\n\x1e\x45xportPredictionResultMetadata\x12H.google.cloud.financialservices.v1.ExportPredictionResultMetadataRequest\x1a\x1d.google.longrunning.Operation\"\xda\x01\xca\x41;\n&ExportPredictionResultMetadataResponse\x12\x11OperationMetadata\xda\x41\x31prediction_result,structured_metadata_destination\x82\xd3\xe4\x93\x02\x62\"]/v1/{prediction_result=projects/*/locations/*/instances/*/predictionResults/*}:exportMetadata:\x01*\x12\xf8\x01\n\x16\x44\x65letePredictionResult\x12@.google.cloud.financialservices.v1.DeletePredictionResultRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43*A/v1/{name=projects/*/locations/*/instances/*/predictionResults/*}\x12\xe6\x01\n\x13ListBacktestResults\x12=.google.cloud.financialservices.v1.ListBacktestResultsRequest\x1a>.google.cloud.financialservices.v1.ListBacktestResultsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/instances/*}/backtestResults\x12\xd3\x01\n\x11GetBacktestResult\x12;.google.cloud.financialservices.v1.GetBacktestResultRequest\x1a\x31.google.cloud.financialservices.v1.BacktestResult\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/instances/*/backtestResults/*}\x12\xa2\x02\n\x14\x43reateBacktestResult\x12>.google.cloud.financialservices.v1.CreateBacktestResultRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41#\n\x0e\x42\x61\x63ktestResult\x12\x11OperationMetadata\xda\x41)parent,backtest_result,backtest_result_id\x82\xd3\xe4\x93\x02R\"?/v1/{parent=projects/*/locations/*/instances/*}/backtestResults:\x0f\x62\x61\x63ktest_result\x12\xa4\x02\n\x14UpdateBacktestResult\x12>.google.cloud.financialservices.v1.UpdateBacktestResultRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41#\n\x0e\x42\x61\x63ktestResult\x12\x11OperationMetadata\xda\x41\x1b\x62\x61\x63ktest_result,update_mask\x82\xd3\xe4\x93\x02\x62\x32O/v1/{backtest_result.name=projects/*/locations/*/instances/*/backtestResults/*}:\x0f\x62\x61\x63ktest_result\x12\xda\x02\n\x1c\x45xportBacktestResultMetadata\x12\x46.google.cloud.financialservices.v1.ExportBacktestResultMetadataRequest\x1a\x1d.google.longrunning.Operation\"\xd2\x01\xca\x41\x39\n$ExportBacktestResultMetadataResponse\x12\x11OperationMetadata\xda\x41/backtest_result,structured_metadata_destination\x82\xd3\xe4\x93\x02^\"Y/v1/{backtest_result=projects/*/locations/*/instances/*/backtestResults/*}:exportMetadata:\x01*\x12\xf2\x01\n\x14\x44\x65leteBacktestResult\x12>.google.cloud.financialservices.v1.DeleteBacktestResultRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/locations/*/instances/*/backtestResults/*}\x1aT\xca\x41 financialservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfb\x01\n%com.google.cloud.financialservices.v1B\x0cServiceProtoP\x01ZScloud.google.com/go/financialservices/apiv1/financialservicespb;financialservicespb\xaa\x02!Google.Cloud.FinancialServices.V1\xca\x02!Google\\Cloud\\FinancialServices\\V1\xea\x02$Google::Cloud::FinancialServices::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module FinancialServices + module V1 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.OperationMetadata").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/service_services_pb.rb new file mode 100644 index 000000000000..6f2d59f876f1 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/service_services_pb.rb @@ -0,0 +1,138 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/financialservices/v1/service.proto for package 'Google.Cloud.FinancialServices.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/financialservices/v1/service_pb' + +module Google + module Cloud + module FinancialServices + module V1 + module AML + # The AML (Anti Money Laundering) service allows users to perform REST + # operations on aml. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.financialservices.v1.AML' + + # Lists instances. + rpc :ListInstances, ::Google::Cloud::FinancialServices::V1::ListInstancesRequest, ::Google::Cloud::FinancialServices::V1::ListInstancesResponse + # Gets an instance. + rpc :GetInstance, ::Google::Cloud::FinancialServices::V1::GetInstanceRequest, ::Google::Cloud::FinancialServices::V1::Instance + # Creates an instance. + rpc :CreateInstance, ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single Instance. + rpc :UpdateInstance, ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest, ::Google::Longrunning::Operation + # Deletes an instance. + rpc :DeleteInstance, ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest, ::Google::Longrunning::Operation + # Imports the list of registered parties. See + # [Create and manage + # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#import-registered-parties) + # for information on the input schema and response for this method. + rpc :ImportRegisteredParties, ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest, ::Google::Longrunning::Operation + # Exports the list of registered parties. See + # [Create and manage + # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#export-registered-parties) + # for information on the output schema for this method. + rpc :ExportRegisteredParties, ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest, ::Google::Longrunning::Operation + # Lists datasets. + rpc :ListDatasets, ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest, ::Google::Cloud::FinancialServices::V1::ListDatasetsResponse + # Gets a dataset. + rpc :GetDataset, ::Google::Cloud::FinancialServices::V1::GetDatasetRequest, ::Google::Cloud::FinancialServices::V1::Dataset + # Creates a dataset. + rpc :CreateDataset, ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single Dataset. + rpc :UpdateDataset, ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest, ::Google::Longrunning::Operation + # Deletes a dataset. + rpc :DeleteDataset, ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest, ::Google::Longrunning::Operation + # Lists models. + rpc :ListModels, ::Google::Cloud::FinancialServices::V1::ListModelsRequest, ::Google::Cloud::FinancialServices::V1::ListModelsResponse + # Gets a model. + rpc :GetModel, ::Google::Cloud::FinancialServices::V1::GetModelRequest, ::Google::Cloud::FinancialServices::V1::Model + # Creates a model. + rpc :CreateModel, ::Google::Cloud::FinancialServices::V1::CreateModelRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single Model. + rpc :UpdateModel, ::Google::Cloud::FinancialServices::V1::UpdateModelRequest, ::Google::Longrunning::Operation + # Export governance information for a Model resource. For + # information on the exported fields, see + # [AML output data + # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#model). + rpc :ExportModelMetadata, ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest, ::Google::Longrunning::Operation + # Deletes a model. + rpc :DeleteModel, ::Google::Cloud::FinancialServices::V1::DeleteModelRequest, ::Google::Longrunning::Operation + # Lists engine configs. + rpc :ListEngineConfigs, ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest, ::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse + # Gets an engine config. + rpc :GetEngineConfig, ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest, ::Google::Cloud::FinancialServices::V1::EngineConfig + # Creates an engine config. + rpc :CreateEngineConfig, ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single EngineConfig. + rpc :UpdateEngineConfig, ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest, ::Google::Longrunning::Operation + # Export governance information for an EngineConfig resource. For + # information on the exported fields, see + # [AML output data + # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#engine-config). + rpc :ExportEngineConfigMetadata, ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest, ::Google::Longrunning::Operation + # Deletes an engine config. + rpc :DeleteEngineConfig, ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest, ::Google::Longrunning::Operation + # Gets a single EngineVersion. + rpc :GetEngineVersion, ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest, ::Google::Cloud::FinancialServices::V1::EngineVersion + # Lists EngineVersions for given location. + rpc :ListEngineVersions, ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest, ::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse + # List PredictionResults. + rpc :ListPredictionResults, ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest, ::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse + # Gets a PredictionResult. + rpc :GetPredictionResult, ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest, ::Google::Cloud::FinancialServices::V1::PredictionResult + # Create a PredictionResult. + rpc :CreatePredictionResult, ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single PredictionResult. + rpc :UpdatePredictionResult, ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest, ::Google::Longrunning::Operation + # Export governance information for a PredictionResult resource. For + # information on the exported fields, see + # [AML output data + # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#prediction-results). + rpc :ExportPredictionResultMetadata, ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest, ::Google::Longrunning::Operation + # Deletes a PredictionResult. + rpc :DeletePredictionResult, ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest, ::Google::Longrunning::Operation + # List BacktestResults. + rpc :ListBacktestResults, ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest, ::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse + # Gets a BacktestResult. + rpc :GetBacktestResult, ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest, ::Google::Cloud::FinancialServices::V1::BacktestResult + # Create a BacktestResult. + rpc :CreateBacktestResult, ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest, ::Google::Longrunning::Operation + # Updates the parameters of a single BacktestResult. + rpc :UpdateBacktestResult, ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest, ::Google::Longrunning::Operation + # Export governance information for a BacktestResult resource. For + # information on the exported fields, see + # [AML output data + # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#backtest-results). + rpc :ExportBacktestResultMetadata, ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest, ::Google::Longrunning::Operation + # Deletes a BacktestResult. + rpc :DeleteBacktestResult, ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/README.md new file mode 100644 index 000000000000..7a70566775e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Financial Services 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-financial_services-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/cloud/financialservices/v1/backtest_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/backtest_result.rb new file mode 100644 index 000000000000..b522c677114d --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/backtest_result.rb @@ -0,0 +1,277 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 FinancialServices + module V1 + # BacktestResult is created to test the performance of a model on a dataset. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the BacktestResult. + # format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/backtestResults/{backtest_result}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of creation of this resource. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of the most recent update of this resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels + # @!attribute [r] state + # @return [::Google::Cloud::FinancialServices::V1::BacktestResult::State] + # Output only. State of the BacktestResult (creating, active, deleting, etc.) + # @!attribute [rw] dataset + # @return [::String] + # Required. The resource name of the Dataset to backtest on + # Format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}` + # @!attribute [rw] model + # @return [::String] + # Required. The resource name of the Model to use or to backtest. + # Format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/models/{model}` + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Required. End_time specifies the latest time from which labels are used and + # from which data is used to generate features for backtesting. End_time + # should be no later than the end of the date_range of the primary dataset. + # @!attribute [rw] backtest_periods + # @return [::Integer] + # The number of consecutive months to conduct backtesting for, ending with + # the last full month prior to the end_time according to the dataset's + # timezone. + # @!attribute [rw] performance_target + # @return [::Google::Cloud::FinancialServices::V1::BacktestResult::PerformanceTarget] + # Required. PerformanceTarget gives information on how the test will be + # evaluated. + # @!attribute [r] line_of_business + # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] + # Output only. The line of business (Retail/Commercial) this backtest is for. + # Determined by Model, cannot be set by user. + class BacktestResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # PerformanceTarget gives hints on how to evaluate the performance of a + # model. + # @!attribute [rw] party_investigations_per_period_hint + # @return [::Integer] + # Required. A number that gives the tuner a hint on the number of parties + # from this data that will be investigated per period (monthly). This is + # used to control how the model is evaluated. For example, when trying AML + # AI for the first time, we recommend setting this to the number of parties + # investigated in an average month, based on alerts from your existing + # automated alerting system. + class PerformanceTarget + 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 + + # The possible states of a resource. + module State + # State is unspecified, should not occur. + STATE_UNSPECIFIED = 0 + + # The resource has not finished being created. + CREATING = 1 + + # The resource is active/ready to be used. + ACTIVE = 2 + + # The resource is in the process of being updated. + UPDATING = 3 + + # The resource is in the process of being deleted. + DELETING = 4 + end + end + + # Request for retrieving a paginated list of BacktestResult resources that + # meet the specified criteria. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the BacktestResult is the Instance. + # @!attribute [rw] page_size + # @return [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @!attribute [rw] page_token + # @return [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListBacktestResultsResponse. It should be copied here to + # retrieve the next page of resources. Empty will give the first page of + # ListBacktestResultsRequest, and the last page will return an empty + # page_token. + # @!attribute [rw] filter + # @return [::String] + # Specify a filter to narrow search results. + # @!attribute [rw] order_by + # @return [::String] + # Specify a field to use for ordering. + class ListBacktestResultsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for retrieving a list of BacktestResults + # @!attribute [rw] backtest_results + # @return [::Array<::Google::Cloud::FinancialServices::V1::BacktestResult>] + # List of BacktestResult resources + # @!attribute [rw] next_page_token + # @return [::String] + # This token should be passed to the next ListBacktestResultsRequest to + # retrieve the next page of BacktestResults (empty indicates we are + # done). + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBacktestResultsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for retrieving a specific BacktestResult resource. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the BacktestResult + class GetBacktestResultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for creating a BacktestResult resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the BacktestResult is the Instance. + # @!attribute [rw] backtest_result_id + # @return [::String] + # Required. The resource id of the BacktestResult + # @!attribute [rw] backtest_result + # @return [::Google::Cloud::FinancialServices::V1::BacktestResult] + # Required. The BacktestResult that will be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateBacktestResultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for updating a BacktestResult + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # BacktestResult resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] backtest_result + # @return [::Google::Cloud::FinancialServices::V1::BacktestResult] + # Required. The new value of the BacktestResult fields that will be updated + # according to the update_mask. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateBacktestResultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting a BacktestResult. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the BacktestResult. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteBacktestResultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for exporting BacktestResult metadata. + # @!attribute [rw] backtest_result + # @return [::String] + # Required. The resource name of the BacktestResult. + # @!attribute [rw] structured_metadata_destination + # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] + # Required. BigQuery output where the metadata will be written. + class ExportBacktestResultMetadataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for exporting BacktestResult metadata. + class ExportBacktestResultMetadataResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/bigquery_destination.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/bigquery_destination.rb new file mode 100644 index 000000000000..283b4557047b --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/bigquery_destination.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! + + +module Google + module Cloud + module FinancialServices + module V1 + # BigQueryDestination is a wrapper for BigQuery output information. + # @!attribute [rw] table_uri + # @return [::String] + # Optional. BigQuery URI to a table, must be of the form + # bq://projectId.bqDatasetId.tableId. + # Note that the BigQuery dataset must already exist. + # VPC-SC restrictions apply. + # @!attribute [rw] write_disposition + # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination::WriteDisposition] + # Required. Whether or not to overwrite the destination table. By default the + # table won't be overwritten and an error will be returned if the table + # exists and contains data. + class BigQueryDestination + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # WriteDisposition controls the behavior when the destination table already + # exists. + module WriteDisposition + # Default behavior is the same as WRITE_EMPTY. + WRITE_DISPOSITION_UNSPECIFIED = 0 + + # If the table already exists and contains data, an error is returned. + WRITE_EMPTY = 1 + + # If the table already exists, the data will be overwritten. + WRITE_TRUNCATE = 2 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/dataset.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/dataset.rb new file mode 100644 index 000000000000..f981223852c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/dataset.rb @@ -0,0 +1,242 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 FinancialServices + module V1 + # The Dataset resource contains summary information about a dataset. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the Dataset. + # format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of creation of this resource. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of the most recent update of this resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels + # @!attribute [rw] table_specs + # @return [::Google::Protobuf::Map{::String => ::String}] + # Required. The set of BigQuery tables in the dataset. The key should be the + # table type and the value should be the BigQuery tables in the format + # `bq://{project}.{dataset}.{table}`. + # Current table types are: + # + # * `party` + # * `account_party_link` + # * `transaction` + # * `risk_case_event` + # * `party_supplementary_data` + # @!attribute [r] state + # @return [::Google::Cloud::FinancialServices::V1::Dataset::State] + # Output only. State of the dataset (creating, active, deleting, etc.) + # @!attribute [rw] date_range + # @return [::Google::Type::Interval] + # Required. Core time window of the dataset. All tables should have complete + # data covering this period. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # The timezone of the data, default will act as UTC. + class Dataset + 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 TableSpecsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The possible states of a resource. + module State + # State is unspecified, should not occur. + STATE_UNSPECIFIED = 0 + + # The resource has not finished being created. + CREATING = 1 + + # The resource is active/ready to be used. + ACTIVE = 2 + + # The resource is in the process of being updated. + UPDATING = 3 + + # The resource is in the process of being deleted. + DELETING = 4 + end + end + + # Request for retrieving a paginated list of Dataset resources that meet the + # specified criteria. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the Dataset is the Instance. + # @!attribute [rw] page_size + # @return [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @!attribute [rw] page_token + # @return [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListDatasetResponse. It should be copied here to retrieve the + # next page of resources. Empty will give the first page of + # ListDatasetRequest, and the last page will return an empty page_token. + # @!attribute [rw] filter + # @return [::String] + # Specify a filter to narrow search results. + # @!attribute [rw] order_by + # @return [::String] + # Specify a field to use for ordering. + class ListDatasetsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for retrieving a list of Datasets + # @!attribute [rw] datasets + # @return [::Array<::Google::Cloud::FinancialServices::V1::Dataset>] + # List of Dataset resources + # @!attribute [rw] next_page_token + # @return [::String] + # This token should be passed to the next ListDatasetsRequest to retrieve + # the next page of Datasets (empty indicates we are done). + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListDatasetsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for retrieving a specific Dataset resource. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Dataset + class GetDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for creating a Dataset resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the Dataset is the Instance. + # @!attribute [rw] dataset_id + # @return [::String] + # Required. The resource id of the dataset + # @!attribute [rw] dataset + # @return [::Google::Cloud::FinancialServices::V1::Dataset] + # Required. The dataset that will be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for updating a Dataset + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Dataset resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] dataset + # @return [::Google::Cloud::FinancialServices::V1::Dataset] + # Required. The new value of the dataset fields that will be updated + # according to the update_mask. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting a Dataset. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Dataset. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteDatasetRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_config.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_config.rb new file mode 100644 index 000000000000..638e1e1e734b --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_config.rb @@ -0,0 +1,324 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 FinancialServices + module V1 + # The EngineConfig resource creates the configuration for training a model. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the EngineConfig. + # format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engine_config}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of creation of this resource. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of the most recent update of this resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels + # @!attribute [r] state + # @return [::Google::Cloud::FinancialServices::V1::EngineConfig::State] + # Output only. State of the EngineConfig (creating, active, deleting, etc.) + # @!attribute [rw] engine_version + # @return [::String] + # Required. The resource name of the EngineVersion used in this model tuning. + # format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}` + # @!attribute [rw] tuning + # @return [::Google::Cloud::FinancialServices::V1::EngineConfig::Tuning] + # Optional. Configuration for tuning in creation of the EngineConfig. + # This field is required if `hyperparameter_source.type` is not `INHERITED`, + # and output-only otherwise. + # @!attribute [rw] performance_target + # @return [::Google::Cloud::FinancialServices::V1::EngineConfig::PerformanceTarget] + # Optional. PerformanceTarget gives information on how the tuning and + # training will be evaluated. This field is required if + # `hyperparameter_source.type` is not `INHERITED`, and output-only otherwise. + # @!attribute [r] line_of_business + # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] + # Output only. The line of business (Retail/Commercial) this engine config is + # used for. Determined by EngineVersion, cannot be set by user. + # @!attribute [rw] hyperparameter_source_type + # @return [::Google::Cloud::FinancialServices::V1::EngineConfig::HyperparameterSourceType] + # Optional. The origin of hyperparameters for the created EngineConfig. The + # default is `TUNING`. In this case, the hyperparameters are selected as a + # result of a + # tuning run. + # @!attribute [rw] hyperparameter_source + # @return [::Google::Cloud::FinancialServices::V1::EngineConfig::HyperparameterSource] + # Optional. Configuration of hyperparameters source EngineConfig. + class EngineConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The parameters needed for the tuning operation, these are used only in + # tuning and not passed on to training. + # @!attribute [rw] primary_dataset + # @return [::String] + # Required. The resource name of the Primary Dataset used in this model + # tuning. For information about how primary and auxiliary datasets are + # used, refer to the engine version's documentation. Format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}` + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Required. End_time specifies the latest time from which labels are used + # and from which data is used to generate features for tuning. End_time + # should be no later than the end of the date_range of the dataset. + class Tuning + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # PerformanceTarget gives hints on how to evaluate the performance of a + # model. + # @!attribute [rw] party_investigations_per_period_hint + # @return [::Integer] + # Required. A number that gives the tuner a hint on the number of parties + # from this data that will be investigated per period (monthly). This is + # used to control how the model is evaluated. For example, when trying AML + # AI for the first time, we recommend setting this to the number of parties + # investigated in an average month, based on alerts from your existing + # automated alerting system. + class PerformanceTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Parameters for bootstrapping an Engine Config with the results of another + # one. + # @!attribute [rw] source_engine_config + # @return [::String] + # Required. The resource name of the source EngineConfig whose outputs are + # used. Format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engine_config}` + # @!attribute [r] source_engine_version + # @return [::String] + # Output only. The resource name of the EngineVersion that was used in the + # tuning run. Format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}` + class HyperparameterSource + 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 + + # The possible states of a resource. + module State + # State is unspecified, should not occur. + STATE_UNSPECIFIED = 0 + + # The resource has not finished being created. + CREATING = 1 + + # The resource is active/ready to be used. + ACTIVE = 2 + + # The resource is in the process of being updated. + UPDATING = 3 + + # The resource is in the process of being deleted. + DELETING = 4 + end + + # The type of the hyperparameter source. + module HyperparameterSourceType + # Hyperparameter source type is unspecified, defaults to TUNING. + HYPERPARAMETER_SOURCE_TYPE_UNSPECIFIED = 0 + + # The EngineConfig creation starts a tuning job which selects the best + # hyperparameters. + TUNING = 1 + + # The hyperparameters are inherited from another EngineConfig. + INHERITED = 2 + end + end + + # Request for retrieving a paginated list of EngineConfig resources that + # meet the specified criteria. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the EngineConfig is the Instance. + # @!attribute [rw] page_size + # @return [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @!attribute [rw] page_token + # @return [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListEngineConfigsResponse. It should be copied here to retrieve + # the next page of resources. Empty will give the first page of + # ListEngineConfigsRequest, and the last page will return an empty + # page_token. + # @!attribute [rw] filter + # @return [::String] + # Specify a filter to narrow search results. + # @!attribute [rw] order_by + # @return [::String] + # Specify a field to use for ordering. + class ListEngineConfigsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for retrieving a list of EngineConfigs + # @!attribute [rw] engine_configs + # @return [::Array<::Google::Cloud::FinancialServices::V1::EngineConfig>] + # List of EngineConfig resources + # @!attribute [rw] next_page_token + # @return [::String] + # This token should be passed to the next ListEngineConfigsRequest to + # retrieve the next page of EngineConfigs (empty indicates we are done). + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListEngineConfigsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for retrieving a specific EngineConfig resource. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EngineConfig + class GetEngineConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for creating an EngineConfig resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the EngineConfig is the Instance. + # @!attribute [rw] engine_config_id + # @return [::String] + # Required. The resource id of the EngineConfig + # @!attribute [rw] engine_config + # @return [::Google::Cloud::FinancialServices::V1::EngineConfig] + # Required. The EngineConfig that will be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateEngineConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for updating an EngineConfig + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # EngineConfig resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] engine_config + # @return [::Google::Cloud::FinancialServices::V1::EngineConfig] + # Required. The new value of the EngineConfig fields that will be updated + # according to the update_mask. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateEngineConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting an EngineConfig. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EngineConfig. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteEngineConfigRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for exporting EngineConfig metadata. + # @!attribute [rw] engine_config + # @return [::String] + # Required. The resource name of the EngineConfig. + # @!attribute [rw] structured_metadata_destination + # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] + # Required. BigQuery output where the metadata will be written. + class ExportEngineConfigMetadataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for exporting EngineConfig metadata. + class ExportEngineConfigMetadataResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_version.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_version.rb new file mode 100644 index 000000000000..7ffe05a27b7d --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_version.rb @@ -0,0 +1,126 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 FinancialServices + module V1 + # EngineVersion controls which version of the engine is used to tune, train, + # and run the model. + # @!attribute [r] name + # @return [::String] + # Output only. Identifier. The resource name of the EngineVersion + # format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}` + # @!attribute [r] state + # @return [::Google::Cloud::FinancialServices::V1::EngineVersion::State] + # Output only. The state of the version. + # @!attribute [r] expected_limitation_start_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Planned time to stop allowing training/tuning using this + # version. Existing trained models can still be used for prediction/backtest. + # @!attribute [r] expected_decommission_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Planned time to stop supporting the version, in addition + # to no training or tuning, models trained on this version + # can no longer be used for prediction/backtest. + # @!attribute [r] line_of_business + # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] + # Output only. The line of business (Retail/Commercial) this engine version + # is used for. + class EngineVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # State determines the lifecycle of a version and the models/engine configs + # trained with it. + module State + # Default state, should never be used. + STATE_UNSPECIFIED = 0 + + # Version is available for training and inference. + ACTIVE = 1 + + # Models using this version can still be run, but new ones cannot be + # trained. + LIMITED = 2 + + # Version is deprecated, listed for informational purposes only. + DECOMMISSIONED = 3 + end + end + + # Request for retrieving a paginated list of EngineVersion resources that meet + # the specified criteria. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the EngineVersion is the Instance. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The number of resources to be included in the response. The + # response contains a next_page_token, which can be used to retrieve the next + # page of resources. + # @!attribute [rw] page_token + # @return [::String] + # Optional. In case of paginated results, this is the token that was returned + # in the previous ListEngineVersionsResponse. It should be copied here to + # retrieve the next page of resources. Empty will give the first page of + # ListEngineVersionsRequest, and the last page will return an empty + # page_token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Specify a filter to narrow search results. + # If empty or unset will default to "state!=DEPRECATED", + # to view deprecated versions use "state:*" or any other filter. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Specify a field to use for ordering. + class ListEngineVersionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response to a list call containing the list of engine versions. + # @!attribute [rw] engine_versions + # @return [::Array<::Google::Cloud::FinancialServices::V1::EngineVersion>] + # List of EngineVersion resources + # @!attribute [rw] next_page_token + # @return [::String] + # This token should be passed to the next EngineVersionsRequest to retrieve + # the next page of EngineVersions (empty indicates we are done). + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListEngineVersionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for retrieving a specific EngineVersion resource. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the EngineVersion + class GetEngineVersionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/instance.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/instance.rb new file mode 100644 index 000000000000..9cc31a9210ea --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/instance.rb @@ -0,0 +1,318 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 FinancialServices + module V1 + # Instance is a container for the rest of API resources. + # Only resources in the same instance can interact with each other. + # Child resources inherit the location (data residency) and encryption (CMEK). + # The location of the provided input and output in requests must match the + # location of the instance. + # @!attribute [r] name + # @return [::String] + # Output only. The full path to the Instance resource in this API. + # format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the Instance was created. + # Assigned by the server. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp when the Instance was last updated. + # Assigned by the server. + # @!attribute [r] state + # @return [::Google::Cloud::FinancialServices::V1::Instance::State] + # Output only. State of the instance. + # Assigned by the server. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels + # @!attribute [rw] kms_key + # @return [::String] + # Required. The KMS key name used for CMEK (encryption-at-rest). + # format: + # `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}` + # VPC-SC restrictions apply. + class Instance + 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 + + # The Resource State + module State + # State is unspecified, should not occur. + STATE_UNSPECIFIED = 0 + + # The resource has not finished being created. + CREATING = 1 + + # The resource is active/ready to be used. + ACTIVE = 2 + + # The resource is in the process of being updated. + UPDATING = 3 + + # The resource is in the process of being deleted. + DELETING = 4 + end + end + + # Request for retrieving a paginated list of Instance resources that meet the + # specified criteria. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the Instance is the location for that Instance. + # Every location has exactly one instance. + # @!attribute [rw] page_size + # @return [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @!attribute [rw] page_token + # @return [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListInstancesResponse. It should be copied here to retrieve the + # next page of resources. This will be empty for the first instance of + # ListInstancesRequest. + # @!attribute [rw] filter + # @return [::String] + # Specify a filter to narrow search results. + # @!attribute [rw] order_by + # @return [::String] + # Specify a field to use for ordering. + class ListInstancesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for retrieving a list of Instances + # @!attribute [rw] instances + # @return [::Array<::Google::Cloud::FinancialServices::V1::Instance>] + # List of Instance resources + # @!attribute [rw] next_page_token + # @return [::String] + # This token should be passed to the next ListInstancesRequest to retrieve + # the next page of Instances. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListInstancesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for retrieving a specific Instance resource. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Instance. + class GetInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for creating a Instance resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the Instance is the location for that Instance. + # Every location has exactly one instance. + # @!attribute [rw] instance_id + # @return [::String] + # Required. The resource id of the instance. + # @!attribute [rw] instance + # @return [::Google::Cloud::FinancialServices::V1::Instance] + # Required. The instance that will be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for updating a Instance + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Instance resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] instance + # @return [::Google::Cloud::FinancialServices::V1::Instance] + # Required. The new value of the instance fields that will be updated + # according to the update_mask + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting a Instance. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Instance. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteInstanceRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for adding/removing registered parties from BigQuery tables + # specified by the customer. + # @!attribute [rw] name + # @return [::String] + # Required. The full path to the Instance resource in this API. + # format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] party_tables + # @return [::Array<::String>] + # Optional. List of BigQuery tables. Union of tables will be taken if there + # is more than one table. VPC-SC restrictions apply. format: + # `bq://{project}.{bqDatasetID}.{bqTableID}` Use of `datasets` is preferred + # over the latter due to its simplicity and the reduced risk of errors + # `party_tables` and `datasets` must not be provided at the + # same time + # @!attribute [rw] mode + # @return [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest::UpdateMode] + # Required. Mode of the request. + # @!attribute [rw] validate_only + # @return [::Boolean] + # Optional. If the request will not register the parties, just determine what + # would happen. + # @!attribute [rw] line_of_business + # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] + # Required. LineOfBusiness for the specified registered parties. + class ImportRegisteredPartiesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # UpdateMode controls the behavior for ImportRegisteredParties. + module UpdateMode + # Default mode. + UPDATE_MODE_UNSPECIFIED = 0 + + # Replace parties that are removable in Parties Table with new parties. + REPLACE = 1 + + # Add new parties to Parties Table. + APPEND = 2 + end + end + + # Response for adding/removing registered parties from BigQuery tables. + # @!attribute [rw] parties_added + # @return [::Integer] + # Number of parties added by this operation. + # @!attribute [rw] parties_removed + # @return [::Integer] + # Number of parties removed by this operation. + # @!attribute [rw] parties_total + # @return [::Integer] + # Total number of parties that are registered in this instance, after the + # update operation was completed. + # @!attribute [rw] parties_failed_to_remove + # @return [::Integer] + # Number of parties that failed to be removed by this operation. + # @!attribute [rw] parties_uptiered + # @return [::Integer] + # @!attribute [rw] parties_downtiered + # @return [::Integer] + # Total number of parties that are downtiered in this instance + # @!attribute [rw] parties_failed_to_downtier + # @return [::Integer] + # Number of parties that failed to be downtiered + class ImportRegisteredPartiesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request to export a list of currently registered parties. + # @!attribute [rw] name + # @return [::String] + # Required. The full path to the Instance resource in this API. + # format: `projects/{project}/locations/{location}/instances/{instance}` + # @!attribute [rw] dataset + # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] + # Required. The location to output the RegisteredParties. + # @!attribute [rw] line_of_business + # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] + # Required. LineOfBusiness to get RegisteredParties from. + class ExportRegisteredPartiesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response to export registered parties request. + class ExportRegisteredPartiesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/line_of_business.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/line_of_business.rb new file mode 100644 index 000000000000..3473397b4756 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/line_of_business.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 FinancialServices + module V1 + # Indicate which LineOfBusiness a party belongs to. + module LineOfBusiness + # An unspecified LineOfBusiness. Do not use. + LINE_OF_BUSINESS_UNSPECIFIED = 0 + + # Commercial LineOfBusiness. + COMMERCIAL = 1 + + # Retail LineOfBusiness. + RETAIL = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/model.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/model.rb new file mode 100644 index 000000000000..7de397a99c7b --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/model.rb @@ -0,0 +1,256 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 FinancialServices + module V1 + # Model represents a trained model. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the Model. + # format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/models/{model}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of creation of this resource. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of the most recent update of this resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels + # @!attribute [r] state + # @return [::Google::Cloud::FinancialServices::V1::Model::State] + # Output only. State of the model (creating, active, deleting, etc.) + # @!attribute [r] engine_version + # @return [::String] + # Output only. The EngineVersion used in training this model. This is output + # only, and is determined from the EngineConfig used. + # @!attribute [rw] engine_config + # @return [::String] + # Required. The resource name of the EngineConfig the model training will be + # based on. Format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engineConfig}` + # @!attribute [rw] primary_dataset + # @return [::String] + # Required. The resource name of the Primary Dataset used in this model + # training. For information about how primary and auxiliary datasets are + # used, refer to the engine version's documentation. Format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}` + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Required. End_time specifies the latest time from which labels are used and + # from which data is used to generate features for training. End_time should + # be no later than the end of the date_range of the dataset. + # @!attribute [r] line_of_business + # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] + # Output only. The line of business (Retail/Commercial) this model is used + # for. Determined by EngineConfig, cannot be set by user. + class Model + 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 + + # The possible states of a resource. + module State + # State is unspecified, should not occur. + STATE_UNSPECIFIED = 0 + + # The resource has not finished being created. + CREATING = 1 + + # The resource is active/ready to be used. + ACTIVE = 2 + + # The resource is in the process of being updated. + UPDATING = 3 + + # The resource is in the process of being deleted. + DELETING = 4 + end + end + + # Request for retrieving a paginated list of Model resources that meet the + # specified criteria. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the Model is the Instance. + # @!attribute [rw] page_size + # @return [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @!attribute [rw] page_token + # @return [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListModelsResponse. It should be copied here to retrieve the next + # page of resources. Empty will give the first page of ListModelsRequest, and + # the last page will return an empty page_token. + # @!attribute [rw] filter + # @return [::String] + # Specify a filter to narrow search results. + # @!attribute [rw] order_by + # @return [::String] + # Specify a field to use for ordering. + class ListModelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for retrieving a list of Models + # @!attribute [rw] models + # @return [::Array<::Google::Cloud::FinancialServices::V1::Model>] + # List of Model resources + # @!attribute [rw] next_page_token + # @return [::String] + # This token should be passed to the next ListModelsRequest to + # retrieve the next page of Models (empty indicicates we are done). + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListModelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for retrieving a specific Model resource. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Model + class GetModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for creating a Model resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the Model is the Instance. + # @!attribute [rw] model_id + # @return [::String] + # Required. The resource id of the Model + # @!attribute [rw] model + # @return [::Google::Cloud::FinancialServices::V1::Model] + # Required. The Model that will be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreateModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for updating a Model + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # Model resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] model + # @return [::Google::Cloud::FinancialServices::V1::Model] + # Required. The new value of the Model fields that will be updated according + # to the update_mask. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdateModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting a Model. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Model. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeleteModelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for exporting Model metadata. + # @!attribute [rw] model + # @return [::String] + # Required. The resource name of the Model. + # @!attribute [rw] structured_metadata_destination + # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] + # Required. BigQuery output where the metadata will be written. + class ExportModelMetadataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for exporting Model metadata. + class ExportModelMetadataResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/prediction_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/prediction_result.rb new file mode 100644 index 000000000000..449eb26243fc --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/prediction_result.rb @@ -0,0 +1,277 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 FinancialServices + module V1 + # PredictionResult is the result of using a model to create predictions. + # @!attribute [r] name + # @return [::String] + # Output only. The resource name of the PredictionResult. + # format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/predictionResults/{prediction_result}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of creation of this resource. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp of the most recent update of this resource. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels + # @!attribute [r] state + # @return [::Google::Cloud::FinancialServices::V1::PredictionResult::State] + # Output only. State of the PredictionResult (creating, active, deleting, + # etc.) + # @!attribute [rw] dataset + # @return [::String] + # Required. The resource name of the Dataset to do predictions on + # Format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/dataset/{dataset_id}` + # @!attribute [rw] model + # @return [::String] + # Required. The resource name of the Model to use to use to make predictions + # Format: + # `/projects/{project_num}/locations/{location}/instances/{instance}/models/{model}` + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Required. Specifies the latest time from which data is used to generate + # features for predictions. This time should be no later than the end of the + # {::Google::Cloud::FinancialServices::V1::Dataset#date_range date_range} of the + # dataset. + # @!attribute [rw] prediction_periods + # @return [::Integer] + # The number of consecutive months to produce predictions for, ending with + # the last full month prior to + # {::Google::Cloud::FinancialServices::V1::PredictionResult#end_time end_time} + # according to the dataset's timezone. + # @!attribute [rw] outputs + # @return [::Google::Cloud::FinancialServices::V1::PredictionResult::Outputs] + # Required. Where to write the output of the predictions. + # @!attribute [r] line_of_business + # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] + # Output only. The line of business (Retail/Commercial) this prediction is + # for. Determined by Model, cannot be set by user. + class PredictionResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Outputs is a list of places where the operation will write results. + # @!attribute [rw] prediction_destination + # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] + # Required. The location to output the predictions. + # @!attribute [rw] explainability_destination + # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] + # The location to output explainability information. If not specified + # no explainability data will be output. + class Outputs + 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 + + # The possible states of a resource. + module State + # State is unspecified, should not occur. + STATE_UNSPECIFIED = 0 + + # The resource has not finished being created. + CREATING = 1 + + # The resource is active/ready to be used. + ACTIVE = 2 + + # The resource is in the process of being updated. + UPDATING = 3 + + # The resource is in the process of being deleted. + DELETING = 4 + end + end + + # Request for retrieving a paginated list of PredictionResult resources that + # meet the specified criteria. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the PredictionResult is the Instance. + # @!attribute [rw] page_size + # @return [::Integer] + # The number of resources to be included in the response. The response + # contains a next_page_token, which can be used to retrieve the next page of + # resources. + # @!attribute [rw] page_token + # @return [::String] + # In case of paginated results, this is the token that was returned in the + # previous ListPredictionResultsResponse. It should be copied here to + # retrieve the next page of resources. Empty will give the first page of + # ListPredictionResultsRequest, and the last page will return an empty + # page_token. + # @!attribute [rw] filter + # @return [::String] + # Specify a filter to narrow search results. + # @!attribute [rw] order_by + # @return [::String] + # Specify a field to use for ordering. + class ListPredictionResultsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for retrieving a list of PredictionResults + # @!attribute [rw] prediction_results + # @return [::Array<::Google::Cloud::FinancialServices::V1::PredictionResult>] + # List of PredictionResult resources + # @!attribute [rw] next_page_token + # @return [::String] + # This token should be passed to the next ListPredictionResultsRequest to + # retrieve the next page of PredictionResults (empty indicicates we are + # done). + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListPredictionResultsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for retrieving a specific PredictionResult resource. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the PredictionResult + class GetPredictionResultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for creating a PredictionResult resource. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent of the PredictionResult is the Instance. + # @!attribute [rw] prediction_result_id + # @return [::String] + # Required. The resource id of the PredictionResult + # @!attribute [rw] prediction_result + # @return [::Google::Cloud::FinancialServices::V1::PredictionResult] + # Required. The PredictionResult that will be created. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class CreatePredictionResultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for updating a PredictionResult + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. Field mask is used to specify the fields to be overwritten in the + # PredictionResult resource by the update. + # The fields specified in the update_mask are relative to the resource, not + # the full request. A field will be overwritten if it is in the mask. If the + # user does not provide a mask then all fields will be overwritten. + # @!attribute [rw] prediction_result + # @return [::Google::Cloud::FinancialServices::V1::PredictionResult] + # Required. The new value of the PredictionResult fields that will be updated + # according to the update_mask. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes since the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class UpdatePredictionResultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for deleting a PredictionResult. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the PredictionResult. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional request ID to identify requests. Specify a unique + # request ID so that if you must retry your request, the server will know to + # ignore the request if it has already been completed. The server will + # guarantee that for at least 60 minutes after the first request. + # + # For example, consider a situation where you make an initial request and the + # request times out. If you make the request again with the same request + # ID, the server can check if original operation with the same request ID + # was received, and if so, will ignore the second request. This prevents + # clients from accidentally creating duplicate commitments. + # + # The request ID must be a valid UUID with the exception that zero UUID is + # not supported (00000000-0000-0000-0000-000000000000). + class DeletePredictionResultRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for exporting PredictionResult metadata. + # @!attribute [rw] prediction_result + # @return [::String] + # Required. The resource name of the PredictionResult. + # @!attribute [rw] structured_metadata_destination + # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] + # Required. BigQuery output where the metadata will be written. + class ExportPredictionResultMetadataRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for exporting PredictionResult metadata. + class ExportPredictionResultMetadataResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/service.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/service.rb new file mode 100644 index 000000000000..ad3a0c4bb605 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/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! + + +module Google + module Cloud + module FinancialServices + module V1 + # Represents the metadata of the 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. + # format: "/projects/\\{project}/..." + # VPC-SC restrictions apply. + # @!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. + # + # Successfully cancelled operations have a [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 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/datetime.rb new file mode 100644 index 000000000000..d15ba7af54e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/datetime.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 civil time (or occasionally physical time). + # + # This type can represent a civil time in one of a few possible ways: + # + # * When utc_offset is set and time_zone is unset: a civil time on a calendar + # day with a particular offset from UTC. + # * When time_zone is set and utc_offset is unset: a civil time on a calendar + # day in a particular time zone. + # * When neither time_zone nor utc_offset is set: a civil time on a calendar + # day in local time. + # + # The date is relative to the Proleptic Gregorian Calendar. + # + # If year is 0, the DateTime is considered not to have a specific year. month + # and day must have valid, non-zero values. + # + # This type may also be used to represent a physical time if all the date and + # time fields are set and either case of the `time_offset` oneof is set. + # Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in + # another field. + # + # This type is more flexible than some applications may want. Make sure to + # document and validate your application's limitations. + # @!attribute [rw] year + # @return [::Integer] + # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a + # datetime without a year. + # @!attribute [rw] month + # @return [::Integer] + # Required. Month of year. Must be from 1 to 12. + # @!attribute [rw] day + # @return [::Integer] + # Required. Day of month. Must be from 1 to 31 and valid for the year and + # month. + # @!attribute [rw] hours + # @return [::Integer] + # Required. Hours of day in 24 hour format. Should be from 0 to 23. An API + # may choose to allow the value "24:00:00" for scenarios like business + # closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Required. Minutes of hour of day. Must be from 0 to 59. + # @!attribute [rw] seconds + # @return [::Integer] + # Required. Seconds of minutes of the time. Must normally be from 0 to 59. An + # API may allow the value 60 if it allows leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Required. Fractions of seconds in nanoseconds. Must be from 0 to + # 999,999,999. + # @!attribute [rw] utc_offset + # @return [::Google::Protobuf::Duration] + # UTC offset. Must be whole seconds, between -18 hours and +18 hours. + # For example, a UTC offset of -4:00 would be represented as + # { seconds: -14400 }. + # + # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Time zone. + # + # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DateTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a time zone from the + # [IANA Time Zone Database](https://www.iana.org/time-zones). + # @!attribute [rw] id + # @return [::String] + # IANA Time Zone Database time zone, e.g. "America/New_York". + # @!attribute [rw] version + # @return [::String] + # Optional. IANA Time Zone Database version number, e.g. "2019a". + class TimeZone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/interval.rb new file mode 100644 index 000000000000..9350ca479005 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/interval.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! + + +module Google + module Type + # Represents a time interval, encoded as a Timestamp start (inclusive) and a + # Timestamp end (exclusive). + # + # The start must be less than or equal to the end. + # When the start equals the end, the interval is empty (matches no time). + # When both start and end are unspecified, the interval matches any time. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Inclusive start of the interval. + # + # If specified, a Timestamp matching this interval will have to be the same + # or after the start. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # Optional. Exclusive end of the interval. + # + # If specified, a Timestamp matching this interval will have to be before the + # end. + class Interval + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-financial_services-v1/snippets/Gemfile new file mode 100644 index 000000000000..14dd75718273 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1", path: "../" +else + gem "google-cloud-financial_services-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-financial_services-v1/snippets/aml/create_backtest_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_backtest_result.rb new file mode 100644 index 000000000000..7d2a70a67125 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_backtest_result.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 financialserivces_v1_generated_AML_CreateBacktestResult_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the create_backtest_result call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#create_backtest_result. +# +def create_backtest_result + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new + + # Call the create_backtest_result method. + result = client.create_backtest_result request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_CreateBacktestResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_dataset.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_dataset.rb new file mode 100644 index 000000000000..83e25ed042e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_dataset.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 financialserivces_v1_generated_AML_CreateDataset_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the create_dataset call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#create_dataset. +# +def create_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new + + # Call the create_dataset method. + result = client.create_dataset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_CreateDataset_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_engine_config.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_engine_config.rb new file mode 100644 index 000000000000..9ba53877e63c --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_engine_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 financialserivces_v1_generated_AML_CreateEngineConfig_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the create_engine_config call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#create_engine_config. +# +def create_engine_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new + + # Call the create_engine_config method. + result = client.create_engine_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 financialserivces_v1_generated_AML_CreateEngineConfig_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_instance.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_instance.rb new file mode 100644 index 000000000000..5e8002e47859 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_instance.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 financialserivces_v1_generated_AML_CreateInstance_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the create_instance call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#create_instance. +# +def create_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new + + # Call the create_instance method. + result = client.create_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_CreateInstance_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_model.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_model.rb new file mode 100644 index 000000000000..bae675b97ecf --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_model.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 financialserivces_v1_generated_AML_CreateModel_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the create_model call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#create_model. +# +def create_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::CreateModelRequest.new + + # Call the create_model method. + result = client.create_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_CreateModel_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_prediction_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_prediction_result.rb new file mode 100644 index 000000000000..3e4d91007d3e --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_prediction_result.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 financialserivces_v1_generated_AML_CreatePredictionResult_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the create_prediction_result call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#create_prediction_result. +# +def create_prediction_result + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new + + # Call the create_prediction_result method. + result = client.create_prediction_result request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_CreatePredictionResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_backtest_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_backtest_result.rb new file mode 100644 index 000000000000..e902bc37df89 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_backtest_result.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 financialserivces_v1_generated_AML_DeleteBacktestResult_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the delete_backtest_result call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#delete_backtest_result. +# +def delete_backtest_result + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new + + # Call the delete_backtest_result method. + result = client.delete_backtest_result request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_DeleteBacktestResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_dataset.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_dataset.rb new file mode 100644 index 000000000000..ec4c63d9edee --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_dataset.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 financialserivces_v1_generated_AML_DeleteDataset_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the delete_dataset call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#delete_dataset. +# +def delete_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new + + # Call the delete_dataset method. + result = client.delete_dataset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_DeleteDataset_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_engine_config.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_engine_config.rb new file mode 100644 index 000000000000..30b8cab2aad1 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_engine_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 financialserivces_v1_generated_AML_DeleteEngineConfig_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the delete_engine_config call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#delete_engine_config. +# +def delete_engine_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new + + # Call the delete_engine_config method. + result = client.delete_engine_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 financialserivces_v1_generated_AML_DeleteEngineConfig_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_instance.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_instance.rb new file mode 100644 index 000000000000..10a7b4aa6248 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_instance.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 financialserivces_v1_generated_AML_DeleteInstance_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the delete_instance call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#delete_instance. +# +def delete_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new + + # Call the delete_instance method. + result = client.delete_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_model.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_model.rb new file mode 100644 index 000000000000..458a9b128e67 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_model.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 financialserivces_v1_generated_AML_DeleteModel_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the delete_model call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#delete_model. +# +def delete_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::DeleteModelRequest.new + + # Call the delete_model method. + result = client.delete_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_DeleteModel_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_prediction_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_prediction_result.rb new file mode 100644 index 000000000000..2d2575714c4b --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_prediction_result.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 financialserivces_v1_generated_AML_DeletePredictionResult_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the delete_prediction_result call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#delete_prediction_result. +# +def delete_prediction_result + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new + + # Call the delete_prediction_result method. + result = client.delete_prediction_result request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_DeletePredictionResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_backtest_result_metadata.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_backtest_result_metadata.rb new file mode 100644 index 000000000000..03b0e8f66e3e --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_backtest_result_metadata.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 financialserivces_v1_generated_AML_ExportBacktestResultMetadata_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the export_backtest_result_metadata call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#export_backtest_result_metadata. +# +def export_backtest_result_metadata + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new + + # Call the export_backtest_result_metadata method. + result = client.export_backtest_result_metadata request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_ExportBacktestResultMetadata_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_engine_config_metadata.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_engine_config_metadata.rb new file mode 100644 index 000000000000..5d6812b2ad7d --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_engine_config_metadata.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 financialserivces_v1_generated_AML_ExportEngineConfigMetadata_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the export_engine_config_metadata call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#export_engine_config_metadata. +# +def export_engine_config_metadata + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new + + # Call the export_engine_config_metadata method. + result = client.export_engine_config_metadata request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_ExportEngineConfigMetadata_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_model_metadata.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_model_metadata.rb new file mode 100644 index 000000000000..5fcbff921343 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_model_metadata.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 financialserivces_v1_generated_AML_ExportModelMetadata_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the export_model_metadata call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#export_model_metadata. +# +def export_model_metadata + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new + + # Call the export_model_metadata method. + result = client.export_model_metadata request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_ExportModelMetadata_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_prediction_result_metadata.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_prediction_result_metadata.rb new file mode 100644 index 000000000000..2e8ada3bb3aa --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_prediction_result_metadata.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 financialserivces_v1_generated_AML_ExportPredictionResultMetadata_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the export_prediction_result_metadata call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#export_prediction_result_metadata. +# +def export_prediction_result_metadata + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new + + # Call the export_prediction_result_metadata method. + result = client.export_prediction_result_metadata request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_ExportPredictionResultMetadata_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_registered_parties.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_registered_parties.rb new file mode 100644 index 000000000000..5fa8d8836317 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_registered_parties.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 financialserivces_v1_generated_AML_ExportRegisteredParties_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the export_registered_parties call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#export_registered_parties. +# +def export_registered_parties + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new + + # Call the export_registered_parties method. + result = client.export_registered_parties request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_ExportRegisteredParties_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_backtest_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_backtest_result.rb new file mode 100644 index 000000000000..51d08bc8eee2 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_backtest_result.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 financialserivces_v1_generated_AML_GetBacktestResult_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the get_backtest_result call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#get_backtest_result. +# +def get_backtest_result + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new + + # Call the get_backtest_result method. + result = client.get_backtest_result request + + # The returned object is of type Google::Cloud::FinancialServices::V1::BacktestResult. + p result +end +# [END financialserivces_v1_generated_AML_GetBacktestResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_dataset.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_dataset.rb new file mode 100644 index 000000000000..fa19ec72707d --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_dataset.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 financialserivces_v1_generated_AML_GetDataset_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the get_dataset call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#get_dataset. +# +def get_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::GetDatasetRequest.new + + # Call the get_dataset method. + result = client.get_dataset request + + # The returned object is of type Google::Cloud::FinancialServices::V1::Dataset. + p result +end +# [END financialserivces_v1_generated_AML_GetDataset_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_config.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_config.rb new file mode 100644 index 000000000000..d2f596f8b31c --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_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 financialserivces_v1_generated_AML_GetEngineConfig_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the get_engine_config call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#get_engine_config. +# +def get_engine_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new + + # Call the get_engine_config method. + result = client.get_engine_config request + + # The returned object is of type Google::Cloud::FinancialServices::V1::EngineConfig. + p result +end +# [END financialserivces_v1_generated_AML_GetEngineConfig_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_version.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_version.rb new file mode 100644 index 000000000000..38c1b3cddcad --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_version.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 financialserivces_v1_generated_AML_GetEngineVersion_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the get_engine_version call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#get_engine_version. +# +def get_engine_version + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new + + # Call the get_engine_version method. + result = client.get_engine_version request + + # The returned object is of type Google::Cloud::FinancialServices::V1::EngineVersion. + p result +end +# [END financialserivces_v1_generated_AML_GetEngineVersion_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_instance.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_instance.rb new file mode 100644 index 000000000000..43591eeb095c --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_instance.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 financialserivces_v1_generated_AML_GetInstance_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the get_instance call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#get_instance. +# +def get_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::GetInstanceRequest.new + + # Call the get_instance method. + result = client.get_instance request + + # The returned object is of type Google::Cloud::FinancialServices::V1::Instance. + p result +end +# [END financialserivces_v1_generated_AML_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_model.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_model.rb new file mode 100644 index 000000000000..5a9297b6e7f5 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_model.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 financialserivces_v1_generated_AML_GetModel_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the get_model call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#get_model. +# +def get_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::GetModelRequest.new + + # Call the get_model method. + result = client.get_model request + + # The returned object is of type Google::Cloud::FinancialServices::V1::Model. + p result +end +# [END financialserivces_v1_generated_AML_GetModel_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_prediction_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_prediction_result.rb new file mode 100644 index 000000000000..270ca19c7ad2 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_prediction_result.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 financialserivces_v1_generated_AML_GetPredictionResult_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the get_prediction_result call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#get_prediction_result. +# +def get_prediction_result + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new + + # Call the get_prediction_result method. + result = client.get_prediction_result request + + # The returned object is of type Google::Cloud::FinancialServices::V1::PredictionResult. + p result +end +# [END financialserivces_v1_generated_AML_GetPredictionResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/import_registered_parties.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/import_registered_parties.rb new file mode 100644 index 000000000000..7f0d7ac1f5e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/import_registered_parties.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 financialserivces_v1_generated_AML_ImportRegisteredParties_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the import_registered_parties call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#import_registered_parties. +# +def import_registered_parties + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new + + # Call the import_registered_parties method. + result = client.import_registered_parties request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_ImportRegisteredParties_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_backtest_results.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_backtest_results.rb new file mode 100644 index 000000000000..ec5d2af2ff4f --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_backtest_results.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 financialserivces_v1_generated_AML_ListBacktestResults_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the list_backtest_results call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#list_backtest_results. +# +def list_backtest_results + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.new + + # Call the list_backtest_results method. + result = client.list_backtest_results request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::FinancialServices::V1::BacktestResult. + p item + end +end +# [END financialserivces_v1_generated_AML_ListBacktestResults_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_datasets.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_datasets.rb new file mode 100644 index 000000000000..426e6b0544ef --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_datasets.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 financialserivces_v1_generated_AML_ListDatasets_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the list_datasets call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#list_datasets. +# +def list_datasets + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::ListDatasetsRequest.new + + # Call the list_datasets method. + result = client.list_datasets request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::FinancialServices::V1::Dataset. + p item + end +end +# [END financialserivces_v1_generated_AML_ListDatasets_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_configs.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_configs.rb new file mode 100644 index 000000000000..3997f515d096 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_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 financialserivces_v1_generated_AML_ListEngineConfigs_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the list_engine_configs call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#list_engine_configs. +# +def list_engine_configs + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.new + + # Call the list_engine_configs method. + result = client.list_engine_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::FinancialServices::V1::EngineConfig. + p item + end +end +# [END financialserivces_v1_generated_AML_ListEngineConfigs_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_versions.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_versions.rb new file mode 100644 index 000000000000..98b57a693564 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_versions.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 financialserivces_v1_generated_AML_ListEngineVersions_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the list_engine_versions call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#list_engine_versions. +# +def list_engine_versions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.new + + # Call the list_engine_versions method. + result = client.list_engine_versions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::FinancialServices::V1::EngineVersion. + p item + end +end +# [END financialserivces_v1_generated_AML_ListEngineVersions_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_instances.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_instances.rb new file mode 100644 index 000000000000..3b6c47d584d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_instances.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 financialserivces_v1_generated_AML_ListInstances_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the list_instances call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#list_instances. +# +def list_instances + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::ListInstancesRequest.new + + # Call the list_instances method. + result = client.list_instances request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::FinancialServices::V1::Instance. + p item + end +end +# [END financialserivces_v1_generated_AML_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_models.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_models.rb new file mode 100644 index 000000000000..fdf5ed6508ea --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_models.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 financialserivces_v1_generated_AML_ListModels_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the list_models call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#list_models. +# +def list_models + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::ListModelsRequest.new + + # Call the list_models method. + result = client.list_models request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::FinancialServices::V1::Model. + p item + end +end +# [END financialserivces_v1_generated_AML_ListModels_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_prediction_results.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_prediction_results.rb new file mode 100644 index 000000000000..129f7876f530 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_prediction_results.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 financialserivces_v1_generated_AML_ListPredictionResults_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the list_prediction_results call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#list_prediction_results. +# +def list_prediction_results + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.new + + # Call the list_prediction_results method. + result = client.list_prediction_results request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::FinancialServices::V1::PredictionResult. + p item + end +end +# [END financialserivces_v1_generated_AML_ListPredictionResults_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_backtest_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_backtest_result.rb new file mode 100644 index 000000000000..c917770102f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_backtest_result.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 financialserivces_v1_generated_AML_UpdateBacktestResult_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the update_backtest_result call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#update_backtest_result. +# +def update_backtest_result + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new + + # Call the update_backtest_result method. + result = client.update_backtest_result request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_UpdateBacktestResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_dataset.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_dataset.rb new file mode 100644 index 000000000000..c58d8da5db4a --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_dataset.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 financialserivces_v1_generated_AML_UpdateDataset_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the update_dataset call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#update_dataset. +# +def update_dataset + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new + + # Call the update_dataset method. + result = client.update_dataset request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_UpdateDataset_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_engine_config.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_engine_config.rb new file mode 100644 index 000000000000..d7984edf4e49 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_engine_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 financialserivces_v1_generated_AML_UpdateEngineConfig_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the update_engine_config call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#update_engine_config. +# +def update_engine_config + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new + + # Call the update_engine_config method. + result = client.update_engine_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 financialserivces_v1_generated_AML_UpdateEngineConfig_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_instance.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_instance.rb new file mode 100644 index 000000000000..ffc9ed715f66 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_instance.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 financialserivces_v1_generated_AML_UpdateInstance_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the update_instance call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#update_instance. +# +def update_instance + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new + + # Call the update_instance method. + result = client.update_instance request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_UpdateInstance_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_model.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_model.rb new file mode 100644 index 000000000000..0f6be62e5c75 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_model.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 financialserivces_v1_generated_AML_UpdateModel_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the update_model call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#update_model. +# +def update_model + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::UpdateModelRequest.new + + # Call the update_model method. + result = client.update_model request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_UpdateModel_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_prediction_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_prediction_result.rb new file mode 100644 index 000000000000..3a6c19a47e8b --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_prediction_result.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 financialserivces_v1_generated_AML_UpdatePredictionResult_sync] +require "google/cloud/financial_services/v1" + +## +# Snippet for the update_prediction_result call in the AML service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::FinancialServices::V1::AML::Client#update_prediction_result. +# +def update_prediction_result + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::FinancialServices::V1::AML::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new + + # Call the update_prediction_result method. + result = client.update_prediction_result request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 financialserivces_v1_generated_AML_UpdatePredictionResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/snippet_metadata_google.cloud.financialservices.v1.json b/owl-bot-staging/google-cloud-financial_services-v1/snippets/snippet_metadata_google.cloud.financialservices.v1.json new file mode 100644 index 000000000000..94304b930124 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/snippets/snippet_metadata_google.cloud.financialservices.v1.json @@ -0,0 +1,1535 @@ +{ + "client_library": { + "name": "google-cloud-financial_services-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.financialservices.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "financialserivces_v1_generated_AML_ListInstances_sync", + "title": "Snippet for the list_instances call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_instances.", + "file": "aml/list_instances.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_instances", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_instances", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::ListInstancesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::ListInstancesResponse", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "ListInstances", + "full_name": "google.cloud.financialservices.v1.AML.ListInstances", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_GetInstance_sync", + "title": "Snippet for the get_instance call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_instance.", + "file": "aml/get_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_instance", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::GetInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::Instance", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "GetInstance", + "full_name": "google.cloud.financialservices.v1.AML.GetInstance", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_CreateInstance_sync", + "title": "Snippet for the create_instance call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#create_instance.", + "file": "aml/create_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_instance", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#create_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::CreateInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "CreateInstance", + "full_name": "google.cloud.financialservices.v1.AML.CreateInstance", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_UpdateInstance_sync", + "title": "Snippet for the update_instance call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#update_instance.", + "file": "aml/update_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_instance", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#update_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "UpdateInstance", + "full_name": "google.cloud.financialservices.v1.AML.UpdateInstance", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_DeleteInstance_sync", + "title": "Snippet for the delete_instance call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#delete_instance.", + "file": "aml/delete_instance.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_instance", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#delete_instance", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "DeleteInstance", + "full_name": "google.cloud.financialservices.v1.AML.DeleteInstance", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_ImportRegisteredParties_sync", + "title": "Snippet for the import_registered_parties call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#import_registered_parties.", + "file": "aml/import_registered_parties.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_registered_parties", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#import_registered_parties", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "ImportRegisteredParties", + "full_name": "google.cloud.financialservices.v1.AML.ImportRegisteredParties", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_ExportRegisteredParties_sync", + "title": "Snippet for the export_registered_parties call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#export_registered_parties.", + "file": "aml/export_registered_parties.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_registered_parties", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#export_registered_parties", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "ExportRegisteredParties", + "full_name": "google.cloud.financialservices.v1.AML.ExportRegisteredParties", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_ListDatasets_sync", + "title": "Snippet for the list_datasets call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_datasets.", + "file": "aml/list_datasets.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_datasets", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_datasets", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::ListDatasetsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::ListDatasetsResponse", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "ListDatasets", + "full_name": "google.cloud.financialservices.v1.AML.ListDatasets", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_GetDataset_sync", + "title": "Snippet for the get_dataset call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_dataset.", + "file": "aml/get_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_dataset", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::GetDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::Dataset", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "GetDataset", + "full_name": "google.cloud.financialservices.v1.AML.GetDataset", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_CreateDataset_sync", + "title": "Snippet for the create_dataset call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#create_dataset.", + "file": "aml/create_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_dataset", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#create_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::CreateDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "CreateDataset", + "full_name": "google.cloud.financialservices.v1.AML.CreateDataset", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_UpdateDataset_sync", + "title": "Snippet for the update_dataset call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#update_dataset.", + "file": "aml/update_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_dataset", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#update_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "UpdateDataset", + "full_name": "google.cloud.financialservices.v1.AML.UpdateDataset", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_DeleteDataset_sync", + "title": "Snippet for the delete_dataset call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#delete_dataset.", + "file": "aml/delete_dataset.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_dataset", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#delete_dataset", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "DeleteDataset", + "full_name": "google.cloud.financialservices.v1.AML.DeleteDataset", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_ListModels_sync", + "title": "Snippet for the list_models call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_models.", + "file": "aml/list_models.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_models", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_models", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::ListModelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::ListModelsResponse", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "ListModels", + "full_name": "google.cloud.financialservices.v1.AML.ListModels", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_GetModel_sync", + "title": "Snippet for the get_model call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_model.", + "file": "aml/get_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_model", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::GetModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::Model", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "GetModel", + "full_name": "google.cloud.financialservices.v1.AML.GetModel", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_CreateModel_sync", + "title": "Snippet for the create_model call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#create_model.", + "file": "aml/create_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_model", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#create_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::CreateModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "CreateModel", + "full_name": "google.cloud.financialservices.v1.AML.CreateModel", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_UpdateModel_sync", + "title": "Snippet for the update_model call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#update_model.", + "file": "aml/update_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_model", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#update_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::UpdateModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "UpdateModel", + "full_name": "google.cloud.financialservices.v1.AML.UpdateModel", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_ExportModelMetadata_sync", + "title": "Snippet for the export_model_metadata call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#export_model_metadata.", + "file": "aml/export_model_metadata.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_model_metadata", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#export_model_metadata", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "ExportModelMetadata", + "full_name": "google.cloud.financialservices.v1.AML.ExportModelMetadata", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_DeleteModel_sync", + "title": "Snippet for the delete_model call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#delete_model.", + "file": "aml/delete_model.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_model", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#delete_model", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::DeleteModelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "DeleteModel", + "full_name": "google.cloud.financialservices.v1.AML.DeleteModel", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_ListEngineConfigs_sync", + "title": "Snippet for the list_engine_configs call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_engine_configs.", + "file": "aml/list_engine_configs.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_engine_configs", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_engine_configs", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "ListEngineConfigs", + "full_name": "google.cloud.financialservices.v1.AML.ListEngineConfigs", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_GetEngineConfig_sync", + "title": "Snippet for the get_engine_config call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_engine_config.", + "file": "aml/get_engine_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_engine_config", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_engine_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::EngineConfig", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "GetEngineConfig", + "full_name": "google.cloud.financialservices.v1.AML.GetEngineConfig", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_CreateEngineConfig_sync", + "title": "Snippet for the create_engine_config call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#create_engine_config.", + "file": "aml/create_engine_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_engine_config", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#create_engine_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "CreateEngineConfig", + "full_name": "google.cloud.financialservices.v1.AML.CreateEngineConfig", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_UpdateEngineConfig_sync", + "title": "Snippet for the update_engine_config call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#update_engine_config.", + "file": "aml/update_engine_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_engine_config", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#update_engine_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "UpdateEngineConfig", + "full_name": "google.cloud.financialservices.v1.AML.UpdateEngineConfig", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_ExportEngineConfigMetadata_sync", + "title": "Snippet for the export_engine_config_metadata call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#export_engine_config_metadata.", + "file": "aml/export_engine_config_metadata.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_engine_config_metadata", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#export_engine_config_metadata", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "ExportEngineConfigMetadata", + "full_name": "google.cloud.financialservices.v1.AML.ExportEngineConfigMetadata", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_DeleteEngineConfig_sync", + "title": "Snippet for the delete_engine_config call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#delete_engine_config.", + "file": "aml/delete_engine_config.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_engine_config", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#delete_engine_config", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "DeleteEngineConfig", + "full_name": "google.cloud.financialservices.v1.AML.DeleteEngineConfig", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_GetEngineVersion_sync", + "title": "Snippet for the get_engine_version call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_engine_version.", + "file": "aml/get_engine_version.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_engine_version", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_engine_version", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::EngineVersion", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "GetEngineVersion", + "full_name": "google.cloud.financialservices.v1.AML.GetEngineVersion", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_ListEngineVersions_sync", + "title": "Snippet for the list_engine_versions call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_engine_versions.", + "file": "aml/list_engine_versions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_engine_versions", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_engine_versions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "ListEngineVersions", + "full_name": "google.cloud.financialservices.v1.AML.ListEngineVersions", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_ListPredictionResults_sync", + "title": "Snippet for the list_prediction_results call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_prediction_results.", + "file": "aml/list_prediction_results.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_prediction_results", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_prediction_results", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "ListPredictionResults", + "full_name": "google.cloud.financialservices.v1.AML.ListPredictionResults", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_GetPredictionResult_sync", + "title": "Snippet for the get_prediction_result call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_prediction_result.", + "file": "aml/get_prediction_result.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_prediction_result", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_prediction_result", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::PredictionResult", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "GetPredictionResult", + "full_name": "google.cloud.financialservices.v1.AML.GetPredictionResult", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_CreatePredictionResult_sync", + "title": "Snippet for the create_prediction_result call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#create_prediction_result.", + "file": "aml/create_prediction_result.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_prediction_result", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#create_prediction_result", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "CreatePredictionResult", + "full_name": "google.cloud.financialservices.v1.AML.CreatePredictionResult", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_UpdatePredictionResult_sync", + "title": "Snippet for the update_prediction_result call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#update_prediction_result.", + "file": "aml/update_prediction_result.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_prediction_result", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#update_prediction_result", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "UpdatePredictionResult", + "full_name": "google.cloud.financialservices.v1.AML.UpdatePredictionResult", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_ExportPredictionResultMetadata_sync", + "title": "Snippet for the export_prediction_result_metadata call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#export_prediction_result_metadata.", + "file": "aml/export_prediction_result_metadata.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_prediction_result_metadata", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#export_prediction_result_metadata", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "ExportPredictionResultMetadata", + "full_name": "google.cloud.financialservices.v1.AML.ExportPredictionResultMetadata", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_DeletePredictionResult_sync", + "title": "Snippet for the delete_prediction_result call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#delete_prediction_result.", + "file": "aml/delete_prediction_result.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_prediction_result", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#delete_prediction_result", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "DeletePredictionResult", + "full_name": "google.cloud.financialservices.v1.AML.DeletePredictionResult", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_ListBacktestResults_sync", + "title": "Snippet for the list_backtest_results call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_backtest_results.", + "file": "aml/list_backtest_results.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backtest_results", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_backtest_results", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "ListBacktestResults", + "full_name": "google.cloud.financialservices.v1.AML.ListBacktestResults", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_GetBacktestResult_sync", + "title": "Snippet for the get_backtest_result call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_backtest_result.", + "file": "aml/get_backtest_result.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backtest_result", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_backtest_result", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::FinancialServices::V1::BacktestResult", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "GetBacktestResult", + "full_name": "google.cloud.financialservices.v1.AML.GetBacktestResult", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_CreateBacktestResult_sync", + "title": "Snippet for the create_backtest_result call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#create_backtest_result.", + "file": "aml/create_backtest_result.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backtest_result", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#create_backtest_result", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "CreateBacktestResult", + "full_name": "google.cloud.financialservices.v1.AML.CreateBacktestResult", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_UpdateBacktestResult_sync", + "title": "Snippet for the update_backtest_result call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#update_backtest_result.", + "file": "aml/update_backtest_result.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backtest_result", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#update_backtest_result", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "UpdateBacktestResult", + "full_name": "google.cloud.financialservices.v1.AML.UpdateBacktestResult", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_ExportBacktestResultMetadata_sync", + "title": "Snippet for the export_backtest_result_metadata call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#export_backtest_result_metadata.", + "file": "aml/export_backtest_result_metadata.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_backtest_result_metadata", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#export_backtest_result_metadata", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "ExportBacktestResultMetadata", + "full_name": "google.cloud.financialservices.v1.AML.ExportBacktestResultMetadata", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "financialserivces_v1_generated_AML_DeleteBacktestResult_sync", + "title": "Snippet for the delete_backtest_result call in the AML service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#delete_backtest_result.", + "file": "aml/delete_backtest_result.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backtest_result", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#delete_backtest_result", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "AML::Client", + "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" + }, + "method": { + "short_name": "DeleteBacktestResult", + "full_name": "google.cloud.financialservices.v1.AML.DeleteBacktestResult", + "service": { + "short_name": "AML", + "full_name": "google.cloud.financialservices.v1.AML" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_operations_test.rb b/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_operations_test.rb new file mode 100644 index 000000000000..338abe107014 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_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/financialservices/v1/service_pb" +require "google/cloud/financialservices/v1/service_services_pb" +require "google/cloud/financial_services/v1/aml" + +class ::Google::Cloud::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_paths_test.rb b/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_paths_test.rb new file mode 100644 index 000000000000..dd40ab5d678a --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_paths_test.rb @@ -0,0 +1,139 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/financial_services/v1/aml" + +class ::Google::Cloud::FinancialServices::V1::AML::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_backtest_result_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backtest_result_path project_num: "value0", location: "value1", instance: "value2", backtest_result: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/backtestResults/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::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.dataset_path project_num: "value0", location: "value1", instance: "value2", dataset: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/datasets/value3", path + end + end + + def test_engine_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::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.engine_config_path project_num: "value0", location: "value1", instance: "value2", engine_config: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/engineConfigs/value3", path + end + end + + def test_engine_version_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.engine_version_path project_num: "value0", location: "value1", instance: "value2", engine_version: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/engineVersions/value3", path + end + end + + def test_instance_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.instance_path project: "value0", location: "value1", instance: "value2" + assert_equal "projects/value0/locations/value1/instances/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::FinancialServices::V1::AML::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_model_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.model_path project_num: "value0", location: "value1", instance: "value2", model: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/models/value3", path + end + end + + def test_prediction_result_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.prediction_result_path project_num: "value0", location: "value1", instance: "value2", prediction_result: "value3" + assert_equal "projects/value0/locations/value1/instances/value2/predictionResults/value3", path + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_rest_test.rb b/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_rest_test.rb new file mode 100644 index 000000000000..ff1208a8e26e --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_rest_test.rb @@ -0,0 +1,2225 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/financialservices/v1/service_pb" +require "google/cloud/financial_services/v1/aml/rest" + + +class ::Google::Cloud::FinancialServices::V1::AML::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_list_instances + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::ListInstancesResponse.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_instances_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_instances({ parent: parent, page_size: 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_instances parent: parent, page_size: 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_instances ::Google::Cloud::FinancialServices::V1::ListInstancesRequest.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_instances({ 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_instances(::Google::Cloud::FinancialServices::V1::ListInstancesRequest.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_instances_client_stub.call_count + end + end + end + + def test_get_instance + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::Instance.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_instance({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_instance name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_instance ::Google::Cloud::FinancialServices::V1::GetInstanceRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_instance({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_instance(::Google::Cloud::FinancialServices::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_instance_client_stub.call_count + end + end + end + + def test_create_instance + # 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" + instance_id = "hello world" + instance = {} + request_id = "hello world" + + create_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_create_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_instance_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_instance parent: parent, instance_id: instance_id, instance: instance, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_instance ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_instance(::Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_instance_client_stub.call_count + end + end + end + + def test_update_instance + # 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 = {} + instance = {} + request_id = "hello world" + + update_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_update_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_instance_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_instance({ update_mask: update_mask, instance: instance, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_instance update_mask: update_mask, instance: instance, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_instance ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_instance({ update_mask: update_mask, instance: instance, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_instance(::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_instance_client_stub.call_count + end + end + end + + def test_delete_instance + # 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" + request_id = "hello world" + + delete_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_instance({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_instance name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_instance ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_instance({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_instance(::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_instance_client_stub.call_count + end + end + end + + def test_import_registered_parties + # 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" + party_tables = ["hello world"] + mode = :UPDATE_MODE_UNSPECIFIED + validate_only = true + line_of_business = :LINE_OF_BUSINESS_UNSPECIFIED + + import_registered_parties_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_import_registered_parties_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_registered_parties_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_registered_parties({ name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_registered_parties name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_registered_parties ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new(name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_registered_parties({ name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_registered_parties(::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new(name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_registered_parties_client_stub.call_count + end + end + end + + def test_export_registered_parties + # 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" + dataset = {} + line_of_business = :LINE_OF_BUSINESS_UNSPECIFIED + + export_registered_parties_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_export_registered_parties_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_registered_parties_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_registered_parties({ name: name, dataset: dataset, line_of_business: line_of_business }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_registered_parties name: name, dataset: dataset, line_of_business: line_of_business do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_registered_parties ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new(name: name, dataset: dataset, line_of_business: line_of_business) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_registered_parties({ name: name, dataset: dataset, line_of_business: line_of_business }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_registered_parties(::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new(name: name, dataset: dataset, line_of_business: line_of_business), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_registered_parties_client_stub.call_count + end + end + end + + def test_list_datasets + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::ListDatasetsResponse.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_datasets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_datasets_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_datasets_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_datasets({ parent: parent, page_size: 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_datasets parent: parent, page_size: 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_datasets ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::FinancialServices::V1::ListDatasetsRequest.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_datasets_client_stub.call_count + end + end + end + + def test_get_dataset + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::Dataset.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_dataset_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_dataset({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_dataset name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_dataset ::Google::Cloud::FinancialServices::V1::GetDatasetRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_dataset({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_dataset(::Google::Cloud::FinancialServices::V1::GetDatasetRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_dataset_client_stub.call_count + end + end + end + + def test_create_dataset + # 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" + dataset_id = "hello world" + dataset = {} + request_id = "hello world" + + create_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_create_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_dataset_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_dataset({ parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_dataset parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_dataset ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new(parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_dataset({ parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_dataset(::Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new(parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_dataset_client_stub.call_count + end + end + end + + def test_update_dataset + # 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 = {} + dataset = {} + request_id = "hello world" + + update_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_update_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_dataset_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_dataset({ update_mask: update_mask, dataset: dataset, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_dataset update_mask: update_mask, dataset: dataset, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_dataset ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new(update_mask: update_mask, dataset: dataset, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_dataset({ update_mask: update_mask, dataset: dataset, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_dataset(::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new(update_mask: update_mask, dataset: dataset, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_dataset_client_stub.call_count + end + end + end + + def test_delete_dataset + # 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" + request_id = "hello world" + + delete_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_delete_dataset_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_dataset_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_dataset({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_dataset name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_dataset ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_dataset({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_dataset(::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_dataset_client_stub.call_count + end + end + end + + def test_list_models + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::ListModelsResponse.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_models_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_models_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_models_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_models({ parent: parent, page_size: 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_models parent: parent, page_size: 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_models ::Google::Cloud::FinancialServices::V1::ListModelsRequest.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_models({ 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_models(::Google::Cloud::FinancialServices::V1::ListModelsRequest.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_models_client_stub.call_count + end + end + end + + def test_get_model + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::Model.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_model_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_model({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_model name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_model ::Google::Cloud::FinancialServices::V1::GetModelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_model({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_model(::Google::Cloud::FinancialServices::V1::GetModelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_model_client_stub.call_count + end + end + end + + def test_create_model + # 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" + model_id = "hello world" + model = {} + request_id = "hello world" + + create_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_create_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_model_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_model({ parent: parent, model_id: model_id, model: model, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_model parent: parent, model_id: model_id, model: model, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_model ::Google::Cloud::FinancialServices::V1::CreateModelRequest.new(parent: parent, model_id: model_id, model: model, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_model({ parent: parent, model_id: model_id, model: model, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_model(::Google::Cloud::FinancialServices::V1::CreateModelRequest.new(parent: parent, model_id: model_id, model: model, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_model_client_stub.call_count + end + end + end + + def test_update_model + # 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 = {} + model = {} + request_id = "hello world" + + update_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_update_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_model_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_model({ update_mask: update_mask, model: model, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_model update_mask: update_mask, model: model, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_model ::Google::Cloud::FinancialServices::V1::UpdateModelRequest.new(update_mask: update_mask, model: model, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_model({ update_mask: update_mask, model: model, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_model(::Google::Cloud::FinancialServices::V1::UpdateModelRequest.new(update_mask: update_mask, model: model, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_model_client_stub.call_count + end + end + end + + def test_export_model_metadata + # 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. + model = "hello world" + structured_metadata_destination = {} + + export_model_metadata_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_export_model_metadata_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_model_metadata_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_model_metadata({ model: model, structured_metadata_destination: structured_metadata_destination }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_model_metadata model: model, structured_metadata_destination: structured_metadata_destination do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_model_metadata ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new(model: model, structured_metadata_destination: structured_metadata_destination) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_model_metadata({ model: model, structured_metadata_destination: structured_metadata_destination }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_model_metadata(::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new(model: model, structured_metadata_destination: structured_metadata_destination), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_model_metadata_client_stub.call_count + end + end + end + + def test_delete_model + # 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" + request_id = "hello world" + + delete_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_delete_model_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_model_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_model({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_model name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_model ::Google::Cloud::FinancialServices::V1::DeleteModelRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_model({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_model(::Google::Cloud::FinancialServices::V1::DeleteModelRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_model_client_stub.call_count + end + end + end + + def test_list_engine_configs + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse.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_engine_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::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_engine_configs_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_engine_configs_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_engine_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_engine_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_engine_configs ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.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_engine_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_engine_configs(::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.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_engine_configs_client_stub.call_count + end + end + end + + def test_get_engine_config + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::EngineConfig.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_engine_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::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_engine_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_engine_config_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_engine_config({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_engine_config name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_engine_config ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_engine_config({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_engine_config(::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_engine_config_client_stub.call_count + end + end + end + + def test_create_engine_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" + engine_config_id = "hello world" + engine_config = {} + request_id = "hello world" + + create_engine_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::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_create_engine_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_engine_config_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_engine_config({ parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_engine_config parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_engine_config ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new(parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_engine_config({ parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_engine_config(::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new(parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_engine_config_client_stub.call_count + end + end + end + + def test_update_engine_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. + update_mask = {} + engine_config = {} + request_id = "hello world" + + update_engine_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::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_update_engine_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_engine_config_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_engine_config({ update_mask: update_mask, engine_config: engine_config, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_engine_config update_mask: update_mask, engine_config: engine_config, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_engine_config ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new(update_mask: update_mask, engine_config: engine_config, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_engine_config({ update_mask: update_mask, engine_config: engine_config, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_engine_config(::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new(update_mask: update_mask, engine_config: engine_config, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_engine_config_client_stub.call_count + end + end + end + + def test_export_engine_config_metadata + # 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. + engine_config = "hello world" + structured_metadata_destination = {} + + export_engine_config_metadata_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_export_engine_config_metadata_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_engine_config_metadata_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_engine_config_metadata({ engine_config: engine_config, structured_metadata_destination: structured_metadata_destination }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_engine_config_metadata engine_config: engine_config, structured_metadata_destination: structured_metadata_destination do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_engine_config_metadata ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new(engine_config: engine_config, structured_metadata_destination: structured_metadata_destination) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_engine_config_metadata({ engine_config: engine_config, structured_metadata_destination: structured_metadata_destination }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_engine_config_metadata(::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new(engine_config: engine_config, structured_metadata_destination: structured_metadata_destination), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_engine_config_metadata_client_stub.call_count + end + end + end + + def test_delete_engine_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" + request_id = "hello world" + + delete_engine_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::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_delete_engine_config_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_engine_config_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_engine_config({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_engine_config name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_engine_config ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_engine_config({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_engine_config(::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_engine_config_client_stub.call_count + end + end + end + + def test_get_engine_version + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::EngineVersion.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_engine_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_engine_version_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_engine_version_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_engine_version({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_engine_version name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_engine_version ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_engine_version({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_engine_version(::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_engine_version_client_stub.call_count + end + end + end + + def test_list_engine_versions + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse.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_engine_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_engine_versions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_engine_versions_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_engine_versions({ parent: parent, page_size: 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_engine_versions parent: parent, page_size: 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_engine_versions ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.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_engine_versions({ 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_engine_versions(::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.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_engine_versions_client_stub.call_count + end + end + end + + def test_list_prediction_results + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse.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_prediction_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_prediction_results_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_prediction_results_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_prediction_results({ parent: parent, page_size: 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_prediction_results parent: parent, page_size: 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_prediction_results ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.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_prediction_results({ 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_prediction_results(::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.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_prediction_results_client_stub.call_count + end + end + end + + def test_get_prediction_result + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::PredictionResult.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_prediction_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_prediction_result_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_prediction_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_prediction_result({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_prediction_result name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_prediction_result ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_prediction_result({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_prediction_result(::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_prediction_result_client_stub.call_count + end + end + end + + def test_create_prediction_result + # 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" + prediction_result_id = "hello world" + prediction_result = {} + request_id = "hello world" + + create_prediction_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_create_prediction_result_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_prediction_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_prediction_result({ parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_prediction_result parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_prediction_result ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new(parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_prediction_result({ parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_prediction_result(::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new(parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_prediction_result_client_stub.call_count + end + end + end + + def test_update_prediction_result + # 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 = {} + prediction_result = {} + request_id = "hello world" + + update_prediction_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_update_prediction_result_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_prediction_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_prediction_result({ update_mask: update_mask, prediction_result: prediction_result, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_prediction_result update_mask: update_mask, prediction_result: prediction_result, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_prediction_result ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new(update_mask: update_mask, prediction_result: prediction_result, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_prediction_result({ update_mask: update_mask, prediction_result: prediction_result, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_prediction_result(::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new(update_mask: update_mask, prediction_result: prediction_result, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_prediction_result_client_stub.call_count + end + end + end + + def test_export_prediction_result_metadata + # 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. + prediction_result = "hello world" + structured_metadata_destination = {} + + export_prediction_result_metadata_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_export_prediction_result_metadata_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_prediction_result_metadata_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_prediction_result_metadata({ prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_prediction_result_metadata prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_prediction_result_metadata ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new(prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_prediction_result_metadata({ prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_prediction_result_metadata(::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new(prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_prediction_result_metadata_client_stub.call_count + end + end + end + + def test_delete_prediction_result + # 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" + request_id = "hello world" + + delete_prediction_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_delete_prediction_result_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_prediction_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_prediction_result({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_prediction_result name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_prediction_result ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_prediction_result({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_prediction_result(::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_prediction_result_client_stub.call_count + end + end + end + + def test_list_backtest_results + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse.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_backtest_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_backtest_results_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backtest_results_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backtest_results({ parent: parent, page_size: 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_backtest_results parent: parent, page_size: 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_backtest_results ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.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_backtest_results({ 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_backtest_results(::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.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_backtest_results_client_stub.call_count + end + end + end + + def test_get_backtest_result + # Create test objects. + client_result = ::Google::Cloud::FinancialServices::V1::BacktestResult.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backtest_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_backtest_result_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backtest_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backtest_result({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backtest_result name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backtest_result ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backtest_result({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backtest_result(::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backtest_result_client_stub.call_count + end + end + end + + def test_create_backtest_result + # 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" + backtest_result_id = "hello world" + backtest_result = {} + request_id = "hello world" + + create_backtest_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_create_backtest_result_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backtest_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_backtest_result({ parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_backtest_result parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_backtest_result ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new(parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_backtest_result({ parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_backtest_result(::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new(parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backtest_result_client_stub.call_count + end + end + end + + def test_update_backtest_result + # 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 = {} + backtest_result = {} + request_id = "hello world" + + update_backtest_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_update_backtest_result_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backtest_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backtest_result({ update_mask: update_mask, backtest_result: backtest_result, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backtest_result update_mask: update_mask, backtest_result: backtest_result, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backtest_result ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new(update_mask: update_mask, backtest_result: backtest_result, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backtest_result({ update_mask: update_mask, backtest_result: backtest_result, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backtest_result(::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new(update_mask: update_mask, backtest_result: backtest_result, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backtest_result_client_stub.call_count + end + end + end + + def test_export_backtest_result_metadata + # 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. + backtest_result = "hello world" + structured_metadata_destination = {} + + export_backtest_result_metadata_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_export_backtest_result_metadata_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_backtest_result_metadata_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_backtest_result_metadata({ backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_backtest_result_metadata backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_backtest_result_metadata ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new(backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_backtest_result_metadata({ backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_backtest_result_metadata(::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new(backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_backtest_result_metadata_client_stub.call_count + end + end + end + + def test_delete_backtest_result + # 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" + request_id = "hello world" + + delete_backtest_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_delete_backtest_result_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backtest_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backtest_result({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backtest_result name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backtest_result ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backtest_result({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backtest_result(::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backtest_result_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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_test.rb b/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_test.rb new file mode 100644 index 000000000000..dee4963beb8c --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_test.rb @@ -0,0 +1,2625 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/financialservices/v1/service_pb" +require "google/cloud/financial_services/v1/aml" + +class ::Google::Cloud::FinancialServices::V1::AML::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_list_instances + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::ListInstancesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_instances, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::ListInstancesRequest, 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_instances_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_instances ::Google::Cloud::FinancialServices::V1::ListInstancesRequest.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_instances({ 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_instances(::Google::Cloud::FinancialServices::V1::ListInstancesRequest.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_instances_client_stub.call_rpc_count + end + end + + def test_get_instance + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::Instance.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_instance, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::GetInstanceRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_instance_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_instance({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_instance name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_instance ::Google::Cloud::FinancialServices::V1::GetInstanceRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_instance({ 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_instance(::Google::Cloud::FinancialServices::V1::GetInstanceRequest.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_instance_client_stub.call_rpc_count + end + end + + def test_create_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + instance_id = "hello world" + instance = {} + request_id = "hello world" + + create_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_instance, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["instance_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::Instance), request["instance"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_instance_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }) do |response, 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_instance parent: parent, instance_id: instance_id, instance: instance, request_id: request_id do |response, 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_instance ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id) do |response, operation| + assert_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_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }, grpc_options) do |response, operation| + assert_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_instance(::Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id), grpc_options) do |response, operation| + assert_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_instance_client_stub.call_rpc_count + end + end + + def test_update_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + instance = {} + request_id = "hello world" + + update_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_instance, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::Instance), request["instance"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_instance_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_instance({ update_mask: update_mask, instance: instance, request_id: request_id }) do |response, 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_instance update_mask: update_mask, instance: instance, request_id: request_id do |response, 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_instance ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance, request_id: request_id) do |response, operation| + assert_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_instance({ update_mask: update_mask, instance: instance, request_id: request_id }, grpc_options) do |response, operation| + assert_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_instance(::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance, request_id: request_id), grpc_options) do |response, operation| + assert_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_instance_client_stub.call_rpc_count + end + end + + def test_delete_instance + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_instance, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_instance_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_instance({ name: name, request_id: request_id }) do |response, 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_instance name: name, request_id: request_id do |response, 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_instance ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new(name: name, request_id: request_id) do |response, operation| + assert_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_instance({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_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_instance(::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_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_instance_client_stub.call_rpc_count + end + end + + def test_import_registered_parties + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + party_tables = ["hello world"] + mode = :UPDATE_MODE_UNSPECIFIED + validate_only = true + line_of_business = :LINE_OF_BUSINESS_UNSPECIFIED + + import_registered_parties_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_registered_parties, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["party_tables"] + assert_equal :UPDATE_MODE_UNSPECIFIED, request["mode"] + assert_equal true, request["validate_only"] + assert_equal :LINE_OF_BUSINESS_UNSPECIFIED, request["line_of_business"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_registered_parties_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_registered_parties({ name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_registered_parties name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_registered_parties ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new(name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_registered_parties({ name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_registered_parties(::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new(name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_registered_parties_client_stub.call_rpc_count + end + end + + def test_export_registered_parties + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + dataset = {} + line_of_business = :LINE_OF_BUSINESS_UNSPECIFIED + + export_registered_parties_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_registered_parties, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BigQueryDestination), request["dataset"] + assert_equal :LINE_OF_BUSINESS_UNSPECIFIED, request["line_of_business"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_registered_parties_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_registered_parties({ name: name, dataset: dataset, line_of_business: line_of_business }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_registered_parties name: name, dataset: dataset, line_of_business: line_of_business do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_registered_parties ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new(name: name, dataset: dataset, line_of_business: line_of_business) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_registered_parties({ name: name, dataset: dataset, line_of_business: line_of_business }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_registered_parties(::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new(name: name, dataset: dataset, line_of_business: line_of_business), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_registered_parties_client_stub.call_rpc_count + end + end + + def test_list_datasets + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::ListDatasetsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_datasets, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest, 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_datasets_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_datasets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_datasets ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::FinancialServices::V1::ListDatasetsRequest.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_datasets_client_stub.call_rpc_count + end + end + + def test_get_dataset + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::Dataset.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_dataset, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::GetDatasetRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_dataset_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_dataset({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_dataset name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_dataset ::Google::Cloud::FinancialServices::V1::GetDatasetRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_dataset({ 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_dataset(::Google::Cloud::FinancialServices::V1::GetDatasetRequest.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_dataset_client_stub.call_rpc_count + end + end + + def test_create_dataset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + dataset_id = "hello world" + dataset = {} + request_id = "hello world" + + create_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_dataset, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["dataset_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::Dataset), request["dataset"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_dataset_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_dataset({ parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id }) do |response, 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_dataset parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id do |response, 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_dataset ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new(parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id) do |response, operation| + assert_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_dataset({ parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id }, grpc_options) do |response, operation| + assert_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_dataset(::Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new(parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id), grpc_options) do |response, operation| + assert_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_dataset_client_stub.call_rpc_count + end + end + + def test_update_dataset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + dataset = {} + request_id = "hello world" + + update_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_dataset, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::Dataset), request["dataset"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_dataset_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_dataset({ update_mask: update_mask, dataset: dataset, request_id: request_id }) do |response, 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_dataset update_mask: update_mask, dataset: dataset, request_id: request_id do |response, 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_dataset ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new(update_mask: update_mask, dataset: dataset, request_id: request_id) do |response, operation| + assert_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_dataset({ update_mask: update_mask, dataset: dataset, request_id: request_id }, grpc_options) do |response, operation| + assert_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_dataset(::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new(update_mask: update_mask, dataset: dataset, request_id: request_id), grpc_options) do |response, operation| + assert_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_dataset_client_stub.call_rpc_count + end + end + + def test_delete_dataset + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_dataset, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_dataset_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_dataset({ name: name, request_id: request_id }) do |response, 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_dataset name: name, request_id: request_id do |response, 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_dataset ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new(name: name, request_id: request_id) do |response, operation| + assert_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_dataset({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_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_dataset(::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_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_dataset_client_stub.call_rpc_count + end + end + + def test_list_models + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::ListModelsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_models_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_models, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::ListModelsRequest, 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_models_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_models({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_models parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_models ::Google::Cloud::FinancialServices::V1::ListModelsRequest.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_models({ 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_models(::Google::Cloud::FinancialServices::V1::ListModelsRequest.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_models_client_stub.call_rpc_count + end + end + + def test_get_model + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::Model.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_model, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::GetModelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_model_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_model({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_model name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_model ::Google::Cloud::FinancialServices::V1::GetModelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_model({ 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_model(::Google::Cloud::FinancialServices::V1::GetModelRequest.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_model_client_stub.call_rpc_count + end + end + + def test_create_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + model_id = "hello world" + model = {} + request_id = "hello world" + + create_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_model, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::CreateModelRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["model_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::Model), request["model"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_model_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_model({ parent: parent, model_id: model_id, model: model, request_id: request_id }) do |response, 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_model parent: parent, model_id: model_id, model: model, request_id: request_id do |response, 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_model ::Google::Cloud::FinancialServices::V1::CreateModelRequest.new(parent: parent, model_id: model_id, model: model, request_id: request_id) do |response, operation| + assert_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_model({ parent: parent, model_id: model_id, model: model, request_id: request_id }, grpc_options) do |response, operation| + assert_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_model(::Google::Cloud::FinancialServices::V1::CreateModelRequest.new(parent: parent, model_id: model_id, model: model, request_id: request_id), grpc_options) do |response, operation| + assert_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_model_client_stub.call_rpc_count + end + end + + def test_update_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + model = {} + request_id = "hello world" + + update_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_model, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::UpdateModelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::Model), request["model"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_model_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_model({ update_mask: update_mask, model: model, request_id: request_id }) do |response, 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_model update_mask: update_mask, model: model, request_id: request_id do |response, 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_model ::Google::Cloud::FinancialServices::V1::UpdateModelRequest.new(update_mask: update_mask, model: model, request_id: request_id) do |response, operation| + assert_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_model({ update_mask: update_mask, model: model, request_id: request_id }, grpc_options) do |response, operation| + assert_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_model(::Google::Cloud::FinancialServices::V1::UpdateModelRequest.new(update_mask: update_mask, model: model, request_id: request_id), grpc_options) do |response, operation| + assert_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_model_client_stub.call_rpc_count + end + end + + def test_export_model_metadata + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + model = "hello world" + structured_metadata_destination = {} + + export_model_metadata_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_model_metadata, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest, request + assert_equal "hello world", request["model"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BigQueryDestination), request["structured_metadata_destination"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_model_metadata_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_model_metadata({ model: model, structured_metadata_destination: structured_metadata_destination }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_model_metadata model: model, structured_metadata_destination: structured_metadata_destination do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_model_metadata ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new(model: model, structured_metadata_destination: structured_metadata_destination) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_model_metadata({ model: model, structured_metadata_destination: structured_metadata_destination }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_model_metadata(::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new(model: model, structured_metadata_destination: structured_metadata_destination), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_model_metadata_client_stub.call_rpc_count + end + end + + def test_delete_model + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_model, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::DeleteModelRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_model_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_model({ name: name, request_id: request_id }) do |response, 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_model name: name, request_id: request_id do |response, 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_model ::Google::Cloud::FinancialServices::V1::DeleteModelRequest.new(name: name, request_id: request_id) do |response, operation| + assert_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_model({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_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_model(::Google::Cloud::FinancialServices::V1::DeleteModelRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_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_model_client_stub.call_rpc_count + end + end + + def test_list_engine_configs + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_engine_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_engine_configs, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest, 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_engine_configs_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_engine_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_engine_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_engine_configs ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.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_engine_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_engine_configs(::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.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_engine_configs_client_stub.call_rpc_count + end + end + + def test_get_engine_config + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::EngineConfig.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_engine_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_engine_config, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_engine_config_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_engine_config({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_engine_config name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_engine_config ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_engine_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_engine_config(::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.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_engine_config_client_stub.call_rpc_count + end + end + + def test_create_engine_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" + engine_config_id = "hello world" + engine_config = {} + request_id = "hello world" + + create_engine_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_engine_config, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["engine_config_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::EngineConfig), request["engine_config"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_engine_config_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_engine_config({ parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id }) do |response, 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_engine_config parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id do |response, 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_engine_config ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new(parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id) do |response, operation| + assert_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_engine_config({ parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id }, grpc_options) do |response, operation| + assert_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_engine_config(::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new(parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id), grpc_options) do |response, operation| + assert_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_engine_config_client_stub.call_rpc_count + end + end + + def test_update_engine_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. + update_mask = {} + engine_config = {} + request_id = "hello world" + + update_engine_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_engine_config, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::EngineConfig), request["engine_config"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_engine_config_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_engine_config({ update_mask: update_mask, engine_config: engine_config, request_id: request_id }) do |response, 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_engine_config update_mask: update_mask, engine_config: engine_config, request_id: request_id do |response, 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_engine_config ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new(update_mask: update_mask, engine_config: engine_config, request_id: request_id) do |response, operation| + assert_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_engine_config({ update_mask: update_mask, engine_config: engine_config, request_id: request_id }, grpc_options) do |response, operation| + assert_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_engine_config(::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new(update_mask: update_mask, engine_config: engine_config, request_id: request_id), grpc_options) do |response, operation| + assert_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_engine_config_client_stub.call_rpc_count + end + end + + def test_export_engine_config_metadata + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + engine_config = "hello world" + structured_metadata_destination = {} + + export_engine_config_metadata_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_engine_config_metadata, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest, request + assert_equal "hello world", request["engine_config"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BigQueryDestination), request["structured_metadata_destination"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_engine_config_metadata_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_engine_config_metadata({ engine_config: engine_config, structured_metadata_destination: structured_metadata_destination }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_engine_config_metadata engine_config: engine_config, structured_metadata_destination: structured_metadata_destination do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_engine_config_metadata ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new(engine_config: engine_config, structured_metadata_destination: structured_metadata_destination) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_engine_config_metadata({ engine_config: engine_config, structured_metadata_destination: structured_metadata_destination }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_engine_config_metadata(::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new(engine_config: engine_config, structured_metadata_destination: structured_metadata_destination), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_engine_config_metadata_client_stub.call_rpc_count + end + end + + def test_delete_engine_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" + request_id = "hello world" + + delete_engine_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_engine_config, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_engine_config_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_engine_config({ name: name, request_id: request_id }) do |response, 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_engine_config name: name, request_id: request_id do |response, 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_engine_config ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new(name: name, request_id: request_id) do |response, operation| + assert_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_engine_config({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_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_engine_config(::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_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_engine_config_client_stub.call_rpc_count + end + end + + def test_get_engine_version + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::EngineVersion.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_engine_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_engine_version, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_engine_version_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_engine_version({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_engine_version name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_engine_version ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_engine_version({ 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_engine_version(::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.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_engine_version_client_stub.call_rpc_count + end + end + + def test_list_engine_versions + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_engine_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_engine_versions, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest, 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_engine_versions_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_engine_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_engine_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_engine_versions ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.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_engine_versions({ 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_engine_versions(::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.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_engine_versions_client_stub.call_rpc_count + end + end + + def test_list_prediction_results + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_prediction_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_prediction_results, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest, 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_prediction_results_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_prediction_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_prediction_results parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_prediction_results ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.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_prediction_results({ 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_prediction_results(::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.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_prediction_results_client_stub.call_rpc_count + end + end + + def test_get_prediction_result + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::PredictionResult.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_prediction_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_prediction_result, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_prediction_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_prediction_result({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_prediction_result name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_prediction_result ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_prediction_result({ 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_prediction_result(::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.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_prediction_result_client_stub.call_rpc_count + end + end + + def test_create_prediction_result + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + prediction_result_id = "hello world" + prediction_result = {} + request_id = "hello world" + + create_prediction_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_prediction_result, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["prediction_result_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::PredictionResult), request["prediction_result"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_prediction_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_prediction_result({ parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id }) do |response, 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_prediction_result parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id do |response, 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_prediction_result ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new(parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id) do |response, operation| + assert_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_prediction_result({ parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id }, grpc_options) do |response, operation| + assert_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_prediction_result(::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new(parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id), grpc_options) do |response, operation| + assert_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_prediction_result_client_stub.call_rpc_count + end + end + + def test_update_prediction_result + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + prediction_result = {} + request_id = "hello world" + + update_prediction_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_prediction_result, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::PredictionResult), request["prediction_result"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_prediction_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_prediction_result({ update_mask: update_mask, prediction_result: prediction_result, request_id: request_id }) do |response, 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_prediction_result update_mask: update_mask, prediction_result: prediction_result, request_id: request_id do |response, 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_prediction_result ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new(update_mask: update_mask, prediction_result: prediction_result, request_id: request_id) do |response, operation| + assert_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_prediction_result({ update_mask: update_mask, prediction_result: prediction_result, request_id: request_id }, grpc_options) do |response, operation| + assert_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_prediction_result(::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new(update_mask: update_mask, prediction_result: prediction_result, request_id: request_id), grpc_options) do |response, operation| + assert_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_prediction_result_client_stub.call_rpc_count + end + end + + def test_export_prediction_result_metadata + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + prediction_result = "hello world" + structured_metadata_destination = {} + + export_prediction_result_metadata_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_prediction_result_metadata, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest, request + assert_equal "hello world", request["prediction_result"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BigQueryDestination), request["structured_metadata_destination"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_prediction_result_metadata_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_prediction_result_metadata({ prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_prediction_result_metadata prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_prediction_result_metadata ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new(prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_prediction_result_metadata({ prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_prediction_result_metadata(::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new(prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_prediction_result_metadata_client_stub.call_rpc_count + end + end + + def test_delete_prediction_result + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_prediction_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_prediction_result, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_prediction_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_prediction_result({ name: name, request_id: request_id }) do |response, 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_prediction_result name: name, request_id: request_id do |response, 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_prediction_result ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new(name: name, request_id: request_id) do |response, operation| + assert_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_prediction_result({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_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_prediction_result(::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_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_prediction_result_client_stub.call_rpc_count + end + end + + def test_list_backtest_results + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backtest_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backtest_results, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest, 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_backtest_results_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backtest_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_backtest_results parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_backtest_results ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.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_backtest_results({ 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_backtest_results(::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.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_backtest_results_client_stub.call_rpc_count + end + end + + def test_get_backtest_result + # Create GRPC objects. + grpc_response = ::Google::Cloud::FinancialServices::V1::BacktestResult.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backtest_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backtest_result, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backtest_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backtest_result({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backtest_result name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backtest_result ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backtest_result({ 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_backtest_result(::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.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_backtest_result_client_stub.call_rpc_count + end + end + + def test_create_backtest_result + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backtest_result_id = "hello world" + backtest_result = {} + request_id = "hello world" + + create_backtest_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backtest_result, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["backtest_result_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BacktestResult), request["backtest_result"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backtest_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_backtest_result({ parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id }) do |response, 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_backtest_result parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id do |response, 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_backtest_result ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new(parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id) do |response, operation| + assert_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_backtest_result({ parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id }, grpc_options) do |response, operation| + assert_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_backtest_result(::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new(parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id), grpc_options) do |response, operation| + assert_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_backtest_result_client_stub.call_rpc_count + end + end + + def test_update_backtest_result + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + backtest_result = {} + request_id = "hello world" + + update_backtest_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backtest_result, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BacktestResult), request["backtest_result"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backtest_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backtest_result({ update_mask: update_mask, backtest_result: backtest_result, request_id: request_id }) do |response, 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_backtest_result update_mask: update_mask, backtest_result: backtest_result, request_id: request_id do |response, 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_backtest_result ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new(update_mask: update_mask, backtest_result: backtest_result, request_id: request_id) do |response, operation| + assert_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_backtest_result({ update_mask: update_mask, backtest_result: backtest_result, request_id: request_id }, grpc_options) do |response, operation| + assert_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_backtest_result(::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new(update_mask: update_mask, backtest_result: backtest_result, request_id: request_id), grpc_options) do |response, operation| + assert_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_backtest_result_client_stub.call_rpc_count + end + end + + def test_export_backtest_result_metadata + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + backtest_result = "hello world" + structured_metadata_destination = {} + + export_backtest_result_metadata_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_backtest_result_metadata, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest, request + assert_equal "hello world", request["backtest_result"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BigQueryDestination), request["structured_metadata_destination"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_backtest_result_metadata_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_backtest_result_metadata({ backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_backtest_result_metadata backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_backtest_result_metadata ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new(backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_backtest_result_metadata({ backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_backtest_result_metadata(::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new(backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_backtest_result_metadata_client_stub.call_rpc_count + end + end + + def test_delete_backtest_result + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_backtest_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backtest_result, name + assert_kind_of ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backtest_result_client_stub do + # Create client + client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backtest_result({ name: name, request_id: request_id }) do |response, 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_backtest_result name: name, request_id: request_id do |response, 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_backtest_result ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new(name: name, request_id: request_id) do |response, operation| + assert_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_backtest_result({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_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_backtest_result(::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_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_backtest_result_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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::FinancialServices::V1::AML::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::FinancialServices::V1::AML::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::FinancialServices::V1::AML::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/test/helper.rb b/owl-bot-staging/google-cloud-financial_services-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-financial_services/.gitignore b/owl-bot-staging/google-cloud-financial_services/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/.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-financial_services/.repo-metadata.json b/owl-bot-staging/google-cloud-financial_services/.repo-metadata.json new file mode 100644 index 000000000000..242458e39d5d --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "financialservices.googleapis.com", + "api_shortname": "financialservices", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services/latest", + "distribution_name": "google-cloud-financial_services", + "is_cloud": true, + "language": "ruby", + "name": "financialservices", + "name_pretty": "Financial Services API", + "product_documentation": "https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-financial_services is the official client library for the Financial Services API.", + "ruby-cloud-product-url": "https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-financial_services/.rubocop.yml b/owl-bot-staging/google-cloud-financial_services/.rubocop.yml new file mode 100644 index 000000000000..cc27aee09ff0 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-financial_services.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-financial_services.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-financial_services/.toys.rb b/owl-bot-staging/google-cloud-financial_services/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/.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-financial_services/.yardopts b/owl-bot-staging/google-cloud-financial_services/.yardopts new file mode 100644 index 000000000000..9e3998c1ad60 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Financial Services API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-financial_services/AUTHENTICATION.md b/owl-bot-staging/google-cloud-financial_services/AUTHENTICATION.md new file mode 100644 index 000000000000..0f4e348cb59d --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-financial_services 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-financial_services 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/financial_services" + +client = Google::Cloud::FinancialServices.aml do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/financial_services" + +Google::Cloud::FinancialServices.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::FinancialServices.aml +``` + +### 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-financial_services +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/financial_services" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::FinancialServices.aml +``` + +### 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-financial_services/CHANGELOG.md b/owl-bot-staging/google-cloud-financial_services/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-financial_services/Gemfile b/owl-bot-staging/google-cloud-financial_services/Gemfile new file mode 100644 index 000000000000..f55d6d2113e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-financial_services-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-financial_services.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-financial_services/LICENSE.md b/owl-bot-staging/google-cloud-financial_services/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/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-financial_services/README.md b/owl-bot-staging/google-cloud-financial_services/README.md new file mode 100644 index 000000000000..6b7fb7c4ecbe --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Financial Services API + +API Client library for the Financial Services API + +google-cloud-financial_services is the official client library for the Financial Services API. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-financial_services-v*`. +The gem `google-cloud-financial_services` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services/latest) +for this library, google-cloud-financial_services, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-financial_services-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-financial_services +``` + +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/financialservices.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/financial_services" + +client = Google::Cloud::FinancialServices.aml +request = ::Google::Cloud::FinancialServices::V1::ListInstancesRequest.new # (request fields as keyword arguments...) +response = client.list_instances request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-financial_services-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services-v1/latest). + +## 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-financial_services`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-financial_services-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-financial_services`. +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-financial_services-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-financial_services/Rakefile b/owl-bot-staging/google-cloud-financial_services/Rakefile new file mode 100644 index 000000000000..c413046b4dec --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/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 = true +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-financial_services 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/financial_services/v1/aml/credentials" + ::Google::Cloud::FinancialServices::V1::AML::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-financial_services 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-financial_services 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-financial_services 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-financial_services gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-financial_services" + header "google-cloud-financial_services rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-financial_services yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-financial_services 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-financial_services 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-financial_services 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-financial_services/google-cloud-financial_services.gemspec b/owl-bot-staging/google-cloud-financial_services/google-cloud-financial_services.gemspec new file mode 100644 index 000000000000..9522169baf90 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/google-cloud-financial_services.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/financial_services/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-financial_services" + gem.version = Google::Cloud::FinancialServices::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-financial_services is the official client library for the Financial Services API." + gem.summary = "API Client library for the Financial Services API" + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-financial_services-v1", ">= 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-financial_services/lib/google-cloud-financial_services.rb b/owl-bot-staging/google-cloud-financial_services/lib/google-cloud-financial_services.rb new file mode 100644 index 000000000000..6b006141b68f --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/lib/google-cloud-financial_services.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/financial_services" unless defined? Google::Cloud::FinancialServices::VERSION diff --git a/owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services.rb b/owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services.rb new file mode 100644 index 000000000000..ed8c6516dda5 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services.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! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/financial_services/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :financial_services do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module FinancialServices + ## + # Create a new client object for AML. + # + # By default, this returns an instance of + # [Google::Cloud::FinancialServices::V1::AML::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services-v1/latest/Google-Cloud-FinancialServices-V1-AML-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the AML service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the AML service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::FinancialServices.aml_available?}. + # + # ## About AML + # + # The AML (Anti Money Laundering) service allows users to perform REST + # operations on aml. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.aml version: :v1, transport: :grpc, &block + require "google/cloud/financial_services/#{version.to_s.downcase}" + + package_name = Google::Cloud::FinancialServices + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::FinancialServices.const_get(package_name).const_get(:AML) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the AML service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::FinancialServices.aml}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the AML service, + # or if the versioned client gem needs an update to support the AML service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.aml_available? version: :v1, transport: :grpc + require "google/cloud/financial_services/#{version.to_s.downcase}" + package_name = Google::Cloud::FinancialServices + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::FinancialServices.const_get package_name + return false unless service_module.const_defined? :AML + service_module = service_module.const_get :AML + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-financial_services library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # 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 [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.financial_services if block_given? + + ::Google::Cloud.configure.financial_services + end + end + end +end + +helper_path = ::File.join __dir__, "financial_services", "helpers.rb" +require "google/cloud/financial_services/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services/version.rb b/owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services/version.rb new file mode 100644 index 000000000000..2fc671ddd481 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services/version.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! + + +module Google + module Cloud + module FinancialServices + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/client_test.rb b/owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/client_test.rb new file mode 100644 index 000000000000..47740c6b8f45 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 "google/cloud/financial_services" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::FinancialServices::ClientConstructionMinitest < 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_aml_grpc + skip unless Google::Cloud::FinancialServices.aml_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::FinancialServices.aml transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::FinancialServices::V1::AML::Client, client + end + end + + def test_aml_rest + skip unless Google::Cloud::FinancialServices.aml_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::FinancialServices.aml transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::FinancialServices::V1::AML::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/version_test.rb b/owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/version_test.rb new file mode 100644 index 000000000000..e8165659db0d --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/version_test.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 "helper" +require "google/cloud/financial_services/version" + +class Google::Cloud::FinancialServices::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::FinancialServices::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-financial_services/test/helper.rb b/owl-bot-staging/google-cloud-financial_services/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-financial_services/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/.gitignore b/owl-bot-staging/google-cloud-firestore-admin-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-firestore-admin-v1/.repo-metadata.json new file mode 100644 index 000000000000..5fe9788514ab --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "firestore.googleapis.com", + "api_shortname": "firestore", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin-v1/latest", + "distribution_name": "google-cloud-firestore-admin-v1", + "is_cloud": true, + "language": "ruby", + "name": "firestore", + "name_pretty": "Cloud Firestore Admin V1 API", + "product_documentation": "https://cloud.google.com/firestore", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Note that google-cloud-firestore-admin-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-firestore-admin instead. See the readme for more details.", + "ruby-cloud-env-prefix": "FIRESTORE", + "ruby-cloud-product-url": "https://cloud.google.com/firestore", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/.rubocop.yml b/owl-bot-staging/google-cloud-firestore-admin-v1/.rubocop.yml new file mode 100644 index 000000000000..8cc38d8fdd28 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-firestore-admin-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-firestore-admin-v1.rb" diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/.toys.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/.yardopts b/owl-bot-staging/google-cloud-firestore-admin-v1/.yardopts new file mode 100644 index 000000000000..6eb0d4f42a37 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Firestore Admin 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-firestore-admin-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-firestore-admin-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..8143a0bdf549 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-firestore-admin-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-firestore-admin-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/firestore/admin/v1" + +client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/firestore/admin/v1" + +::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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-firestore-admin-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/firestore/admin/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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-firestore-admin-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-firestore-admin-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/Gemfile b/owl-bot-staging/google-cloud-firestore-admin-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/LICENSE.md b/owl-bot-staging/google-cloud-firestore-admin-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/README.md b/owl-bot-staging/google-cloud-firestore-admin-v1/README.md new file mode 100644 index 000000000000..038402866b16 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Firestore Admin V1 API + +Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development. + +Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Firestore Admin V1 API. Most users should consider using +the main client gem, +[google-cloud-firestore-admin](https://rubygems.org/gems/google-cloud-firestore-admin). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-firestore-admin-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/firestore.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/firestore/admin/v1" + +client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new +request = ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new # (request fields as keyword arguments...) +response = client.create_index request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/firestore) +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/firestore/admin/v1" +require "logger" + +client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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-firestore-admin`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-firestore-admin-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-firestore-admin`. +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-firestore-admin-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-firestore-admin-v1/Rakefile b/owl-bot-staging/google-cloud-firestore-admin-v1/Rakefile new file mode 100644 index 000000000000..a6087cc77563 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["FIRESTORE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["FIRESTORE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["FIRESTORE_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 FIRESTORE_TEST_PROJECT=test123 FIRESTORE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/firestore/admin/v1/firestore_admin/credentials" + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["FIRESTORE_PROJECT"] = project + ENV["FIRESTORE_TEST_PROJECT"] = project + ENV["FIRESTORE_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-firestore-admin-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-firestore-admin-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-firestore-admin-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-firestore-admin-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-firestore-admin-v1" + header "google-cloud-firestore-admin-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-firestore-admin-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-firestore-admin-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-firestore-admin-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-firestore-admin-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-firestore-admin-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-firestore-admin-v1/gapic_metadata.json new file mode 100644 index 000000000000..b3ac64250ccf --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/gapic_metadata.json @@ -0,0 +1,178 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.firestore.admin.v1", + "libraryPackage": "::Google::Cloud::Firestore::Admin::V1", + "services": { + "FirestoreAdmin": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client", + "rpcs": { + "CreateIndex": { + "methods": [ + "create_index" + ] + }, + "ListIndexes": { + "methods": [ + "list_indexes" + ] + }, + "GetIndex": { + "methods": [ + "get_index" + ] + }, + "DeleteIndex": { + "methods": [ + "delete_index" + ] + }, + "GetField": { + "methods": [ + "get_field" + ] + }, + "UpdateField": { + "methods": [ + "update_field" + ] + }, + "ListFields": { + "methods": [ + "list_fields" + ] + }, + "ExportDocuments": { + "methods": [ + "export_documents" + ] + }, + "ImportDocuments": { + "methods": [ + "import_documents" + ] + }, + "BulkDeleteDocuments": { + "methods": [ + "bulk_delete_documents" + ] + }, + "CreateDatabase": { + "methods": [ + "create_database" + ] + }, + "GetDatabase": { + "methods": [ + "get_database" + ] + }, + "ListDatabases": { + "methods": [ + "list_databases" + ] + }, + "UpdateDatabase": { + "methods": [ + "update_database" + ] + }, + "DeleteDatabase": { + "methods": [ + "delete_database" + ] + }, + "CreateUserCreds": { + "methods": [ + "create_user_creds" + ] + }, + "GetUserCreds": { + "methods": [ + "get_user_creds" + ] + }, + "ListUserCreds": { + "methods": [ + "list_user_creds" + ] + }, + "EnableUserCreds": { + "methods": [ + "enable_user_creds" + ] + }, + "DisableUserCreds": { + "methods": [ + "disable_user_creds" + ] + }, + "ResetUserPassword": { + "methods": [ + "reset_user_password" + ] + }, + "DeleteUserCreds": { + "methods": [ + "delete_user_creds" + ] + }, + "GetBackup": { + "methods": [ + "get_backup" + ] + }, + "ListBackups": { + "methods": [ + "list_backups" + ] + }, + "DeleteBackup": { + "methods": [ + "delete_backup" + ] + }, + "RestoreDatabase": { + "methods": [ + "restore_database" + ] + }, + "CreateBackupSchedule": { + "methods": [ + "create_backup_schedule" + ] + }, + "GetBackupSchedule": { + "methods": [ + "get_backup_schedule" + ] + }, + "ListBackupSchedules": { + "methods": [ + "list_backup_schedules" + ] + }, + "UpdateBackupSchedule": { + "methods": [ + "update_backup_schedule" + ] + }, + "DeleteBackupSchedule": { + "methods": [ + "delete_backup_schedule" + ] + }, + "CloneDatabase": { + "methods": [ + "clone_database" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/google-cloud-firestore-admin-v1.gemspec b/owl-bot-staging/google-cloud-firestore-admin-v1/google-cloud-firestore-admin-v1.gemspec new file mode 100644 index 000000000000..1d5191b71829 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/google-cloud-firestore-admin-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/firestore/admin/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-firestore-admin-v1" + gem.version = Google::Cloud::Firestore::Admin::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Note that google-cloud-firestore-admin-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-firestore-admin instead. See the readme for more details." + gem.summary = "Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google-cloud-firestore-admin-v1.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google-cloud-firestore-admin-v1.rb new file mode 100644 index 000000000000..653eb12e8e8e --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google-cloud-firestore-admin-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/firestore/admin/v1" diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1.rb new file mode 100644 index 000000000000..43cc6acbca5a --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1.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 "google/cloud/firestore/admin/v1/firestore_admin" +require "google/cloud/firestore/admin/v1/version" + +module Google + module Cloud + module Firestore + module Admin + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/firestore/admin/v1" + # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/firestore/admin/v1" + # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + module V1 + end + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/firestore/admin/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin.rb new file mode 100644 index 000000000000..38eed9c8a7f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin.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! + +require "gapic/common" +require "gapic/config" +require "gapic/config/method" + +require "google/cloud/firestore/admin/v1/version" + +require "google/cloud/firestore/admin/v1/firestore_admin/credentials" +require "google/cloud/firestore/admin/v1/firestore_admin/paths" +require "google/cloud/firestore/admin/v1/firestore_admin/operations" +require "google/cloud/firestore/admin/v1/firestore_admin/client" +require "google/cloud/firestore/admin/v1/firestore_admin/rest" + +module Google + module Cloud + module Firestore + module Admin + module V1 + ## + # The Cloud Firestore Admin API. + # + # This API provides several administrative services for Cloud Firestore. + # + # Project, Database, Namespace, Collection, Collection Group, and Document are + # used as defined in the Google Cloud Firestore API. + # + # Operation: An Operation represents work being performed in the background. + # + # The index service manages Cloud Firestore indexes. + # + # Index creation is performed asynchronously. + # An Operation resource is created for each such asynchronous operation. + # The state of the operation (including any errors encountered) + # may be queried via the Operation resource. + # + # The Operations collection provides a record of actions performed for the + # specified Project (including any Operations in progress). Operations are not + # created directly but through calls on other collections or resources. + # + # An Operation that is done may be deleted so that it is no longer listed as + # part of the Operation collection. Operations are garbage collected after + # 30 days. By default, ListOperations will only return in progress and failed + # operations. To list completed operation, issue a ListOperations request with + # the filter `done: true`. + # + # Operations are created by service `FirestoreAdmin`, but are accessed via + # service `google.longrunning.Operations`. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/firestore/admin/v1/firestore_admin" + # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/firestore/admin/v1/firestore_admin/rest" + # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + module FirestoreAdmin + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "firestore_admin", "helpers.rb" +require "google/cloud/firestore/admin/v1/firestore_admin/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb new file mode 100644 index 000000000000..882f95e4afaf --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb @@ -0,0 +1,3849 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/admin/v1/firestore_admin_pb" +require "google/cloud/location" + +module Google + module Cloud + module Firestore + module Admin + module V1 + module FirestoreAdmin + ## + # Client for the FirestoreAdmin service. + # + # The Cloud Firestore Admin API. + # + # This API provides several administrative services for Cloud Firestore. + # + # Project, Database, Namespace, Collection, Collection Group, and Document are + # used as defined in the Google Cloud Firestore API. + # + # Operation: An Operation represents work being performed in the background. + # + # The index service manages Cloud Firestore indexes. + # + # Index creation is performed asynchronously. + # An Operation resource is created for each such asynchronous operation. + # The state of the operation (including any errors encountered) + # may be queried via the Operation resource. + # + # The Operations collection provides a record of actions performed for the + # specified Project (including any Operations in progress). Operations are not + # created directly but through calls on other collections or resources. + # + # An Operation that is done may be deleted so that it is no longer listed as + # part of the Operation collection. Operations are garbage collected after + # 30 days. By default, ListOperations will only return in progress and failed + # operations. To list completed operation, issue a ListOperations request with + # the filter `done: true`. + # + # Operations are created by service `FirestoreAdmin`, but are accessed via + # service `google.longrunning.Operations`. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :firestore_admin_stub + + ## + # Configure the FirestoreAdmin Client class. + # + # See {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FirestoreAdmin clients + # ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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", "Firestore", "Admin", "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_index.timeout = 60.0 + + default_config.rpcs.list_indexes.timeout = 60.0 + default_config.rpcs.list_indexes.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] + } + + default_config.rpcs.get_index.timeout = 60.0 + default_config.rpcs.get_index.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] + } + + default_config.rpcs.delete_index.timeout = 60.0 + default_config.rpcs.delete_index.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] + } + + default_config.rpcs.get_field.timeout = 60.0 + default_config.rpcs.get_field.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] + } + + default_config.rpcs.update_field.timeout = 60.0 + + default_config.rpcs.list_fields.timeout = 60.0 + default_config.rpcs.list_fields.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] + } + + default_config.rpcs.export_documents.timeout = 60.0 + + default_config.rpcs.import_documents.timeout = 60.0 + + default_config.rpcs.bulk_delete_documents.timeout = 60.0 + + default_config.rpcs.create_database.timeout = 120.0 + + default_config.rpcs.restore_database.timeout = 120.0 + + default_config.rpcs.clone_database.timeout = 120.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the FirestoreAdmin 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::Firestore::Admin::V1::FirestoreAdmin::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 + @firestore_admin_stub.universe_domain + end + + ## + # Create a new FirestoreAdmin client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FirestoreAdmin 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/firestore/admin/v1/firestore_admin_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 + + @firestore_admin_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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 + ) + + @firestore_admin_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 = @firestore_admin_stub.endpoint + config.universe_domain = @firestore_admin_stub.universe_domain + config.logger = @firestore_admin_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @firestore_admin_stub.logger + end + + # Service calls + + ## + # Creates a composite index. This returns a + # {::Google::Longrunning::Operation google.longrunning.Operation} which may be + # used to track the status of the creation. The metadata for the operation + # will be the type + # {::Google::Cloud::Firestore::Admin::V1::IndexOperationMetadata IndexOperationMetadata}. + # + # @overload create_index(request, options = nil) + # Pass arguments to `create_index` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_index(parent: nil, index: nil) + # Pass arguments to `create_index` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + # @param index [::Google::Cloud::Firestore::Admin::V1::Index, ::Hash] + # Required. The composite index 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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new + # + # # Call the create_index method. + # result = client.create_index request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_index request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest + + # Converts hash and nil to 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_index.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_index.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_index.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :create_index, 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 composite indexes. + # + # @overload list_indexes(request, options = nil) + # Pass arguments to `list_indexes` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_indexes(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_indexes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + # @param filter [::String] + # The filter to apply to list results. + # @param page_size [::Integer] + # The number of results to return. + # @param page_token [::String] + # A page token, returned from a previous call to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes FirestoreAdmin.ListIndexes}, + # that may be used to get the next page of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new + # + # # Call the list_indexes method. + # result = client.list_indexes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Index. + # p item + # end + # + def list_indexes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest + + # Converts hash and nil to 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_indexes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_indexes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_indexes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :list_indexes, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @firestore_admin_stub, :list_indexes, 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 a composite index. + # + # @overload get_index(request, options = nil) + # Pass arguments to `get_index` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::GetIndexRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::GetIndexRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_index(name: nil) + # Pass arguments to `get_index` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::Index] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::Index] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::GetIndexRequest.new + # + # # Call the get_index method. + # result = client.get_index request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Index. + # p result + # + def get_index request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetIndexRequest + + # Converts hash and nil to 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_index.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_index.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_index.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :get_index, 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 composite index. + # + # @overload delete_index(request, options = nil) + # Pass arguments to `delete_index` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_index(name: nil) + # Pass arguments to `delete_index` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.new + # + # # Call the delete_index method. + # result = client.delete_index request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_index request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest + + # Converts hash and nil to 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_index.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_index.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_index.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :delete_index, 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 metadata and configuration for a Field. + # + # @overload get_field(request, options = nil) + # Pass arguments to `get_field` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::GetFieldRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::GetFieldRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_field(name: nil) + # Pass arguments to `get_field` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::Field] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::Field] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::GetFieldRequest.new + # + # # Call the get_field method. + # result = client.get_field request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Field. + # p result + # + def get_field request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetFieldRequest + + # Converts hash and nil to 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_field.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_field.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_field.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :get_field, 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 field configuration. Currently, field updates apply only to + # single field index configuration. However, calls to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_field FirestoreAdmin.UpdateField} + # should provide a field mask to avoid changing any configuration that the + # caller isn't aware of. The field mask should be specified as: `{ paths: + # "index_config" }`. + # + # This call returns a + # {::Google::Longrunning::Operation google.longrunning.Operation} which may be + # used to track the status of the field update. The metadata for the + # operation will be the type + # {::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata FieldOperationMetadata}. + # + # To configure the default field settings for the database, use + # the special `Field` with resource name: + # `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + # + # @overload update_field(request, options = nil) + # Pass arguments to `update_field` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_field(field: nil, update_mask: nil) + # Pass arguments to `update_field` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param field [::Google::Cloud::Firestore::Admin::V1::Field, ::Hash] + # Required. The field to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # A mask, relative to the field. If specified, only configuration specified + # by this field_mask will be updated in the field. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new + # + # # Call the update_field method. + # result = client.update_field request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_field request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest + + # Converts hash and nil to 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_field.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.field&.name + header_params["field.name"] = request.field.name + end + + request_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_field.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_field.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :update_field, 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 the field configuration and metadata for this database. + # + # Currently, + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} + # only supports listing fields that have been explicitly overridden. To issue + # this query, call + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} + # with the filter set to `indexConfig.usesAncestorConfig:false` or + # `ttlConfig:*`. + # + # @overload list_fields(request, options = nil) + # Pass arguments to `list_fields` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_fields(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_fields` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + # @param filter [::String] + # The filter to apply to list results. Currently, + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} + # only supports listing fields that have been explicitly overridden. To issue + # this query, call + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} + # with a filter that includes `indexConfig.usesAncestorConfig:false` or + # `ttlConfig:*`. + # @param page_size [::Integer] + # The number of results to return. + # @param page_token [::String] + # A page token, returned from a previous call to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields}, + # that may be used to get the next page of results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new + # + # # Call the list_fields method. + # result = client.list_fields request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Field. + # p item + # end + # + def list_fields request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest + + # Converts hash and nil to 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_fields.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_fields.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_fields.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :list_fields, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @firestore_admin_stub, :list_fields, 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 + + ## + # Exports a copy of all or a subset of documents from Google Cloud Firestore + # to another storage system, such as Google Cloud Storage. Recent updates to + # documents may not be reflected in the export. The export occurs in the + # background and its progress can be monitored and managed via the + # Operation resource that is created. The output of an export may only be + # used once the associated operation is done. If an export operation is + # cancelled before completion it may leave partial data behind in Google + # Cloud Storage. + # + # For more details on export behavior and output format, refer to: + # https://cloud.google.com/firestore/docs/manage-data/export-import + # + # @overload export_documents(request, options = nil) + # Pass arguments to `export_documents` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload export_documents(name: nil, collection_ids: nil, output_uri_prefix: nil, namespace_ids: nil, snapshot_time: nil) + # Pass arguments to `export_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Database to export. Should be of the form: + # `projects/{project_id}/databases/{database_id}`. + # @param collection_ids [::Array<::String>] + # Which collection IDs to export. Unspecified means all collections. Each + # collection ID in this list must be unique. + # @param output_uri_prefix [::String] + # The output URI. Currently only supports Google Cloud Storage URIs of the + # form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + # of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + # Google Cloud Storage namespace path. When + # choosing a name, be sure to consider Google Cloud Storage naming + # guidelines: https://cloud.google.com/storage/docs/naming. + # If the URI is a bucket (without a namespace path), a prefix will be + # generated based on the start time. + # @param namespace_ids [::Array<::String>] + # An empty list represents all namespaces. This is the preferred + # usage for databases that don't use namespaces. + # + # An empty string element represents the default namespace. This should be + # used if the database has data in non-default namespaces, but doesn't want + # to include them. Each namespace in this list must be unique. + # @param snapshot_time [::Google::Protobuf::Timestamp, ::Hash] + # The timestamp that corresponds to the version of the database to be + # exported. The timestamp must be in the past, rounded to the minute and not + # older than + # {::Google::Cloud::Firestore::Admin::V1::Database#earliest_version_time earliestVersionTime}. + # If specified, then the exported documents will represent a consistent view + # of the database at the provided time. Otherwise, there are no guarantees + # about the consistency of the exported documents. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new + # + # # Call the export_documents method. + # result = client.export_documents request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.export_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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.export_documents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.export_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :export_documents, 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 + + ## + # Imports documents into Google Cloud Firestore. Existing documents with the + # same name are overwritten. The import occurs in the background and its + # progress can be monitored and managed via the Operation resource that is + # created. If an ImportDocuments operation is cancelled, it is possible + # that a subset of the data has already been imported to Cloud Firestore. + # + # @overload import_documents(request, options = nil) + # Pass arguments to `import_documents` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload import_documents(name: nil, collection_ids: nil, input_uri_prefix: nil, namespace_ids: nil) + # Pass arguments to `import_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Database to import into. Should be of the form: + # `projects/{project_id}/databases/{database_id}`. + # @param collection_ids [::Array<::String>] + # Which collection IDs to import. Unspecified means all collections included + # in the import. Each collection ID in this list must be unique. + # @param input_uri_prefix [::String] + # Location of the exported files. + # This must match the output_uri_prefix of an ExportDocumentsResponse from + # an export that has completed successfully. + # See: + # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsResponse#output_uri_prefix google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix}. + # @param namespace_ids [::Array<::String>] + # An empty list represents all namespaces. This is the preferred + # usage for databases that don't use namespaces. + # + # An empty string element represents the default namespace. This should be + # used if the database has data in non-default namespaces, but doesn't want + # to include them. Each namespace in this list must be unique. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new + # + # # Call the import_documents method. + # result = client.import_documents request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.import_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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.import_documents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.import_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :import_documents, 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 + + ## + # Bulk deletes a subset of documents from Google Cloud Firestore. + # Documents created or updated after the underlying system starts to process + # the request will not be deleted. The bulk delete occurs in the background + # and its progress can be monitored and managed via the Operation resource + # that is created. + # + # For more details on bulk delete behavior, refer to: + # https://cloud.google.com/firestore/docs/manage-data/bulk-delete + # + # @overload bulk_delete_documents(request, options = nil) + # Pass arguments to `bulk_delete_documents` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload bulk_delete_documents(name: nil, collection_ids: nil, namespace_ids: nil) + # Pass arguments to `bulk_delete_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Database to operate. Should be of the form: + # `projects/{project_id}/databases/{database_id}`. + # @param collection_ids [::Array<::String>] + # Optional. IDs of the collection groups to delete. Unspecified means all + # collection groups. + # + # Each collection group in this list must be unique. + # @param namespace_ids [::Array<::String>] + # Optional. Namespaces to delete. + # + # An empty list means all namespaces. This is the recommended + # usage for databases that don't use namespaces. + # + # An empty string element represents the default namespace. This should be + # used if the database has data in non-default namespaces, but doesn't want + # to delete from them. + # + # Each namespace in this list must be unique. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new + # + # # Call the bulk_delete_documents method. + # result = client.bulk_delete_documents request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def bulk_delete_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.bulk_delete_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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.bulk_delete_documents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.bulk_delete_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :bulk_delete_documents, 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 + + ## + # Create a database. + # + # @overload create_database(request, options = nil) + # Pass arguments to `create_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_database(parent: nil, database: nil, database_id: nil) + # Pass arguments to `create_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent name of the form + # `projects/{project_id}` + # @param database [::Google::Cloud::Firestore::Admin::V1::Database, ::Hash] + # Required. The Database to create. + # @param database_id [::String] + # Required. The ID to use for the database, which will become the final + # component of the database's resource name. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # + # "(default)" database ID is also valid. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new + # + # # Call the create_database method. + # result = client.create_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest + + # Converts hash and nil to 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_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_database.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :create_database, 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 information about a database. + # + # @overload get_database(request, options = nil) + # Pass arguments to `get_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_database(name: nil) + # Pass arguments to `get_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::Database] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::Database] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.new + # + # # Call the get_database method. + # result = client.get_database request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Database. + # p result + # + def get_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest + + # Converts hash and nil to 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_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_database.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :get_database, 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 all the databases in the project. + # + # @overload list_databases(request, options = nil) + # Pass arguments to `list_databases` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_databases(parent: nil, show_deleted: nil) + # Pass arguments to `list_databases` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent name of the form + # `projects/{project_id}` + # @param show_deleted [::Boolean] + # If true, also returns deleted resources. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new + # + # # Call the list_databases method. + # result = client.list_databases request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse. + # p result + # + def list_databases request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest + + # Converts hash and nil to 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_databases.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_databases.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_databases.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :list_databases, 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 database. + # + # @overload update_database(request, options = nil) + # Pass arguments to `update_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_database(database: nil, update_mask: nil) + # Pass arguments to `update_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::Google::Cloud::Firestore::Admin::V1::Database, ::Hash] + # Required. The database to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new + # + # # Call the update_database method. + # result = client.update_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest + + # Converts hash and nil to 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_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database&.name + header_params["database.name"] = request.database.name + end + + request_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_database.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :update_database, 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 database. + # + # @overload delete_database(request, options = nil) + # Pass arguments to `delete_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_database(name: nil, etag: nil) + # Pass arguments to `delete_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}` + # @param etag [::String] + # The current etag of the Database. + # If an etag is provided and does not match the current etag of the database, + # deletion will be blocked and a FAILED_PRECONDITION error will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.new + # + # # Call the delete_database method. + # result = client.delete_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest + + # Converts hash and nil to 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_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_database.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :delete_database, 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 + + ## + # Create a user creds. + # + # @overload create_user_creds(request, options = nil) + # Pass arguments to `create_user_creds` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_user_creds(parent: nil, user_creds: nil, user_creds_id: nil) + # Pass arguments to `create_user_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent name of the form + # `projects/{project_id}/databases/{database_id}` + # @param user_creds [::Google::Cloud::Firestore::Admin::V1::UserCreds, ::Hash] + # Required. The user creds to create. + # @param user_creds_id [::String] + # Required. The ID to use for the user creds, which will become the final + # component of the user creds's resource name. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new + # + # # Call the create_user_creds method. + # result = client.create_user_creds request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + # p result + # + def create_user_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest + + # Converts hash and nil to 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_user_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_user_creds.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_user_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :create_user_creds, 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 user creds resource. Note that the returned resource does not + # contain the secret value itself. + # + # @overload get_user_creds(request, options = nil) + # Pass arguments to `get_user_creds` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_user_creds(name: nil) + # Pass arguments to `get_user_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new + # + # # Call the get_user_creds method. + # result = client.get_user_creds request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + # p result + # + def get_user_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest + + # Converts hash and nil to 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_user_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_user_creds.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_user_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :get_user_creds, 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 all user creds in the database. Note that the returned resource + # does not contain the secret value itself. + # + # @overload list_user_creds(request, options = nil) + # Pass arguments to `list_user_creds` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_user_creds(parent: nil) + # Pass arguments to `list_user_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent database name of the form + # `projects/{project_id}/databases/{database_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new + # + # # Call the list_user_creds method. + # result = client.list_user_creds request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse. + # p result + # + def list_user_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest + + # Converts hash and nil to 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_user_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_user_creds.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_user_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :list_user_creds, 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 + + ## + # Enables a user creds. No-op if the user creds are already enabled. + # + # @overload enable_user_creds(request, options = nil) + # Pass arguments to `enable_user_creds` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload enable_user_creds(name: nil) + # Pass arguments to `enable_user_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new + # + # # Call the enable_user_creds method. + # result = client.enable_user_creds request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + # p result + # + def enable_user_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.enable_user_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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.enable_user_creds.timeout, + metadata: metadata, + retry_policy: @config.rpcs.enable_user_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :enable_user_creds, 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 + + ## + # Disables a user creds. No-op if the user creds are already disabled. + # + # @overload disable_user_creds(request, options = nil) + # Pass arguments to `disable_user_creds` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload disable_user_creds(name: nil) + # Pass arguments to `disable_user_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new + # + # # Call the disable_user_creds method. + # result = client.disable_user_creds request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + # p result + # + def disable_user_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.disable_user_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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.disable_user_creds.timeout, + metadata: metadata, + retry_policy: @config.rpcs.disable_user_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :disable_user_creds, 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 + + ## + # Resets the password of a user creds. + # + # @overload reset_user_password(request, options = nil) + # Pass arguments to `reset_user_password` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload reset_user_password(name: nil) + # Pass arguments to `reset_user_password` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new + # + # # Call the reset_user_password method. + # result = client.reset_user_password request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + # p result + # + def reset_user_password request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.reset_user_password.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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.reset_user_password.timeout, + metadata: metadata, + retry_policy: @config.rpcs.reset_user_password.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :reset_user_password, 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 user creds. + # + # @overload delete_user_creds(request, options = nil) + # Pass arguments to `delete_user_creds` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_user_creds(name: nil) + # Pass arguments to `delete_user_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new + # + # # Call the delete_user_creds method. + # result = client.delete_user_creds request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_user_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest + + # Converts hash and nil to 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_user_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_user_creds.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_user_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :delete_user_creds, 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 information about a backup. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::GetBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup(name: nil) + # Pass arguments to `get_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup to fetch. + # + # Format is `projects/{project}/locations/{location}/backups/{backup}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::Backup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Backup. + # p result + # + def get_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetBackupRequest + + # Converts hash and nil to 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :get_backup, 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 all the backups. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backups(parent: nil, filter: nil) + # Pass arguments to `list_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 to list backups from. + # + # Format is `projects/{project}/locations/{location}`. + # Use `{location} = '-'` to list backups from all locations for the given + # project. This allows listing backups from a single location or from all + # locations. + # @param filter [::String] + # An expression that filters the list of returned backups. + # + # A filter expression consists of a field name, a comparison operator, and a + # value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the {::Google::Cloud::Firestore::Admin::V1::Backup Backup} are + # eligible for filtering: + # + # * `database_uid` (supports `=` only) + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new + # + # # Call the list_backups method. + # result = client.list_backups request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupsResponse. + # p result + # + def list_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest + + # Converts hash and nil to 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_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_backups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :list_backups, 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 backup. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup(name: nil) + # Pass arguments to `delete_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup to delete. + # + # format is `projects/{project}/locations/{location}/backups/{backup}`. + # + # @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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_backup request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest + + # Converts hash and nil to 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :delete_backup, 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 new database by restoring from an existing backup. + # + # The new database must be in the same cloud region or multi-region location + # as the existing backup. This behaves similar to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database FirestoreAdmin.CreateDatabase} + # except instead of creating a new empty database, a new database is created + # with the database type, index configuration, and documents from an existing + # backup. + # + # The {::Google::Longrunning::Operation long-running operation} can be used to + # track the progress of the restore, with the Operation's + # {::Google::Longrunning::Operation#metadata metadata} field type being the + # {::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. + # The {::Google::Longrunning::Operation#response response} type is the + # {::Google::Cloud::Firestore::Admin::V1::Database Database} if the restore was + # successful. The new database is not readable or writeable until the LRO has + # completed. + # + # @overload restore_database(request, options = nil) + # Pass arguments to `restore_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload restore_database(parent: nil, database_id: nil, backup: nil, encryption_config: nil, tags: nil) + # Pass arguments to `restore_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project to restore the database in. Format is + # `projects/{project_id}`. + # @param database_id [::String] + # Required. The ID to use for the database, which will become the final + # component of the database's resource name. This database ID must not be + # associated with an existing database. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # + # "(default)" database ID is also valid. + # @param backup [::String] + # Required. Backup to restore from. Must be from the same project as the + # parent. + # + # The restored database will be created in the same location as the source + # backup. + # + # Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + # @param encryption_config [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig, ::Hash] + # Optional. Encryption configuration for the restored database. + # + # If this field is not specified, the restored database will use + # the same encryption configuration as the backup, namely + # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. + # @param tags [::Hash{::String => ::String}] + # Optional. Immutable. Tags to be bound to the restored database. + # + # The tags should be provided in the format of + # `tagKeys/{tag_key_id} -> tagValues/{tag_value_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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new + # + # # Call the restore_database method. + # result = client.restore_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.restore_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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.restore_database.timeout, + metadata: metadata, + retry_policy: @config.rpcs.restore_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :restore_database, 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 backup schedule on a database. + # At most two backup schedules can be configured on a database, one daily + # backup schedule and one weekly backup schedule. + # + # @overload create_backup_schedule(request, options = nil) + # Pass arguments to `create_backup_schedule` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_schedule(parent: nil, backup_schedule: nil) + # Pass arguments to `create_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 database. + # + # Format `projects/{project}/databases/{database}` + # @param backup_schedule [::Google::Cloud::Firestore::Admin::V1::BackupSchedule, ::Hash] + # Required. The backup schedule to create. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new + # + # # Call the create_backup_schedule method. + # result = client.create_backup_schedule request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. + # p result + # + def create_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest + + # Converts hash and nil to 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_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_backup_schedule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :create_backup_schedule, 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 information about a backup schedule. + # + # @overload get_backup_schedule(request, options = nil) + # Pass arguments to `get_backup_schedule` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_schedule(name: nil) + # Pass arguments to `get_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 backup schedule. + # + # Format + # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.new + # + # # Call the get_backup_schedule method. + # result = client.get_backup_schedule request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. + # p result + # + def get_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest + + # Converts hash and nil to 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_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_backup_schedule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :get_backup_schedule, 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 backup schedules. + # + # @overload list_backup_schedules(request, options = nil) + # Pass arguments to `list_backup_schedules` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_schedules(parent: nil) + # Pass arguments to `list_backup_schedules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 database. + # + # Format is `projects/{project}/databases/{database}`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new + # + # # Call the list_backup_schedules method. + # result = client.list_backup_schedules request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse. + # p result + # + def list_backup_schedules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest + + # Converts hash and nil to 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_backup_schedules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_backup_schedules.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_schedules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :list_backup_schedules, 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 backup schedule. + # + # @overload update_backup_schedule(request, options = nil) + # Pass arguments to `update_backup_schedule` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_schedule(backup_schedule: nil, update_mask: nil) + # Pass arguments to `update_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_schedule [::Google::Cloud::Firestore::Admin::V1::BackupSchedule, ::Hash] + # Required. The backup schedule to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new + # + # # Call the update_backup_schedule method. + # result = client.update_backup_schedule request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. + # p result + # + def update_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest + + # Converts hash and nil to 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_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup_schedule&.name + header_params["backup_schedule.name"] = request.backup_schedule.name + end + + request_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_backup_schedule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :update_backup_schedule, 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 backup schedule. + # + # @overload delete_backup_schedule(request, options = nil) + # Pass arguments to `delete_backup_schedule` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup_schedule(name: nil) + # Pass arguments to `delete_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 backup schedule. + # + # Format + # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + # + # @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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.new + # + # # Call the delete_backup_schedule method. + # result = client.delete_backup_schedule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest + + # Converts hash and nil to 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_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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_backup_schedule.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :delete_backup_schedule, 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 new database by cloning an existing one. + # + # The new database must be in the same cloud region or multi-region location + # as the existing database. This behaves similar to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database FirestoreAdmin.CreateDatabase} + # except instead of creating a new empty database, a new database is created + # with the database type, index configuration, and documents from an existing + # database. + # + # The {::Google::Longrunning::Operation long-running operation} can be used to + # track the progress of the clone, with the Operation's + # {::Google::Longrunning::Operation#metadata metadata} field type being the + # {::Google::Cloud::Firestore::Admin::V1::CloneDatabaseMetadata CloneDatabaseMetadata}. + # The {::Google::Longrunning::Operation#response response} type is the + # {::Google::Cloud::Firestore::Admin::V1::Database Database} if the clone was + # successful. The new database is not readable or writeable until the LRO has + # completed. + # + # @overload clone_database(request, options = nil) + # Pass arguments to `clone_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload clone_database(parent: nil, database_id: nil, pitr_snapshot: nil, encryption_config: nil, tags: nil) + # Pass arguments to `clone_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project to clone the database in. Format is + # `projects/{project_id}`. + # @param database_id [::String] + # Required. The ID to use for the database, which will become the final + # component of the database's resource name. This database ID must not be + # associated with an existing database. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # + # "(default)" database ID is also valid. + # @param pitr_snapshot [::Google::Cloud::Firestore::Admin::V1::PitrSnapshot, ::Hash] + # Required. Specification of the PITR data to clone from. The source database + # must exist. + # + # The cloned database will be created in the same location as the source + # database. + # @param encryption_config [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig, ::Hash] + # Optional. Encryption configuration for the cloned database. + # + # If this field is not specified, the cloned database will use + # the same encryption configuration as the source database, namely + # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. + # @param tags [::Hash{::String => ::String}] + # Optional. Immutable. Tags to be bound to the cloned database. + # + # The tags should be provided in the format of + # `tagKeys/{tag_key_id} -> tagValues/{tag_value_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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new + # + # # Call the clone_database method. + # result = client.clone_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def clone_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.clone_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.pitr_snapshot&.database + regex_match = %r{^projects/(?[^/]+)(?:/.*)?$}.match request.pitr_snapshot.database + if regex_match + header_params["project_id"] = regex_match["project_id".to_s] + end + end + if request.pitr_snapshot&.database + regex_match = %r{^projects/[^/]+/databases/(?[^/]+)(?:/.*)?$}.match request.pitr_snapshot.database + if regex_match + header_params["database_id"] = regex_match["database_id".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.clone_database.timeout, + metadata: metadata, + retry_policy: @config.rpcs.clone_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.call_rpc :clone_database, 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 FirestoreAdmin API. + # + # This class represents the configuration for FirestoreAdmin, + # 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::Firestore::Admin::V1::FirestoreAdmin::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_index to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_index.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_index.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::Firestore::Admin::V1::FirestoreAdmin::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 = "firestore.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 FirestoreAdmin 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_index` + # @return [::Gapic::Config::Method] + # + attr_reader :create_index + ## + # RPC-specific configuration for `list_indexes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_indexes + ## + # RPC-specific configuration for `get_index` + # @return [::Gapic::Config::Method] + # + attr_reader :get_index + ## + # RPC-specific configuration for `delete_index` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_index + ## + # RPC-specific configuration for `get_field` + # @return [::Gapic::Config::Method] + # + attr_reader :get_field + ## + # RPC-specific configuration for `update_field` + # @return [::Gapic::Config::Method] + # + attr_reader :update_field + ## + # RPC-specific configuration for `list_fields` + # @return [::Gapic::Config::Method] + # + attr_reader :list_fields + ## + # RPC-specific configuration for `export_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :export_documents + ## + # RPC-specific configuration for `import_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :import_documents + ## + # RPC-specific configuration for `bulk_delete_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_delete_documents + ## + # RPC-specific configuration for `create_database` + # @return [::Gapic::Config::Method] + # + attr_reader :create_database + ## + # RPC-specific configuration for `get_database` + # @return [::Gapic::Config::Method] + # + attr_reader :get_database + ## + # RPC-specific configuration for `list_databases` + # @return [::Gapic::Config::Method] + # + attr_reader :list_databases + ## + # RPC-specific configuration for `update_database` + # @return [::Gapic::Config::Method] + # + attr_reader :update_database + ## + # RPC-specific configuration for `delete_database` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_database + ## + # RPC-specific configuration for `create_user_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :create_user_creds + ## + # RPC-specific configuration for `get_user_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :get_user_creds + ## + # RPC-specific configuration for `list_user_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :list_user_creds + ## + # RPC-specific configuration for `enable_user_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_user_creds + ## + # RPC-specific configuration for `disable_user_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_user_creds + ## + # RPC-specific configuration for `reset_user_password` + # @return [::Gapic::Config::Method] + # + attr_reader :reset_user_password + ## + # RPC-specific configuration for `delete_user_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user_creds + ## + # RPC-specific configuration for `get_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `delete_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup + ## + # RPC-specific configuration for `restore_database` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_database + ## + # RPC-specific configuration for `create_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_schedule + ## + # RPC-specific configuration for `get_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_schedule + ## + # RPC-specific configuration for `list_backup_schedules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_schedules + ## + # RPC-specific configuration for `update_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_schedule + ## + # RPC-specific configuration for `delete_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_schedule + ## + # RPC-specific configuration for `clone_database` + # @return [::Gapic::Config::Method] + # + attr_reader :clone_database + + # @private + def initialize parent_rpcs = nil + create_index_config = parent_rpcs.create_index if parent_rpcs.respond_to? :create_index + @create_index = ::Gapic::Config::Method.new create_index_config + list_indexes_config = parent_rpcs.list_indexes if parent_rpcs.respond_to? :list_indexes + @list_indexes = ::Gapic::Config::Method.new list_indexes_config + get_index_config = parent_rpcs.get_index if parent_rpcs.respond_to? :get_index + @get_index = ::Gapic::Config::Method.new get_index_config + delete_index_config = parent_rpcs.delete_index if parent_rpcs.respond_to? :delete_index + @delete_index = ::Gapic::Config::Method.new delete_index_config + get_field_config = parent_rpcs.get_field if parent_rpcs.respond_to? :get_field + @get_field = ::Gapic::Config::Method.new get_field_config + update_field_config = parent_rpcs.update_field if parent_rpcs.respond_to? :update_field + @update_field = ::Gapic::Config::Method.new update_field_config + list_fields_config = parent_rpcs.list_fields if parent_rpcs.respond_to? :list_fields + @list_fields = ::Gapic::Config::Method.new list_fields_config + export_documents_config = parent_rpcs.export_documents if parent_rpcs.respond_to? :export_documents + @export_documents = ::Gapic::Config::Method.new export_documents_config + import_documents_config = parent_rpcs.import_documents if parent_rpcs.respond_to? :import_documents + @import_documents = ::Gapic::Config::Method.new import_documents_config + bulk_delete_documents_config = parent_rpcs.bulk_delete_documents if parent_rpcs.respond_to? :bulk_delete_documents + @bulk_delete_documents = ::Gapic::Config::Method.new bulk_delete_documents_config + create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database + @create_database = ::Gapic::Config::Method.new create_database_config + get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database + @get_database = ::Gapic::Config::Method.new get_database_config + list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases + @list_databases = ::Gapic::Config::Method.new list_databases_config + update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database + @update_database = ::Gapic::Config::Method.new update_database_config + delete_database_config = parent_rpcs.delete_database if parent_rpcs.respond_to? :delete_database + @delete_database = ::Gapic::Config::Method.new delete_database_config + create_user_creds_config = parent_rpcs.create_user_creds if parent_rpcs.respond_to? :create_user_creds + @create_user_creds = ::Gapic::Config::Method.new create_user_creds_config + get_user_creds_config = parent_rpcs.get_user_creds if parent_rpcs.respond_to? :get_user_creds + @get_user_creds = ::Gapic::Config::Method.new get_user_creds_config + list_user_creds_config = parent_rpcs.list_user_creds if parent_rpcs.respond_to? :list_user_creds + @list_user_creds = ::Gapic::Config::Method.new list_user_creds_config + enable_user_creds_config = parent_rpcs.enable_user_creds if parent_rpcs.respond_to? :enable_user_creds + @enable_user_creds = ::Gapic::Config::Method.new enable_user_creds_config + disable_user_creds_config = parent_rpcs.disable_user_creds if parent_rpcs.respond_to? :disable_user_creds + @disable_user_creds = ::Gapic::Config::Method.new disable_user_creds_config + reset_user_password_config = parent_rpcs.reset_user_password if parent_rpcs.respond_to? :reset_user_password + @reset_user_password = ::Gapic::Config::Method.new reset_user_password_config + delete_user_creds_config = parent_rpcs.delete_user_creds if parent_rpcs.respond_to? :delete_user_creds + @delete_user_creds = ::Gapic::Config::Method.new delete_user_creds_config + get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup + @get_backup = ::Gapic::Config::Method.new get_backup_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup + @delete_backup = ::Gapic::Config::Method.new delete_backup_config + restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database + @restore_database = ::Gapic::Config::Method.new restore_database_config + create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule + @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config + get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule + @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config + list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules + @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config + update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule + @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config + delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule + @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config + clone_database_config = parent_rpcs.clone_database if parent_rpcs.respond_to? :clone_database + @clone_database = ::Gapic::Config::Method.new clone_database_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/credentials.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/credentials.rb new file mode 100644 index 000000000000..0837b6c659cd --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/credentials.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 "googleauth" + +module Google + module Cloud + module Firestore + module Admin + module V1 + module FirestoreAdmin + # Credentials for the FirestoreAdmin API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + self.env_vars = [ + "FIRESTORE_CREDENTIALS", + "FIRESTORE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "FIRESTORE_CREDENTIALS_JSON", + "FIRESTORE_KEYFILE_JSON", + "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 +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb new file mode 100644 index 000000000000..c0d9502b6fc8 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb @@ -0,0 +1,843 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Firestore + module Admin + module V1 + module FirestoreAdmin + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the FirestoreAdmin 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 FirestoreAdmin 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::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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::Firestore::Admin::V1::VERSION + metadata[:"x-goog-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::Firestore::Admin::V1::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 = "firestore.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 +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb new file mode 100644 index 000000000000..37f0b87e6c0b --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/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 Firestore + module Admin + module V1 + module FirestoreAdmin + # Path helper methods for the FirestoreAdmin API. + module Paths + ## + # Create a fully-qualified Backup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backups/{backup}` + # + # @param project [String] + # @param location [String] + # @param backup [String] + # + # @return [::String] + def backup_path project:, location:, backup: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backups/#{backup}" + end + + ## + # Create a fully-qualified BackupSchedule resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + # + # @param project [String] + # @param database [String] + # @param backup_schedule [String] + # + # @return [::String] + def backup_schedule_path project:, database:, backup_schedule: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" + + "projects/#{project}/databases/#{database}/backupSchedules/#{backup_schedule}" + end + + ## + # Create a fully-qualified CollectionGroup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/databases/{database}/collectionGroups/{collection}` + # + # @param project [String] + # @param database [String] + # @param collection [String] + # + # @return [::String] + def collection_group_path project:, database:, collection: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" + + "projects/#{project}/databases/#{database}/collectionGroups/#{collection}" + end + + ## + # Create a fully-qualified Database resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/databases/{database}` + # + # @param project [String] + # @param database [String] + # + # @return [::String] + def database_path project:, database: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/databases/#{database}" + end + + ## + # Create a fully-qualified Field resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}` + # + # @param project [String] + # @param database [String] + # @param collection [String] + # @param field [String] + # + # @return [::String] + def field_path project:, database:, collection:, field: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + + "projects/#{project}/databases/#{database}/collectionGroups/#{collection}/fields/#{field}" + end + + ## + # Create a fully-qualified Index resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}` + # + # @param project [String] + # @param database [String] + # @param collection [String] + # @param index [String] + # + # @return [::String] + def index_path project:, database:, collection:, index: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" + raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" + + "projects/#{project}/databases/#{database}/collectionGroups/#{collection}/indexes/#{index}" + 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 Operation resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/databases/{database}/operations/{operation}` + # + # @param project [String] + # @param database [String] + # @param operation [String] + # + # @return [::String] + def operation_path project:, database:, operation: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" + + "projects/#{project}/databases/#{database}/operations/#{operation}" + 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 + + ## + # Create a fully-qualified UserCreds resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/databases/{database}/userCreds/{user_creds}` + # + # @param project [String] + # @param database [String] + # @param user_creds [String] + # + # @return [::String] + def user_creds_path project:, database:, user_creds: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" + + "projects/#{project}/databases/#{database}/userCreds/#{user_creds}" + end + + extend self + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest.rb new file mode 100644 index 000000000000..de531d6fbc46 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/admin/v1/version" + +require "google/cloud/firestore/admin/v1/firestore_admin/credentials" +require "google/cloud/firestore/admin/v1/firestore_admin/paths" +require "google/cloud/firestore/admin/v1/firestore_admin/rest/operations" +require "google/cloud/firestore/admin/v1/firestore_admin/rest/client" + +module Google + module Cloud + module Firestore + module Admin + module V1 + ## + # The Cloud Firestore Admin API. + # + # This API provides several administrative services for Cloud Firestore. + # + # Project, Database, Namespace, Collection, Collection Group, and Document are + # used as defined in the Google Cloud Firestore API. + # + # Operation: An Operation represents work being performed in the background. + # + # The index service manages Cloud Firestore indexes. + # + # Index creation is performed asynchronously. + # An Operation resource is created for each such asynchronous operation. + # The state of the operation (including any errors encountered) + # may be queried via the Operation resource. + # + # The Operations collection provides a record of actions performed for the + # specified Project (including any Operations in progress). Operations are not + # created directly but through calls on other collections or resources. + # + # An Operation that is done may be deleted so that it is no longer listed as + # part of the Operation collection. Operations are garbage collected after + # 30 days. By default, ListOperations will only return in progress and failed + # operations. To list completed operation, issue a ListOperations request with + # the filter `done: true`. + # + # Operations are created by service `FirestoreAdmin`, but are accessed via + # service `google.longrunning.Operations`. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/firestore/admin/v1/firestore_admin/rest" + # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + module FirestoreAdmin + # Client for the REST transport + module Rest + end + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/firestore/admin/v1/firestore_admin/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb new file mode 100644 index 000000000000..063eaab47780 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb @@ -0,0 +1,3573 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/admin/v1/firestore_admin_pb" +require "google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Firestore + module Admin + module V1 + module FirestoreAdmin + module Rest + ## + # REST client for the FirestoreAdmin service. + # + # The Cloud Firestore Admin API. + # + # This API provides several administrative services for Cloud Firestore. + # + # Project, Database, Namespace, Collection, Collection Group, and Document are + # used as defined in the Google Cloud Firestore API. + # + # Operation: An Operation represents work being performed in the background. + # + # The index service manages Cloud Firestore indexes. + # + # Index creation is performed asynchronously. + # An Operation resource is created for each such asynchronous operation. + # The state of the operation (including any errors encountered) + # may be queried via the Operation resource. + # + # The Operations collection provides a record of actions performed for the + # specified Project (including any Operations in progress). Operations are not + # created directly but through calls on other collections or resources. + # + # An Operation that is done may be deleted so that it is no longer listed as + # part of the Operation collection. Operations are garbage collected after + # 30 days. By default, ListOperations will only return in progress and failed + # operations. To list completed operation, issue a ListOperations request with + # the filter `done: true`. + # + # Operations are created by service `FirestoreAdmin`, but are accessed via + # service `google.longrunning.Operations`. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :firestore_admin_stub + + ## + # Configure the FirestoreAdmin Client class. + # + # See {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FirestoreAdmin clients + # ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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", "Firestore", "Admin", "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_index.timeout = 60.0 + + default_config.rpcs.list_indexes.timeout = 60.0 + default_config.rpcs.list_indexes.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] + } + + default_config.rpcs.get_index.timeout = 60.0 + default_config.rpcs.get_index.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] + } + + default_config.rpcs.delete_index.timeout = 60.0 + default_config.rpcs.delete_index.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] + } + + default_config.rpcs.get_field.timeout = 60.0 + default_config.rpcs.get_field.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] + } + + default_config.rpcs.update_field.timeout = 60.0 + + default_config.rpcs.list_fields.timeout = 60.0 + default_config.rpcs.list_fields.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] + } + + default_config.rpcs.export_documents.timeout = 60.0 + + default_config.rpcs.import_documents.timeout = 60.0 + + default_config.rpcs.bulk_delete_documents.timeout = 60.0 + + default_config.rpcs.create_database.timeout = 120.0 + + default_config.rpcs.restore_database.timeout = 120.0 + + default_config.rpcs.clone_database.timeout = 120.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the FirestoreAdmin 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::Firestore::Admin::V1::FirestoreAdmin::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 + @firestore_admin_stub.universe_domain + end + + ## + # Create a new FirestoreAdmin REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FirestoreAdmin 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::Firestore::Admin::V1::FirestoreAdmin::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 + + @firestore_admin_stub = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @firestore_admin_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 = @firestore_admin_stub.endpoint + config.universe_domain = @firestore_admin_stub.universe_domain + config.logger = @firestore_admin_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @firestore_admin_stub.logger + end + + # Service calls + + ## + # Creates a composite index. This returns a + # {::Google::Longrunning::Operation google.longrunning.Operation} which may be + # used to track the status of the creation. The metadata for the operation + # will be the type + # {::Google::Cloud::Firestore::Admin::V1::IndexOperationMetadata IndexOperationMetadata}. + # + # @overload create_index(request, options = nil) + # Pass arguments to `create_index` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_index(parent: nil, index: nil) + # Pass arguments to `create_index` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + # @param index [::Google::Cloud::Firestore::Admin::V1::Index, ::Hash] + # Required. The composite index 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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new + # + # # Call the create_index method. + # result = client.create_index request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_index request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest + + # Converts hash and nil to an 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_index.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_index.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_index.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.create_index 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 composite indexes. + # + # @overload list_indexes(request, options = nil) + # Pass arguments to `list_indexes` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_indexes(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_indexes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + # @param filter [::String] + # The filter to apply to list results. + # @param page_size [::Integer] + # The number of results to return. + # @param page_token [::String] + # A page token, returned from a previous call to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_indexes FirestoreAdmin.ListIndexes}, + # that may be used to get the next page of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new + # + # # Call the list_indexes method. + # result = client.list_indexes request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Index. + # p item + # end + # + def list_indexes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest + + # Converts hash and nil to an 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_indexes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_indexes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_indexes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.list_indexes request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @firestore_admin_stub, :list_indexes, "indexes", 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 a composite index. + # + # @overload get_index(request, options = nil) + # Pass arguments to `get_index` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::GetIndexRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::GetIndexRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_index(name: nil) + # Pass arguments to `get_index` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Index] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::Index] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::GetIndexRequest.new + # + # # Call the get_index method. + # result = client.get_index request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Index. + # p result + # + def get_index request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetIndexRequest + + # Converts hash and nil to an 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_index.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_index.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_index.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.get_index 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 composite index. + # + # @overload delete_index(request, options = nil) + # Pass arguments to `delete_index` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_index(name: nil) + # Pass arguments to `delete_index` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.new + # + # # Call the delete_index method. + # result = client.delete_index request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_index request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest + + # Converts hash and nil to an 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_index.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_index.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_index.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.delete_index 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 metadata and configuration for a Field. + # + # @overload get_field(request, options = nil) + # Pass arguments to `get_field` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::GetFieldRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::GetFieldRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_field(name: nil) + # Pass arguments to `get_field` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Field] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::Field] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::GetFieldRequest.new + # + # # Call the get_field method. + # result = client.get_field request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Field. + # p result + # + def get_field request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetFieldRequest + + # Converts hash and nil to an 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_field.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_field.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_field.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.get_field 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 field configuration. Currently, field updates apply only to + # single field index configuration. However, calls to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#update_field FirestoreAdmin.UpdateField} + # should provide a field mask to avoid changing any configuration that the + # caller isn't aware of. The field mask should be specified as: `{ paths: + # "index_config" }`. + # + # This call returns a + # {::Google::Longrunning::Operation google.longrunning.Operation} which may be + # used to track the status of the field update. The metadata for the + # operation will be the type + # {::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata FieldOperationMetadata}. + # + # To configure the default field settings for the database, use + # the special `Field` with resource name: + # `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + # + # @overload update_field(request, options = nil) + # Pass arguments to `update_field` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_field(field: nil, update_mask: nil) + # Pass arguments to `update_field` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param field [::Google::Cloud::Firestore::Admin::V1::Field, ::Hash] + # Required. The field to be updated. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # A mask, relative to the field. If specified, only configuration specified + # by this field_mask will be updated in the field. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new + # + # # Call the update_field method. + # result = client.update_field request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_field request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest + + # Converts hash and nil to an 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_field.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_field.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_field.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.update_field 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 the field configuration and metadata for this database. + # + # Currently, + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_fields FirestoreAdmin.ListFields} + # only supports listing fields that have been explicitly overridden. To issue + # this query, call + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_fields FirestoreAdmin.ListFields} + # with the filter set to `indexConfig.usesAncestorConfig:false` or + # `ttlConfig:*`. + # + # @overload list_fields(request, options = nil) + # Pass arguments to `list_fields` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_fields(parent: nil, filter: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_fields` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + # @param filter [::String] + # The filter to apply to list results. Currently, + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_fields FirestoreAdmin.ListFields} + # only supports listing fields that have been explicitly overridden. To issue + # this query, call + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_fields FirestoreAdmin.ListFields} + # with a filter that includes `indexConfig.usesAncestorConfig:false` or + # `ttlConfig:*`. + # @param page_size [::Integer] + # The number of results to return. + # @param page_token [::String] + # A page token, returned from a previous call to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_fields FirestoreAdmin.ListFields}, + # that may be used to get the next page of results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new + # + # # Call the list_fields method. + # result = client.list_fields request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Field. + # p item + # end + # + def list_fields request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest + + # Converts hash and nil to an 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_fields.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_fields.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_fields.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.list_fields request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @firestore_admin_stub, :list_fields, "fields", 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 + + ## + # Exports a copy of all or a subset of documents from Google Cloud Firestore + # to another storage system, such as Google Cloud Storage. Recent updates to + # documents may not be reflected in the export. The export occurs in the + # background and its progress can be monitored and managed via the + # Operation resource that is created. The output of an export may only be + # used once the associated operation is done. If an export operation is + # cancelled before completion it may leave partial data behind in Google + # Cloud Storage. + # + # For more details on export behavior and output format, refer to: + # https://cloud.google.com/firestore/docs/manage-data/export-import + # + # @overload export_documents(request, options = nil) + # Pass arguments to `export_documents` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload export_documents(name: nil, collection_ids: nil, output_uri_prefix: nil, namespace_ids: nil, snapshot_time: nil) + # Pass arguments to `export_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Database to export. Should be of the form: + # `projects/{project_id}/databases/{database_id}`. + # @param collection_ids [::Array<::String>] + # Which collection IDs to export. Unspecified means all collections. Each + # collection ID in this list must be unique. + # @param output_uri_prefix [::String] + # The output URI. Currently only supports Google Cloud Storage URIs of the + # form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + # of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + # Google Cloud Storage namespace path. When + # choosing a name, be sure to consider Google Cloud Storage naming + # guidelines: https://cloud.google.com/storage/docs/naming. + # If the URI is a bucket (without a namespace path), a prefix will be + # generated based on the start time. + # @param namespace_ids [::Array<::String>] + # An empty list represents all namespaces. This is the preferred + # usage for databases that don't use namespaces. + # + # An empty string element represents the default namespace. This should be + # used if the database has data in non-default namespaces, but doesn't want + # to include them. Each namespace in this list must be unique. + # @param snapshot_time [::Google::Protobuf::Timestamp, ::Hash] + # The timestamp that corresponds to the version of the database to be + # exported. The timestamp must be in the past, rounded to the minute and not + # older than + # {::Google::Cloud::Firestore::Admin::V1::Database#earliest_version_time earliestVersionTime}. + # If specified, then the exported documents will represent a consistent view + # of the database at the provided time. Otherwise, there are no guarantees + # about the consistency of the exported documents. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new + # + # # Call the export_documents method. + # result = client.export_documents request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def export_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.export_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.export_documents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.export_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.export_documents 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 + + ## + # Imports documents into Google Cloud Firestore. Existing documents with the + # same name are overwritten. The import occurs in the background and its + # progress can be monitored and managed via the Operation resource that is + # created. If an ImportDocuments operation is cancelled, it is possible + # that a subset of the data has already been imported to Cloud Firestore. + # + # @overload import_documents(request, options = nil) + # Pass arguments to `import_documents` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload import_documents(name: nil, collection_ids: nil, input_uri_prefix: nil, namespace_ids: nil) + # Pass arguments to `import_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Database to import into. Should be of the form: + # `projects/{project_id}/databases/{database_id}`. + # @param collection_ids [::Array<::String>] + # Which collection IDs to import. Unspecified means all collections included + # in the import. Each collection ID in this list must be unique. + # @param input_uri_prefix [::String] + # Location of the exported files. + # This must match the output_uri_prefix of an ExportDocumentsResponse from + # an export that has completed successfully. + # See: + # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsResponse#output_uri_prefix google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix}. + # @param namespace_ids [::Array<::String>] + # An empty list represents all namespaces. This is the preferred + # usage for databases that don't use namespaces. + # + # An empty string element represents the default namespace. This should be + # used if the database has data in non-default namespaces, but doesn't want + # to include them. Each namespace in this list must be unique. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new + # + # # Call the import_documents method. + # result = client.import_documents request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def import_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.import_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.import_documents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.import_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.import_documents 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 + + ## + # Bulk deletes a subset of documents from Google Cloud Firestore. + # Documents created or updated after the underlying system starts to process + # the request will not be deleted. The bulk delete occurs in the background + # and its progress can be monitored and managed via the Operation resource + # that is created. + # + # For more details on bulk delete behavior, refer to: + # https://cloud.google.com/firestore/docs/manage-data/bulk-delete + # + # @overload bulk_delete_documents(request, options = nil) + # Pass arguments to `bulk_delete_documents` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload bulk_delete_documents(name: nil, collection_ids: nil, namespace_ids: nil) + # Pass arguments to `bulk_delete_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Database to operate. Should be of the form: + # `projects/{project_id}/databases/{database_id}`. + # @param collection_ids [::Array<::String>] + # Optional. IDs of the collection groups to delete. Unspecified means all + # collection groups. + # + # Each collection group in this list must be unique. + # @param namespace_ids [::Array<::String>] + # Optional. Namespaces to delete. + # + # An empty list means all namespaces. This is the recommended + # usage for databases that don't use namespaces. + # + # An empty string element represents the default namespace. This should be + # used if the database has data in non-default namespaces, but doesn't want + # to delete from them. + # + # Each namespace in this list must be unique. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new + # + # # Call the bulk_delete_documents method. + # result = client.bulk_delete_documents request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def bulk_delete_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.bulk_delete_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.bulk_delete_documents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.bulk_delete_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.bulk_delete_documents 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 + + ## + # Create a database. + # + # @overload create_database(request, options = nil) + # Pass arguments to `create_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_database(parent: nil, database: nil, database_id: nil) + # Pass arguments to `create_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent name of the form + # `projects/{project_id}` + # @param database [::Google::Cloud::Firestore::Admin::V1::Database, ::Hash] + # Required. The Database to create. + # @param database_id [::String] + # Required. The ID to use for the database, which will become the final + # component of the database's resource name. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # + # "(default)" database ID is also valid. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new + # + # # Call the create_database method. + # result = client.create_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest + + # Converts hash and nil to an 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_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_database.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.create_database 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 information about a database. + # + # @overload get_database(request, options = nil) + # Pass arguments to `get_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_database(name: nil) + # Pass arguments to `get_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Database] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::Database] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.new + # + # # Call the get_database method. + # result = client.get_database request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Database. + # p result + # + def get_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest + + # Converts hash and nil to an 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_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_database.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.get_database 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 all the databases in the project. + # + # @overload list_databases(request, options = nil) + # Pass arguments to `list_databases` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_databases(parent: nil, show_deleted: nil) + # Pass arguments to `list_databases` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent name of the form + # `projects/{project_id}` + # @param show_deleted [::Boolean] + # If true, also returns deleted resources. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new + # + # # Call the list_databases method. + # result = client.list_databases request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse. + # p result + # + def list_databases request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest + + # Converts hash and nil to an 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_databases.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_databases.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_databases.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.list_databases 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 database. + # + # @overload update_database(request, options = nil) + # Pass arguments to `update_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_database(database: nil, update_mask: nil) + # Pass arguments to `update_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::Google::Cloud::Firestore::Admin::V1::Database, ::Hash] + # Required. The database to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new + # + # # Call the update_database method. + # result = client.update_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest + + # Converts hash and nil to an 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_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_database.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.update_database 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 database. + # + # @overload delete_database(request, options = nil) + # Pass arguments to `delete_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_database(name: nil, etag: nil) + # Pass arguments to `delete_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}` + # @param etag [::String] + # The current etag of the Database. + # If an etag is provided and does not match the current etag of the database, + # deletion will be blocked and a FAILED_PRECONDITION error will be returned. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.new + # + # # Call the delete_database method. + # result = client.delete_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest + + # Converts hash and nil to an 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_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_database.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.delete_database 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 + + ## + # Create a user creds. + # + # @overload create_user_creds(request, options = nil) + # Pass arguments to `create_user_creds` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_user_creds(parent: nil, user_creds: nil, user_creds_id: nil) + # Pass arguments to `create_user_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent name of the form + # `projects/{project_id}/databases/{database_id}` + # @param user_creds [::Google::Cloud::Firestore::Admin::V1::UserCreds, ::Hash] + # Required. The user creds to create. + # @param user_creds_id [::String] + # Required. The ID to use for the user creds, which will become the final + # component of the user creds's resource name. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new + # + # # Call the create_user_creds method. + # result = client.create_user_creds request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + # p result + # + def create_user_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest + + # Converts hash and nil to an 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_user_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_user_creds.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_user_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.create_user_creds 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 user creds resource. Note that the returned resource does not + # contain the secret value itself. + # + # @overload get_user_creds(request, options = nil) + # Pass arguments to `get_user_creds` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_user_creds(name: nil) + # Pass arguments to `get_user_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new + # + # # Call the get_user_creds method. + # result = client.get_user_creds request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + # p result + # + def get_user_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest + + # Converts hash and nil to an 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_user_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_user_creds.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_user_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.get_user_creds 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 all user creds in the database. Note that the returned resource + # does not contain the secret value itself. + # + # @overload list_user_creds(request, options = nil) + # Pass arguments to `list_user_creds` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_user_creds(parent: nil) + # Pass arguments to `list_user_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. A parent database name of the form + # `projects/{project_id}/databases/{database_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new + # + # # Call the list_user_creds method. + # result = client.list_user_creds request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse. + # p result + # + def list_user_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest + + # Converts hash and nil to an 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_user_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_user_creds.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_user_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.list_user_creds 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 + + ## + # Enables a user creds. No-op if the user creds are already enabled. + # + # @overload enable_user_creds(request, options = nil) + # Pass arguments to `enable_user_creds` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload enable_user_creds(name: nil) + # Pass arguments to `enable_user_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new + # + # # Call the enable_user_creds method. + # result = client.enable_user_creds request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + # p result + # + def enable_user_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.enable_user_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.enable_user_creds.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.enable_user_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.enable_user_creds 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 + + ## + # Disables a user creds. No-op if the user creds are already disabled. + # + # @overload disable_user_creds(request, options = nil) + # Pass arguments to `disable_user_creds` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload disable_user_creds(name: nil) + # Pass arguments to `disable_user_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new + # + # # Call the disable_user_creds method. + # result = client.disable_user_creds request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + # p result + # + def disable_user_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.disable_user_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.disable_user_creds.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.disable_user_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.disable_user_creds 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 + + ## + # Resets the password of a user creds. + # + # @overload reset_user_password(request, options = nil) + # Pass arguments to `reset_user_password` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload reset_user_password(name: nil) + # Pass arguments to `reset_user_password` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new + # + # # Call the reset_user_password method. + # result = client.reset_user_password request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + # p result + # + def reset_user_password request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.reset_user_password.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.reset_user_password.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.reset_user_password.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.reset_user_password 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 user creds. + # + # @overload delete_user_creds(request, options = nil) + # Pass arguments to `delete_user_creds` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_user_creds(name: nil) + # Pass arguments to `delete_user_creds` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new + # + # # Call the delete_user_creds method. + # result = client.delete_user_creds request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_user_creds request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest + + # Converts hash and nil to an 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_user_creds.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_user_creds.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_user_creds.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.delete_user_creds 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 information about a backup. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::GetBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup(name: nil) + # Pass arguments to `get_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup to fetch. + # + # Format is `projects/{project}/locations/{location}/backups/{backup}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Backup. + # p result + # + def get_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetBackupRequest + + # Converts hash and nil to an 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.get_backup 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 all the backups. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backups(parent: nil, filter: nil) + # Pass arguments to `list_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 to list backups from. + # + # Format is `projects/{project}/locations/{location}`. + # Use `{location} = '-'` to list backups from all locations for the given + # project. This allows listing backups from a single location or from all + # locations. + # @param filter [::String] + # An expression that filters the list of returned backups. + # + # A filter expression consists of a field name, a comparison operator, and a + # value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the {::Google::Cloud::Firestore::Admin::V1::Backup Backup} are + # eligible for filtering: + # + # * `database_uid` (supports `=` only) + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new + # + # # Call the list_backups method. + # result = client.list_backups request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupsResponse. + # p result + # + def list_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest + + # Converts hash and nil to an 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_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.list_backups 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 backup. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup(name: nil) + # Pass arguments to `delete_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the backup to delete. + # + # format is `projects/{project}/locations/{location}/backups/{backup}`. + # @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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_backup request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest + + # Converts hash and nil to an 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.delete_backup 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 new database by restoring from an existing backup. + # + # The new database must be in the same cloud region or multi-region location + # as the existing backup. This behaves similar to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#create_database FirestoreAdmin.CreateDatabase} + # except instead of creating a new empty database, a new database is created + # with the database type, index configuration, and documents from an existing + # backup. + # + # The {::Google::Longrunning::Operation long-running operation} can be used to + # track the progress of the restore, with the Operation's + # {::Google::Longrunning::Operation#metadata metadata} field type being the + # {::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. + # The {::Google::Longrunning::Operation#response response} type is the + # {::Google::Cloud::Firestore::Admin::V1::Database Database} if the restore was + # successful. The new database is not readable or writeable until the LRO has + # completed. + # + # @overload restore_database(request, options = nil) + # Pass arguments to `restore_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload restore_database(parent: nil, database_id: nil, backup: nil, encryption_config: nil, tags: nil) + # Pass arguments to `restore_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project to restore the database in. Format is + # `projects/{project_id}`. + # @param database_id [::String] + # Required. The ID to use for the database, which will become the final + # component of the database's resource name. This database ID must not be + # associated with an existing database. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # + # "(default)" database ID is also valid. + # @param backup [::String] + # Required. Backup to restore from. Must be from the same project as the + # parent. + # + # The restored database will be created in the same location as the source + # backup. + # + # Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + # @param encryption_config [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig, ::Hash] + # Optional. Encryption configuration for the restored database. + # + # If this field is not specified, the restored database will use + # the same encryption configuration as the backup, namely + # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. + # @param tags [::Hash{::String => ::String}] + # Optional. Immutable. Tags to be bound to the restored database. + # + # The tags should be provided in the format of + # `tagKeys/{tag_key_id} -> tagValues/{tag_value_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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new + # + # # Call the restore_database method. + # result = client.restore_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def restore_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.restore_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.restore_database.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.restore_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.restore_database 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 backup schedule on a database. + # At most two backup schedules can be configured on a database, one daily + # backup schedule and one weekly backup schedule. + # + # @overload create_backup_schedule(request, options = nil) + # Pass arguments to `create_backup_schedule` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_schedule(parent: nil, backup_schedule: nil) + # Pass arguments to `create_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 database. + # + # Format `projects/{project}/databases/{database}` + # @param backup_schedule [::Google::Cloud::Firestore::Admin::V1::BackupSchedule, ::Hash] + # Required. The backup schedule to create. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new + # + # # Call the create_backup_schedule method. + # result = client.create_backup_schedule request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. + # p result + # + def create_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest + + # Converts hash and nil to an 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_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_schedule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.create_backup_schedule 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 information about a backup schedule. + # + # @overload get_backup_schedule(request, options = nil) + # Pass arguments to `get_backup_schedule` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_schedule(name: nil) + # Pass arguments to `get_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 backup schedule. + # + # Format + # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.new + # + # # Call the get_backup_schedule method. + # result = client.get_backup_schedule request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. + # p result + # + def get_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest + + # Converts hash and nil to an 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_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_schedule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.get_backup_schedule 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 backup schedules. + # + # @overload list_backup_schedules(request, options = nil) + # Pass arguments to `list_backup_schedules` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_schedules(parent: nil) + # Pass arguments to `list_backup_schedules` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 database. + # + # Format is `projects/{project}/databases/{database}`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new + # + # # Call the list_backup_schedules method. + # result = client.list_backup_schedules request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse. + # p result + # + def list_backup_schedules request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest + + # Converts hash and nil to an 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_backup_schedules.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_schedules.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_schedules.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.list_backup_schedules 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 backup schedule. + # + # @overload update_backup_schedule(request, options = nil) + # Pass arguments to `update_backup_schedule` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_schedule(backup_schedule: nil, update_mask: nil) + # Pass arguments to `update_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_schedule [::Google::Cloud::Firestore::Admin::V1::BackupSchedule, ::Hash] + # Required. The backup schedule to update. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new + # + # # Call the update_backup_schedule method. + # result = client.update_backup_schedule request + # + # # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. + # p result + # + def update_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest + + # Converts hash and nil to an 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_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_schedule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.update_backup_schedule 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 backup schedule. + # + # @overload delete_backup_schedule(request, options = nil) + # Pass arguments to `delete_backup_schedule` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup_schedule(name: nil) + # Pass arguments to `delete_backup_schedule` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 backup schedule. + # + # Format + # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + # @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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.new + # + # # Call the delete_backup_schedule method. + # result = client.delete_backup_schedule request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_backup_schedule request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest + + # Converts hash and nil to an 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_backup_schedule.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_schedule.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup_schedule.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.delete_backup_schedule 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 new database by cloning an existing one. + # + # The new database must be in the same cloud region or multi-region location + # as the existing database. This behaves similar to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#create_database FirestoreAdmin.CreateDatabase} + # except instead of creating a new empty database, a new database is created + # with the database type, index configuration, and documents from an existing + # database. + # + # The {::Google::Longrunning::Operation long-running operation} can be used to + # track the progress of the clone, with the Operation's + # {::Google::Longrunning::Operation#metadata metadata} field type being the + # {::Google::Cloud::Firestore::Admin::V1::CloneDatabaseMetadata CloneDatabaseMetadata}. + # The {::Google::Longrunning::Operation#response response} type is the + # {::Google::Cloud::Firestore::Admin::V1::Database Database} if the clone was + # successful. The new database is not readable or writeable until the LRO has + # completed. + # + # @overload clone_database(request, options = nil) + # Pass arguments to `clone_database` via a request object, either of type + # {::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload clone_database(parent: nil, database_id: nil, pitr_snapshot: nil, encryption_config: nil, tags: nil) + # Pass arguments to `clone_database` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project to clone the database in. Format is + # `projects/{project_id}`. + # @param database_id [::String] + # Required. The ID to use for the database, which will become the final + # component of the database's resource name. This database ID must not be + # associated with an existing database. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # + # "(default)" database ID is also valid. + # @param pitr_snapshot [::Google::Cloud::Firestore::Admin::V1::PitrSnapshot, ::Hash] + # Required. Specification of the PITR data to clone from. The source database + # must exist. + # + # The cloned database will be created in the same location as the source + # database. + # @param encryption_config [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig, ::Hash] + # Optional. Encryption configuration for the cloned database. + # + # If this field is not specified, the cloned database will use + # the same encryption configuration as the source database, namely + # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. + # @param tags [::Hash{::String => ::String}] + # Optional. Immutable. Tags to be bound to the cloned database. + # + # The tags should be provided in the format of + # `tagKeys/{tag_key_id} -> tagValues/{tag_value_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/firestore/admin/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new + # + # # Call the clone_database method. + # result = client.clone_database request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def clone_database request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.clone_database.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.clone_database.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.clone_database.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_admin_stub.clone_database 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 FirestoreAdmin REST API. + # + # This class represents the configuration for FirestoreAdmin 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::Firestore::Admin::V1::FirestoreAdmin::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_index to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_index.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_index.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 = "firestore.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 FirestoreAdmin 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_index` + # @return [::Gapic::Config::Method] + # + attr_reader :create_index + ## + # RPC-specific configuration for `list_indexes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_indexes + ## + # RPC-specific configuration for `get_index` + # @return [::Gapic::Config::Method] + # + attr_reader :get_index + ## + # RPC-specific configuration for `delete_index` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_index + ## + # RPC-specific configuration for `get_field` + # @return [::Gapic::Config::Method] + # + attr_reader :get_field + ## + # RPC-specific configuration for `update_field` + # @return [::Gapic::Config::Method] + # + attr_reader :update_field + ## + # RPC-specific configuration for `list_fields` + # @return [::Gapic::Config::Method] + # + attr_reader :list_fields + ## + # RPC-specific configuration for `export_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :export_documents + ## + # RPC-specific configuration for `import_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :import_documents + ## + # RPC-specific configuration for `bulk_delete_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :bulk_delete_documents + ## + # RPC-specific configuration for `create_database` + # @return [::Gapic::Config::Method] + # + attr_reader :create_database + ## + # RPC-specific configuration for `get_database` + # @return [::Gapic::Config::Method] + # + attr_reader :get_database + ## + # RPC-specific configuration for `list_databases` + # @return [::Gapic::Config::Method] + # + attr_reader :list_databases + ## + # RPC-specific configuration for `update_database` + # @return [::Gapic::Config::Method] + # + attr_reader :update_database + ## + # RPC-specific configuration for `delete_database` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_database + ## + # RPC-specific configuration for `create_user_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :create_user_creds + ## + # RPC-specific configuration for `get_user_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :get_user_creds + ## + # RPC-specific configuration for `list_user_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :list_user_creds + ## + # RPC-specific configuration for `enable_user_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :enable_user_creds + ## + # RPC-specific configuration for `disable_user_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :disable_user_creds + ## + # RPC-specific configuration for `reset_user_password` + # @return [::Gapic::Config::Method] + # + attr_reader :reset_user_password + ## + # RPC-specific configuration for `delete_user_creds` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_user_creds + ## + # RPC-specific configuration for `get_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `delete_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup + ## + # RPC-specific configuration for `restore_database` + # @return [::Gapic::Config::Method] + # + attr_reader :restore_database + ## + # RPC-specific configuration for `create_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_schedule + ## + # RPC-specific configuration for `get_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_schedule + ## + # RPC-specific configuration for `list_backup_schedules` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_schedules + ## + # RPC-specific configuration for `update_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_schedule + ## + # RPC-specific configuration for `delete_backup_schedule` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_schedule + ## + # RPC-specific configuration for `clone_database` + # @return [::Gapic::Config::Method] + # + attr_reader :clone_database + + # @private + def initialize parent_rpcs = nil + create_index_config = parent_rpcs.create_index if parent_rpcs.respond_to? :create_index + @create_index = ::Gapic::Config::Method.new create_index_config + list_indexes_config = parent_rpcs.list_indexes if parent_rpcs.respond_to? :list_indexes + @list_indexes = ::Gapic::Config::Method.new list_indexes_config + get_index_config = parent_rpcs.get_index if parent_rpcs.respond_to? :get_index + @get_index = ::Gapic::Config::Method.new get_index_config + delete_index_config = parent_rpcs.delete_index if parent_rpcs.respond_to? :delete_index + @delete_index = ::Gapic::Config::Method.new delete_index_config + get_field_config = parent_rpcs.get_field if parent_rpcs.respond_to? :get_field + @get_field = ::Gapic::Config::Method.new get_field_config + update_field_config = parent_rpcs.update_field if parent_rpcs.respond_to? :update_field + @update_field = ::Gapic::Config::Method.new update_field_config + list_fields_config = parent_rpcs.list_fields if parent_rpcs.respond_to? :list_fields + @list_fields = ::Gapic::Config::Method.new list_fields_config + export_documents_config = parent_rpcs.export_documents if parent_rpcs.respond_to? :export_documents + @export_documents = ::Gapic::Config::Method.new export_documents_config + import_documents_config = parent_rpcs.import_documents if parent_rpcs.respond_to? :import_documents + @import_documents = ::Gapic::Config::Method.new import_documents_config + bulk_delete_documents_config = parent_rpcs.bulk_delete_documents if parent_rpcs.respond_to? :bulk_delete_documents + @bulk_delete_documents = ::Gapic::Config::Method.new bulk_delete_documents_config + create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database + @create_database = ::Gapic::Config::Method.new create_database_config + get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database + @get_database = ::Gapic::Config::Method.new get_database_config + list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases + @list_databases = ::Gapic::Config::Method.new list_databases_config + update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database + @update_database = ::Gapic::Config::Method.new update_database_config + delete_database_config = parent_rpcs.delete_database if parent_rpcs.respond_to? :delete_database + @delete_database = ::Gapic::Config::Method.new delete_database_config + create_user_creds_config = parent_rpcs.create_user_creds if parent_rpcs.respond_to? :create_user_creds + @create_user_creds = ::Gapic::Config::Method.new create_user_creds_config + get_user_creds_config = parent_rpcs.get_user_creds if parent_rpcs.respond_to? :get_user_creds + @get_user_creds = ::Gapic::Config::Method.new get_user_creds_config + list_user_creds_config = parent_rpcs.list_user_creds if parent_rpcs.respond_to? :list_user_creds + @list_user_creds = ::Gapic::Config::Method.new list_user_creds_config + enable_user_creds_config = parent_rpcs.enable_user_creds if parent_rpcs.respond_to? :enable_user_creds + @enable_user_creds = ::Gapic::Config::Method.new enable_user_creds_config + disable_user_creds_config = parent_rpcs.disable_user_creds if parent_rpcs.respond_to? :disable_user_creds + @disable_user_creds = ::Gapic::Config::Method.new disable_user_creds_config + reset_user_password_config = parent_rpcs.reset_user_password if parent_rpcs.respond_to? :reset_user_password + @reset_user_password = ::Gapic::Config::Method.new reset_user_password_config + delete_user_creds_config = parent_rpcs.delete_user_creds if parent_rpcs.respond_to? :delete_user_creds + @delete_user_creds = ::Gapic::Config::Method.new delete_user_creds_config + get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup + @get_backup = ::Gapic::Config::Method.new get_backup_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup + @delete_backup = ::Gapic::Config::Method.new delete_backup_config + restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database + @restore_database = ::Gapic::Config::Method.new restore_database_config + create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule + @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config + get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule + @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config + list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules + @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config + update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule + @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config + delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule + @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config + clone_database_config = parent_rpcs.clone_database if parent_rpcs.respond_to? :clone_database + @clone_database = ::Gapic::Config::Method.new clone_database_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb new file mode 100644 index 000000000000..cd55f393cf90 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb @@ -0,0 +1,927 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Firestore + module Admin + module V1 + module FirestoreAdmin + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the FirestoreAdmin 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 FirestoreAdmin 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::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Firestore::Admin::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "firestore.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/[^/]+/databases/[^/]+/?$}, 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/[^/]+/databases/[^/]+/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/[^/]+/databases/[^/]+/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/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb new file mode 100644 index 000000000000..57d850599a12 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb @@ -0,0 +1,2050 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/admin/v1/firestore_admin_pb" + +module Google + module Cloud + module Firestore + module Admin + module V1 + module FirestoreAdmin + module Rest + ## + # REST service stub for the FirestoreAdmin 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_index REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_index request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_index_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_index", + 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_indexes REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse] + # A result object deserialized from the server's reply + def list_indexes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_indexes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_indexes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse.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_index REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetIndexRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Index] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::Index] + # A result object deserialized from the server's reply + def get_index request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_index_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_index", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::Index.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_index REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_index request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_index_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_index", + 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_field REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetFieldRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Field] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::Field] + # A result object deserialized from the server's reply + def get_field request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_field_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_field", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::Field.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_field REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_field request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_field_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_field", + 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_fields REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse] + # A result object deserialized from the server's reply + def list_fields request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_fields_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_fields", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the export_documents REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def export_documents request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_export_documents_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "export_documents", + 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 import_documents REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def import_documents request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_import_documents_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "import_documents", + 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 bulk_delete_documents REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def bulk_delete_documents request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_bulk_delete_documents_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "bulk_delete_documents", + 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_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_database request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_database_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_database", + 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_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Database] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::Database] + # A result object deserialized from the server's reply + def get_database request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_database_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_database", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::Database.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_databases REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse] + # A result object deserialized from the server's reply + def list_databases request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_databases_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_databases", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse.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_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_database request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_database_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_database", + 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_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_database request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_database_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_database", + 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_user_creds REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # A result object deserialized from the server's reply + def create_user_creds request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_user_creds_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_user_creds", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.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_user_creds REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # A result object deserialized from the server's reply + def get_user_creds request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_user_creds_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_user_creds", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.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_user_creds REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse] + # A result object deserialized from the server's reply + def list_user_creds request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_user_creds_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_user_creds", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the enable_user_creds REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # A result object deserialized from the server's reply + def enable_user_creds request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_enable_user_creds_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "enable_user_creds", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the disable_user_creds REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # A result object deserialized from the server's reply + def disable_user_creds request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_disable_user_creds_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "disable_user_creds", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the reset_user_password REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # A result object deserialized from the server's reply + def reset_user_password request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_reset_user_password_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "reset_user_password", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.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_user_creds REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_user_creds request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_creds_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_user_creds", + 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_backup REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::Backup] + # A result object deserialized from the server's reply + def get_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::Backup.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_backups REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse] + # A result object deserialized from the server's reply + def list_backups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse.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_backup REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup", + 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 restore_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def restore_database request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_restore_database_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "restore_database", + 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_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # A result object deserialized from the server's reply + def create_backup_schedule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_schedule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_schedule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.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_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # A result object deserialized from the server's reply + def get_backup_schedule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_schedule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_schedule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.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_backup_schedules REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse] + # A result object deserialized from the server's reply + def list_backup_schedules request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_schedules_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_schedules", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse.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_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # A result object deserialized from the server's reply + def update_backup_schedule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_schedule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_schedule", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.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_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_backup_schedule request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_schedule_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_schedule", + 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 clone_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def clone_database request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_clone_database_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "clone_database", + 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_index REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest] + # 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_index_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/indexes", + body: "index", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_indexes REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest] + # 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_indexes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/indexes", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_index REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetIndexRequest] + # 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_index_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/indexes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_index REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest] + # 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_index_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/indexes/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_field REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetFieldRequest] + # 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_field_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/fields/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_field REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest] + # 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_field_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{field.name}", + body: "field", + matches: [ + ["field.name", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/fields/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_fields REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest] + # 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_fields_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/fields", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the export_documents REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_export_documents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:exportDocuments", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the import_documents REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_import_documents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:importDocuments", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the bulk_delete_documents REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_bulk_delete_documents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:bulkDeleteDocuments", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest] + # 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_database_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/databases", + body: "database", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest] + # 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_database_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_databases REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest] + # 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_databases_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/databases", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest] + # 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_database_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{database.name}", + body: "database", + matches: [ + ["database.name", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest] + # 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_database_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_user_creds REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest] + # 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_user_creds_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/userCreds", + body: "user_creds", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_user_creds REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest] + # 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_user_creds_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/userCreds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_user_creds REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest] + # 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_user_creds_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/userCreds", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the enable_user_creds REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_enable_user_creds_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:enable", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/userCreds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the disable_user_creds REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_disable_user_creds_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:disable", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/userCreds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the reset_user_password REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_reset_user_password_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:resetPassword", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/userCreds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_user_creds REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest] + # 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_user_creds_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/userCreds/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetBackupRequest] + # 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_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backups REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest] + # 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_backups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest] + # 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_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the restore_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_restore_database_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/databases:restore", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest] + # 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_backup_schedule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupSchedules", + body: "backup_schedule", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest] + # 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_backup_schedule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_schedules REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest] + # 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_backup_schedules_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupSchedules", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest] + # 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_backup_schedule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_schedule.name}", + body: "backup_schedule", + matches: [ + ["backup_schedule.name", %r{^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_schedule REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest] + # 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_backup_schedule_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the clone_database REST call + # + # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_clone_database_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/databases:clone", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/rest.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/rest.rb new file mode 100644 index 000000000000..d599ad3cdd38 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/rest.rb @@ -0,0 +1,39 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/admin/v1/firestore_admin/rest" +require "google/cloud/firestore/admin/v1/version" + +module Google + module Cloud + module Firestore + module Admin + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/firestore/admin/v1/rest" + # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new + # + module V1 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb new file mode 100644 index 000000000000..ec727a6a3960 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb @@ -0,0 +1,30 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module Admin + module V1 + VERSION = "0.0.1" + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/backup_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/backup_pb.rb new file mode 100644 index 000000000000..e0ac294397fe --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/backup_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/admin/v1/backup.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/firestore/admin/v1/backup.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\x04\n\x06\x42\x61\x63kup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12;\n\x08\x64\x61tabase\x18\x02 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!firestore.googleapis.com/Database\x12\x19\n\x0c\x64\x61tabase_uid\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rsnapshot_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12;\n\x05stats\x18\x06 \x01(\x0b\x32\'.google.firestore.admin.v1.Backup.StatsB\x03\xe0\x41\x03\x12;\n\x05state\x18\x08 \x01(\x0e\x32\'.google.firestore.admin.v1.Backup.StateB\x03\xe0\x41\x03\x1aW\n\x05Stats\x12\x17\n\nsize_bytes\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0e\x64ocument_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bindex_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x11\n\rNOT_AVAILABLE\x10\x03:^\xea\x41[\n\x1f\x66irestore.googleapis.com/Backup\x12\x38projects/{project}/locations/{location}/backups/{backup}B\xda\x01\n\x1d\x63om.google.firestore.admin.v1B\x0b\x42\x61\x63kupProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module Admin + module V1 + Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Backup").msgclass + Backup::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Backup.Stats").msgclass + Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Backup.State").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/database_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/database_pb.rb new file mode 100644 index 000000000000..637cde4b3cc8 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/database_pb.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/admin/v1/database.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/firestore/admin/v1/database.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa3\x16\n\x08\x44\x61tabase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\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\x34\n\x0b\x64\x65lete_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x0blocation_id\x18\t \x01(\t\x12>\n\x04type\x18\n \x01(\x0e\x32\x30.google.firestore.admin.v1.Database.DatabaseType\x12M\n\x10\x63oncurrency_mode\x18\x0f \x01(\x0e\x32\x33.google.firestore.admin.v1.Database.ConcurrencyMode\x12@\n\x18version_retention_period\x18\x11 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12>\n\x15\x65\x61rliest_version_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12l\n!point_in_time_recovery_enablement\x18\x15 \x01(\x0e\x32\x41.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement\x12\x61\n\x1b\x61pp_engine_integration_mode\x18\x13 \x01(\x0e\x32<.google.firestore.admin.v1.Database.AppEngineIntegrationMode\x12\x17\n\nkey_prefix\x18\x14 \x01(\tB\x03\xe0\x41\x03\x12Z\n\x17\x64\x65lete_protection_state\x18\x16 \x01(\x0e\x32\x39.google.firestore.admin.v1.Database.DeleteProtectionState\x12H\n\x0b\x63mek_config\x18\x17 \x01(\x0b\x32..google.firestore.admin.v1.Database.CmekConfigB\x03\xe0\x41\x01\x12\x18\n\x0bprevious_id\x18\x19 \x01(\tB\x03\xe0\x41\x03\x12H\n\x0bsource_info\x18\x1a \x01(\x0b\x32..google.firestore.admin.v1.Database.SourceInfoB\x03\xe0\x41\x03\x12\x46\n\x04tags\x18\x1d \x03(\x0b\x32-.google.firestore.admin.v1.Database.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x12\x1b\n\tfree_tier\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x0c\n\x04\x65tag\x18\x63 \x01(\t\x12R\n\x10\x64\x61tabase_edition\x18\x1c \x01(\x0e\x32\x33.google.firestore.admin.v1.Database.DatabaseEditionB\x03\xe0\x41\x05\x1aH\n\nCmekConfig\x12\x19\n\x0ckms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x61\x63tive_key_version\x18\x02 \x03(\tB\x03\xe0\x41\x03\x1a\xe7\x01\n\nSourceInfo\x12M\n\x06\x62\x61\x63kup\x18\x01 \x01(\x0b\x32;.google.firestore.admin.v1.Database.SourceInfo.BackupSourceH\x00\x12:\n\toperation\x18\x03 \x01(\tB\'\xfa\x41$\n\"firestore.googleapis.com/Operation\x1a\x44\n\x0c\x42\x61\x63kupSource\x12\x34\n\x06\x62\x61\x63kup\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x66irestore.googleapis.com/BackupB\x08\n\x06source\x1a\x88\x04\n\x10\x45ncryptionConfig\x12x\n\x19google_default_encryption\x18\x01 \x01(\x0b\x32S.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptionsH\x00\x12m\n\x15use_source_encryption\x18\x02 \x01(\x0b\x32L.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptionsH\x00\x12|\n\x1b\x63ustomer_managed_encryption\x18\x03 \x01(\x0b\x32U.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptionsH\x00\x1a \n\x1eGoogleDefaultEncryptionOptions\x1a\x19\n\x17SourceEncryptionOptions\x1a=\n CustomerManagedEncryptionOptions\x12\x19\n\x0ckms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x11\n\x0f\x65ncryption_type\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"W\n\x0c\x44\x61tabaseType\x12\x1d\n\x19\x44\x41TABASE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x46IRESTORE_NATIVE\x10\x01\x12\x12\n\x0e\x44\x41TASTORE_MODE\x10\x02\"w\n\x0f\x43oncurrencyMode\x12 \n\x1c\x43ONCURRENCY_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nOPTIMISTIC\x10\x01\x12\x0f\n\x0bPESSIMISTIC\x10\x02\x12!\n\x1dOPTIMISTIC_WITH_ENTITY_GROUPS\x10\x03\"\x9b\x01\n\x1dPointInTimeRecoveryEnablement\x12\x31\n-POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED\x10\x00\x12\"\n\x1ePOINT_IN_TIME_RECOVERY_ENABLED\x10\x01\x12#\n\x1fPOINT_IN_TIME_RECOVERY_DISABLED\x10\x02\"b\n\x18\x41ppEngineIntegrationMode\x12+\n\'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"\x7f\n\x15\x44\x65leteProtectionState\x12\'\n#DELETE_PROTECTION_STATE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x44\x45LETE_PROTECTION_DISABLED\x10\x01\x12\x1d\n\x19\x44\x45LETE_PROTECTION_ENABLED\x10\x02\"Q\n\x0f\x44\x61tabaseEdition\x12 \n\x1c\x44\x41TABASE_EDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02:R\xea\x41O\n!firestore.googleapis.com/Database\x12\'projects/{project}/databases/{database}R\x01\x01\x42\x0c\n\n_free_tierB\xc3\x02\n\x1d\x63om.google.firestore.admin.v1B\rDatabaseProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1\xea\x41\x64\n\"firestore.googleapis.com/Operation\x12>projects/{project}/databases/{database}/operations/{operation}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.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module Admin + module V1 + Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database").msgclass + Database::CmekConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.CmekConfig").msgclass + Database::SourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.SourceInfo").msgclass + Database::SourceInfo::BackupSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.SourceInfo.BackupSource").msgclass + Database::EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.EncryptionConfig").msgclass + Database::EncryptionConfig::GoogleDefaultEncryptionOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions").msgclass + Database::EncryptionConfig::SourceEncryptionOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions").msgclass + Database::EncryptionConfig::CustomerManagedEncryptionOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions").msgclass + Database::DatabaseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.DatabaseType").enummodule + Database::ConcurrencyMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.ConcurrencyMode").enummodule + Database::PointInTimeRecoveryEnablement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement").enummodule + Database::AppEngineIntegrationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.AppEngineIntegrationMode").enummodule + Database::DeleteProtectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.DeleteProtectionState").enummodule + Database::DatabaseEdition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.DatabaseEdition").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/field_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/field_pb.rb new file mode 100644 index 000000000000..986cb252bd7b --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/field_pb.rb @@ -0,0 +1,52 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/admin/v1/field.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/firestore/admin/v1/index_pb' + + +descriptor_data = "\n%google/firestore/admin/v1/field.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a%google/firestore/admin/v1/index.proto\"\xc5\x04\n\x05\x46ield\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\x0cindex_config\x18\x02 \x01(\x0b\x32,.google.firestore.admin.v1.Field.IndexConfig\x12>\n\nttl_config\x18\x03 \x01(\x0b\x32*.google.firestore.admin.v1.Field.TtlConfig\x1a\x89\x01\n\x0bIndexConfig\x12\x31\n\x07indexes\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Index\x12\x1c\n\x14uses_ancestor_config\x18\x02 \x01(\x08\x12\x16\n\x0e\x61ncestor_field\x18\x03 \x01(\t\x12\x11\n\treverting\x18\x04 \x01(\x08\x1a\x9d\x01\n\tTtlConfig\x12\x44\n\x05state\x18\x01 \x01(\x0e\x32\x30.google.firestore.admin.v1.Field.TtlConfig.StateB\x03\xe0\x41\x03\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x10\n\x0cNEEDS_REPAIR\x10\x03:y\xea\x41v\n\x1e\x66irestore.googleapis.com/Field\x12Tprojects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}B\xd9\x01\n\x1d\x63om.google.firestore.admin.v1B\nFieldProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.firestore.admin.v1.Index", "google/firestore/admin/v1/index.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module Admin + module V1 + Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field").msgclass + Field::IndexConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field.IndexConfig").msgclass + Field::TtlConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field.TtlConfig").msgclass + Field::TtlConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field.TtlConfig.State").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb new file mode 100644 index 000000000000..571d8d96b27f --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb @@ -0,0 +1,112 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/admin/v1/firestore_admin.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/api/routing_pb' +require 'google/firestore/admin/v1/backup_pb' +require 'google/firestore/admin/v1/database_pb' +require 'google/firestore/admin/v1/field_pb' +require 'google/firestore/admin/v1/index_pb' +require 'google/firestore/admin/v1/operation_pb' +require 'google/firestore/admin/v1/schedule_pb' +require 'google/firestore/admin/v1/snapshot_pb' +require 'google/firestore/admin/v1/user_creds_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/firestore/admin/v1/firestore_admin.proto\x12\x19google.firestore.admin.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a&google/firestore/admin/v1/backup.proto\x1a(google/firestore/admin/v1/database.proto\x1a%google/firestore/admin/v1/field.proto\x1a%google/firestore/admin/v1/index.proto\x1a)google/firestore/admin/v1/operation.proto\x1a(google/firestore/admin/v1/schedule.proto\x1a(google/firestore/admin/v1/snapshot.proto\x1a*google/firestore/admin/v1/user_creds.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"g\n\x14ListDatabasesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"\xa8\x01\n\x15\x43reateDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12:\n\x08\x64\x61tabase\x18\x02 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x18\n\x16\x43reateDatabaseMetadata\"d\n\x15ListDatabasesResponse\x12\x36\n\tdatabases\x18\x01 \x03(\x0b\x32#.google.firestore.admin.v1.Database\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x12GetDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"\x84\x01\n\x15UpdateDatabaseRequest\x12:\n\x08\x64\x61tabase\x18\x01 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x18\n\x16UpdateDatabaseMetadata\"^\n\x15\x44\x65leteDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"\x18\n\x16\x44\x65leteDatabaseMetadata\"\xaf\x01\n\x16\x43reateUserCredsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"firestore.googleapis.com/UserCreds\x12=\n\nuser_creds\x18\x02 \x01(\x0b\x32$.google.firestore.admin.v1.UserCredsB\x03\xe0\x41\x02\x12\x1a\n\ruser_creds_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"O\n\x13GetUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"R\n\x14ListUserCredsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"firestore.googleapis.com/UserCreds\"Q\n\x15ListUserCredsResponse\x12\x38\n\nuser_creds\x18\x01 \x03(\x0b\x32$.google.firestore.admin.v1.UserCreds\"R\n\x16\x45nableUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"S\n\x17\x44isableUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"T\n\x18ResetUserPasswordRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"R\n\x16\x44\x65leteUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"\xa1\x01\n\x1b\x43reateBackupScheduleRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12G\n\x0f\x62\x61\x63kup_schedule\x18\x02 \x01(\x0b\x32).google.firestore.admin.v1.BackupScheduleB\x03\xe0\x41\x02\"Y\n\x18GetBackupScheduleRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'firestore.googleapis.com/BackupSchedule\"\x97\x01\n\x1bUpdateBackupScheduleRequest\x12G\n\x0f\x62\x61\x63kup_schedule\x18\x01 \x01(\x0b\x32).google.firestore.admin.v1.BackupScheduleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"W\n\x1aListBackupSchedulesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"b\n\x1bListBackupSchedulesResponse\x12\x43\n\x10\x62\x61\x63kup_schedules\x18\x01 \x03(\x0b\x32).google.firestore.admin.v1.BackupSchedule\"\\\n\x1b\x44\x65leteBackupScheduleRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'firestore.googleapis.com/BackupSchedule\"\x8c\x01\n\x12\x43reateIndexRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x34\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.IndexB\x03\xe0\x41\x02\"\x8d\x01\n\x12ListIndexesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"a\n\x13ListIndexesResponse\x12\x31\n\x07indexes\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Index\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x0fGetIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"J\n\x12\x44\x65leteIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"{\n\x12UpdateFieldRequest\x12\x34\n\x05\x66ield\x18\x01 \x01(\x0b\x32 .google.firestore.admin.v1.FieldB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"G\n\x0fGetFieldRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Field\"\x8c\x01\n\x11ListFieldsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"_\n\x12ListFieldsResponse\x12\x30\n\x06\x66ields\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Field\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xce\x01\n\x16\x45xportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t\x12\x31\n\rsnapshot_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x9a\x01\n\x16ImportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t\"\x8e\x01\n\x1a\x42ulkDeleteDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x1b\n\x0e\x63ollection_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rnamespace_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x1d\n\x1b\x42ulkDeleteDocumentsResponse\"I\n\x10GetBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\"_\n\x12ListBackupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\"^\n\x13ListBackupsResponse\x12\x32\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32!.google.firestore.admin.v1.Backup\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"L\n\x13\x44\x65leteBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\"\xfc\x02\n\x16RestoreDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x18\n\x0b\x64\x61tabase_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x06\x62\x61\x63kup\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\x12T\n\x11\x65ncryption_config\x18\t \x01(\x0b\x32\x34.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xe0\x41\x01\x12Q\n\x04tags\x18\n \x03(\x0b\x32;.google.firestore.admin.v1.RestoreDatabaseRequest.TagsEntryB\x06\xe0\x41\x05\xe0\x41\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x84\x03\n\x14\x43loneDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x18\n\x0b\x64\x61tabase_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\rpitr_snapshot\x18\x06 \x01(\x0b\x32\'.google.firestore.admin.v1.PitrSnapshotB\x03\xe0\x41\x02\x12T\n\x11\x65ncryption_config\x18\x04 \x01(\x0b\x32\x34.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xe0\x41\x01\x12O\n\x04tags\x18\x05 \x03(\x0b\x32\x39.google.firestore.admin.v1.CloneDatabaseRequest.TagsEntryB\x06\xe0\x41\x05\xe0\x41\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xfb\x31\n\x0e\x46irestoreAdmin\x12\xdb\x01\n\x0b\x43reateIndex\x12-.google.firestore.admin.v1.CreateIndexRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x1f\n\x05Index\x12\x16IndexOperationMetadata\xda\x41\x0cparent,index\x82\xd3\xe4\x93\x02G\">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:\x05index\x12\xbd\x01\n\x0bListIndexes\x12-.google.firestore.admin.v1.ListIndexesRequest\x1a..google.firestore.admin.v1.ListIndexesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes\x12\xa7\x01\n\x08GetIndex\x12*.google.firestore.admin.v1.GetIndexRequest\x1a .google.firestore.admin.v1.Index\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xa3\x01\n\x0b\x44\x65leteIndex\x12-.google.firestore.admin.v1.DeleteIndexRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xa6\x01\n\x08GetField\x12*.google.firestore.admin.v1.GetFieldRequest\x1a .google.firestore.admin.v1.Field\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}\x12\xd9\x01\n\x0bUpdateField\x12-.google.firestore.admin.v1.UpdateFieldRequest\x1a\x1d.google.longrunning.Operation\"|\xca\x41\x1f\n\x05\x46ield\x12\x16\x46ieldOperationMetadata\xda\x41\x05\x66ield\x82\xd3\xe4\x93\x02L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:\x05\x66ield\x12\xb9\x01\n\nListFields\x12,.google.firestore.admin.v1.ListFieldsRequest\x1a-.google.firestore.admin.v1.ListFieldsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields\x12\xdd\x01\n\x0f\x45xportDocuments\x12\x31.google.firestore.admin.v1.ExportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x32\n\x17\x45xportDocumentsResponse\x12\x17\x45xportDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:exportDocuments:\x01*\x12\xdb\x01\n\x0fImportDocuments\x12\x31.google.firestore.admin.v1.ImportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17ImportDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:importDocuments:\x01*\x12\xf2\x01\n\x13\x42ulkDeleteDocuments\x12\x35.google.firestore.admin.v1.BulkDeleteDocumentsRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41:\n\x1b\x42ulkDeleteDocumentsResponse\x12\x1b\x42ulkDeleteDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/databases/*}:bulkDeleteDocuments:\x01*\x12\xd9\x01\n\x0e\x43reateDatabase\x12\x30.google.firestore.admin.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x43reateDatabaseMetadata\xda\x41\x1bparent,database,database_id\x82\xd3\xe4\x93\x02-\"!/v1/{parent=projects/*}/databases:\x08\x64\x61tabase\x12\x93\x01\n\x0bGetDatabase\x12-.google.firestore.admin.v1.GetDatabaseRequest\x1a#.google.firestore.admin.v1.Database\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*/databases/*}\x12\xa6\x01\n\rListDatabases\x12/.google.firestore.admin.v1.ListDatabasesRequest\x1a\x30.google.firestore.admin.v1.ListDatabasesResponse\"2\xda\x41\x06parent\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=projects/*}/databases\x12\xdb\x01\n\x0eUpdateDatabase\x12\x30.google.firestore.admin.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\xda\x41\x14\x64\x61tabase,update_mask\x82\xd3\xe4\x93\x02\x36\x32*/v1/{database.name=projects/*/databases/*}:\x08\x64\x61tabase\x12\xb8\x01\n\x0e\x44\x65leteDatabase\x12\x30.google.firestore.admin.v1.DeleteDatabaseRequest\x1a\x1d.google.longrunning.Operation\"U\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x44\x65leteDatabaseMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=projects/*/databases/*}\x12\xcf\x01\n\x0f\x43reateUserCreds\x12\x31.google.firestore.admin.v1.CreateUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"c\xda\x41\x1fparent,user_creds,user_creds_id\x82\xd3\xe4\x93\x02;\"-/v1/{parent=projects/*/databases/*}/userCreds:\nuser_creds\x12\xa2\x01\n\x0cGetUserCreds\x12..google.firestore.admin.v1.GetUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/databases/*/userCreds/*}\x12\xb2\x01\n\rListUserCreds\x12/.google.firestore.admin.v1.ListUserCredsRequest\x1a\x30.google.firestore.admin.v1.ListUserCredsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/databases/*}/userCreds\x12\xb2\x01\n\x0f\x45nableUserCreds\x12\x31.google.firestore.admin.v1.EnableUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/databases/*/userCreds/*}:enable:\x01*\x12\xb5\x01\n\x10\x44isableUserCreds\x12\x32.google.firestore.admin.v1.DisableUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/databases/*/userCreds/*}:disable:\x01*\x12\xbd\x01\n\x11ResetUserPassword\x12\x33.google.firestore.admin.v1.ResetUserPasswordRequest\x1a$.google.firestore.admin.v1.UserCreds\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword:\x01*\x12\x9a\x01\n\x0f\x44\x65leteUserCreds\x12\x31.google.firestore.admin.v1.DeleteUserCredsRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/databases/*/userCreds/*}\x12\x97\x01\n\tGetBackup\x12+.google.firestore.admin.v1.GetBackupRequest\x1a!.google.firestore.admin.v1.Backup\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/backups/*}\x12\xaa\x01\n\x0bListBackups\x12-.google.firestore.admin.v1.ListBackupsRequest\x1a..google.firestore.admin.v1.ListBackupsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/backups\x12\x92\x01\n\x0c\x44\x65leteBackup\x12..google.firestore.admin.v1.DeleteBackupRequest\x1a\x16.google.protobuf.Empty\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/backups/*}\x12\xbf\x01\n\x0fRestoreDatabase\x12\x31.google.firestore.admin.v1.RestoreDatabaseRequest\x1a\x1d.google.longrunning.Operation\"Z\xca\x41#\n\x08\x44\x61tabase\x12\x17RestoreDatabaseMetadata\x82\xd3\xe4\x93\x02.\")/v1/{parent=projects/*}/databases:restore:\x01*\x12\xe0\x01\n\x14\x43reateBackupSchedule\x12\x36.google.firestore.admin.v1.CreateBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"e\xda\x41\x16parent,backup_schedule\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/databases/*}/backupSchedules:\x0f\x62\x61\x63kup_schedule\x12\xb7\x01\n\x11GetBackupSchedule\x12\x33.google.firestore.admin.v1.GetBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xca\x01\n\x13ListBackupSchedules\x12\x35.google.firestore.admin.v1.ListBackupSchedulesRequest\x1a\x36.google.firestore.admin.v1.ListBackupSchedulesResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/databases/*}/backupSchedules\x12\xf5\x01\n\x14UpdateBackupSchedule\x12\x36.google.firestore.admin.v1.UpdateBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"z\xda\x41\x1b\x62\x61\x63kup_schedule,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}:\x0f\x62\x61\x63kup_schedule\x12\xaa\x01\n\x14\x44\x65leteBackupSchedule\x12\x36.google.firestore.admin.v1.DeleteBackupScheduleRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xb7\x02\n\rCloneDatabase\x12/.google.firestore.admin.v1.CloneDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41!\n\x08\x44\x61tabase\x12\x15\x43loneDatabaseMetadata\x82\xd3\xe4\x93\x02,\"\'/v1/{parent=projects/*}/databases:clone:\x01*\x8a\xd3\xe4\x93\x02y\x12\x34\n\x16pitr_snapshot.database\x12\x1aprojects/{project_id=*}/**\x12\x41\n\x16pitr_snapshot.database\x12\'projects/*/databases/{database_id=*}/**\x1av\xca\x41\x18\x66irestore.googleapis.com\xd2\x41Xhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB\xa5\x03\n\x1d\x63om.google.firestore.admin.v1B\x13\x46irestoreAdminProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1\xea\x41L\n!firestore.googleapis.com/Location\x12\'projects/{project}/locations/{location}\xea\x41q\n(firestore.googleapis.com/CollectionGroup\x12\x45projects/{project}/databases/{database}/collectionGroups/{collection}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.firestore.admin.v1.Database", "google/firestore/admin/v1/database.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.firestore.admin.v1.UserCreds", "google/firestore/admin/v1/user_creds.proto"], + ["google.firestore.admin.v1.BackupSchedule", "google/firestore/admin/v1/schedule.proto"], + ["google.firestore.admin.v1.Index", "google/firestore/admin/v1/index.proto"], + ["google.firestore.admin.v1.Field", "google/firestore/admin/v1/field.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.firestore.admin.v1.Backup", "google/firestore/admin/v1/backup.proto"], + ["google.firestore.admin.v1.PitrSnapshot", "google/firestore/admin/v1/snapshot.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module Admin + module V1 + ListDatabasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListDatabasesRequest").msgclass + CreateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateDatabaseRequest").msgclass + CreateDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateDatabaseMetadata").msgclass + ListDatabasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListDatabasesResponse").msgclass + GetDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetDatabaseRequest").msgclass + UpdateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateDatabaseRequest").msgclass + UpdateDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateDatabaseMetadata").msgclass + DeleteDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteDatabaseRequest").msgclass + DeleteDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteDatabaseMetadata").msgclass + CreateUserCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateUserCredsRequest").msgclass + GetUserCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetUserCredsRequest").msgclass + ListUserCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListUserCredsRequest").msgclass + ListUserCredsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListUserCredsResponse").msgclass + EnableUserCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.EnableUserCredsRequest").msgclass + DisableUserCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DisableUserCredsRequest").msgclass + ResetUserPasswordRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ResetUserPasswordRequest").msgclass + DeleteUserCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteUserCredsRequest").msgclass + CreateBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateBackupScheduleRequest").msgclass + GetBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetBackupScheduleRequest").msgclass + UpdateBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateBackupScheduleRequest").msgclass + ListBackupSchedulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListBackupSchedulesRequest").msgclass + ListBackupSchedulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListBackupSchedulesResponse").msgclass + DeleteBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteBackupScheduleRequest").msgclass + CreateIndexRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateIndexRequest").msgclass + ListIndexesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListIndexesRequest").msgclass + ListIndexesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListIndexesResponse").msgclass + GetIndexRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetIndexRequest").msgclass + DeleteIndexRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteIndexRequest").msgclass + UpdateFieldRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateFieldRequest").msgclass + GetFieldRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetFieldRequest").msgclass + ListFieldsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListFieldsRequest").msgclass + ListFieldsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListFieldsResponse").msgclass + ExportDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ExportDocumentsRequest").msgclass + ImportDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ImportDocumentsRequest").msgclass + BulkDeleteDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.BulkDeleteDocumentsRequest").msgclass + BulkDeleteDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.BulkDeleteDocumentsResponse").msgclass + GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetBackupRequest").msgclass + ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListBackupsRequest").msgclass + ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListBackupsResponse").msgclass + DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteBackupRequest").msgclass + RestoreDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.RestoreDatabaseRequest").msgclass + CloneDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CloneDatabaseRequest").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb new file mode 100644 index 000000000000..df9cf306ef17 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb @@ -0,0 +1,220 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/firestore/admin/v1/firestore_admin.proto for package 'Google.Cloud.Firestore.Admin.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/firestore/admin/v1/firestore_admin_pb' + +module Google + module Cloud + module Firestore + module Admin + module V1 + module FirestoreAdmin + # The Cloud Firestore Admin API. + # + # This API provides several administrative services for Cloud Firestore. + # + # Project, Database, Namespace, Collection, Collection Group, and Document are + # used as defined in the Google Cloud Firestore API. + # + # Operation: An Operation represents work being performed in the background. + # + # The index service manages Cloud Firestore indexes. + # + # Index creation is performed asynchronously. + # An Operation resource is created for each such asynchronous operation. + # The state of the operation (including any errors encountered) + # may be queried via the Operation resource. + # + # The Operations collection provides a record of actions performed for the + # specified Project (including any Operations in progress). Operations are not + # created directly but through calls on other collections or resources. + # + # An Operation that is done may be deleted so that it is no longer listed as + # part of the Operation collection. Operations are garbage collected after + # 30 days. By default, ListOperations will only return in progress and failed + # operations. To list completed operation, issue a ListOperations request with + # the filter `done: true`. + # + # Operations are created by service `FirestoreAdmin`, but are accessed via + # service `google.longrunning.Operations`. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.firestore.admin.v1.FirestoreAdmin' + + # Creates a composite index. This returns a + # [google.longrunning.Operation][google.longrunning.Operation] which may be + # used to track the status of the creation. The metadata for the operation + # will be the type + # [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. + rpc :CreateIndex, ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest, ::Google::Longrunning::Operation + # Lists composite indexes. + rpc :ListIndexes, ::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest, ::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse + # Gets a composite index. + rpc :GetIndex, ::Google::Cloud::Firestore::Admin::V1::GetIndexRequest, ::Google::Cloud::Firestore::Admin::V1::Index + # Deletes a composite index. + rpc :DeleteIndex, ::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest, ::Google::Protobuf::Empty + # Gets the metadata and configuration for a Field. + rpc :GetField, ::Google::Cloud::Firestore::Admin::V1::GetFieldRequest, ::Google::Cloud::Firestore::Admin::V1::Field + # Updates a field configuration. Currently, field updates apply only to + # single field index configuration. However, calls to + # [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] + # should provide a field mask to avoid changing any configuration that the + # caller isn't aware of. The field mask should be specified as: `{ paths: + # "index_config" }`. + # + # This call returns a + # [google.longrunning.Operation][google.longrunning.Operation] which may be + # used to track the status of the field update. The metadata for the + # operation will be the type + # [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. + # + # To configure the default field settings for the database, use + # the special `Field` with resource name: + # `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. + rpc :UpdateField, ::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest, ::Google::Longrunning::Operation + # Lists the field configuration and metadata for this database. + # + # Currently, + # [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + # only supports listing fields that have been explicitly overridden. To issue + # this query, call + # [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] + # with the filter set to `indexConfig.usesAncestorConfig:false` or + # `ttlConfig:*`. + rpc :ListFields, ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, ::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse + # Exports a copy of all or a subset of documents from Google Cloud Firestore + # to another storage system, such as Google Cloud Storage. Recent updates to + # documents may not be reflected in the export. The export occurs in the + # background and its progress can be monitored and managed via the + # Operation resource that is created. The output of an export may only be + # used once the associated operation is done. If an export operation is + # cancelled before completion it may leave partial data behind in Google + # Cloud Storage. + # + # For more details on export behavior and output format, refer to: + # https://cloud.google.com/firestore/docs/manage-data/export-import + rpc :ExportDocuments, ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest, ::Google::Longrunning::Operation + # Imports documents into Google Cloud Firestore. Existing documents with the + # same name are overwritten. The import occurs in the background and its + # progress can be monitored and managed via the Operation resource that is + # created. If an ImportDocuments operation is cancelled, it is possible + # that a subset of the data has already been imported to Cloud Firestore. + rpc :ImportDocuments, ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest, ::Google::Longrunning::Operation + # Bulk deletes a subset of documents from Google Cloud Firestore. + # Documents created or updated after the underlying system starts to process + # the request will not be deleted. The bulk delete occurs in the background + # and its progress can be monitored and managed via the Operation resource + # that is created. + # + # For more details on bulk delete behavior, refer to: + # https://cloud.google.com/firestore/docs/manage-data/bulk-delete + rpc :BulkDeleteDocuments, ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest, ::Google::Longrunning::Operation + # Create a database. + rpc :CreateDatabase, ::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest, ::Google::Longrunning::Operation + # Gets information about a database. + rpc :GetDatabase, ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest, ::Google::Cloud::Firestore::Admin::V1::Database + # List all the databases in the project. + rpc :ListDatabases, ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest, ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse + # Updates a database. + rpc :UpdateDatabase, ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest, ::Google::Longrunning::Operation + # Deletes a database. + rpc :DeleteDatabase, ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest, ::Google::Longrunning::Operation + # Create a user creds. + rpc :CreateUserCreds, ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest, ::Google::Cloud::Firestore::Admin::V1::UserCreds + # Gets a user creds resource. Note that the returned resource does not + # contain the secret value itself. + rpc :GetUserCreds, ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest, ::Google::Cloud::Firestore::Admin::V1::UserCreds + # List all user creds in the database. Note that the returned resource + # does not contain the secret value itself. + rpc :ListUserCreds, ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest, ::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse + # Enables a user creds. No-op if the user creds are already enabled. + rpc :EnableUserCreds, ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest, ::Google::Cloud::Firestore::Admin::V1::UserCreds + # Disables a user creds. No-op if the user creds are already disabled. + rpc :DisableUserCreds, ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest, ::Google::Cloud::Firestore::Admin::V1::UserCreds + # Resets the password of a user creds. + rpc :ResetUserPassword, ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest, ::Google::Cloud::Firestore::Admin::V1::UserCreds + # Deletes a user creds. + rpc :DeleteUserCreds, ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest, ::Google::Protobuf::Empty + # Gets information about a backup. + rpc :GetBackup, ::Google::Cloud::Firestore::Admin::V1::GetBackupRequest, ::Google::Cloud::Firestore::Admin::V1::Backup + # Lists all the backups. + rpc :ListBackups, ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest, ::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse + # Deletes a backup. + rpc :DeleteBackup, ::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest, ::Google::Protobuf::Empty + # Creates a new database by restoring from an existing backup. + # + # The new database must be in the same cloud region or multi-region location + # as the existing backup. This behaves similar to + # [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] + # except instead of creating a new empty database, a new database is created + # with the database type, index configuration, and documents from an existing + # backup. + # + # The [long-running operation][google.longrunning.Operation] can be used to + # track the progress of the restore, with the Operation's + # [metadata][google.longrunning.Operation.metadata] field type being the + # [RestoreDatabaseMetadata][google.firestore.admin.v1.RestoreDatabaseMetadata]. + # The [response][google.longrunning.Operation.response] type is the + # [Database][google.firestore.admin.v1.Database] if the restore was + # successful. The new database is not readable or writeable until the LRO has + # completed. + rpc :RestoreDatabase, ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest, ::Google::Longrunning::Operation + # Creates a backup schedule on a database. + # At most two backup schedules can be configured on a database, one daily + # backup schedule and one weekly backup schedule. + rpc :CreateBackupSchedule, ::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest, ::Google::Cloud::Firestore::Admin::V1::BackupSchedule + # Gets information about a backup schedule. + rpc :GetBackupSchedule, ::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest, ::Google::Cloud::Firestore::Admin::V1::BackupSchedule + # List backup schedules. + rpc :ListBackupSchedules, ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest, ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse + # Updates a backup schedule. + rpc :UpdateBackupSchedule, ::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest, ::Google::Cloud::Firestore::Admin::V1::BackupSchedule + # Deletes a backup schedule. + rpc :DeleteBackupSchedule, ::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest, ::Google::Protobuf::Empty + # Creates a new database by cloning an existing one. + # + # The new database must be in the same cloud region or multi-region location + # as the existing database. This behaves similar to + # [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] + # except instead of creating a new empty database, a new database is created + # with the database type, index configuration, and documents from an existing + # database. + # + # The [long-running operation][google.longrunning.Operation] can be used to + # track the progress of the clone, with the Operation's + # [metadata][google.longrunning.Operation.metadata] field type being the + # [CloneDatabaseMetadata][google.firestore.admin.v1.CloneDatabaseMetadata]. + # The [response][google.longrunning.Operation.response] type is the + # [Database][google.firestore.admin.v1.Database] if the clone was + # successful. The new database is not readable or writeable until the LRO has + # completed. + rpc :CloneDatabase, ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/index_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/index_pb.rb new file mode 100644 index 000000000000..67a43977198c --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/index_pb.rb @@ -0,0 +1,56 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/admin/v1/index.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n%google/firestore/admin/v1/index.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xed\n\n\x05Index\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x0bquery_scope\x18\x02 \x01(\x0e\x32+.google.firestore.admin.v1.Index.QueryScope\x12<\n\tapi_scope\x18\x05 \x01(\x0e\x32).google.firestore.admin.v1.Index.ApiScope\x12;\n\x06\x66ields\x18\x03 \x03(\x0b\x32+.google.firestore.admin.v1.Index.IndexField\x12\x35\n\x05state\x18\x04 \x01(\x0e\x32&.google.firestore.admin.v1.Index.State\x12>\n\x07\x64\x65nsity\x18\x06 \x01(\x0e\x32(.google.firestore.admin.v1.Index.DensityB\x03\xe0\x41\x05\x12\x15\n\x08multikey\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bshard_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x1a\xa2\x04\n\nIndexField\x12\x12\n\nfield_path\x18\x01 \x01(\t\x12\x42\n\x05order\x18\x02 \x01(\x0e\x32\x31.google.firestore.admin.v1.Index.IndexField.OrderH\x00\x12O\n\x0c\x61rray_config\x18\x03 \x01(\x0e\x32\x37.google.firestore.admin.v1.Index.IndexField.ArrayConfigH\x00\x12Q\n\rvector_config\x18\x04 \x01(\x0b\x32\x38.google.firestore.admin.v1.Index.IndexField.VectorConfigH\x00\x1a\x8f\x01\n\x0cVectorConfig\x12\x16\n\tdimension\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12R\n\x04\x66lat\x18\x02 \x01(\x0b\x32\x42.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndexH\x00\x1a\x0b\n\tFlatIndexB\x06\n\x04type\"=\n\x05Order\x12\x15\n\x11ORDER_UNSPECIFIED\x10\x00\x12\r\n\tASCENDING\x10\x01\x12\x0e\n\nDESCENDING\x10\x02\"9\n\x0b\x41rrayConfig\x12\x1c\n\x18\x41RRAY_CONFIG_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43ONTAINS\x10\x01\x42\x0c\n\nvalue_mode\"i\n\nQueryScope\x12\x1b\n\x17QUERY_SCOPE_UNSPECIFIED\x10\x00\x12\x0e\n\nCOLLECTION\x10\x01\x12\x14\n\x10\x43OLLECTION_GROUP\x10\x02\x12\x18\n\x14\x43OLLECTION_RECURSIVE\x10\x03\"K\n\x08\x41piScope\x12\x0b\n\x07\x41NY_API\x10\x00\x12\x16\n\x12\x44\x41TASTORE_MODE_API\x10\x01\x12\x1a\n\x16MONGODB_COMPATIBLE_API\x10\x02\"I\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x10\n\x0cNEEDS_REPAIR\x10\x03\"M\n\x07\x44\x65nsity\x12\x17\n\x13\x44\x45NSITY_UNSPECIFIED\x10\x00\x12\x0e\n\nSPARSE_ALL\x10\x01\x12\x0e\n\nSPARSE_ANY\x10\x02\x12\t\n\x05\x44\x45NSE\x10\x03:z\xea\x41w\n\x1e\x66irestore.googleapis.com/Index\x12Uprojects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}B\xd9\x01\n\x1d\x63om.google.firestore.admin.v1B\nIndexProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module Admin + module V1 + Index = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index").msgclass + Index::IndexField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.IndexField").msgclass + Index::IndexField::VectorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.IndexField.VectorConfig").msgclass + Index::IndexField::VectorConfig::FlatIndex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex").msgclass + Index::IndexField::Order = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.IndexField.Order").enummodule + Index::IndexField::ArrayConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.IndexField.ArrayConfig").enummodule + Index::QueryScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.QueryScope").enummodule + Index::ApiScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.ApiScope").enummodule + Index::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.State").enummodule + Index::Density = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.Density").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/location_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/location_pb.rb new file mode 100644 index 000000000000..9132e2304719 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/location_pb.rb @@ -0,0 +1,44 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/admin/v1/location.proto + +require 'google/protobuf' + + +descriptor_data = "\n(google/firestore/admin/v1/location.proto\x12\x19google.firestore.admin.v1\"\x12\n\x10LocationMetadataB\xdc\x01\n\x1d\x63om.google.firestore.admin.v1B\rLocationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module Admin + module V1 + LocationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.LocationMetadata").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/operation_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/operation_pb.rb new file mode 100644 index 000000000000..604a6a498bc4 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/operation_pb.rb @@ -0,0 +1,65 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/admin/v1/operation.proto + +require 'google/protobuf' + +require 'google/api/resource_pb' +require 'google/firestore/admin/v1/index_pb' +require 'google/firestore/admin/v1/snapshot_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n)google/firestore/admin/v1/operation.proto\x12\x19google.firestore.admin.v1\x1a\x19google/api/resource.proto\x1a%google/firestore/admin/v1/index.proto\x1a(google/firestore/admin/v1/snapshot.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x02\n\x16IndexOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05index\x18\x03 \x01(\t\x12\x38\n\x05state\x18\x04 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\"\x99\x07\n\x16\x46ieldOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05\x66ield\x18\x03 \x01(\t\x12_\n\x13index_config_deltas\x18\x04 \x03(\x0b\x32\x42.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta\x12\x38\n\x05state\x18\x05 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x07 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12Z\n\x10ttl_config_delta\x18\x08 \x01(\x0b\x32@.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta\x1a\xe7\x01\n\x10IndexConfigDelta\x12\x62\n\x0b\x63hange_type\x18\x01 \x01(\x0e\x32M.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType\x12/\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.Index\">\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x1a\xb2\x01\n\x0eTtlConfigDelta\x12`\n\x0b\x63hange_type\x18\x01 \x01(\x0e\x32K.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\">\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\"\xb6\x03\n\x17\x45xportDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x07 \x01(\t\x12\x15\n\rnamespace_ids\x18\x08 \x03(\t\x12\x31\n\rsnapshot_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x82\x03\n\x17ImportDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x07 \x01(\t\x12\x15\n\rnamespace_ids\x18\x08 \x03(\t\"\x9f\x03\n\x1b\x42ulkDeleteDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x15\n\rnamespace_ids\x18\x07 \x03(\t\x12\x31\n\rsnapshot_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"4\n\x17\x45xportDocumentsResponse\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t\"\xed\x02\n\x17RestoreDatabaseMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12\x38\n\x08\x64\x61tabase\x18\x04 \x01(\tB&\xfa\x41#\n!firestore.googleapis.com/Database\x12\x34\n\x06\x62\x61\x63kup\x18\x05 \x01(\tB$\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\x12@\n\x13progress_percentage\x18\x08 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\"\xf5\x02\n\x15\x43loneDatabaseMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12\x38\n\x08\x64\x61tabase\x18\x04 \x01(\tB&\xfa\x41#\n!firestore.googleapis.com/Database\x12>\n\rpitr_snapshot\x18\x07 \x01(\x0b\x32\'.google.firestore.admin.v1.PitrSnapshot\x12@\n\x13progress_percentage\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\":\n\x08Progress\x12\x16\n\x0e\x65stimated_work\x18\x01 \x01(\x03\x12\x16\n\x0e\x63ompleted_work\x18\x02 \x01(\x03*\x9e\x01\n\x0eOperationState\x12\x1f\n\x1bOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINITIALIZING\x10\x01\x12\x0e\n\nPROCESSING\x10\x02\x12\x0e\n\nCANCELLING\x10\x03\x12\x0e\n\nFINALIZING\x10\x04\x12\x0e\n\nSUCCESSFUL\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\r\n\tCANCELLED\x10\x07\x42\xdd\x01\n\x1d\x63om.google.firestore.admin.v1B\x0eOperationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.firestore.admin.v1.Index", "google/firestore/admin/v1/index.proto"], + ["google.firestore.admin.v1.PitrSnapshot", "google/firestore/admin/v1/snapshot.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module Admin + module V1 + IndexOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.IndexOperationMetadata").msgclass + FieldOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata").msgclass + FieldOperationMetadata::IndexConfigDelta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta").msgclass + FieldOperationMetadata::IndexConfigDelta::ChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType").enummodule + FieldOperationMetadata::TtlConfigDelta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta").msgclass + FieldOperationMetadata::TtlConfigDelta::ChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType").enummodule + ExportDocumentsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ExportDocumentsMetadata").msgclass + ImportDocumentsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ImportDocumentsMetadata").msgclass + BulkDeleteDocumentsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.BulkDeleteDocumentsMetadata").msgclass + ExportDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ExportDocumentsResponse").msgclass + RestoreDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.RestoreDatabaseMetadata").msgclass + CloneDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CloneDatabaseMetadata").msgclass + Progress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Progress").msgclass + OperationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.OperationState").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/schedule_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/schedule_pb.rb new file mode 100644 index 000000000000..9ce18f3264f8 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/schedule_pb.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/admin/v1/schedule.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' +require 'google/type/dayofweek_pb' + + +descriptor_data = "\n(google/firestore/admin/v1/schedule.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\"\xd6\x03\n\x0e\x42\x61\x63kupSchedule\x12\x11\n\x04name\x18\x01 \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\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12,\n\tretention\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x46\n\x10\x64\x61ily_recurrence\x18\x07 \x01(\x0b\x32*.google.firestore.admin.v1.DailyRecurrenceH\x00\x12H\n\x11weekly_recurrence\x18\x08 \x01(\x0b\x32+.google.firestore.admin.v1.WeeklyRecurrenceH\x00:w\xea\x41t\n\'firestore.googleapis.com/BackupSchedule\x12Iprojects/{project}/databases/{database}/backupSchedules/{backup_schedule}B\x0c\n\nrecurrence\"\x11\n\x0f\x44\x61ilyRecurrence\"7\n\x10WeeklyRecurrence\x12#\n\x03\x64\x61y\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\xdc\x01\n\x1d\x63om.google.firestore.admin.v1B\rScheduleProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module Admin + module V1 + BackupSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.BackupSchedule").msgclass + DailyRecurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DailyRecurrence").msgclass + WeeklyRecurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.WeeklyRecurrence").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/snapshot_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/snapshot_pb.rb new file mode 100644 index 000000000000..edea876f8875 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/snapshot_pb.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/admin/v1/snapshot.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n(google/firestore/admin/v1/snapshot.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9e\x01\n\x0cPitrSnapshot\x12;\n\x08\x64\x61tabase\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x19\n\x0c\x64\x61tabase_uid\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x03\x12\x36\n\rsnapshot_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x42\xe0\x01\n\x1d\x63om.google.firestore.admin.v1B\x11PitrSnapshotProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module Admin + module V1 + PitrSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.PitrSnapshot").msgclass + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/user_creds_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/user_creds_pb.rb new file mode 100644 index 000000000000..82ff5de9e8fb --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/user_creds_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/admin/v1/user_creds.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n*google/firestore/admin/v1/user_creds.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb7\x04\n\tUserCreds\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x05state\x18\x04 \x01(\x0e\x32*.google.firestore.admin.v1.UserCreds.StateB\x03\xe0\x41\x03\x12\x1c\n\x0fsecure_password\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12R\n\x11resource_identity\x18\x06 \x01(\x0b\x32\x35.google.firestore.admin.v1.UserCreds.ResourceIdentityH\x00\x1a*\n\x10ResourceIdentity\x12\x16\n\tprincipal\x18\x01 \x01(\tB\x03\xe0\x41\x03\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:}\xea\x41z\n\"firestore.googleapis.com/UserCreds\x12>projects/{project}/databases/{database}/userCreds/{user_creds}*\tuserCreds2\tuserCredsB\x13\n\x11UserCredsIdentityB\xdd\x01\n\x1d\x63om.google.firestore.admin.v1B\x0eUserCredsProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module Admin + module V1 + UserCreds = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UserCreds").msgclass + UserCreds::ResourceIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UserCreds.ResourceIdentity").msgclass + UserCreds::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UserCreds.State").enummodule + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/README.md new file mode 100644 index 000000000000..8973d7337b3b --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Firestore Admin 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-firestore-admin-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/routing.rb new file mode 100644 index 000000000000..d777329024e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/routing.rb @@ -0,0 +1,459 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Specifies the routing information that should be sent along with the request + # in the form of routing header. + # **NOTE:** All service configuration rules follow the "last one wins" order. + # + # The examples below will apply to an RPC which has the following request type: + # + # Message Definition: + # + # message Request { + # // The name of the Table + # // Values can be of the following formats: + # // - `projects//tables/` + # // - `projects//instances//tables/
` + # // - `region//zones//tables/
` + # string table_name = 1; + # + # // This value specifies routing for replication. + # // It can be in the following formats: + # // - `profiles/` + # // - a legacy `profile_id` that can be any string + # string app_profile_id = 2; + # } + # + # Example message: + # + # { + # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, + # app_profile_id: profiles/prof_qux + # } + # + # The routing header consists of one or multiple key-value pairs. Every key + # and value must be percent-encoded, and joined together in the format of + # `key1=value1&key2=value2`. + # The examples below skip the percent-encoding for readability. + # + # Example 1 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key equal to the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`. + # routing_parameters { + # field: "app_profile_id" + # } + # }; + # + # result: + # + # x-goog-request-params: app_profile_id=profiles/prof_qux + # + # Example 2 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key different from the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`, but name it `routing_id` in the header. + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 3 + # + # Extracting a field from the request to put into the routing + # header, while matching a path template syntax on the field's value. + # + # NB: it is more useful to send nothing than to send garbage for the purpose + # of dynamic routing, since garbage pollutes cache. Thus the matching. + # + # Sub-example 3a + # + # The field matches the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with project-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Sub-example 3b + # + # The field does not match the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with region-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # }; + # + # result: + # + # + # + # Sub-example 3c + # + # Multiple alternative conflictingly named path templates are + # specified. The one that matches is used to construct the header. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed, whether + # // using the region- or projects-based syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Example 4 + # + # Extracting a single routing header key-value pair by matching a + # template syntax on (a part of) a single request field. + # + # annotation: + # + # option (google.api.routing) = { + # // Take just the project id from the `table_name` field. + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=projects/proj_foo + # + # Example 5 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on (parts of) a single request + # field. The last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // If the `table_name` does not have instances information, + # // take just the project id for routing. + # // Otherwise take project + instance. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*/instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # routing_id=projects/proj_foo/instances/instance_bar + # + # Example 6 + # + # Extracting multiple routing header key-value pairs by matching + # several non-conflicting path templates on (parts of) a single request field. + # + # Sub-example 6a + # + # Make the templates strict, so that if the `table_name` does not + # have an instance information, nothing is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code needs two keys instead of one composite + # // but works only for the tables with the "project-instance" name + # // syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/instances/*/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Sub-example 6b + # + # Make the templates loose, so that if the `table_name` does not + # have an instance information, just the project id part is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code wants two keys instead of one composite + # // but will work with just the `project_id` for tables without + # // an instance in the `table_name`. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result (is the same as 6a for our example message because it has the instance + # information): + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Example 7 + # + # Extracting multiple routing header key-value pairs by matching + # several path templates on multiple request fields. + # + # NB: note that here there is no way to specify sending nothing if one of the + # fields does not match its template. E.g. if the `table_name` is in the wrong + # format, the `project_id` will not be sent, but the `routing_id` will be. + # The backend routing code has to be aware of that and be prepared to not + # receive a full complement of keys if it expects multiple. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing needs both `project_id` and `routing_id` + # // (from the `app_profile_id` field) for routing. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&routing_id=profiles/prof_qux + # + # Example 8 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on several request fields. The + # last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // The `routing_id` can be a project id or a region id depending on + # // the table name format, but only if the `app_profile_id` is not set. + # // If `app_profile_id` is set it should be used instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=regions/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 9 + # + # Bringing it all together. + # + # annotation: + # + # option (google.api.routing) = { + # // For routing both `table_location` and a `routing_id` are needed. + # // + # // table_location can be either an instance id or a region+zone id. + # // + # // For `routing_id`, take the value of `app_profile_id` + # // - If it's in the format `profiles/`, send + # // just the `` part. + # // - If it's any other literal, send it as is. + # // If the `app_profile_id` is empty, and the `table_name` starts with + # // the project_id, send that instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_location=regions/*/zones/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "profiles/{routing_id=*}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_location=instances/instance_bar&routing_id=prof_qux + # @!attribute [rw] routing_parameters + # @return [::Array<::Google::Api::RoutingParameter>] + # A collection of Routing Parameter specifications. + # **NOTE:** If multiple Routing Parameters describe the same key + # (via the `path_template` field or via the `field` field when + # `path_template` is not provided), "last one wins" rule + # determines which Parameter gets used. + # See the examples for more details. + class RoutingRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A projection from an input message to the GRPC or REST header. + # @!attribute [rw] field + # @return [::String] + # A request field to extract the header key-value pair from. + # @!attribute [rw] path_template + # @return [::String] + # A pattern matching the key-value field. Optional. + # If not specified, the whole field specified in the `field` field will be + # taken as value, and its name used as key. If specified, it MUST contain + # exactly one named segment (along with any number of unnamed segments) The + # pattern will be matched over the field specified in the `field` field, then + # if the match is successful: + # - the name of the single named segment will be used as a header name, + # - the match value of the segment will be used as a header value; + # if the match is NOT successful, nothing will be sent. + # + # Example: + # + # -- This is a field in the request message + # | that the header value will be extracted from. + # | + # | -- This is the key name in the + # | | routing header. + # V | + # field: "table_name" v + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # ^ ^ + # | | + # In the {} brackets is the pattern that -- | + # specifies what to extract from the | + # field as a value to be sent. | + # | + # The string in the field must match the whole pattern -- + # before brackets, inside brackets, after brackets. + # + # When looking at this specific example, we can see that: + # - A key-value pair with the key `table_location` + # and the value matching `instances/*` should be added + # to the x-goog-request-params routing header. + # - The value is extracted from the request message's `table_name` field + # if it matches the full pattern specified: + # `projects/*/instances/*/tables/*`. + # + # **NB:** If the `path_template` field is not provided, the key name is + # equal to the field name, and the whole field should be sent as a value. + # This makes the pattern for the field and the value functionally equivalent + # to `**`, and the configuration + # + # { + # field: "table_name" + # } + # + # is a functionally equivalent shorthand to: + # + # { + # field: "table_name" + # path_template: "{table_name=**}" + # } + # + # See Example 1 for more details. + class RoutingParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/backup.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/backup.rb new file mode 100644 index 000000000000..e801575a4ec8 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/backup.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module Admin + module V1 + # A Backup of a Cloud Firestore Database. + # + # The backup contains all documents and index configurations for the given + # database at a specific point in time. + # @!attribute [r] name + # @return [::String] + # Output only. The unique resource name of the Backup. + # + # Format is `projects/{project}/locations/{location}/backups/{backup}`. + # @!attribute [r] database + # @return [::String] + # Output only. Name of the Firestore database that the backup is from. + # + # Format is `projects/{project}/databases/{database}`. + # @!attribute [r] database_uid + # @return [::String] + # Output only. The system-generated UUID4 for the Firestore database that the + # backup is from. + # @!attribute [r] snapshot_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The backup contains an externally consistent copy of the + # database at this time. + # @!attribute [r] expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp at which this backup expires. + # @!attribute [r] stats + # @return [::Google::Cloud::Firestore::Admin::V1::Backup::Stats] + # Output only. Statistics about the backup. + # + # This data only becomes available after the backup is fully materialized to + # secondary storage. This field will be empty till then. + # @!attribute [r] state + # @return [::Google::Cloud::Firestore::Admin::V1::Backup::State] + # Output only. The current state of the backup. + class Backup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Backup specific statistics. + # @!attribute [r] size_bytes + # @return [::Integer] + # Output only. Summation of the size of all documents and index entries in + # the backup, measured in bytes. + # @!attribute [r] document_count + # @return [::Integer] + # Output only. The total number of documents contained in the backup. + # @!attribute [r] index_count + # @return [::Integer] + # Output only. The total number of index entries contained in the backup. + class Stats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Indicate the current state of the backup. + module State + # The state is unspecified. + STATE_UNSPECIFIED = 0 + + # The pending backup is still being created. Operations on the + # backup will be rejected in this state. + CREATING = 1 + + # The backup is complete and ready to use. + READY = 2 + + # The backup is not available at this moment. + NOT_AVAILABLE = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/database.rb new file mode 100644 index 000000000000..73638281854c --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/database.rb @@ -0,0 +1,367 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module Admin + module V1 + # A Cloud Firestore Database. + # @!attribute [rw] name + # @return [::String] + # The resource name of the Database. + # Format: `projects/{project}/databases/{database}` + # @!attribute [r] uid + # @return [::String] + # Output only. The system-generated UUID4 for this Database. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp at which this database was created. Databases + # created before 2016 do not populate create_time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp at which this database was most recently + # updated. Note this only includes updates to the database resource and not + # data contained by the database. + # @!attribute [r] delete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp at which this database was deleted. Only set if + # the database has been deleted. + # @!attribute [rw] location_id + # @return [::String] + # The location of the database. Available locations are listed at + # https://cloud.google.com/firestore/docs/locations. + # @!attribute [rw] type + # @return [::Google::Cloud::Firestore::Admin::V1::Database::DatabaseType] + # The type of the database. + # See https://cloud.google.com/datastore/docs/firestore-or-datastore for + # information about how to choose. + # @!attribute [rw] concurrency_mode + # @return [::Google::Cloud::Firestore::Admin::V1::Database::ConcurrencyMode] + # The concurrency control mode to use for this database. + # @!attribute [r] version_retention_period + # @return [::Google::Protobuf::Duration] + # Output only. The period during which past versions of data are retained in + # the database. + # + # Any [read][google.firestore.v1.GetDocumentRequest.read_time] + # or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify + # a `read_time` within this window, and will read the state of the database + # at that time. + # + # If the PITR feature is enabled, the retention period is 7 days. Otherwise, + # the retention period is 1 hour. + # @!attribute [r] earliest_version_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The earliest timestamp at which older versions of the data can + # be read from the database. See [version_retention_period] above; this field + # is populated with `now - version_retention_period`. + # + # This value is continuously updated, and becomes stale the moment it is + # queried. If you are using this value to recover data, make sure to account + # for the time from the moment when the value is queried to the moment when + # you initiate the recovery. + # @!attribute [rw] point_in_time_recovery_enablement + # @return [::Google::Cloud::Firestore::Admin::V1::Database::PointInTimeRecoveryEnablement] + # Whether to enable the PITR feature on this database. + # @!attribute [rw] app_engine_integration_mode + # @return [::Google::Cloud::Firestore::Admin::V1::Database::AppEngineIntegrationMode] + # The App Engine integration mode to use for this database. + # @!attribute [r] key_prefix + # @return [::String] + # Output only. The key_prefix for this database. This key_prefix is used, in + # combination with the project ID ("~") to construct + # the application ID that is returned from the Cloud Datastore APIs in Google + # App Engine first generation runtimes. + # + # This value may be empty in which case the appid to use for URL-encoded keys + # is the project_id (eg: foo instead of v~foo). + # @!attribute [rw] delete_protection_state + # @return [::Google::Cloud::Firestore::Admin::V1::Database::DeleteProtectionState] + # State of delete protection for the database. + # @!attribute [rw] cmek_config + # @return [::Google::Cloud::Firestore::Admin::V1::Database::CmekConfig] + # Optional. Presence indicates CMEK is enabled for this database. + # @!attribute [r] previous_id + # @return [::String] + # Output only. The database resource's prior database ID. This field is only + # populated for deleted databases. + # @!attribute [r] source_info + # @return [::Google::Cloud::Firestore::Admin::V1::Database::SourceInfo] + # Output only. Information about the provenance of this database. + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Input only. Immutable. Tag keys/values directly bound to this + # resource. For example: + # "123/environment": "production", + # "123/costCenter": "marketing" + # @!attribute [r] free_tier + # @return [::Boolean] + # Output only. Background: Free tier is the ability of a Firestore database + # to use a small amount of resources every day without being charged. Once + # usage exceeds the free tier limit further usage is charged. + # + # Whether this database can make use of the free tier. Only one database + # per project can be eligible for the free tier. + # + # The first (or next) database that is created in a project without a free + # tier database will be marked as eligible for the free tier. Databases that + # are created while there is a free tier database will not be eligible for + # the free tier. + # @!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] database_edition + # @return [::Google::Cloud::Firestore::Admin::V1::Database::DatabaseEdition] + # Immutable. The edition of the database. + class Database + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The CMEK (Customer Managed Encryption Key) configuration for a Firestore + # database. If not present, the database is secured by the default Google + # encryption key. + # @!attribute [rw] kms_key_name + # @return [::String] + # Required. Only keys in the same location as this database are allowed to + # be used for encryption. + # + # For Firestore's nam5 multi-region, this corresponds to Cloud KMS + # multi-region us. For Firestore's eur3 multi-region, this corresponds to + # Cloud KMS multi-region europe. See + # https://cloud.google.com/kms/docs/locations. + # + # The expected format is + # `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + # @!attribute [r] active_key_version + # @return [::Array<::String>] + # Output only. Currently in-use [KMS key + # versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). + # During [key rotation](https://cloud.google.com/kms/docs/key-rotation), + # there can be multiple in-use key versions. + # + # The expected format is + # `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. + class CmekConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about the provenance of this database. + # @!attribute [rw] backup + # @return [::Google::Cloud::Firestore::Admin::V1::Database::SourceInfo::BackupSource] + # If set, this database was restored from the specified backup (or a + # snapshot thereof). + # @!attribute [rw] operation + # @return [::String] + # The associated long-running operation. This field may not be set after + # the operation has completed. Format: + # `projects/{project}/databases/{database}/operations/{operation}`. + class SourceInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about a backup that was used to restore a database. + # @!attribute [rw] backup + # @return [::String] + # The resource name of the backup that was used to restore this + # database. Format: + # `projects/{project}/locations/{location}/backups/{backup}`. + class BackupSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Encryption configuration for a new database being created from another + # source. + # + # The source could be a {::Google::Cloud::Firestore::Admin::V1::Backup Backup} . + # @!attribute [rw] google_default_encryption + # @return [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig::GoogleDefaultEncryptionOptions] + # Use Google default encryption. + # + # Note: The following fields are mutually exclusive: `google_default_encryption`, `use_source_encryption`, `customer_managed_encryption`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] use_source_encryption + # @return [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig::SourceEncryptionOptions] + # The database will use the same encryption configuration as the source. + # + # Note: The following fields are mutually exclusive: `use_source_encryption`, `google_default_encryption`, `customer_managed_encryption`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] customer_managed_encryption + # @return [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig::CustomerManagedEncryptionOptions] + # Use Customer Managed Encryption Keys (CMEK) for encryption. + # + # Note: The following fields are mutually exclusive: `customer_managed_encryption`, `google_default_encryption`, `use_source_encryption`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class EncryptionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The configuration options for using Google default encryption. + class GoogleDefaultEncryptionOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration options for using the same encryption method as the + # source. + class SourceEncryptionOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The configuration options for using CMEK (Customer Managed Encryption + # Key) encryption. + # @!attribute [rw] kms_key_name + # @return [::String] + # Required. Only keys in the same location as the database are allowed to + # be used for encryption. + # + # For Firestore's nam5 multi-region, this corresponds to Cloud KMS + # multi-region us. For Firestore's eur3 multi-region, this corresponds to + # Cloud KMS multi-region europe. See + # https://cloud.google.com/kms/docs/locations. + # + # The expected format is + # `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + class CustomerManagedEncryptionOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The type of the database. + # See https://cloud.google.com/datastore/docs/firestore-or-datastore for + # information about how to choose. + # + # Mode changes are only allowed if the database is empty. + module DatabaseType + # Not used. + DATABASE_TYPE_UNSPECIFIED = 0 + + # Firestore Native Mode + FIRESTORE_NATIVE = 1 + + # Firestore in Datastore Mode. + DATASTORE_MODE = 2 + end + + # The type of concurrency control mode for transactions. + module ConcurrencyMode + # Not used. + CONCURRENCY_MODE_UNSPECIFIED = 0 + + # Use optimistic concurrency control by default. This mode is available + # for Cloud Firestore databases. + OPTIMISTIC = 1 + + # Use pessimistic concurrency control by default. This mode is available + # for Cloud Firestore databases. + # + # This is the default setting for Cloud Firestore. + PESSIMISTIC = 2 + + # Use optimistic concurrency control with entity groups by default. + # + # This is the only available mode for Cloud Datastore. + # + # This mode is also available for Cloud Firestore with Datastore Mode but + # is not recommended. + OPTIMISTIC_WITH_ENTITY_GROUPS = 3 + end + + # Point In Time Recovery feature enablement. + module PointInTimeRecoveryEnablement + # Not used. + POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0 + + # Reads are supported on selected versions of the data from within the past + # 7 days: + # + # * Reads against any timestamp within the past hour + # * Reads against 1-minute snapshots beyond 1 hour and within 7 days + # + # `version_retention_period` and `earliest_version_time` can be + # used to determine the supported versions. + POINT_IN_TIME_RECOVERY_ENABLED = 1 + + # Reads are supported on any version of the data from within the past 1 + # hour. + POINT_IN_TIME_RECOVERY_DISABLED = 2 + end + + # The type of App Engine integration mode. + module AppEngineIntegrationMode + # Not used. + APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0 + + # If an App Engine application exists in the same region as this database, + # App Engine configuration will impact this database. This includes + # disabling of the application & database, as well as disabling writes to + # the database. + ENABLED = 1 + + # App Engine has no effect on the ability of this database to serve + # requests. + # + # This is the default setting for databases created with the Firestore API. + DISABLED = 2 + end + + # The delete protection state of the database. + module DeleteProtectionState + # The default value. Delete protection type is not specified + DELETE_PROTECTION_STATE_UNSPECIFIED = 0 + + # Delete protection is disabled + DELETE_PROTECTION_DISABLED = 1 + + # Delete protection is enabled + DELETE_PROTECTION_ENABLED = 2 + end + + # The edition of the database. + module DatabaseEdition + # Not used. + DATABASE_EDITION_UNSPECIFIED = 0 + + # Standard edition. + # + # This is the default setting if not specified. + STANDARD = 1 + + # Enterprise edition. + ENTERPRISE = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/field.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/field.rb new file mode 100644 index 000000000000..b8c041573d04 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/field.rb @@ -0,0 +1,139 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module Admin + module V1 + # Represents a single field in the database. + # + # Fields are grouped by their "Collection Group", which represent all + # collections in the database with the same ID. + # @!attribute [rw] name + # @return [::String] + # Required. A field name of the form: + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + # + # A field path can be a simple field name, e.g. `address` or a path to fields + # within `map_value` , e.g. `address.city`, + # or a special field path. The only valid special field is `*`, which + # represents any field. + # + # Field paths can be quoted using `` ` `` (backtick). The only character that + # must be escaped within a quoted field path is the backtick character + # itself, escaped using a backslash. Special characters in field paths that + # must be quoted include: `*`, `.`, + # `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. + # + # Examples: + # `` `address.city` `` represents a field named `address.city`, not the map + # key `city` in the field `address`. `` `*` `` represents a field named `*`, + # not any field. + # + # A special `Field` contains the default indexing settings for all fields. + # This field's resource name is: + # `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` + # Indexes defined on this `Field` will be applied to all fields which do not + # have their own `Field` index configuration. + # @!attribute [rw] index_config + # @return [::Google::Cloud::Firestore::Admin::V1::Field::IndexConfig] + # The index configuration for this field. If unset, field indexing will + # revert to the configuration defined by the `ancestor_field`. To + # explicitly remove all indexes for this field, specify an index config + # with an empty list of indexes. + # @!attribute [rw] ttl_config + # @return [::Google::Cloud::Firestore::Admin::V1::Field::TtlConfig] + # The TTL configuration for this `Field`. + # Setting or unsetting this will enable or disable the TTL for + # documents that have this `Field`. + class Field + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The index configuration for this field. + # @!attribute [rw] indexes + # @return [::Array<::Google::Cloud::Firestore::Admin::V1::Index>] + # The indexes supported for this field. + # @!attribute [rw] uses_ancestor_config + # @return [::Boolean] + # Output only. When true, the `Field`'s index configuration is set from the + # configuration specified by the `ancestor_field`. + # When false, the `Field`'s index configuration is defined explicitly. + # @!attribute [rw] ancestor_field + # @return [::String] + # Output only. Specifies the resource name of the `Field` from which this + # field's index configuration is set (when `uses_ancestor_config` is true), + # or from which it *would* be set if this field had no index configuration + # (when `uses_ancestor_config` is false). + # @!attribute [rw] reverting + # @return [::Boolean] + # Output only + # When true, the `Field`'s index configuration is in the process of being + # reverted. Once complete, the index config will transition to the same + # state as the field specified by `ancestor_field`, at which point + # `uses_ancestor_config` will be `true` and `reverting` will be `false`. + class IndexConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The TTL (time-to-live) configuration for documents that have this `Field` + # set. + # + # Storing a timestamp value into a TTL-enabled field will be treated as + # the document's absolute expiration time. Timestamp values in the past + # indicate that the document is eligible for immediate expiration. Using any + # other data type or leaving the field absent will disable expiration for the + # individual document. + # @!attribute [r] state + # @return [::Google::Cloud::Firestore::Admin::V1::Field::TtlConfig::State] + # Output only. The state of the TTL configuration. + class TtlConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The state of applying the TTL configuration to all documents. + module State + # The state is unspecified or unknown. + STATE_UNSPECIFIED = 0 + + # The TTL is being applied. There is an active long-running operation to + # track the change. Newly written documents will have TTLs applied as + # requested. Requested TTLs on existing documents are still being + # processed. When TTLs on all existing documents have been processed, the + # state will move to 'ACTIVE'. + CREATING = 1 + + # The TTL is active for all documents. + ACTIVE = 2 + + # The TTL configuration could not be enabled for all existing documents. + # Newly written documents will continue to have their TTL applied. + # The LRO returned when last attempting to enable TTL for this `Field` + # has failed, and may have more details. + NEEDS_REPAIR = 3 + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb new file mode 100644 index 000000000000..46f006d4f0b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb @@ -0,0 +1,746 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module Admin + module V1 + # A request to list the Firestore Databases in all locations for a project. + # @!attribute [rw] parent + # @return [::String] + # Required. A parent name of the form + # `projects/{project_id}` + # @!attribute [rw] show_deleted + # @return [::Boolean] + # If true, also returns deleted resources. + class ListDatabasesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database FirestoreAdmin.CreateDatabase}. + # @!attribute [rw] parent + # @return [::String] + # Required. A parent name of the form + # `projects/{project_id}` + # @!attribute [rw] database + # @return [::Google::Cloud::Firestore::Admin::V1::Database] + # Required. The Database to create. + # @!attribute [rw] database_id + # @return [::String] + # Required. The ID to use for the database, which will become the final + # component of the database's resource name. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # + # "(default)" database ID is also valid. + class CreateDatabaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata related to the create database operation. + class CreateDatabaseMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The list of databases for a project. + # @!attribute [rw] databases + # @return [::Array<::Google::Cloud::Firestore::Admin::V1::Database>] + # The databases in the project. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # In the event that data about individual databases cannot be listed they + # will be recorded here. + # + # An example entry might be: projects/some_project/locations/some_location + # This can happen if the Cloud Region that the Database resides in is + # currently unavailable. In this case we can't fetch all the details about + # the database. You may be able to get a more detailed error message + # (or possibly fetch the resource) by sending a 'Get' request for the + # resource or a 'List' request for the specific location. + class ListDatabasesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_database FirestoreAdmin.GetDatabase}. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}` + class GetDatabaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_database FirestoreAdmin.UpdateDatabase}. + # @!attribute [rw] database + # @return [::Google::Cloud::Firestore::Admin::V1::Database] + # Required. The database to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + class UpdateDatabaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata related to the update database operation. + class UpdateDatabaseMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_database FirestoreAdmin.DeleteDatabase}. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}` + # @!attribute [rw] etag + # @return [::String] + # The current etag of the Database. + # If an etag is provided and does not match the current etag of the database, + # deletion will be blocked and a FAILED_PRECONDITION error will be returned. + class DeleteDatabaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata related to the delete database operation. + class DeleteDatabaseMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_user_creds FirestoreAdmin.CreateUserCreds}. + # @!attribute [rw] parent + # @return [::String] + # Required. A parent name of the form + # `projects/{project_id}/databases/{database_id}` + # @!attribute [rw] user_creds + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] + # Required. The user creds to create. + # @!attribute [rw] user_creds_id + # @return [::String] + # Required. The ID to use for the user creds, which will become the final + # component of the user creds's resource name. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + class CreateUserCredsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_user_creds FirestoreAdmin.GetUserCreds}. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + class GetUserCredsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_user_creds FirestoreAdmin.ListUserCreds}. + # @!attribute [rw] parent + # @return [::String] + # Required. A parent database name of the form + # `projects/{project_id}/databases/{database_id}` + class ListUserCredsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_user_creds FirestoreAdmin.ListUserCreds}. + # @!attribute [rw] user_creds + # @return [::Array<::Google::Cloud::Firestore::Admin::V1::UserCreds>] + # The user creds for the database. + class ListUserCredsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#enable_user_creds FirestoreAdmin.EnableUserCreds}. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + class EnableUserCredsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#disable_user_creds FirestoreAdmin.DisableUserCreds}. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + class DisableUserCredsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#reset_user_password FirestoreAdmin.ResetUserPassword}. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + class ResetUserPasswordRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_user_creds FirestoreAdmin.DeleteUserCreds}. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` + class DeleteUserCredsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_backup_schedule FirestoreAdmin.CreateBackupSchedule}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent database. + # + # Format `projects/{project}/databases/{database}` + # @!attribute [rw] backup_schedule + # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # Required. The backup schedule to create. + class CreateBackupScheduleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup_schedule FirestoreAdmin.GetBackupSchedule}. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the backup schedule. + # + # Format + # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + class GetBackupScheduleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_backup_schedule FirestoreAdmin.UpdateBackupSchedule}. + # @!attribute [rw] backup_schedule + # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] + # Required. The backup schedule to update. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + class UpdateBackupScheduleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backup_schedules FirestoreAdmin.ListBackupSchedules}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent database. + # + # Format is `projects/{project}/databases/{database}`. + class ListBackupSchedulesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backup_schedules FirestoreAdmin.ListBackupSchedules}. + # @!attribute [rw] backup_schedules + # @return [::Array<::Google::Cloud::Firestore::Admin::V1::BackupSchedule>] + # List of all backup schedules. + class ListBackupSchedulesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for [FirestoreAdmin.DeleteBackupSchedules][]. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the backup schedule. + # + # Format + # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + class DeleteBackupScheduleRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_index FirestoreAdmin.CreateIndex}. + # @!attribute [rw] parent + # @return [::String] + # Required. A parent name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + # @!attribute [rw] index + # @return [::Google::Cloud::Firestore::Admin::V1::Index] + # Required. The composite index to create. + class CreateIndexRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes FirestoreAdmin.ListIndexes}. + # @!attribute [rw] parent + # @return [::String] + # Required. A parent name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + # @!attribute [rw] filter + # @return [::String] + # The filter to apply to list results. + # @!attribute [rw] page_size + # @return [::Integer] + # The number of results to return. + # @!attribute [rw] page_token + # @return [::String] + # A page token, returned from a previous call to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes FirestoreAdmin.ListIndexes}, + # that may be used to get the next page of results. + class ListIndexesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes FirestoreAdmin.ListIndexes}. + # @!attribute [rw] indexes + # @return [::Array<::Google::Cloud::Firestore::Admin::V1::Index>] + # The requested indexes. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that may be used to request another page of results. If blank, + # this is the last page. + class ListIndexesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_index FirestoreAdmin.GetIndex}. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + class GetIndexRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_index FirestoreAdmin.DeleteIndex}. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + class DeleteIndexRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_field FirestoreAdmin.UpdateField}. + # @!attribute [rw] field + # @return [::Google::Cloud::Firestore::Admin::V1::Field] + # Required. The field to be updated. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # A mask, relative to the field. If specified, only configuration specified + # by this field_mask will be updated in the field. + class UpdateFieldRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_field FirestoreAdmin.GetField}. + # @!attribute [rw] name + # @return [::String] + # Required. A name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` + class GetFieldRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields}. + # @!attribute [rw] parent + # @return [::String] + # Required. A parent name of the form + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` + # @!attribute [rw] filter + # @return [::String] + # The filter to apply to list results. Currently, + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} + # only supports listing fields that have been explicitly overridden. To issue + # this query, call + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} + # with a filter that includes `indexConfig.usesAncestorConfig:false` or + # `ttlConfig:*`. + # @!attribute [rw] page_size + # @return [::Integer] + # The number of results to return. + # @!attribute [rw] page_token + # @return [::String] + # A page token, returned from a previous call to + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields}, + # that may be used to get the next page of results. + class ListFieldsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields}. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Firestore::Admin::V1::Field>] + # The requested fields. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that may be used to request another page of results. If blank, + # this is the last page. + class ListFieldsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#export_documents FirestoreAdmin.ExportDocuments}. + # @!attribute [rw] name + # @return [::String] + # Required. Database to export. Should be of the form: + # `projects/{project_id}/databases/{database_id}`. + # @!attribute [rw] collection_ids + # @return [::Array<::String>] + # Which collection IDs to export. Unspecified means all collections. Each + # collection ID in this list must be unique. + # @!attribute [rw] output_uri_prefix + # @return [::String] + # The output URI. Currently only supports Google Cloud Storage URIs of the + # form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name + # of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional + # Google Cloud Storage namespace path. When + # choosing a name, be sure to consider Google Cloud Storage naming + # guidelines: https://cloud.google.com/storage/docs/naming. + # If the URI is a bucket (without a namespace path), a prefix will be + # generated based on the start time. + # @!attribute [rw] namespace_ids + # @return [::Array<::String>] + # An empty list represents all namespaces. This is the preferred + # usage for databases that don't use namespaces. + # + # An empty string element represents the default namespace. This should be + # used if the database has data in non-default namespaces, but doesn't want + # to include them. Each namespace in this list must be unique. + # @!attribute [rw] snapshot_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp that corresponds to the version of the database to be + # exported. The timestamp must be in the past, rounded to the minute and not + # older than + # {::Google::Cloud::Firestore::Admin::V1::Database#earliest_version_time earliestVersionTime}. + # If specified, then the exported documents will represent a consistent view + # of the database at the provided time. Otherwise, there are no guarantees + # about the consistency of the exported documents. + class ExportDocumentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#import_documents FirestoreAdmin.ImportDocuments}. + # @!attribute [rw] name + # @return [::String] + # Required. Database to import into. Should be of the form: + # `projects/{project_id}/databases/{database_id}`. + # @!attribute [rw] collection_ids + # @return [::Array<::String>] + # Which collection IDs to import. Unspecified means all collections included + # in the import. Each collection ID in this list must be unique. + # @!attribute [rw] input_uri_prefix + # @return [::String] + # Location of the exported files. + # This must match the output_uri_prefix of an ExportDocumentsResponse from + # an export that has completed successfully. + # See: + # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsResponse#output_uri_prefix google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix}. + # @!attribute [rw] namespace_ids + # @return [::Array<::String>] + # An empty list represents all namespaces. This is the preferred + # usage for databases that don't use namespaces. + # + # An empty string element represents the default namespace. This should be + # used if the database has data in non-default namespaces, but doesn't want + # to include them. Each namespace in this list must be unique. + class ImportDocumentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#bulk_delete_documents FirestoreAdmin.BulkDeleteDocuments}. + # + # When both collection_ids and namespace_ids are set, only documents satisfying + # both conditions will be deleted. + # + # Requests with namespace_ids and collection_ids both empty will be rejected. + # Please use + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_database FirestoreAdmin.DeleteDatabase} + # instead. + # @!attribute [rw] name + # @return [::String] + # Required. Database to operate. Should be of the form: + # `projects/{project_id}/databases/{database_id}`. + # @!attribute [rw] collection_ids + # @return [::Array<::String>] + # Optional. IDs of the collection groups to delete. Unspecified means all + # collection groups. + # + # Each collection group in this list must be unique. + # @!attribute [rw] namespace_ids + # @return [::Array<::String>] + # Optional. Namespaces to delete. + # + # An empty list means all namespaces. This is the recommended + # usage for databases that don't use namespaces. + # + # An empty string element represents the default namespace. This should be + # used if the database has data in non-default namespaces, but doesn't want + # to delete from them. + # + # Each namespace in this list must be unique. + class BulkDeleteDocumentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#bulk_delete_documents FirestoreAdmin.BulkDeleteDocuments}. + class BulkDeleteDocumentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup FirestoreAdmin.GetBackup}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backup to fetch. + # + # Format is `projects/{project}/locations/{location}/backups/{backup}`. + class GetBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backups FirestoreAdmin.ListBackups}. + # @!attribute [rw] parent + # @return [::String] + # Required. The location to list backups from. + # + # Format is `projects/{project}/locations/{location}`. + # Use `{location} = '-'` to list backups from all locations for the given + # project. This allows listing backups from a single location or from all + # locations. + # @!attribute [rw] filter + # @return [::String] + # An expression that filters the list of returned backups. + # + # A filter expression consists of a field name, a comparison operator, and a + # value for filtering. + # The value must be a string, a number, or a boolean. The comparison operator + # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. + # Colon `:` is the contains operator. Filter rules are not case sensitive. + # + # The following fields in the {::Google::Cloud::Firestore::Admin::V1::Backup Backup} are + # eligible for filtering: + # + # * `database_uid` (supports `=` only) + class ListBackupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backups FirestoreAdmin.ListBackups}. + # @!attribute [rw] backups + # @return [::Array<::Google::Cloud::Firestore::Admin::V1::Backup>] + # List of all backups for the project. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # List of locations that existing backups were not able to be fetched from. + # + # Instead of failing the entire requests when a single location is + # unreachable, this response returns a partial result set and list of + # locations unable to be reached here. The request can be retried against a + # single location to get a concrete error. + class ListBackupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup FirestoreAdmin.DeleteBackup}. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the backup to delete. + # + # format is `projects/{project}/locations/{location}/backups/{backup}`. + class DeleteBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request message for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#restore_database FirestoreAdmin.RestoreDatabase}. + # @!attribute [rw] parent + # @return [::String] + # Required. The project to restore the database in. Format is + # `projects/{project_id}`. + # @!attribute [rw] database_id + # @return [::String] + # Required. The ID to use for the database, which will become the final + # component of the database's resource name. This database ID must not be + # associated with an existing database. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # + # "(default)" database ID is also valid. + # @!attribute [rw] backup + # @return [::String] + # Required. Backup to restore from. Must be from the same project as the + # parent. + # + # The restored database will be created in the same location as the source + # backup. + # + # Format is: `projects/{project_id}/locations/{location}/backups/{backup}` + # @!attribute [rw] encryption_config + # @return [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig] + # Optional. Encryption configuration for the restored database. + # + # If this field is not specified, the restored database will use + # the same encryption configuration as the backup, namely + # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Immutable. Tags to be bound to the restored database. + # + # The tags should be provided in the format of + # `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + class RestoreDatabaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The request message for + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#clone_database FirestoreAdmin.CloneDatabase}. + # @!attribute [rw] parent + # @return [::String] + # Required. The project to clone the database in. Format is + # `projects/{project_id}`. + # @!attribute [rw] database_id + # @return [::String] + # Required. The ID to use for the database, which will become the final + # component of the database's resource name. This database ID must not be + # associated with an existing database. + # + # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ + # with first character a letter and the last a letter or a number. Must not + # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. + # + # "(default)" database ID is also valid. + # @!attribute [rw] pitr_snapshot + # @return [::Google::Cloud::Firestore::Admin::V1::PitrSnapshot] + # Required. Specification of the PITR data to clone from. The source database + # must exist. + # + # The cloned database will be created in the same location as the source + # database. + # @!attribute [rw] encryption_config + # @return [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig] + # Optional. Encryption configuration for the cloned database. + # + # If this field is not specified, the cloned database will use + # the same encryption configuration as the source database, namely + # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. + # @!attribute [rw] tags + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Immutable. Tags to be bound to the cloned database. + # + # The tags should be provided in the format of + # `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. + class CloneDatabaseRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class TagsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/index.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/index.rb new file mode 100644 index 000000000000..2c75b41ab996 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/index.rb @@ -0,0 +1,249 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module Admin + module V1 + # Cloud Firestore indexes enable simple and complex queries against + # documents in a database. + # @!attribute [rw] name + # @return [::String] + # Output only. A server defined name for this index. + # The form of this name for composite indexes will be: + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` + # For single field indexes, this field will be empty. + # @!attribute [rw] query_scope + # @return [::Google::Cloud::Firestore::Admin::V1::Index::QueryScope] + # Indexes with a collection query scope specified allow queries + # against a collection that is the child of a specific document, specified at + # query time, and that has the same collection ID. + # + # Indexes with a collection group query scope specified allow queries against + # all collections descended from a specific document, specified at query + # time, and that have the same collection ID as this index. + # @!attribute [rw] api_scope + # @return [::Google::Cloud::Firestore::Admin::V1::Index::ApiScope] + # The API scope supported by this index. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Firestore::Admin::V1::Index::IndexField>] + # The fields supported by this index. + # + # For composite indexes, this requires a minimum of 2 and a maximum of 100 + # fields. The last field entry is always for the field path `__name__`. If, + # on creation, `__name__` was not specified as the last field, it will be + # added automatically with the same direction as that of the last field + # defined. If the final field in a composite index is not directional, the + # `__name__` will be ordered ASCENDING (unless explicitly specified). + # + # For single field indexes, this will always be exactly one entry with a + # field path equal to the field path of the associated field. + # @!attribute [rw] state + # @return [::Google::Cloud::Firestore::Admin::V1::Index::State] + # Output only. The serving state of the index. + # @!attribute [rw] density + # @return [::Google::Cloud::Firestore::Admin::V1::Index::Density] + # Immutable. The density configuration of the index. + # @!attribute [rw] multikey + # @return [::Boolean] + # Optional. Whether the index is multikey. By default, the index is not + # multikey. For non-multikey indexes, none of the paths in the index + # definition reach or traverse an array, except via an explicit array index. + # For multikey indexes, at most one of the paths in the index definition + # reach or traverse an array, except via an explicit array index. Violations + # will result in errors. + # + # Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. + # @!attribute [rw] shard_count + # @return [::Integer] + # Optional. The number of shards for the index. + class Index + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A field in an index. + # The field_path describes which field is indexed, the value_mode describes + # how the field value is indexed. + # @!attribute [rw] field_path + # @return [::String] + # Can be __name__. + # For single field indexes, this must match the name of the field or may + # be omitted. + # @!attribute [rw] order + # @return [::Google::Cloud::Firestore::Admin::V1::Index::IndexField::Order] + # Indicates that this field supports ordering by the specified order or + # comparing using =, !=, <, <=, >, >=. + # + # Note: The following fields are mutually exclusive: `order`, `array_config`, `vector_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] array_config + # @return [::Google::Cloud::Firestore::Admin::V1::Index::IndexField::ArrayConfig] + # Indicates that this field supports operations on `array_value`s. + # + # Note: The following fields are mutually exclusive: `array_config`, `order`, `vector_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] vector_config + # @return [::Google::Cloud::Firestore::Admin::V1::Index::IndexField::VectorConfig] + # Indicates that this field supports nearest neighbor and distance + # operations on vector. + # + # Note: The following fields are mutually exclusive: `vector_config`, `order`, `array_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class IndexField + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The index configuration to support vector search operations + # @!attribute [rw] dimension + # @return [::Integer] + # Required. The vector dimension this configuration applies to. + # + # The resulting index will only include vectors of this dimension, and + # can be used for vector search with the same dimension. + # @!attribute [rw] flat + # @return [::Google::Cloud::Firestore::Admin::V1::Index::IndexField::VectorConfig::FlatIndex] + # Indicates the vector index is a flat index. + class VectorConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # An index that stores vectors in a flat data structure, and supports + # exhaustive search. + class FlatIndex + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # The supported orderings. + module Order + # The ordering is unspecified. Not a valid option. + ORDER_UNSPECIFIED = 0 + + # The field is ordered by ascending field value. + ASCENDING = 1 + + # The field is ordered by descending field value. + DESCENDING = 2 + end + + # The supported array value configurations. + module ArrayConfig + # The index does not support additional array queries. + ARRAY_CONFIG_UNSPECIFIED = 0 + + # The index supports array containment queries. + CONTAINS = 1 + end + end + + # Query Scope defines the scope at which a query is run. This is specified on + # a StructuredQuery's `from` field. + module QueryScope + # The query scope is unspecified. Not a valid option. + QUERY_SCOPE_UNSPECIFIED = 0 + + # Indexes with a collection query scope specified allow queries + # against a collection that is the child of a specific document, specified + # at query time, and that has the collection ID specified by the index. + COLLECTION = 1 + + # Indexes with a collection group query scope specified allow queries + # against all collections that has the collection ID specified by the + # index. + COLLECTION_GROUP = 2 + + # Include all the collections's ancestor in the index. Only available for + # Datastore Mode databases. + COLLECTION_RECURSIVE = 3 + end + + # API Scope defines the APIs (Firestore Native, or Firestore in + # Datastore Mode) that are supported for queries. + module ApiScope + # The index can only be used by the Firestore Native query API. + # This is the default. + ANY_API = 0 + + # The index can only be used by the Firestore in Datastore Mode query API. + DATASTORE_MODE_API = 1 + + # The index can only be used by the MONGODB_COMPATIBLE_API. + MONGODB_COMPATIBLE_API = 2 + end + + # The state of an index. During index creation, an index will be in the + # `CREATING` state. If the index is created successfully, it will transition + # to the `READY` state. If the index creation encounters a problem, the index + # will transition to the `NEEDS_REPAIR` state. + module State + # The state is unspecified. + STATE_UNSPECIFIED = 0 + + # The index is being created. + # There is an active long-running operation for the index. + # The index is updated when writing a document. + # Some index data may exist. + CREATING = 1 + + # The index is ready to be used. + # The index is updated when writing a document. + # The index is fully populated from all stored documents it applies to. + READY = 2 + + # The index was being created, but something went wrong. + # There is no active long-running operation for the index, + # and the most recently finished long-running operation failed. + # The index is not updated when writing a document. + # Some index data may exist. + # Use the google.longrunning.Operations API to determine why the operation + # that last attempted to create this index failed, then re-create the + # index. + NEEDS_REPAIR = 3 + end + + # The density configuration for the index. + module Density + # Unspecified. It will use database default setting. This value is input + # only. + DENSITY_UNSPECIFIED = 0 + + # In order for an index entry to be added, the document must + # contain all fields specified in the index. + # + # This is the only allowed value for indexes having ApiScope `ANY_API` and + # `DATASTORE_MODE_API`. + SPARSE_ALL = 1 + + # In order for an index entry to be added, the document must + # contain at least one of the fields specified in the index. + # Non-existent fields are treated as having a NULL value when generating + # index entries. + SPARSE_ANY = 2 + + # An index entry will be added regardless of whether the + # document contains any of the fields specified in the index. + # Non-existent fields are treated as having a NULL value when generating + # index entries. + DENSE = 3 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/location.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/location.rb new file mode 100644 index 000000000000..699d03ec3a7c --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/location.rb @@ -0,0 +1,35 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module Admin + module V1 + # The metadata message for + # [google.cloud.location.Location.metadata][google.cloud.location.Location.metadata]. + class LocationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/operation.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/operation.rb new file mode 100644 index 000000000000..d8844cee33ef --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/operation.rb @@ -0,0 +1,349 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module Admin + module V1 + # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} + # results from + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_index FirestoreAdmin.CreateIndex}. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time this operation started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time this operation completed. Will be unset if operation still in + # progress. + # @!attribute [rw] index + # @return [::String] + # The index resource that this operation is acting on. For example: + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` + # @!attribute [rw] state + # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] + # The state of the operation. + # @!attribute [rw] progress_documents + # @return [::Google::Cloud::Firestore::Admin::V1::Progress] + # The progress, in documents, of this operation. + # @!attribute [rw] progress_bytes + # @return [::Google::Cloud::Firestore::Admin::V1::Progress] + # The progress, in bytes, of this operation. + class IndexOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} + # results from + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_field FirestoreAdmin.UpdateField}. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time this operation started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time this operation completed. Will be unset if operation still in + # progress. + # @!attribute [rw] field + # @return [::String] + # The field resource that this operation is acting on. For example: + # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` + # @!attribute [rw] index_config_deltas + # @return [::Array<::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::IndexConfigDelta>] + # A list of + # {::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::IndexConfigDelta IndexConfigDelta}, + # which describe the intent of this operation. + # @!attribute [rw] state + # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] + # The state of the operation. + # @!attribute [rw] progress_documents + # @return [::Google::Cloud::Firestore::Admin::V1::Progress] + # The progress, in documents, of this operation. + # @!attribute [rw] progress_bytes + # @return [::Google::Cloud::Firestore::Admin::V1::Progress] + # The progress, in bytes, of this operation. + # @!attribute [rw] ttl_config_delta + # @return [::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::TtlConfigDelta] + # Describes the deltas of TTL configuration. + class FieldOperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about an index configuration change. + # @!attribute [rw] change_type + # @return [::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::IndexConfigDelta::ChangeType] + # Specifies how the index is changing. + # @!attribute [rw] index + # @return [::Google::Cloud::Firestore::Admin::V1::Index] + # The index being changed. + class IndexConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies how the index is changing. + module ChangeType + # The type of change is not specified or known. + CHANGE_TYPE_UNSPECIFIED = 0 + + # The single field index is being added. + ADD = 1 + + # The single field index is being removed. + REMOVE = 2 + end + end + + # Information about a TTL configuration change. + # @!attribute [rw] change_type + # @return [::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::TtlConfigDelta::ChangeType] + # Specifies how the TTL configuration is changing. + class TtlConfigDelta + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Specifies how the TTL config is changing. + module ChangeType + # The type of change is not specified or known. + CHANGE_TYPE_UNSPECIFIED = 0 + + # The TTL config is being added. + ADD = 1 + + # The TTL config is being removed. + REMOVE = 2 + end + end + end + + # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} + # results from + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#export_documents FirestoreAdmin.ExportDocuments}. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time this operation started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time this operation completed. Will be unset if operation still in + # progress. + # @!attribute [rw] operation_state + # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] + # The state of the export operation. + # @!attribute [rw] progress_documents + # @return [::Google::Cloud::Firestore::Admin::V1::Progress] + # The progress, in documents, of this operation. + # @!attribute [rw] progress_bytes + # @return [::Google::Cloud::Firestore::Admin::V1::Progress] + # The progress, in bytes, of this operation. + # @!attribute [rw] collection_ids + # @return [::Array<::String>] + # Which collection IDs are being exported. + # @!attribute [rw] output_uri_prefix + # @return [::String] + # Where the documents are being exported to. + # @!attribute [rw] namespace_ids + # @return [::Array<::String>] + # Which namespace IDs are being exported. + # @!attribute [rw] snapshot_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp that corresponds to the version of the database that is being + # exported. If unspecified, there are no guarantees about the consistency of + # the documents being exported. + class ExportDocumentsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} + # results from + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#import_documents FirestoreAdmin.ImportDocuments}. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time this operation started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time this operation completed. Will be unset if operation still in + # progress. + # @!attribute [rw] operation_state + # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] + # The state of the import operation. + # @!attribute [rw] progress_documents + # @return [::Google::Cloud::Firestore::Admin::V1::Progress] + # The progress, in documents, of this operation. + # @!attribute [rw] progress_bytes + # @return [::Google::Cloud::Firestore::Admin::V1::Progress] + # The progress, in bytes, of this operation. + # @!attribute [rw] collection_ids + # @return [::Array<::String>] + # Which collection IDs are being imported. + # @!attribute [rw] input_uri_prefix + # @return [::String] + # The location of the documents being imported. + # @!attribute [rw] namespace_ids + # @return [::Array<::String>] + # Which namespace IDs are being imported. + class ImportDocumentsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} + # results from + # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#bulk_delete_documents FirestoreAdmin.BulkDeleteDocuments}. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time this operation started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time this operation completed. Will be unset if operation still in + # progress. + # @!attribute [rw] operation_state + # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] + # The state of the operation. + # @!attribute [rw] progress_documents + # @return [::Google::Cloud::Firestore::Admin::V1::Progress] + # The progress, in documents, of this operation. + # @!attribute [rw] progress_bytes + # @return [::Google::Cloud::Firestore::Admin::V1::Progress] + # The progress, in bytes, of this operation. + # @!attribute [rw] collection_ids + # @return [::Array<::String>] + # The IDs of the collection groups that are being deleted. + # @!attribute [rw] namespace_ids + # @return [::Array<::String>] + # Which namespace IDs are being deleted. + # @!attribute [rw] snapshot_time + # @return [::Google::Protobuf::Timestamp] + # The timestamp that corresponds to the version of the database that is being + # read to get the list of documents to delete. This time can also be used as + # the timestamp of PITR in case of disaster recovery (subject to PITR window + # limit). + class BulkDeleteDocumentsMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Returned in the {::Google::Longrunning::Operation google.longrunning.Operation} + # response field. + # @!attribute [rw] output_uri_prefix + # @return [::String] + # Location of the output files. This can be used to begin an import + # into Cloud Firestore (this project or another project) after the operation + # completes successfully. + class ExportDocumentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for the {::Google::Longrunning::Operation long-running operation} from + # the [RestoreDatabase][google.firestore.admin.v1.RestoreDatabase] request. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time the restore was started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time the restore finished, unset for ongoing restores. + # @!attribute [rw] operation_state + # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] + # The operation state of the restore. + # @!attribute [rw] database + # @return [::String] + # The name of the database being restored to. + # @!attribute [rw] backup + # @return [::String] + # The name of the backup restoring from. + # @!attribute [rw] progress_percentage + # @return [::Google::Cloud::Firestore::Admin::V1::Progress] + # How far along the restore is as an estimated percentage of remaining time. + class RestoreDatabaseMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Metadata for the {::Google::Longrunning::Operation long-running operation} from + # the [CloneDatabase][google.firestore.admin.v1.CloneDatabase] request. + # @!attribute [rw] start_time + # @return [::Google::Protobuf::Timestamp] + # The time the clone was started. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time the clone finished, unset for ongoing clones. + # @!attribute [rw] operation_state + # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] + # The operation state of the clone. + # @!attribute [rw] database + # @return [::String] + # The name of the database being cloned to. + # @!attribute [rw] pitr_snapshot + # @return [::Google::Cloud::Firestore::Admin::V1::PitrSnapshot] + # The snapshot from which this database was cloned. + # @!attribute [rw] progress_percentage + # @return [::Google::Cloud::Firestore::Admin::V1::Progress] + # How far along the clone is as an estimated percentage of remaining time. + class CloneDatabaseMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the progress of the operation. + # Unit of work is generic and must be interpreted based on where + # {::Google::Cloud::Firestore::Admin::V1::Progress Progress} is used. + # @!attribute [rw] estimated_work + # @return [::Integer] + # The amount of work estimated. + # @!attribute [rw] completed_work + # @return [::Integer] + # The amount of work completed. + class Progress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the state of the operation. + module OperationState + # Unspecified. + OPERATION_STATE_UNSPECIFIED = 0 + + # Request is being prepared for processing. + INITIALIZING = 1 + + # Request is actively being processed. + PROCESSING = 2 + + # Request is in the process of being cancelled after user called + # google.longrunning.Operations.CancelOperation on the operation. + CANCELLING = 3 + + # Request has been processed and is in its finalization stage. + FINALIZING = 4 + + # Request has completed successfully. + SUCCESSFUL = 5 + + # Request has finished being processed, but encountered an error. + FAILED = 6 + + # Request has finished being cancelled after user called + # google.longrunning.Operations.CancelOperation. + CANCELLED = 7 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/schedule.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/schedule.rb new file mode 100644 index 000000000000..dd7558215b30 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/schedule.rb @@ -0,0 +1,94 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module Admin + module V1 + # A backup schedule for a Cloud Firestore Database. + # + # This resource is owned by the database it is backing up, and is deleted along + # with the database. The actual backups are not though. + # @!attribute [r] name + # @return [::String] + # Output only. The unique backup schedule identifier across all locations and + # databases for the given project. + # + # This will be auto-assigned. + # + # Format is + # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp at which this backup schedule was created and + # effective since. + # + # No backups will be created for this schedule before this time. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp at which this backup schedule was most recently + # updated. When a backup schedule is first created, this is the same as + # create_time. + # @!attribute [rw] retention + # @return [::Google::Protobuf::Duration] + # At what relative time in the future, compared to its creation time, + # the backup should be deleted, e.g. keep backups for 7 days. + # + # The maximum supported retention period is 14 weeks. + # @!attribute [rw] daily_recurrence + # @return [::Google::Cloud::Firestore::Admin::V1::DailyRecurrence] + # For a schedule that runs daily. + # + # Note: The following fields are mutually exclusive: `daily_recurrence`, `weekly_recurrence`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] weekly_recurrence + # @return [::Google::Cloud::Firestore::Admin::V1::WeeklyRecurrence] + # For a schedule that runs weekly on a specific day. + # + # Note: The following fields are mutually exclusive: `weekly_recurrence`, `daily_recurrence`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BackupSchedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a recurring schedule that runs every day. + # + # The time zone is UTC. + class DailyRecurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a recurring schedule that runs on a specified day of the week. + # + # The time zone is UTC. + # @!attribute [rw] day + # @return [::Google::Type::DayOfWeek] + # The day of week to run. + # + # DAY_OF_WEEK_UNSPECIFIED is not allowed. + class WeeklyRecurrence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/snapshot.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/snapshot.rb new file mode 100644 index 000000000000..ea1365850daf --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/snapshot.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 Cloud + module Firestore + module Admin + module V1 + # A consistent snapshot of a database at a specific point in time. + # A PITR (Point-in-time recovery) snapshot with previous versions of a + # database's data is available for every minute up to the associated database's + # data retention period. If the PITR feature is enabled, the retention period + # is 7 days; otherwise, it is one hour. + # @!attribute [rw] database + # @return [::String] + # Required. The name of the database that this was a snapshot of. Format: + # `projects/{project}/databases/{database}`. + # @!attribute [r] database_uid + # @return [::String] + # Output only. Public UUID of the database the snapshot was associated with. + # @!attribute [rw] snapshot_time + # @return [::Google::Protobuf::Timestamp] + # Required. Snapshot time of the database. + class PitrSnapshot + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/user_creds.rb new file mode 100644 index 000000000000..7af24fd164ab --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/user_creds.rb @@ -0,0 +1,78 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module Admin + module V1 + # A Cloud Firestore User Creds. + # @!attribute [rw] name + # @return [::String] + # Identifier. The resource name of the UserCreds. + # Format: + # `projects/{project}/databases/{database}/userCreds/{user_creds}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the user creds were created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time the user creds were last updated. + # @!attribute [r] state + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds::State] + # Output only. Whether the user creds are enabled or disabled. Defaults to + # ENABLED on creation. + # @!attribute [r] secure_password + # @return [::String] + # Output only. The plaintext server-generated password for the user creds. + # Only populated in responses for CreateUserCreds and ResetUserPassword. + # @!attribute [rw] resource_identity + # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds::ResourceIdentity] + # Resource Identity descriptor. + class UserCreds + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes a Resource Identity principal. + # @!attribute [r] principal + # @return [::String] + # Output only. Principal identifier string. + # See: https://cloud.google.com/iam/docs/principal-identifiers + class ResourceIdentity + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The state of the user creds (ENABLED or DISABLED). + module State + # The default value. Should not be used. + STATE_UNSPECIFIED = 0 + + # The user creds are enabled. + ENABLED = 1 + + # The user creds are disabled. + DISABLED = 2 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/type/dayofweek.rb new file mode 100644 index 000000000000..973211b9ffe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/type/dayofweek.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! + + +module Google + module Type + # Represents a day of the week. + module DayOfWeek + # The day of the week is unspecified. + DAY_OF_WEEK_UNSPECIFIED = 0 + + # Monday + MONDAY = 1 + + # Tuesday + TUESDAY = 2 + + # Wednesday + WEDNESDAY = 3 + + # Thursday + THURSDAY = 4 + + # Friday + FRIDAY = 5 + + # Saturday + SATURDAY = 6 + + # Sunday + SUNDAY = 7 + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/Gemfile new file mode 100644 index 000000000000..53731d915653 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1", path: "../" +else + gem "google-cloud-firestore-admin-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-firestore-admin-v1/snippets/firestore_admin/bulk_delete_documents.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/bulk_delete_documents.rb new file mode 100644 index 000000000000..84e4b2295885 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/bulk_delete_documents.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 firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the bulk_delete_documents call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#bulk_delete_documents. +# +def bulk_delete_documents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new + + # Call the bulk_delete_documents method. + result = client.bulk_delete_documents request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/clone_database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/clone_database.rb new file mode 100644 index 000000000000..8281526ddc22 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/clone_database.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 firestore_v1_generated_FirestoreAdmin_CloneDatabase_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the clone_database call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#clone_database. +# +def clone_database + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new + + # Call the clone_database method. + result = client.clone_database request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 firestore_v1_generated_FirestoreAdmin_CloneDatabase_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_backup_schedule.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_backup_schedule.rb new file mode 100644 index 000000000000..9163cb60c9d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_backup_schedule.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 firestore_v1_generated_FirestoreAdmin_CreateBackupSchedule_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the create_backup_schedule call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_backup_schedule. +# +def create_backup_schedule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new + + # Call the create_backup_schedule method. + result = client.create_backup_schedule request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_CreateBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_database.rb new file mode 100644 index 000000000000..7f82eb093618 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_database.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 firestore_v1_generated_FirestoreAdmin_CreateDatabase_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the create_database call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database. +# +def create_database + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new + + # Call the create_database method. + result = client.create_database request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 firestore_v1_generated_FirestoreAdmin_CreateDatabase_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_index.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_index.rb new file mode 100644 index 000000000000..37fd399ff07a --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_index.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 firestore_v1_generated_FirestoreAdmin_CreateIndex_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the create_index call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_index. +# +def create_index + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new + + # Call the create_index method. + result = client.create_index request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 firestore_v1_generated_FirestoreAdmin_CreateIndex_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_user_creds.rb new file mode 100644 index 000000000000..50822a58e5d8 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_user_creds.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 firestore_v1_generated_FirestoreAdmin_CreateUserCreds_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the create_user_creds call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_user_creds. +# +def create_user_creds + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new + + # Call the create_user_creds method. + result = client.create_user_creds request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_CreateUserCreds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup.rb new file mode 100644 index 000000000000..8ce1f50f8af6 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup.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 firestore_v1_generated_FirestoreAdmin_DeleteBackup_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the delete_backup call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup. +# +def delete_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.new + + # Call the delete_backup method. + result = client.delete_backup request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup_schedule.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup_schedule.rb new file mode 100644 index 000000000000..8340ab05ee26 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup_schedule.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 firestore_v1_generated_FirestoreAdmin_DeleteBackupSchedule_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the delete_backup_schedule call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup_schedule. +# +def delete_backup_schedule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.new + + # Call the delete_backup_schedule method. + result = client.delete_backup_schedule request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_DeleteBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_database.rb new file mode 100644 index 000000000000..7481765bc545 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_database.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 firestore_v1_generated_FirestoreAdmin_DeleteDatabase_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the delete_database call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_database. +# +def delete_database + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.new + + # Call the delete_database method. + result = client.delete_database request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 firestore_v1_generated_FirestoreAdmin_DeleteDatabase_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_index.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_index.rb new file mode 100644 index 000000000000..7c25a6b6b8df --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_index.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 firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the delete_index call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_index. +# +def delete_index + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.new + + # Call the delete_index method. + result = client.delete_index request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_user_creds.rb new file mode 100644 index 000000000000..dfba43aaf5c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_user_creds.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 firestore_v1_generated_FirestoreAdmin_DeleteUserCreds_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the delete_user_creds call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_user_creds. +# +def delete_user_creds + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new + + # Call the delete_user_creds method. + result = client.delete_user_creds request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_DeleteUserCreds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/disable_user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/disable_user_creds.rb new file mode 100644 index 000000000000..942477f09484 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/disable_user_creds.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 firestore_v1_generated_FirestoreAdmin_DisableUserCreds_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the disable_user_creds call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#disable_user_creds. +# +def disable_user_creds + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new + + # Call the disable_user_creds method. + result = client.disable_user_creds request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_DisableUserCreds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/enable_user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/enable_user_creds.rb new file mode 100644 index 000000000000..87c57424a5cb --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/enable_user_creds.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 firestore_v1_generated_FirestoreAdmin_EnableUserCreds_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the enable_user_creds call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#enable_user_creds. +# +def enable_user_creds + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new + + # Call the enable_user_creds method. + result = client.enable_user_creds request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_EnableUserCreds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/export_documents.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/export_documents.rb new file mode 100644 index 000000000000..bdc0790a43ad --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/export_documents.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 firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the export_documents call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#export_documents. +# +def export_documents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new + + # Call the export_documents method. + result = client.export_documents request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup.rb new file mode 100644 index 000000000000..cb59b2662ae3 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup.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 firestore_v1_generated_FirestoreAdmin_GetBackup_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the get_backup call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup. +# +def get_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::GetBackupRequest.new + + # Call the get_backup method. + result = client.get_backup request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::Backup. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup_schedule.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup_schedule.rb new file mode 100644 index 000000000000..7a4c48b35672 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup_schedule.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 firestore_v1_generated_FirestoreAdmin_GetBackupSchedule_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the get_backup_schedule call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup_schedule. +# +def get_backup_schedule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.new + + # Call the get_backup_schedule method. + result = client.get_backup_schedule request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_GetBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_database.rb new file mode 100644 index 000000000000..9aeb3af77d1a --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_database.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 firestore_v1_generated_FirestoreAdmin_GetDatabase_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the get_database call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_database. +# +def get_database + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.new + + # Call the get_database method. + result = client.get_database request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::Database. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_GetDatabase_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_field.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_field.rb new file mode 100644 index 000000000000..9ea356a2397a --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_field.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 firestore_v1_generated_FirestoreAdmin_GetField_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the get_field call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_field. +# +def get_field + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::GetFieldRequest.new + + # Call the get_field method. + result = client.get_field request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::Field. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_GetField_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_index.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_index.rb new file mode 100644 index 000000000000..5321bf09f7c4 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_index.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 firestore_v1_generated_FirestoreAdmin_GetIndex_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the get_index call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_index. +# +def get_index + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::GetIndexRequest.new + + # Call the get_index method. + result = client.get_index request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::Index. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_GetIndex_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_user_creds.rb new file mode 100644 index 000000000000..10bb03bba272 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_user_creds.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 firestore_v1_generated_FirestoreAdmin_GetUserCreds_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the get_user_creds call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_user_creds. +# +def get_user_creds + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new + + # Call the get_user_creds method. + result = client.get_user_creds request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_GetUserCreds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/import_documents.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/import_documents.rb new file mode 100644 index 000000000000..c149ab6a5f7c --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/import_documents.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 firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the import_documents call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#import_documents. +# +def import_documents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new + + # Call the import_documents method. + result = client.import_documents request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backup_schedules.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backup_schedules.rb new file mode 100644 index 000000000000..725d8ca52b93 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backup_schedules.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 firestore_v1_generated_FirestoreAdmin_ListBackupSchedules_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the list_backup_schedules call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backup_schedules. +# +def list_backup_schedules + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new + + # Call the list_backup_schedules method. + result = client.list_backup_schedules request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_ListBackupSchedules_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backups.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backups.rb new file mode 100644 index 000000000000..d1fae2168425 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backups.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 firestore_v1_generated_FirestoreAdmin_ListBackups_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the list_backups call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backups. +# +def list_backups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new + + # Call the list_backups method. + result = client.list_backups request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupsResponse. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_databases.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_databases.rb new file mode 100644 index 000000000000..19fba0fdfa95 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_databases.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 firestore_v1_generated_FirestoreAdmin_ListDatabases_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the list_databases call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_databases. +# +def list_databases + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new + + # Call the list_databases method. + result = client.list_databases request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_ListDatabases_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_fields.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_fields.rb new file mode 100644 index 000000000000..a6ea7f313b6c --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_fields.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 firestore_v1_generated_FirestoreAdmin_ListFields_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the list_fields call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields. +# +def list_fields + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new + + # Call the list_fields method. + result = client.list_fields request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Field. + p item + end +end +# [END firestore_v1_generated_FirestoreAdmin_ListFields_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_indexes.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_indexes.rb new file mode 100644 index 000000000000..3438feca8085 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_indexes.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 firestore_v1_generated_FirestoreAdmin_ListIndexes_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the list_indexes call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes. +# +def list_indexes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new + + # Call the list_indexes method. + result = client.list_indexes request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Index. + p item + end +end +# [END firestore_v1_generated_FirestoreAdmin_ListIndexes_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_user_creds.rb new file mode 100644 index 000000000000..2d850bc1773e --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_user_creds.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 firestore_v1_generated_FirestoreAdmin_ListUserCreds_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the list_user_creds call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_user_creds. +# +def list_user_creds + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new + + # Call the list_user_creds method. + result = client.list_user_creds request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_ListUserCreds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/reset_user_password.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/reset_user_password.rb new file mode 100644 index 000000000000..df78cf028233 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/reset_user_password.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 firestore_v1_generated_FirestoreAdmin_ResetUserPassword_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the reset_user_password call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#reset_user_password. +# +def reset_user_password + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new + + # Call the reset_user_password method. + result = client.reset_user_password request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_ResetUserPassword_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/restore_database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/restore_database.rb new file mode 100644 index 000000000000..18b4bc584eaa --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/restore_database.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 firestore_v1_generated_FirestoreAdmin_RestoreDatabase_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the restore_database call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#restore_database. +# +def restore_database + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new + + # Call the restore_database method. + result = client.restore_database request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 firestore_v1_generated_FirestoreAdmin_RestoreDatabase_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_backup_schedule.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_backup_schedule.rb new file mode 100644 index 000000000000..190273262c47 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_backup_schedule.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 firestore_v1_generated_FirestoreAdmin_UpdateBackupSchedule_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the update_backup_schedule call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_backup_schedule. +# +def update_backup_schedule + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new + + # Call the update_backup_schedule method. + result = client.update_backup_schedule request + + # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. + p result +end +# [END firestore_v1_generated_FirestoreAdmin_UpdateBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_database.rb new file mode 100644 index 000000000000..11ac0b76a38b --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_database.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 firestore_v1_generated_FirestoreAdmin_UpdateDatabase_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the update_database call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_database. +# +def update_database + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new + + # Call the update_database method. + result = client.update_database request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 firestore_v1_generated_FirestoreAdmin_UpdateDatabase_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_field.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_field.rb new file mode 100644 index 000000000000..a1023f2c2fe4 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_field.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 firestore_v1_generated_FirestoreAdmin_UpdateField_sync] +require "google/cloud/firestore/admin/v1" + +## +# Snippet for the update_field call in the FirestoreAdmin service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_field. +# +def update_field + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new + + # Call the update_field method. + result = client.update_field request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 firestore_v1_generated_FirestoreAdmin_UpdateField_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json new file mode 100644 index 000000000000..8837190d2735 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json @@ -0,0 +1,1295 @@ +{ + "client_library": { + "name": "google-cloud-firestore-admin-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.firestore.admin.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_CreateIndex_sync", + "title": "Snippet for the create_index call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_index.", + "file": "firestore_admin/create_index.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_index", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_index", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "CreateIndex", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.CreateIndex", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_ListIndexes_sync", + "title": "Snippet for the list_indexes call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes.", + "file": "firestore_admin/list_indexes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_indexes", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "ListIndexes", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.ListIndexes", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_GetIndex_sync", + "title": "Snippet for the get_index call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_index.", + "file": "firestore_admin/get_index.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_index", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_index", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::GetIndexRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::Index", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "GetIndex", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.GetIndex", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync", + "title": "Snippet for the delete_index call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_index.", + "file": "firestore_admin/delete_index.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_index", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_index", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "DeleteIndex", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.DeleteIndex", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_GetField_sync", + "title": "Snippet for the get_field call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_field.", + "file": "firestore_admin/get_field.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_field", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_field", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::GetFieldRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::Field", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "GetField", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.GetField", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_UpdateField_sync", + "title": "Snippet for the update_field call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_field.", + "file": "firestore_admin/update_field.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_field", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_field", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "UpdateField", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.UpdateField", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_ListFields_sync", + "title": "Snippet for the list_fields call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields.", + "file": "firestore_admin/list_fields.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_fields", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "ListFields", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.ListFields", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync", + "title": "Snippet for the export_documents call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#export_documents.", + "file": "firestore_admin/export_documents.rb", + "language": "RUBY", + "client_method": { + "short_name": "export_documents", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#export_documents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "ExportDocuments", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.ExportDocuments", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync", + "title": "Snippet for the import_documents call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#import_documents.", + "file": "firestore_admin/import_documents.rb", + "language": "RUBY", + "client_method": { + "short_name": "import_documents", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#import_documents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "ImportDocuments", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.ImportDocuments", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync", + "title": "Snippet for the bulk_delete_documents call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#bulk_delete_documents.", + "file": "firestore_admin/bulk_delete_documents.rb", + "language": "RUBY", + "client_method": { + "short_name": "bulk_delete_documents", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#bulk_delete_documents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "BulkDeleteDocuments", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_CreateDatabase_sync", + "title": "Snippet for the create_database call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database.", + "file": "firestore_admin/create_database.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_database", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "CreateDatabase", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.CreateDatabase", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_GetDatabase_sync", + "title": "Snippet for the get_database call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_database.", + "file": "firestore_admin/get_database.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_database", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_database", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::Database", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "GetDatabase", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.GetDatabase", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_ListDatabases_sync", + "title": "Snippet for the list_databases call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_databases.", + "file": "firestore_admin/list_databases.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_databases", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_databases", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "ListDatabases", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.ListDatabases", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_UpdateDatabase_sync", + "title": "Snippet for the update_database call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_database.", + "file": "firestore_admin/update_database.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_database", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_database", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "UpdateDatabase", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.UpdateDatabase", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_DeleteDatabase_sync", + "title": "Snippet for the delete_database call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_database.", + "file": "firestore_admin/delete_database.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_database", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_database", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "DeleteDatabase", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.DeleteDatabase", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_CreateUserCreds_sync", + "title": "Snippet for the create_user_creds call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_user_creds.", + "file": "firestore_admin/create_user_creds.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_user_creds", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_user_creds", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::UserCreds", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "CreateUserCreds", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.CreateUserCreds", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_GetUserCreds_sync", + "title": "Snippet for the get_user_creds call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_user_creds.", + "file": "firestore_admin/get_user_creds.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_user_creds", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_user_creds", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::UserCreds", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "GetUserCreds", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.GetUserCreds", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_ListUserCreds_sync", + "title": "Snippet for the list_user_creds call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_user_creds.", + "file": "firestore_admin/list_user_creds.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_user_creds", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_user_creds", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "ListUserCreds", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.ListUserCreds", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_EnableUserCreds_sync", + "title": "Snippet for the enable_user_creds call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#enable_user_creds.", + "file": "firestore_admin/enable_user_creds.rb", + "language": "RUBY", + "client_method": { + "short_name": "enable_user_creds", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#enable_user_creds", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::UserCreds", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "EnableUserCreds", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.EnableUserCreds", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_DisableUserCreds_sync", + "title": "Snippet for the disable_user_creds call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#disable_user_creds.", + "file": "firestore_admin/disable_user_creds.rb", + "language": "RUBY", + "client_method": { + "short_name": "disable_user_creds", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#disable_user_creds", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::UserCreds", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "DisableUserCreds", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.DisableUserCreds", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_ResetUserPassword_sync", + "title": "Snippet for the reset_user_password call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#reset_user_password.", + "file": "firestore_admin/reset_user_password.rb", + "language": "RUBY", + "client_method": { + "short_name": "reset_user_password", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#reset_user_password", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::UserCreds", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "ResetUserPassword", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.ResetUserPassword", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_DeleteUserCreds_sync", + "title": "Snippet for the delete_user_creds call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_user_creds.", + "file": "firestore_admin/delete_user_creds.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_user_creds", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_user_creds", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "DeleteUserCreds", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.DeleteUserCreds", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_GetBackup_sync", + "title": "Snippet for the get_backup call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup.", + "file": "firestore_admin/get_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::GetBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::Backup", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "GetBackup", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.GetBackup", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_ListBackups_sync", + "title": "Snippet for the list_backups call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backups.", + "file": "firestore_admin/list_backups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backups", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "ListBackups", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.ListBackups", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_DeleteBackup_sync", + "title": "Snippet for the delete_backup call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup.", + "file": "firestore_admin/delete_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "DeleteBackup", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.DeleteBackup", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_RestoreDatabase_sync", + "title": "Snippet for the restore_database call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#restore_database.", + "file": "firestore_admin/restore_database.rb", + "language": "RUBY", + "client_method": { + "short_name": "restore_database", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#restore_database", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "RestoreDatabase", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.RestoreDatabase", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_CreateBackupSchedule_sync", + "title": "Snippet for the create_backup_schedule call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_backup_schedule.", + "file": "firestore_admin/create_backup_schedule.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup_schedule", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_backup_schedule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::BackupSchedule", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "CreateBackupSchedule", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.CreateBackupSchedule", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_GetBackupSchedule_sync", + "title": "Snippet for the get_backup_schedule call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup_schedule.", + "file": "firestore_admin/get_backup_schedule.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_schedule", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup_schedule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::BackupSchedule", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "GetBackupSchedule", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.GetBackupSchedule", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_ListBackupSchedules_sync", + "title": "Snippet for the list_backup_schedules call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backup_schedules.", + "file": "firestore_admin/list_backup_schedules.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_schedules", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backup_schedules", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "ListBackupSchedules", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.ListBackupSchedules", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_UpdateBackupSchedule_sync", + "title": "Snippet for the update_backup_schedule call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_backup_schedule.", + "file": "firestore_admin/update_backup_schedule.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_schedule", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_backup_schedule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::Admin::V1::BackupSchedule", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "UpdateBackupSchedule", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.UpdateBackupSchedule", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_DeleteBackupSchedule_sync", + "title": "Snippet for the delete_backup_schedule call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup_schedule.", + "file": "firestore_admin/delete_backup_schedule.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup_schedule", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup_schedule", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "DeleteBackupSchedule", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.DeleteBackupSchedule", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_FirestoreAdmin_CloneDatabase_sync", + "title": "Snippet for the clone_database call in the FirestoreAdmin service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#clone_database.", + "file": "firestore_admin/clone_database.rb", + "language": "RUBY", + "client_method": { + "short_name": "clone_database", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#clone_database", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FirestoreAdmin::Client", + "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" + }, + "method": { + "short_name": "CloneDatabase", + "full_name": "google.firestore.admin.v1.FirestoreAdmin.CloneDatabase", + "service": { + "short_name": "FirestoreAdmin", + "full_name": "google.firestore.admin.v1.FirestoreAdmin" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_operations_test.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_operations_test.rb new file mode 100644 index 000000000000..e35067220aca --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_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/firestore/admin/v1/firestore_admin_pb" +require "google/firestore/admin/v1/firestore_admin_services_pb" +require "google/cloud/firestore/admin/v1/firestore_admin" + +class ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_paths_test.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_paths_test.rb new file mode 100644 index 000000000000..b432f6211d22 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_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/firestore/admin/v1/firestore_admin" + +class ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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_backup_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_path project: "value0", location: "value1", backup: "value2" + assert_equal "projects/value0/locations/value1/backups/value2", path + end + end + + def test_backup_schedule_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_schedule_path project: "value0", database: "value1", backup_schedule: "value2" + assert_equal "projects/value0/databases/value1/backupSchedules/value2", path + end + end + + def test_collection_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::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.collection_group_path project: "value0", database: "value1", collection: "value2" + assert_equal "projects/value0/databases/value1/collectionGroups/value2", path + end + end + + def test_database_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.database_path project: "value0", database: "value1" + assert_equal "projects/value0/databases/value1", path + end + end + + def test_field_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.field_path project: "value0", database: "value1", collection: "value2", field: "value3" + assert_equal "projects/value0/databases/value1/collectionGroups/value2/fields/value3", path + end + end + + def test_index_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.index_path project: "value0", database: "value1", collection: "value2", index: "value3" + assert_equal "projects/value0/databases/value1/collectionGroups/value2/indexes/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::Firestore::Admin::V1::FirestoreAdmin::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_operation_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.operation_path project: "value0", database: "value1", operation: "value2" + assert_equal "projects/value0/databases/value1/operations/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::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.project_path project: "value0" + assert_equal "projects/value0", path + end + end + + def test_user_creds_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.user_creds_path project: "value0", database: "value1", user_creds: "value2" + assert_equal "projects/value0/databases/value1/userCreds/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb new file mode 100644 index 000000000000..c2fd8d735cb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb @@ -0,0 +1,1862 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/admin/v1/firestore_admin_pb" +require "google/cloud/firestore/admin/v1/firestore_admin/rest" + + +class ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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_index + # 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" + index = {} + + create_index_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_create_index_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_index_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_index({ parent: parent, index: index }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_index parent: parent, index: index do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_index ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new(parent: parent, index: index) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_index({ parent: parent, index: index }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_index(::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new(parent: parent, index: index), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_index_client_stub.call_count + end + end + end + + def test_list_indexes + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse.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" + + list_indexes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_list_indexes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_indexes_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_indexes({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_indexes parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_indexes ::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new(parent: parent, filter: filter, 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_indexes({ parent: parent, filter: filter, 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_indexes(::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new(parent: parent, filter: filter, 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_indexes_client_stub.call_count + end + end + end + + def test_get_index + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::Index.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_index_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_get_index_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_index_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_index({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_index name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_index ::Google::Cloud::Firestore::Admin::V1::GetIndexRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_index({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_index(::Google::Cloud::Firestore::Admin::V1::GetIndexRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_index_client_stub.call_count + end + end + end + + def test_delete_index + # 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_index_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_delete_index_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_index_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_index({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_index name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_index ::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_index({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_index(::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_index_client_stub.call_count + end + end + end + + def test_get_field + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::Field.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_field_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_get_field_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_field_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_field({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_field name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_field ::Google::Cloud::Firestore::Admin::V1::GetFieldRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_field({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_field(::Google::Cloud::Firestore::Admin::V1::GetFieldRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_field_client_stub.call_count + end + end + end + + def test_update_field + # 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. + field = {} + update_mask = {} + + update_field_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_update_field_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_field_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_field({ field: field, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_field field: field, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_field ::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new(field: field, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_field({ field: field, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_field(::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new(field: field, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_field_client_stub.call_count + end + end + end + + def test_list_fields + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse.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" + + list_fields_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_list_fields_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_fields_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_fields({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_fields parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_fields ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new(parent: parent, filter: filter, 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_fields({ parent: parent, filter: filter, 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_fields(::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new(parent: parent, filter: filter, 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_fields_client_stub.call_count + end + end + end + + def test_export_documents + # 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" + collection_ids = ["hello world"] + output_uri_prefix = "hello world" + namespace_ids = ["hello world"] + snapshot_time = {} + + export_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_export_documents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, export_documents_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.export_documents({ name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.export_documents name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.export_documents ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new(name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.export_documents({ name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.export_documents(::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new(name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, export_documents_client_stub.call_count + end + end + end + + def test_import_documents + # 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" + collection_ids = ["hello world"] + input_uri_prefix = "hello world" + namespace_ids = ["hello world"] + + import_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_import_documents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, import_documents_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.import_documents({ name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.import_documents name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.import_documents ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new(name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.import_documents({ name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.import_documents(::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new(name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, import_documents_client_stub.call_count + end + end + end + + def test_bulk_delete_documents + # 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" + collection_ids = ["hello world"] + namespace_ids = ["hello world"] + + bulk_delete_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_bulk_delete_documents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, bulk_delete_documents_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.bulk_delete_documents({ name: name, collection_ids: collection_ids, namespace_ids: namespace_ids }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.bulk_delete_documents name: name, collection_ids: collection_ids, namespace_ids: namespace_ids do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.bulk_delete_documents ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new(name: name, collection_ids: collection_ids, namespace_ids: namespace_ids) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.bulk_delete_documents({ name: name, collection_ids: collection_ids, namespace_ids: namespace_ids }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.bulk_delete_documents(::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new(name: name, collection_ids: collection_ids, namespace_ids: namespace_ids), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, bulk_delete_documents_client_stub.call_count + end + end + end + + def test_create_database + # 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" + database = {} + database_id = "hello world" + + create_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_create_database_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_database({ parent: parent, database: database, database_id: database_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_database parent: parent, database: database, database_id: database_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_database ::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new(parent: parent, database: database, database_id: database_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_database({ parent: parent, database: database, database_id: database_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_database(::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new(parent: parent, database: database, database_id: database_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_database_client_stub.call_count + end + end + end + + def test_get_database + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::Database.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_get_database_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_database({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_database name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_database ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_database({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_database(::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_database_client_stub.call_count + end + end + end + + def test_list_databases + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + show_deleted = true + + list_databases_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_list_databases_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_databases_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_databases({ parent: parent, show_deleted: show_deleted }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_databases parent: parent, show_deleted: show_deleted do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_databases ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new(parent: parent, show_deleted: show_deleted) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_databases({ parent: parent, show_deleted: show_deleted }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_databases(::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new(parent: parent, show_deleted: show_deleted), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_databases_client_stub.call_count + end + end + end + + def test_update_database + # 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. + database = {} + update_mask = {} + + update_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_update_database_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_database({ database: database, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_database database: database, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_database ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new(database: database, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_database({ database: database, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_database(::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new(database: database, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_database_client_stub.call_count + end + end + end + + def test_delete_database + # 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_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_delete_database_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_database({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_database name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_database ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_database({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_database(::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.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_database_client_stub.call_count + end + end + end + + def test_create_user_creds + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + user_creds = {} + user_creds_id = "hello world" + + create_user_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_create_user_creds_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_user_creds_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_user_creds({ parent: parent, user_creds: user_creds, user_creds_id: user_creds_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_user_creds parent: parent, user_creds: user_creds, user_creds_id: user_creds_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_user_creds ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new(parent: parent, user_creds: user_creds, user_creds_id: user_creds_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_user_creds({ parent: parent, user_creds: user_creds, user_creds_id: user_creds_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_user_creds(::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new(parent: parent, user_creds: user_creds, user_creds_id: user_creds_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_user_creds_client_stub.call_count + end + end + end + + def test_get_user_creds + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_user_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_get_user_creds_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_user_creds_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_user_creds({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_user_creds name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_user_creds ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_user_creds({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_user_creds(::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_user_creds_client_stub.call_count + end + end + end + + def test_list_user_creds + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_user_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_list_user_creds_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_user_creds_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_user_creds({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_user_creds parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_user_creds ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_user_creds({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_user_creds(::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_user_creds_client_stub.call_count + end + end + end + + def test_enable_user_creds + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_user_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_enable_user_creds_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, enable_user_creds_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.enable_user_creds({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.enable_user_creds name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.enable_user_creds ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.enable_user_creds({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.enable_user_creds(::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, enable_user_creds_client_stub.call_count + end + end + end + + def test_disable_user_creds + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + disable_user_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_disable_user_creds_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, disable_user_creds_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.disable_user_creds({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.disable_user_creds name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.disable_user_creds ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.disable_user_creds({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.disable_user_creds(::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, disable_user_creds_client_stub.call_count + end + end + end + + def test_reset_user_password + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + reset_user_password_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_reset_user_password_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, reset_user_password_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.reset_user_password({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.reset_user_password name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.reset_user_password ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.reset_user_password({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.reset_user_password(::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, reset_user_password_client_stub.call_count + end + end + end + + def test_delete_user_creds + # 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_user_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_delete_user_creds_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_user_creds_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_user_creds({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_user_creds name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_user_creds ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_user_creds({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_user_creds(::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_user_creds_client_stub.call_count + end + end + end + + def test_get_backup + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::Backup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup ::Google::Cloud::Firestore::Admin::V1::GetBackupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup(::Google::Cloud::Firestore::Admin::V1::GetBackupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_client_stub.call_count + end + end + end + + def test_list_backups + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse.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" + + list_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backups({ parent: parent, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backups parent: parent, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backups ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backups({ parent: parent, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backups(::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backups_client_stub.call_count + end + end + end + + def test_delete_backup + # 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_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup ::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup(::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_client_stub.call_count + end + end + end + + def test_restore_database + # 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" + database_id = "hello world" + backup = "hello world" + encryption_config = {} + tags = {} + + restore_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_restore_database_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, restore_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.restore_database parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.restore_database ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.restore_database(::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, restore_database_client_stub.call_count + end + end + end + + def test_create_backup_schedule + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_schedule = {} + + create_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_create_backup_schedule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_schedule_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_backup_schedule({ parent: parent, backup_schedule: backup_schedule }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_backup_schedule parent: parent, backup_schedule: backup_schedule do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_backup_schedule ::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule: backup_schedule) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_backup_schedule({ parent: parent, backup_schedule: backup_schedule }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_backup_schedule(::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule: backup_schedule), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_schedule_client_stub.call_count + end + end + end + + def test_get_backup_schedule + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_get_backup_schedule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_schedule_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_schedule({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_schedule name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_schedule ::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_schedule({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_schedule(::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_schedule_client_stub.call_count + end + end + end + + def test_list_backup_schedules + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_backup_schedules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_list_backup_schedules_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_schedules_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_schedules({ parent: parent }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backup_schedules parent: parent do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backup_schedules ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new(parent: parent) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backup_schedules({ parent: parent }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backup_schedules(::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new(parent: parent), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backup_schedules_client_stub.call_count + end + end + end + + def test_update_backup_schedule + # Create test objects. + client_result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + backup_schedule = {} + update_mask = {} + + update_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_update_backup_schedule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_schedule_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup_schedule backup_schedule: backup_schedule, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup_schedule ::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup_schedule(::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_schedule_client_stub.call_count + end + end + end + + def test_delete_backup_schedule + # 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_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_delete_backup_schedule_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_schedule_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup_schedule({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup_schedule name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup_schedule ::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup_schedule({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup_schedule(::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_schedule_client_stub.call_count + end + end + end + + def test_clone_database + # 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" + database_id = "hello world" + pitr_snapshot = {} + encryption_config = {} + tags = {} + + clone_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_clone_database_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, clone_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.clone_database({ parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.clone_database parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.clone_database ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new(parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.clone_database({ parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.clone_database(::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new(parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, clone_database_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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb new file mode 100644 index 000000000000..802c5ac9c59b --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb @@ -0,0 +1,2104 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/admin/v1/firestore_admin_pb" +require "google/cloud/firestore/admin/v1/firestore_admin" + +class ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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_index + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + index = {} + + create_index_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_index, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Index), request["index"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_index_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_index({ parent: parent, index: index }) do |response, 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_index parent: parent, index: index do |response, 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_index ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new(parent: parent, index: index) do |response, operation| + assert_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_index({ parent: parent, index: index }, grpc_options) do |response, operation| + assert_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_index(::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new(parent: parent, index: index), grpc_options) do |response, operation| + assert_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_index_client_stub.call_rpc_count + end + end + + def test_list_indexes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + list_indexes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_indexes, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_indexes_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_indexes({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_indexes parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_indexes ::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_indexes({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_indexes(::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_indexes_client_stub.call_rpc_count + end + end + + def test_get_index + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::Index.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_index_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_index, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::GetIndexRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_index_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_index({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_index name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_index ::Google::Cloud::Firestore::Admin::V1::GetIndexRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_index({ 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_index(::Google::Cloud::Firestore::Admin::V1::GetIndexRequest.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_index_client_stub.call_rpc_count + end + end + + def test_delete_index + # 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_index_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_index, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_index_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_index({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_index name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_index ::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_index({ 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_index(::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.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_index_client_stub.call_rpc_count + end + end + + def test_get_field + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::Field.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_field_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_field, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::GetFieldRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_field_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_field({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_field name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_field ::Google::Cloud::Firestore::Admin::V1::GetFieldRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_field({ 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_field(::Google::Cloud::Firestore::Admin::V1::GetFieldRequest.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_field_client_stub.call_rpc_count + end + end + + def test_update_field + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + field = {} + update_mask = {} + + update_field_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_field, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Field), request["field"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_field_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_field({ field: field, 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_field field: field, 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_field ::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new(field: field, 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_field({ field: field, 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_field(::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new(field: field, 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_field_client_stub.call_rpc_count + end + end + + def test_list_fields + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + list_fields_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_fields, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, 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"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_fields_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_fields({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_fields parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_fields ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_fields({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_fields(::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| + assert_kind_of Gapic::PagedEnumerable, response + assert_equal grpc_response, response.response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_fields_client_stub.call_rpc_count + end + end + + def test_export_documents + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + collection_ids = ["hello world"] + output_uri_prefix = "hello world" + namespace_ids = ["hello world"] + snapshot_time = {} + + export_documents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :export_documents, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["collection_ids"] + assert_equal "hello world", request["output_uri_prefix"] + assert_equal ["hello world"], request["namespace_ids"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["snapshot_time"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, export_documents_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.export_documents({ name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.export_documents name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.export_documents ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new(name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.export_documents({ name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.export_documents(::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new(name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, export_documents_client_stub.call_rpc_count + end + end + + def test_import_documents + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + collection_ids = ["hello world"] + input_uri_prefix = "hello world" + namespace_ids = ["hello world"] + + import_documents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :import_documents, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["collection_ids"] + assert_equal "hello world", request["input_uri_prefix"] + assert_equal ["hello world"], request["namespace_ids"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, import_documents_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.import_documents({ name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.import_documents name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.import_documents ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new(name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.import_documents({ name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.import_documents(::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new(name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, import_documents_client_stub.call_rpc_count + end + end + + def test_bulk_delete_documents + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + collection_ids = ["hello world"] + namespace_ids = ["hello world"] + + bulk_delete_documents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :bulk_delete_documents, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest, request + assert_equal "hello world", request["name"] + assert_equal ["hello world"], request["collection_ids"] + assert_equal ["hello world"], request["namespace_ids"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, bulk_delete_documents_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.bulk_delete_documents({ name: name, collection_ids: collection_ids, namespace_ids: namespace_ids }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.bulk_delete_documents name: name, collection_ids: collection_ids, namespace_ids: namespace_ids do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.bulk_delete_documents ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new(name: name, collection_ids: collection_ids, namespace_ids: namespace_ids) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.bulk_delete_documents({ name: name, collection_ids: collection_ids, namespace_ids: namespace_ids }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.bulk_delete_documents(::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new(name: name, collection_ids: collection_ids, namespace_ids: namespace_ids), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, bulk_delete_documents_client_stub.call_rpc_count + end + end + + def test_create_database + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + database = {} + database_id = "hello world" + + create_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_database, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Database), request["database"] + assert_equal "hello world", request["database_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_database({ parent: parent, database: database, database_id: database_id }) do |response, 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_database parent: parent, database: database, database_id: database_id do |response, 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_database ::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new(parent: parent, database: database, database_id: database_id) do |response, operation| + assert_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_database({ parent: parent, database: database, database_id: database_id }, grpc_options) do |response, operation| + assert_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_database(::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new(parent: parent, database: database, database_id: database_id), grpc_options) do |response, operation| + assert_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_database_client_stub.call_rpc_count + end + end + + def test_get_database + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::Database.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_database, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_database({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_database name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_database ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_database({ 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_database(::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.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_database_client_stub.call_rpc_count + end + end + + def test_list_databases + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + show_deleted = true + + list_databases_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_databases, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest, request + assert_equal "hello world", request["parent"] + assert_equal true, request["show_deleted"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_databases_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_databases({ parent: parent, show_deleted: show_deleted }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_databases parent: parent, show_deleted: show_deleted do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_databases ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new(parent: parent, show_deleted: show_deleted) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_databases({ parent: parent, show_deleted: show_deleted }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_databases(::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new(parent: parent, show_deleted: show_deleted), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_databases_client_stub.call_rpc_count + end + end + + def test_update_database + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + database = {} + update_mask = {} + + update_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_database, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Database), request["database"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_database({ database: database, 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_database database: database, 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_database ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new(database: database, 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_database({ database: database, 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_database(::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new(database: database, 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_database_client_stub.call_rpc_count + end + end + + def test_delete_database + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_database, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_database({ 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_database 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_database ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.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_database({ 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_database(::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.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_database_client_stub.call_rpc_count + end + end + + def test_create_user_creds + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + user_creds = {} + user_creds_id = "hello world" + + create_user_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_user_creds, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::UserCreds), request["user_creds"] + assert_equal "hello world", request["user_creds_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_user_creds_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_user_creds({ parent: parent, user_creds: user_creds, user_creds_id: user_creds_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_user_creds parent: parent, user_creds: user_creds, user_creds_id: user_creds_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_user_creds ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new(parent: parent, user_creds: user_creds, user_creds_id: user_creds_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_user_creds({ parent: parent, user_creds: user_creds, user_creds_id: user_creds_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_user_creds(::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new(parent: parent, user_creds: user_creds, user_creds_id: user_creds_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_user_creds_client_stub.call_rpc_count + end + end + + def test_get_user_creds + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_user_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_user_creds, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_user_creds_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_user_creds({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_user_creds name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_user_creds ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_user_creds({ 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_user_creds(::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.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_user_creds_client_stub.call_rpc_count + end + end + + def test_list_user_creds + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_user_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_user_creds, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_user_creds_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_user_creds({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_user_creds parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_user_creds ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_user_creds({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_user_creds(::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_user_creds_client_stub.call_rpc_count + end + end + + def test_enable_user_creds + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + enable_user_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :enable_user_creds, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, enable_user_creds_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.enable_user_creds({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.enable_user_creds name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.enable_user_creds ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.enable_user_creds({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.enable_user_creds(::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.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, enable_user_creds_client_stub.call_rpc_count + end + end + + def test_disable_user_creds + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + disable_user_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :disable_user_creds, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, disable_user_creds_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.disable_user_creds({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.disable_user_creds name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.disable_user_creds ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.disable_user_creds({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.disable_user_creds(::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.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, disable_user_creds_client_stub.call_rpc_count + end + end + + def test_reset_user_password + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + reset_user_password_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :reset_user_password, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, reset_user_password_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.reset_user_password({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.reset_user_password name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.reset_user_password ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.reset_user_password({ name: name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.reset_user_password(::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.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, reset_user_password_client_stub.call_rpc_count + end + end + + def test_delete_user_creds + # 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_user_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_user_creds, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_user_creds_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_user_creds({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_user_creds name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_user_creds ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_user_creds({ 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_user_creds(::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.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_user_creds_client_stub.call_rpc_count + end + end + + def test_get_backup + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::Backup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::GetBackupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup ::Google::Cloud::Firestore::Admin::V1::GetBackupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup({ 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_backup(::Google::Cloud::Firestore::Admin::V1::GetBackupRequest.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_backup_client_stub.call_rpc_count + end + end + + def test_list_backups + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backups, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backups_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backups({ parent: parent, filter: filter }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_backups parent: parent, filter: filter do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_backups ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent, filter: filter) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_backups({ parent: parent, filter: filter }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_backups(::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent, filter: filter), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backups_client_stub.call_rpc_count + end + end + + def test_delete_backup + # 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_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_backup name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_backup ::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_backup({ 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_backup(::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.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_backup_client_stub.call_rpc_count + end + end + + def test_restore_database + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + database_id = "hello world" + backup = "hello world" + encryption_config = {} + tags = {} + + restore_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :restore_database, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["database_id"] + assert_equal "hello world", request["backup"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig), request["encryption_config"] + assert_equal({}, request["tags"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, restore_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.restore_database parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.restore_database ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.restore_database(::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, restore_database_client_stub.call_rpc_count + end + end + + def test_create_backup_schedule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_schedule = {} + + create_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup_schedule, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::BackupSchedule), request["backup_schedule"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_schedule_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_backup_schedule({ parent: parent, backup_schedule: backup_schedule }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_backup_schedule parent: parent, backup_schedule: backup_schedule do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_backup_schedule ::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule: backup_schedule) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_backup_schedule({ parent: parent, backup_schedule: backup_schedule }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_backup_schedule(::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule: backup_schedule), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_backup_schedule_client_stub.call_rpc_count + end + end + + def test_get_backup_schedule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_schedule, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_schedule_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_schedule({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_schedule name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_schedule ::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_schedule({ 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_backup_schedule(::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.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_backup_schedule_client_stub.call_rpc_count + end + end + + def test_list_backup_schedules + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + + list_backup_schedules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_schedules, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest, request + assert_equal "hello world", request["parent"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backup_schedules_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backup_schedules({ parent: parent }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_backup_schedules parent: parent do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_backup_schedules ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new(parent: parent) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_backup_schedules({ parent: parent }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_backup_schedules(::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new(parent: parent), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_backup_schedules_client_stub.call_rpc_count + end + end + + def test_update_backup_schedule + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + backup_schedule = {} + update_mask = {} + + update_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_schedule, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::BackupSchedule), request["backup_schedule"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_schedule_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_backup_schedule backup_schedule: backup_schedule, update_mask: update_mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_backup_schedule ::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, 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_backup_schedule({ backup_schedule: backup_schedule, 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_backup_schedule(::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, 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_backup_schedule_client_stub.call_rpc_count + end + end + + def test_delete_backup_schedule + # 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_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup_schedule, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_schedule_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup_schedule({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_backup_schedule name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_backup_schedule ::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_backup_schedule({ 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_backup_schedule(::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.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_backup_schedule_client_stub.call_rpc_count + end + end + + def test_clone_database + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + database_id = "hello world" + pitr_snapshot = {} + encryption_config = {} + tags = {} + + clone_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :clone_database, name + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["database_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::PitrSnapshot), request["pitr_snapshot"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig), request["encryption_config"] + assert_equal({}, request["tags"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, clone_database_client_stub do + # Create client + client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.clone_database({ parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.clone_database parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.clone_database ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new(parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.clone_database({ parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.clone_database(::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new(parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, clone_database_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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/test/helper.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-firestore-admin/.gitignore b/owl-bot-staging/google-cloud-firestore-admin/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/.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-firestore-admin/.repo-metadata.json b/owl-bot-staging/google-cloud-firestore-admin/.repo-metadata.json new file mode 100644 index 000000000000..5d4b0e1335ab --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "firestore.googleapis.com", + "api_shortname": "firestore", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin/latest", + "distribution_name": "google-cloud-firestore-admin", + "is_cloud": true, + "language": "ruby", + "name": "firestore", + "name_pretty": "Cloud Firestore Admin API", + "product_documentation": "https://cloud.google.com/firestore", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development.", + "ruby-cloud-env-prefix": "FIRESTORE", + "ruby-cloud-product-url": "https://cloud.google.com/firestore", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-firestore-admin/.rubocop.yml b/owl-bot-staging/google-cloud-firestore-admin/.rubocop.yml new file mode 100644 index 000000000000..d578d69a5ee7 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-firestore-admin.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-firestore-admin.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-firestore-admin/.toys.rb b/owl-bot-staging/google-cloud-firestore-admin/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/.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-firestore-admin/.yardopts b/owl-bot-staging/google-cloud-firestore-admin/.yardopts new file mode 100644 index 000000000000..5fedc380c4b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Cloud Firestore Admin API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-firestore-admin/AUTHENTICATION.md b/owl-bot-staging/google-cloud-firestore-admin/AUTHENTICATION.md new file mode 100644 index 000000000000..3477215a6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-firestore-admin 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-firestore-admin 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/firestore/admin" + +client = Google::Cloud::Firestore::Admin.firestore_admin do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/firestore/admin" + +Google::Cloud::Firestore::Admin.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Firestore::Admin.firestore_admin +``` + +### 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-firestore-admin +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/firestore/admin" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Firestore::Admin.firestore_admin +``` + +### 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-firestore-admin/CHANGELOG.md b/owl-bot-staging/google-cloud-firestore-admin/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-firestore-admin/Gemfile b/owl-bot-staging/google-cloud-firestore-admin/Gemfile new file mode 100644 index 000000000000..fdcff34a6bfc --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-firestore-admin-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-firestore-admin.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-firestore-admin/LICENSE.md b/owl-bot-staging/google-cloud-firestore-admin/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/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-firestore-admin/README.md b/owl-bot-staging/google-cloud-firestore-admin/README.md new file mode 100644 index 000000000000..869363f67725 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Cloud Firestore Admin API + +API Client library for the Cloud Firestore Admin API + +Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-firestore-admin-v*`. +The gem `google-cloud-firestore-admin` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin/latest) +for this library, google-cloud-firestore-admin, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-firestore-admin-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/firestore) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-firestore-admin +``` + +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/firestore.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/firestore/admin" + +client = Google::Cloud::Firestore::Admin.firestore_admin +request = ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new # (request fields as keyword arguments...) +response = client.create_index request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-firestore-admin-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin-v1/latest). + +## 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-firestore-admin`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-firestore-admin-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-firestore-admin`. +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-firestore-admin-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-firestore-admin/Rakefile b/owl-bot-staging/google-cloud-firestore-admin/Rakefile new file mode 100644 index 000000000000..9ac2e661bd76 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/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 = true +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-firestore-admin acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["FIRESTORE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["FIRESTORE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["FIRESTORE_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 FIRESTORE_TEST_PROJECT=test123 FIRESTORE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/firestore/admin/v1/firestore_admin/credentials" + ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["FIRESTORE_PROJECT"] = project + ENV["FIRESTORE_TEST_PROJECT"] = project + ENV["FIRESTORE_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-firestore-admin 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-firestore-admin 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-firestore-admin 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-firestore-admin gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-firestore-admin" + header "google-cloud-firestore-admin rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-firestore-admin yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-firestore-admin 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-firestore-admin 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-firestore-admin 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-firestore-admin/google-cloud-firestore-admin.gemspec b/owl-bot-staging/google-cloud-firestore-admin/google-cloud-firestore-admin.gemspec new file mode 100644 index 000000000000..a9be5c27a475 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/google-cloud-firestore-admin.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/firestore/admin/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-firestore-admin" + gem.version = Google::Cloud::Firestore::Admin::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development." + gem.summary = "API Client library for the Cloud Firestore Admin API" + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-firestore-admin-v1", ">= 0.14", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-firestore-admin/lib/google-cloud-firestore-admin.rb b/owl-bot-staging/google-cloud-firestore-admin/lib/google-cloud-firestore-admin.rb new file mode 100644 index 000000000000..7abf27599e3e --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/lib/google-cloud-firestore-admin.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/admin" unless defined? Google::Cloud::Firestore::Admin::VERSION diff --git a/owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin.rb b/owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin.rb new file mode 100644 index 000000000000..6f107e28ca38 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin.rb @@ -0,0 +1,185 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/firestore/admin/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :firestore_admin do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Firestore + module Admin + ## + # Create a new client object for FirestoreAdmin. + # + # By default, this returns an instance of + # [Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin-v1/latest/Google-Cloud-Firestore-Admin-V1-FirestoreAdmin-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the FirestoreAdmin service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the FirestoreAdmin service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Firestore::Admin.firestore_admin_available?}. + # + # ## About FirestoreAdmin + # + # The Cloud Firestore Admin API. + # + # This API provides several administrative services for Cloud Firestore. + # + # Project, Database, Namespace, Collection, Collection Group, and Document are + # used as defined in the Google Cloud Firestore API. + # + # Operation: An Operation represents work being performed in the background. + # + # The index service manages Cloud Firestore indexes. + # + # Index creation is performed asynchronously. + # An Operation resource is created for each such asynchronous operation. + # The state of the operation (including any errors encountered) + # may be queried via the Operation resource. + # + # The Operations collection provides a record of actions performed for the + # specified Project (including any Operations in progress). Operations are not + # created directly but through calls on other collections or resources. + # + # An Operation that is done may be deleted so that it is no longer listed as + # part of the Operation collection. Operations are garbage collected after + # 30 days. By default, ListOperations will only return in progress and failed + # operations. To list completed operation, issue a ListOperations request with + # the filter `done: true`. + # + # Operations are created by service `FirestoreAdmin`, but are accessed via + # service `google.longrunning.Operations`. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.firestore_admin version: :v1, transport: :grpc, &block + require "google/cloud/firestore/admin/#{version.to_s.downcase}" + + package_name = Google::Cloud::Firestore::Admin + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Firestore::Admin.const_get(package_name).const_get(:FirestoreAdmin) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the FirestoreAdmin service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Firestore::Admin.firestore_admin}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the FirestoreAdmin service, + # or if the versioned client gem needs an update to support the FirestoreAdmin service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.firestore_admin_available? version: :v1, transport: :grpc + require "google/cloud/firestore/admin/#{version.to_s.downcase}" + package_name = Google::Cloud::Firestore::Admin + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Firestore::Admin.const_get package_name + return false unless service_module.const_defined? :FirestoreAdmin + service_module = service_module.const_get :FirestoreAdmin + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-firestore-admin library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # 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 [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.firestore_admin if block_given? + + ::Google::Cloud.configure.firestore_admin + end + end + end + end +end + +helper_path = ::File.join __dir__, "admin", "helpers.rb" +require "google/cloud/firestore/admin/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin/version.rb b/owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin/version.rb new file mode 100644 index 000000000000..3727753d766a --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin/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 Firestore + module Admin + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/client_test.rb b/owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/client_test.rb new file mode 100644 index 000000000000..4cb98a6cc051 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 "google/cloud/firestore/admin" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Firestore::Admin::ClientConstructionMinitest < 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_firestore_admin_grpc + skip unless Google::Cloud::Firestore::Admin.firestore_admin_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Firestore::Admin.firestore_admin transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client, client + end + end + + def test_firestore_admin_rest + skip unless Google::Cloud::Firestore::Admin.firestore_admin_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Firestore::Admin.firestore_admin transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/version_test.rb b/owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/version_test.rb new file mode 100644 index 000000000000..21d044f6c489 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/version_test.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 "helper" +require "google/cloud/firestore/admin/version" + +class Google::Cloud::Firestore::Admin::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Firestore::Admin::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-firestore-admin/test/helper.rb b/owl-bot-staging/google-cloud-firestore-admin/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-admin/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-firestore-v1/.gitignore b/owl-bot-staging/google-cloud-firestore-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-firestore-v1/.repo-metadata.json new file mode 100644 index 000000000000..195e6cac6d41 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "firestore.googleapis.com", + "api_shortname": "firestore", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest", + "distribution_name": "google-cloud-firestore-v1", + "is_cloud": true, + "language": "ruby", + "name": "firestore", + "name_pretty": "Cloud Firestore V1 API", + "product_documentation": "https://cloud.google.com/firestore", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Note that google-cloud-firestore-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-firestore instead. See the readme for more details.", + "ruby-cloud-env-prefix": "FIRESTORE", + "ruby-cloud-product-url": "https://cloud.google.com/firestore", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-firestore-v1/.rubocop.yml b/owl-bot-staging/google-cloud-firestore-v1/.rubocop.yml new file mode 100644 index 000000000000..b39192458484 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-firestore-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-firestore-v1.rb" diff --git a/owl-bot-staging/google-cloud-firestore-v1/.toys.rb b/owl-bot-staging/google-cloud-firestore-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1/.yardopts b/owl-bot-staging/google-cloud-firestore-v1/.yardopts new file mode 100644 index 000000000000..3ca29a5a2e96 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Firestore 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-firestore-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-firestore-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..928670fe30c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-firestore-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-firestore-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/firestore/v1" + +client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/firestore/v1" + +::Google::Cloud::Firestore::V1::Firestore::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Firestore::V1::Firestore::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-firestore-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/firestore/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Firestore::V1::Firestore::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-firestore-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-firestore-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-firestore-v1/Gemfile b/owl-bot-staging/google-cloud-firestore-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-firestore-v1/LICENSE.md b/owl-bot-staging/google-cloud-firestore-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1/README.md b/owl-bot-staging/google-cloud-firestore-v1/README.md new file mode 100644 index 000000000000..f635e3ad0443 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Firestore V1 API + +Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development. + +Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Firestore V1 API. Most users should consider using +the main client gem, +[google-cloud-firestore](https://rubygems.org/gems/google-cloud-firestore). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-firestore-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/firestore.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/firestore/v1" + +client = ::Google::Cloud::Firestore::V1::Firestore::Client.new +request = ::Google::Cloud::Firestore::V1::GetDocumentRequest.new # (request fields as keyword arguments...) +response = client.get_document request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/firestore) +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/firestore/v1" +require "logger" + +client = ::Google::Cloud::Firestore::V1::Firestore::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-firestore`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-firestore-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-firestore`. +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-firestore-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-firestore-v1/Rakefile b/owl-bot-staging/google-cloud-firestore-v1/Rakefile new file mode 100644 index 000000000000..070c05371228 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["FIRESTORE_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["FIRESTORE_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["FIRESTORE_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 FIRESTORE_TEST_PROJECT=test123 FIRESTORE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/firestore/v1/firestore/credentials" + ::Google::Cloud::Firestore::V1::Firestore::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["FIRESTORE_PROJECT"] = project + ENV["FIRESTORE_TEST_PROJECT"] = project + ENV["FIRESTORE_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-firestore-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-firestore-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-firestore-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-firestore-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-firestore-v1" + header "google-cloud-firestore-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-firestore-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-firestore-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-firestore-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-firestore-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-firestore-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-firestore-v1/gapic_metadata.json new file mode 100644 index 000000000000..46f4f6d27b0b --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/gapic_metadata.json @@ -0,0 +1,103 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.firestore.v1", + "libraryPackage": "::Google::Cloud::Firestore::V1", + "services": { + "Firestore": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Firestore::V1::Firestore::Client", + "rpcs": { + "GetDocument": { + "methods": [ + "get_document" + ] + }, + "ListDocuments": { + "methods": [ + "list_documents" + ] + }, + "UpdateDocument": { + "methods": [ + "update_document" + ] + }, + "DeleteDocument": { + "methods": [ + "delete_document" + ] + }, + "BatchGetDocuments": { + "methods": [ + "batch_get_documents" + ] + }, + "BeginTransaction": { + "methods": [ + "begin_transaction" + ] + }, + "Commit": { + "methods": [ + "commit" + ] + }, + "Rollback": { + "methods": [ + "rollback" + ] + }, + "RunQuery": { + "methods": [ + "run_query" + ] + }, + "ExecutePipeline": { + "methods": [ + "execute_pipeline" + ] + }, + "RunAggregationQuery": { + "methods": [ + "run_aggregation_query" + ] + }, + "PartitionQuery": { + "methods": [ + "partition_query" + ] + }, + "Write": { + "methods": [ + "write" + ] + }, + "Listen": { + "methods": [ + "listen" + ] + }, + "ListCollectionIds": { + "methods": [ + "list_collection_ids" + ] + }, + "BatchWrite": { + "methods": [ + "batch_write" + ] + }, + "CreateDocument": { + "methods": [ + "create_document" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-firestore-v1/google-cloud-firestore-v1.gemspec b/owl-bot-staging/google-cloud-firestore-v1/google-cloud-firestore-v1.gemspec new file mode 100644 index 000000000000..9821a35b2173 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/google-cloud-firestore-v1.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/firestore/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-firestore-v1" + gem.version = Google::Cloud::Firestore::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Note that google-cloud-firestore-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-firestore instead. See the readme for more details." + gem.summary = "Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development." + 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.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google-cloud-firestore-v1.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google-cloud-firestore-v1.rb new file mode 100644 index 000000000000..a06d65d7c71a --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google-cloud-firestore-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/firestore/v1" diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1.rb new file mode 100644 index 000000000000..b062b442952c --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1.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/firestore/v1/firestore" +require "google/cloud/firestore/v1/version" + +module Google + module Cloud + module Firestore + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/firestore/v1" + # client = ::Google::Cloud::Firestore::V1::Firestore::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/firestore/v1" + # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/firestore/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore.rb new file mode 100644 index 000000000000..839d1e4340f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore.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/firestore/v1/version" + +require "google/cloud/firestore/v1/firestore/credentials" +require "google/cloud/firestore/v1/firestore/client" +require "google/cloud/firestore/v1/firestore/rest" + +module Google + module Cloud + module Firestore + module V1 + ## + # The Cloud Firestore service. + # + # Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL + # document database that simplifies storing, syncing, and querying data for + # your mobile, web, and IoT apps at global scale. Its client libraries provide + # live synchronization and offline support, while its security features and + # integrations with Firebase and Google Cloud Platform accelerate building + # truly serverless apps. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/firestore/v1/firestore" + # client = ::Google::Cloud::Firestore::V1::Firestore::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/firestore/v1/firestore/rest" + # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + module Firestore + end + end + end + end +end + +helper_path = ::File.join __dir__, "firestore", "helpers.rb" +require "google/cloud/firestore/v1/firestore/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb new file mode 100644 index 000000000000..30b933631d21 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb @@ -0,0 +1,2413 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/v1/firestore_pb" +require "google/cloud/location" + +module Google + module Cloud + module Firestore + module V1 + module Firestore + ## + # Client for the Firestore service. + # + # The Cloud Firestore service. + # + # Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL + # document database that simplifies storing, syncing, and querying data for + # your mobile, web, and IoT apps at global scale. Its client libraries provide + # live synchronization and offline support, while its security features and + # integrations with Firebase and Google Cloud Platform accelerate building + # truly serverless apps. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :firestore_stub + + ## + # Configure the Firestore Client class. + # + # See {::Google::Cloud::Firestore::V1::Firestore::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Firestore clients + # ::Google::Cloud::Firestore::V1::Firestore::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", "Firestore", "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.get_document.timeout = 60.0 + default_config.rpcs.get_document.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.list_documents.timeout = 60.0 + default_config.rpcs.list_documents.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.update_document.timeout = 60.0 + default_config.rpcs.update_document.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14] + } + + default_config.rpcs.delete_document.timeout = 60.0 + default_config.rpcs.delete_document.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.batch_get_documents.timeout = 300.0 + default_config.rpcs.batch_get_documents.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.begin_transaction.timeout = 60.0 + default_config.rpcs.begin_transaction.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.commit.timeout = 60.0 + default_config.rpcs.commit.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14] + } + + default_config.rpcs.rollback.timeout = 60.0 + default_config.rpcs.rollback.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.run_query.timeout = 300.0 + default_config.rpcs.run_query.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.execute_pipeline.timeout = 300.0 + default_config.rpcs.execute_pipeline.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.run_aggregation_query.timeout = 300.0 + default_config.rpcs.run_aggregation_query.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.partition_query.timeout = 300.0 + default_config.rpcs.partition_query.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.write.timeout = 86_400.0 + + default_config.rpcs.listen.timeout = 86_400.0 + default_config.rpcs.listen.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.list_collection_ids.timeout = 60.0 + default_config.rpcs.list_collection_ids.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.batch_write.timeout = 60.0 + default_config.rpcs.batch_write.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 10] + } + + default_config.rpcs.create_document.timeout = 60.0 + default_config.rpcs.create_document.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Firestore 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::Firestore::V1::Firestore::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 + @firestore_stub.universe_domain + end + + ## + # Create a new Firestore client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Firestore 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/firestore/v1/firestore_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 + + @firestore_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Firestore::V1::Firestore::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 + ) + + @firestore_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 = @firestore_stub.endpoint + config.universe_domain = @firestore_stub.universe_domain + config.logger = @firestore_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @firestore_stub.logger + end + + # Service calls + + ## + # Gets a single document. + # + # @overload get_document(request, options = nil) + # Pass arguments to `get_document` via a request object, either of type + # {::Google::Cloud::Firestore::V1::GetDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::GetDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_document(name: nil, mask: nil, transaction: nil, read_time: nil) + # Pass arguments to `get_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Document to get. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] + # The fields to return. If not set, returns all fields. + # + # If the document has a field that is not present in this mask, that field + # will not be returned in the response. + # @param transaction [::String] + # Reads the document in a transaction. + # + # Note: The following parameters are mutually exclusive: `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Reads the version of the document at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::V1::Document] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::V1::Document] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::GetDocumentRequest.new + # + # # Call the get_document method. + # result = client.get_document request + # + # # The returned object is of type Google::Cloud::Firestore::V1::Document. + # p result + # + def get_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::GetDocumentRequest + + # Converts hash and nil to 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_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-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_document.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :get_document, 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 documents. + # + # @overload list_documents(request, options = nil) + # Pass arguments to `list_documents` via a request object, either of type + # {::Google::Cloud::Firestore::V1::ListDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::ListDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_documents(parent: nil, collection_id: nil, page_size: nil, page_token: nil, order_by: nil, mask: nil, transaction: nil, read_time: nil, show_missing: nil) + # Pass arguments to `list_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. In the format: + # `projects/{project_id}/databases/{database_id}/documents` or + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # + # For example: + # `projects/my-project/databases/my-database/documents` or + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @param collection_id [::String] + # Optional. The collection ID, relative to `parent`, to list. + # + # For example: `chatrooms` or `messages`. + # + # This is optional, and when not provided, Firestore will list documents + # from all collections under the provided `parent`. + # @param page_size [::Integer] + # Optional. The maximum number of documents to return in a single response. + # + # Firestore may return fewer than this value. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDocuments` response. + # + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters (with the exception of `page_size`) must match the values set + # in the request that generated the page token. + # @param order_by [::String] + # Optional. The optional ordering of the documents to return. + # + # For example: `priority desc, __name__ desc`. + # + # This mirrors the {::Google::Cloud::Firestore::V1::StructuredQuery#order_by `ORDER BY`} + # used in Firestore queries but in a string representation. When absent, + # documents are ordered based on `__name__ ASC`. + # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] + # Optional. The fields to return. If not set, returns all fields. + # + # If a document has a field that is not present in this mask, that field + # will not be returned in the response. + # @param transaction [::String] + # Perform the read as part of an already active transaction. + # + # Note: The following parameters are mutually exclusive: `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Perform the read at the provided time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param show_missing [::Boolean] + # If the list should show missing documents. + # + # A document is missing if it does not exist, but there are sub-documents + # nested underneath it. When true, such missing documents will be returned + # with a key but will not have fields, + # {::Google::Cloud::Firestore::V1::Document#create_time `create_time`}, or + # {::Google::Cloud::Firestore::V1::Document#update_time `update_time`} set. + # + # Requests with `show_missing` may not specify `where` or `order_by`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::V1::Document>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::V1::Document>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::ListDocumentsRequest.new + # + # # Call the list_documents method. + # result = client.list_documents request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Firestore::V1::Document. + # p item + # end + # + def list_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::ListDocumentsRequest + + # Converts hash and nil to 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_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-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 + if request.collection_id + header_params["collection_id"] = request.collection_id + end + + request_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_documents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :list_documents, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @firestore_stub, :list_documents, 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 or inserts a document. + # + # @overload update_document(request, options = nil) + # Pass arguments to `update_document` via a request object, either of type + # {::Google::Cloud::Firestore::V1::UpdateDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::UpdateDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_document(document: nil, update_mask: nil, mask: nil, current_document: nil) + # Pass arguments to `update_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param document [::Google::Cloud::Firestore::V1::Document, ::Hash] + # Required. The updated document. + # Creates the document if it does not already exist. + # @param update_mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] + # The fields to update. + # None of the field paths in the mask may contain a reserved name. + # + # If the document exists on the server and has fields not referenced in the + # mask, they are left unchanged. + # Fields referenced in the mask, but not present in the input document, are + # deleted from the document on the server. + # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] + # The fields to return. If not set, returns all fields. + # + # If the document has a field that is not present in this mask, that field + # will not be returned in the response. + # @param current_document [::Google::Cloud::Firestore::V1::Precondition, ::Hash] + # An optional precondition on the document. + # The request will fail if this is set and not met by the target document. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::V1::Document] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::V1::Document] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::UpdateDocumentRequest.new + # + # # Call the update_document method. + # result = client.update_document request + # + # # The returned object is of type Google::Cloud::Firestore::V1::Document. + # p result + # + def update_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::UpdateDocumentRequest + + # Converts hash and nil to 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_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.document&.name + header_params["document.name"] = request.document.name + end + + request_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_document.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :update_document, 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 document. + # + # @overload delete_document(request, options = nil) + # Pass arguments to `delete_document` via a request object, either of type + # {::Google::Cloud::Firestore::V1::DeleteDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::DeleteDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_document(name: nil, current_document: nil) + # Pass arguments to `delete_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Document to delete. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # @param current_document [::Google::Cloud::Firestore::V1::Precondition, ::Hash] + # An optional precondition on the document. + # The request will fail if this is set and not met by the target document. + # + # @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/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::DeleteDocumentRequest.new + # + # # Call the delete_document method. + # result = client.delete_document request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::DeleteDocumentRequest + + # Converts hash and nil to 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_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-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_document.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :delete_document, 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 multiple documents. + # + # Documents returned by this method are not guaranteed to be returned in the + # same order that they were requested. + # + # @overload batch_get_documents(request, options = nil) + # Pass arguments to `batch_get_documents` via a request object, either of type + # {::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_get_documents(database: nil, documents: nil, mask: nil, transaction: nil, new_transaction: nil, read_time: nil) + # Pass arguments to `batch_get_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @param documents [::Array<::String>] + # The names of the documents to retrieve. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # The request will fail if any of the document is not a child resource of the + # given `database`. Duplicate names will be elided. + # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] + # The fields to return. If not set, returns all fields. + # + # If a document has a field that is not present in this mask, that field will + # not be returned in the response. + # @param transaction [::String] + # Reads documents in a transaction. + # + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] + # Starts a new transaction and reads the documents. + # Defaults to a read-only transaction. + # The new transaction ID will be returned as the first response in the + # stream. + # + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Reads documents as they were at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new + # + # # Call the batch_get_documents method to start streaming. + # output = client.batch_get_documents request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse + # output.each do |current_response| + # p current_response + # end + # + def batch_get_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_get_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + header_params["database"] = request.database + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_get_documents.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_get_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :batch_get_documents, 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 a new transaction. + # + # @overload begin_transaction(request, options = nil) + # Pass arguments to `begin_transaction` via a request object, either of type + # {::Google::Cloud::Firestore::V1::BeginTransactionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::BeginTransactionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload begin_transaction(database: nil, options: nil) + # Pass arguments to `begin_transaction` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @param options [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] + # The options for the transaction. + # Defaults to a read-write transaction. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::V1::BeginTransactionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::V1::BeginTransactionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::BeginTransactionRequest.new + # + # # Call the begin_transaction method. + # result = client.begin_transaction request + # + # # The returned object is of type Google::Cloud::Firestore::V1::BeginTransactionResponse. + # p result + # + def begin_transaction request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::BeginTransactionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.begin_transaction.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + header_params["database"] = request.database + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.begin_transaction.timeout, + metadata: metadata, + retry_policy: @config.rpcs.begin_transaction.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :begin_transaction, 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 + + ## + # Commits a transaction, while optionally updating documents. + # + # @overload commit(request, options = nil) + # Pass arguments to `commit` via a request object, either of type + # {::Google::Cloud::Firestore::V1::CommitRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::CommitRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload commit(database: nil, writes: nil, transaction: nil) + # Pass arguments to `commit` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @param writes [::Array<::Google::Cloud::Firestore::V1::Write, ::Hash>] + # The writes to apply. + # + # Always executed atomically and in order. + # @param transaction [::String] + # If set, applies all writes in this transaction, and commits it. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::V1::CommitResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::V1::CommitResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::CommitRequest.new + # + # # Call the commit method. + # result = client.commit request + # + # # The returned object is of type Google::Cloud::Firestore::V1::CommitResponse. + # p result + # + def commit request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::CommitRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.commit.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + header_params["database"] = request.database + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.commit.timeout, + metadata: metadata, + retry_policy: @config.rpcs.commit.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :commit, 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 + + ## + # Rolls back a transaction. + # + # @overload rollback(request, options = nil) + # Pass arguments to `rollback` via a request object, either of type + # {::Google::Cloud::Firestore::V1::RollbackRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::RollbackRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload rollback(database: nil, transaction: nil) + # Pass arguments to `rollback` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @param transaction [::String] + # Required. The transaction to roll back. + # + # @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/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::RollbackRequest.new + # + # # Call the rollback method. + # result = client.rollback request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def rollback request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::RollbackRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.rollback.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + header_params["database"] = request.database + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.rollback.timeout, + metadata: metadata, + retry_policy: @config.rpcs.rollback.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :rollback, 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 + + ## + # Runs a query. + # + # @overload run_query(request, options = nil) + # Pass arguments to `run_query` via a request object, either of type + # {::Google::Cloud::Firestore::V1::RunQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::RunQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_query(parent: nil, structured_query: nil, transaction: nil, new_transaction: nil, read_time: nil, explain_options: nil) + # Pass arguments to `run_query` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. In the format: + # `projects/{project_id}/databases/{database_id}/documents` or + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # For example: + # `projects/my-project/databases/my-database/documents` or + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @param structured_query [::Google::Cloud::Firestore::V1::StructuredQuery, ::Hash] + # A structured query. + # @param transaction [::String] + # Run the query within an already active transaction. + # + # The value here is the opaque transaction ID to execute the query in. + # + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] + # Starts a new transaction and reads the documents. + # Defaults to a read-only transaction. + # The new transaction ID will be returned as the first response in the + # stream. + # + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Reads documents as they were at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param explain_options [::Google::Cloud::Firestore::V1::ExplainOptions, ::Hash] + # Optional. Explain options for the query. If set, additional query + # statistics will be returned. If not, only query results will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Firestore::V1::RunQueryResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Firestore::V1::RunQueryResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::RunQueryRequest.new + # + # # Call the run_query method to start streaming. + # output = client.run_query request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Firestore::V1::RunQueryResponse + # output.each do |current_response| + # p current_response + # end + # + def run_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::RunQueryRequest + + # Converts hash and nil to 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_query.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-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.run_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :run_query, 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 + + ## + # Executes a pipeline query. + # + # @overload execute_pipeline(request, options = nil) + # Pass arguments to `execute_pipeline` via a request object, either of type + # {::Google::Cloud::Firestore::V1::ExecutePipelineRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::ExecutePipelineRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload execute_pipeline(database: nil, structured_pipeline: nil, transaction: nil, new_transaction: nil, read_time: nil) + # Pass arguments to `execute_pipeline` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. Database identifier, in the form + # `projects/{project}/databases/{database}`. + # @param structured_pipeline [::Google::Cloud::Firestore::V1::StructuredPipeline, ::Hash] + # A pipelined operation. + # @param transaction [::String] + # Run the query within an already active transaction. + # + # The value here is the opaque transaction ID to execute the query in. + # + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] + # Execute the pipeline in a new transaction. + # + # The identifier of the newly created transaction will be returned in the + # first response on the stream. This defaults to a read-only transaction. + # + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Execute the pipeline in a snapshot transaction at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Firestore::V1::ExecutePipelineResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Firestore::V1::ExecutePipelineResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::ExecutePipelineRequest.new + # + # # Call the execute_pipeline method to start streaming. + # output = client.execute_pipeline request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Firestore::V1::ExecutePipelineResponse + # output.each do |current_response| + # p current_response + # end + # + def execute_pipeline request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::ExecutePipelineRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.execute_pipeline.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + regex_match = %r{^projects/(?[^/]+)(?:/.*)?$}.match request.database + if regex_match + header_params["project_id"] = regex_match["project_id".to_s] + end + end + if request.database + regex_match = %r{^projects/[^/]+/databases/(?[^/]+)(?:/.*)?$}.match request.database + if regex_match + header_params["database_id"] = regex_match["database_id".to_s] + end + end + + request_params_header = URI.encode_www_form header_params + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.execute_pipeline.timeout, + metadata: metadata, + retry_policy: @config.rpcs.execute_pipeline.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :execute_pipeline, 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 + + ## + # Runs an aggregation query. + # + # Rather than producing {::Google::Cloud::Firestore::V1::Document Document} results like + # {::Google::Cloud::Firestore::V1::Firestore::Client#run_query Firestore.RunQuery}, this API + # allows running an aggregation to produce a series of + # {::Google::Cloud::Firestore::V1::AggregationResult AggregationResult} server-side. + # + # High-Level Example: + # + # ``` + # -- Return the number of documents in table given a filter. + # SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); + # ``` + # + # @overload run_aggregation_query(request, options = nil) + # Pass arguments to `run_aggregation_query` via a request object, either of type + # {::Google::Cloud::Firestore::V1::RunAggregationQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::RunAggregationQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_aggregation_query(parent: nil, structured_aggregation_query: nil, transaction: nil, new_transaction: nil, read_time: nil, explain_options: nil) + # Pass arguments to `run_aggregation_query` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. In the format: + # `projects/{project_id}/databases/{database_id}/documents` or + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # For example: + # `projects/my-project/databases/my-database/documents` or + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @param structured_aggregation_query [::Google::Cloud::Firestore::V1::StructuredAggregationQuery, ::Hash] + # An aggregation query. + # @param transaction [::String] + # Run the aggregation within an already active transaction. + # + # The value here is the opaque transaction ID to execute the query in. + # + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] + # Starts a new transaction as part of the query, defaulting to read-only. + # + # The new transaction ID will be returned as the first response in the + # stream. + # + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Executes the query at the given timestamp. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param explain_options [::Google::Cloud::Firestore::V1::ExplainOptions, ::Hash] + # Optional. Explain options for the query. If set, additional query + # statistics will be returned. If not, only query results will be returned. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Firestore::V1::RunAggregationQueryResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Firestore::V1::RunAggregationQueryResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new + # + # # Call the run_aggregation_query method to start streaming. + # output = client.run_aggregation_query request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse + # output.each do |current_response| + # p current_response + # end + # + def run_aggregation_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::RunAggregationQueryRequest + + # Converts hash and nil to 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_aggregation_query.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-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.run_aggregation_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.run_aggregation_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :run_aggregation_query, 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 + + ## + # Partitions a query by returning partition cursors that can be used to run + # the query in parallel. The returned partition cursors are split points that + # can be used by RunQuery as starting/end points for the query results. + # + # @overload partition_query(request, options = nil) + # Pass arguments to `partition_query` via a request object, either of type + # {::Google::Cloud::Firestore::V1::PartitionQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::PartitionQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload partition_query(parent: nil, structured_query: nil, partition_count: nil, page_token: nil, page_size: nil, read_time: nil) + # Pass arguments to `partition_query` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. In the format: + # `projects/{project_id}/databases/{database_id}/documents`. + # Document resource names are not supported; only database resource names + # can be specified. + # @param structured_query [::Google::Cloud::Firestore::V1::StructuredQuery, ::Hash] + # A structured query. + # Query must specify collection with all descendants and be ordered by name + # ascending. Other filters, order bys, limits, offsets, and start/end + # cursors are not supported. + # @param partition_count [::Integer] + # The desired maximum number of partition points. + # The partitions may be returned across multiple pages of results. + # The number must be positive. The actual number of partitions + # returned may be fewer. + # + # For example, this may be set to one fewer than the number of parallel + # queries to be run, or in running a data pipeline job, one fewer than the + # number of workers or compute instances available. + # @param page_token [::String] + # The `next_page_token` value returned from a previous call to + # PartitionQuery that may be used to get an additional set of results. + # There are no ordering guarantees between sets of results. Thus, using + # multiple sets of results will require merging the different result sets. + # + # For example, two subsequent calls using a page_token may return: + # + # * cursor B, cursor M, cursor Q + # * cursor A, cursor U, cursor W + # + # To obtain a complete result set ordered with respect to the results of the + # query supplied to PartitionQuery, the results sets should be merged: + # cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + # @param page_size [::Integer] + # The maximum number of partitions to return in this call, subject to + # `partition_count`. + # + # For example, if `partition_count` = 10 and `page_size` = 8, the first call + # to PartitionQuery will return up to 8 partitions and a `next_page_token` + # if more results exist. A second call to PartitionQuery will return up to + # 2 partitions, to complete the total of 10 specified in `partition_count`. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Reads documents as they were at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::V1::Cursor>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::V1::Cursor>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::PartitionQueryRequest.new + # + # # Call the partition_query method. + # result = client.partition_query request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Firestore::V1::Cursor. + # p item + # end + # + def partition_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::PartitionQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.partition_query.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-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.partition_query.timeout, + metadata: metadata, + retry_policy: @config.rpcs.partition_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :partition_query, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @firestore_stub, :partition_query, 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 + + ## + # Streams batches of document updates and deletes, in order. This method is + # only available via gRPC or WebChannel (not REST). + # + # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Firestore::V1::WriteRequest, ::Hash>] + # An enumerable of {::Google::Cloud::Firestore::V1::WriteRequest} instances. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Firestore::V1::WriteResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Firestore::V1::WriteResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create an input stream. + # input = Gapic::StreamInput.new + # + # # Call the write method to start streaming. + # output = client.write input + # + # # Send requests on the stream. For each request object, set fields by + # # passing keyword arguments. Be sure to close the stream when done. + # input << Google::Cloud::Firestore::V1::WriteRequest.new + # input << Google::Cloud::Firestore::V1::WriteRequest.new + # input.close + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Firestore::V1::WriteResponse + # output.each do |current_response| + # p current_response + # end + # + def write request, options = nil + unless request.is_a? ::Enumerable + raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum + request = request.to_enum + end + + request = request.lazy.map do |req| + ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Firestore::V1::WriteRequest + end + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.write.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::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.write.timeout, + metadata: metadata, + retry_policy: @config.rpcs.write.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :write, 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 + + ## + # Listens to changes. This method is only available via gRPC or WebChannel + # (not REST). + # + # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Firestore::V1::ListenRequest, ::Hash>] + # An enumerable of {::Google::Cloud::Firestore::V1::ListenRequest} instances. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Enumerable<::Google::Cloud::Firestore::V1::ListenResponse>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Enumerable<::Google::Cloud::Firestore::V1::ListenResponse>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create an input stream. + # input = Gapic::StreamInput.new + # + # # Call the listen method to start streaming. + # output = client.listen input + # + # # Send requests on the stream. For each request object, set fields by + # # passing keyword arguments. Be sure to close the stream when done. + # input << Google::Cloud::Firestore::V1::ListenRequest.new + # input << Google::Cloud::Firestore::V1::ListenRequest.new + # input.close + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Firestore::V1::ListenResponse + # output.each do |current_response| + # p current_response + # end + # + def listen request, options = nil + unless request.is_a? ::Enumerable + raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum + request = request.to_enum + end + + request = request.lazy.map do |req| + ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Firestore::V1::ListenRequest + end + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.listen.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::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.listen.timeout, + metadata: metadata, + retry_policy: @config.rpcs.listen.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :listen, 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 all the collection IDs underneath a document. + # + # @overload list_collection_ids(request, options = nil) + # Pass arguments to `list_collection_ids` via a request object, either of type + # {::Google::Cloud::Firestore::V1::ListCollectionIdsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::ListCollectionIdsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_collection_ids(parent: nil, page_size: nil, page_token: nil, read_time: nil) + # Pass arguments to `list_collection_ids` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 document. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # For example: + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @param page_size [::Integer] + # The maximum number of results to return. + # @param page_token [::String] + # A page token. Must be a value from + # {::Google::Cloud::Firestore::V1::ListCollectionIdsResponse ListCollectionIdsResponse}. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Reads documents as they were at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::V1::ListCollectionIdsResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::V1::ListCollectionIdsResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new + # + # # Call the list_collection_ids method. + # result = client.list_collection_ids request + # + # # The returned object is of type Google::Cloud::Firestore::V1::ListCollectionIdsResponse. + # p result + # + def list_collection_ids request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::ListCollectionIdsRequest + + # Converts hash and nil to 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_collection_ids.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-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_collection_ids.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_collection_ids.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :list_collection_ids, 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 + + ## + # Applies a batch of write operations. + # + # The BatchWrite method does not apply the write operations atomically + # and can apply them out of order. Method does not allow more than one write + # per document. Each write succeeds or fails independently. See the + # {::Google::Cloud::Firestore::V1::BatchWriteResponse BatchWriteResponse} for the + # success status of each write. + # + # If you require an atomically applied set of writes, use + # {::Google::Cloud::Firestore::V1::Firestore::Client#commit Commit} instead. + # + # @overload batch_write(request, options = nil) + # Pass arguments to `batch_write` via a request object, either of type + # {::Google::Cloud::Firestore::V1::BatchWriteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::BatchWriteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload batch_write(database: nil, writes: nil, labels: nil) + # Pass arguments to `batch_write` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @param writes [::Array<::Google::Cloud::Firestore::V1::Write, ::Hash>] + # The writes to apply. + # + # Method does not apply writes atomically and does not guarantee ordering. + # Each write succeeds or fails independently. You cannot write to the same + # document more than once per request. + # @param labels [::Hash{::String => ::String}] + # Labels associated with this batch write. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::V1::BatchWriteResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::V1::BatchWriteResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::BatchWriteRequest.new + # + # # Call the batch_write method. + # result = client.batch_write request + # + # # The returned object is of type Google::Cloud::Firestore::V1::BatchWriteResponse. + # p result + # + def batch_write request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::BatchWriteRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.batch_write.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.database + header_params["database"] = request.database + end + + request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") + metadata[:"x-goog-request-params"] ||= request_params_header + + options.apply_defaults timeout: @config.rpcs.batch_write.timeout, + metadata: metadata, + retry_policy: @config.rpcs.batch_write.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :batch_write, 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 new document. + # + # @overload create_document(request, options = nil) + # Pass arguments to `create_document` via a request object, either of type + # {::Google::Cloud::Firestore::V1::CreateDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::CreateDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_document(parent: nil, collection_id: nil, document_id: nil, document: nil, mask: nil) + # Pass arguments to `create_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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. For example: + # `projects/{project_id}/databases/{database_id}/documents` or + # `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + # @param collection_id [::String] + # Required. The collection ID, relative to `parent`, to list. For example: + # `chatrooms`. + # @param document_id [::String] + # The client-assigned document ID to use for this document. + # + # Optional. If not specified, an ID will be assigned by the service. + # @param document [::Google::Cloud::Firestore::V1::Document, ::Hash] + # Required. The document to create. `name` must not be set. + # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] + # The fields to return. If not set, returns all fields. + # + # If the document has a field that is not present in this mask, that field + # will not be returned in the response. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Firestore::V1::Document] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Firestore::V1::Document] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::CreateDocumentRequest.new + # + # # Call the create_document method. + # result = client.create_document request + # + # # The returned object is of type Google::Cloud::Firestore::V1::Document. + # p result + # + def create_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::CreateDocumentRequest + + # Converts hash and nil to 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_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION + metadata[:"x-goog-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 + if request.collection_id + header_params["collection_id"] = request.collection_id + end + + request_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_document.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.call_rpc :create_document, 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 Firestore API. + # + # This class represents the configuration for Firestore, + # 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::Firestore::V1::Firestore::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 + # # get_document to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Firestore::V1::Firestore::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_document.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_document.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::Firestore::V1::Firestore::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 = "firestore.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 Firestore 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 `get_document` + # @return [::Gapic::Config::Method] + # + attr_reader :get_document + ## + # RPC-specific configuration for `list_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :list_documents + ## + # RPC-specific configuration for `update_document` + # @return [::Gapic::Config::Method] + # + attr_reader :update_document + ## + # RPC-specific configuration for `delete_document` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_document + ## + # RPC-specific configuration for `batch_get_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_documents + ## + # RPC-specific configuration for `begin_transaction` + # @return [::Gapic::Config::Method] + # + attr_reader :begin_transaction + ## + # RPC-specific configuration for `commit` + # @return [::Gapic::Config::Method] + # + attr_reader :commit + ## + # RPC-specific configuration for `rollback` + # @return [::Gapic::Config::Method] + # + attr_reader :rollback + ## + # RPC-specific configuration for `run_query` + # @return [::Gapic::Config::Method] + # + attr_reader :run_query + ## + # RPC-specific configuration for `execute_pipeline` + # @return [::Gapic::Config::Method] + # + attr_reader :execute_pipeline + ## + # RPC-specific configuration for `run_aggregation_query` + # @return [::Gapic::Config::Method] + # + attr_reader :run_aggregation_query + ## + # RPC-specific configuration for `partition_query` + # @return [::Gapic::Config::Method] + # + attr_reader :partition_query + ## + # RPC-specific configuration for `write` + # @return [::Gapic::Config::Method] + # + attr_reader :write + ## + # RPC-specific configuration for `listen` + # @return [::Gapic::Config::Method] + # + attr_reader :listen + ## + # RPC-specific configuration for `list_collection_ids` + # @return [::Gapic::Config::Method] + # + attr_reader :list_collection_ids + ## + # RPC-specific configuration for `batch_write` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_write + ## + # RPC-specific configuration for `create_document` + # @return [::Gapic::Config::Method] + # + attr_reader :create_document + + # @private + def initialize parent_rpcs = nil + get_document_config = parent_rpcs.get_document if parent_rpcs.respond_to? :get_document + @get_document = ::Gapic::Config::Method.new get_document_config + list_documents_config = parent_rpcs.list_documents if parent_rpcs.respond_to? :list_documents + @list_documents = ::Gapic::Config::Method.new list_documents_config + update_document_config = parent_rpcs.update_document if parent_rpcs.respond_to? :update_document + @update_document = ::Gapic::Config::Method.new update_document_config + delete_document_config = parent_rpcs.delete_document if parent_rpcs.respond_to? :delete_document + @delete_document = ::Gapic::Config::Method.new delete_document_config + batch_get_documents_config = parent_rpcs.batch_get_documents if parent_rpcs.respond_to? :batch_get_documents + @batch_get_documents = ::Gapic::Config::Method.new batch_get_documents_config + begin_transaction_config = parent_rpcs.begin_transaction if parent_rpcs.respond_to? :begin_transaction + @begin_transaction = ::Gapic::Config::Method.new begin_transaction_config + commit_config = parent_rpcs.commit if parent_rpcs.respond_to? :commit + @commit = ::Gapic::Config::Method.new commit_config + rollback_config = parent_rpcs.rollback if parent_rpcs.respond_to? :rollback + @rollback = ::Gapic::Config::Method.new rollback_config + run_query_config = parent_rpcs.run_query if parent_rpcs.respond_to? :run_query + @run_query = ::Gapic::Config::Method.new run_query_config + execute_pipeline_config = parent_rpcs.execute_pipeline if parent_rpcs.respond_to? :execute_pipeline + @execute_pipeline = ::Gapic::Config::Method.new execute_pipeline_config + run_aggregation_query_config = parent_rpcs.run_aggregation_query if parent_rpcs.respond_to? :run_aggregation_query + @run_aggregation_query = ::Gapic::Config::Method.new run_aggregation_query_config + partition_query_config = parent_rpcs.partition_query if parent_rpcs.respond_to? :partition_query + @partition_query = ::Gapic::Config::Method.new partition_query_config + write_config = parent_rpcs.write if parent_rpcs.respond_to? :write + @write = ::Gapic::Config::Method.new write_config + listen_config = parent_rpcs.listen if parent_rpcs.respond_to? :listen + @listen = ::Gapic::Config::Method.new listen_config + list_collection_ids_config = parent_rpcs.list_collection_ids if parent_rpcs.respond_to? :list_collection_ids + @list_collection_ids = ::Gapic::Config::Method.new list_collection_ids_config + batch_write_config = parent_rpcs.batch_write if parent_rpcs.respond_to? :batch_write + @batch_write = ::Gapic::Config::Method.new batch_write_config + create_document_config = parent_rpcs.create_document if parent_rpcs.respond_to? :create_document + @create_document = ::Gapic::Config::Method.new create_document_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/credentials.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/credentials.rb new file mode 100644 index 000000000000..b86cdeb94a6f --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/credentials.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! + +require "googleauth" + +module Google + module Cloud + module Firestore + module V1 + module Firestore + # Credentials for the Firestore API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform", + "https://www.googleapis.com/auth/datastore" + ] + self.env_vars = [ + "FIRESTORE_CREDENTIALS", + "FIRESTORE_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "FIRESTORE_CREDENTIALS_JSON", + "FIRESTORE_KEYFILE_JSON", + "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-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest.rb new file mode 100644 index 000000000000..a26df12bed6b --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/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/firestore/v1/version" + +require "google/cloud/firestore/v1/firestore/credentials" +require "google/cloud/firestore/v1/firestore/rest/client" + +module Google + module Cloud + module Firestore + module V1 + ## + # The Cloud Firestore service. + # + # Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL + # document database that simplifies storing, syncing, and querying data for + # your mobile, web, and IoT apps at global scale. Its client libraries provide + # live synchronization and offline support, while its security features and + # integrations with Firebase and Google Cloud Platform accelerate building + # truly serverless apps. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/firestore/v1/firestore/rest" + # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + module Firestore + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/firestore/v1/firestore/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb new file mode 100644 index 000000000000..5daa2a36cf5a --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb @@ -0,0 +1,2079 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/v1/firestore_pb" +require "google/cloud/firestore/v1/firestore/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module Firestore + module V1 + module Firestore + module Rest + ## + # REST client for the Firestore service. + # + # The Cloud Firestore service. + # + # Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL + # document database that simplifies storing, syncing, and querying data for + # your mobile, web, and IoT apps at global scale. Its client libraries provide + # live synchronization and offline support, while its security features and + # integrations with Firebase and Google Cloud Platform accelerate building + # truly serverless apps. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :firestore_stub + + ## + # Configure the Firestore Client class. + # + # See {::Google::Cloud::Firestore::V1::Firestore::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all Firestore clients + # ::Google::Cloud::Firestore::V1::Firestore::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", "Firestore", "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.get_document.timeout = 60.0 + default_config.rpcs.get_document.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.list_documents.timeout = 60.0 + default_config.rpcs.list_documents.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.update_document.timeout = 60.0 + default_config.rpcs.update_document.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14] + } + + default_config.rpcs.delete_document.timeout = 60.0 + default_config.rpcs.delete_document.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.batch_get_documents.timeout = 300.0 + default_config.rpcs.batch_get_documents.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.begin_transaction.timeout = 60.0 + default_config.rpcs.begin_transaction.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.commit.timeout = 60.0 + default_config.rpcs.commit.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14] + } + + default_config.rpcs.rollback.timeout = 60.0 + default_config.rpcs.rollback.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.run_query.timeout = 300.0 + default_config.rpcs.run_query.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.execute_pipeline.timeout = 300.0 + default_config.rpcs.execute_pipeline.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.run_aggregation_query.timeout = 300.0 + default_config.rpcs.run_aggregation_query.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.partition_query.timeout = 300.0 + default_config.rpcs.partition_query.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.list_collection_ids.timeout = 60.0 + default_config.rpcs.list_collection_ids.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] + } + + default_config.rpcs.batch_write.timeout = 60.0 + default_config.rpcs.batch_write.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 10] + } + + default_config.rpcs.create_document.timeout = 60.0 + default_config.rpcs.create_document.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the Firestore 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::Firestore::V1::Firestore::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 + @firestore_stub.universe_domain + end + + ## + # Create a new Firestore REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the Firestore 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 + + @firestore_stub = ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @firestore_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 = @firestore_stub.endpoint + config.universe_domain = @firestore_stub.universe_domain + config.logger = @firestore_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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @firestore_stub.logger + end + + # Service calls + + ## + # Gets a single document. + # + # @overload get_document(request, options = nil) + # Pass arguments to `get_document` via a request object, either of type + # {::Google::Cloud::Firestore::V1::GetDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::GetDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_document(name: nil, mask: nil, transaction: nil, read_time: nil) + # Pass arguments to `get_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Document to get. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] + # The fields to return. If not set, returns all fields. + # + # If the document has a field that is not present in this mask, that field + # will not be returned in the response. + # @param transaction [::String] + # Reads the document in a transaction. + # + # Note: The following parameters are mutually exclusive: `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Reads the version of the document at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::Document] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::Document] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::GetDocumentRequest.new + # + # # Call the get_document method. + # result = client.get_document request + # + # # The returned object is of type Google::Cloud::Firestore::V1::Document. + # p result + # + def get_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::GetDocumentRequest + + # Converts hash and nil to an 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_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_document.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.get_document 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 documents. + # + # @overload list_documents(request, options = nil) + # Pass arguments to `list_documents` via a request object, either of type + # {::Google::Cloud::Firestore::V1::ListDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::ListDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_documents(parent: nil, collection_id: nil, page_size: nil, page_token: nil, order_by: nil, mask: nil, transaction: nil, read_time: nil, show_missing: nil) + # Pass arguments to `list_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. In the format: + # `projects/{project_id}/databases/{database_id}/documents` or + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # + # For example: + # `projects/my-project/databases/my-database/documents` or + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @param collection_id [::String] + # Optional. The collection ID, relative to `parent`, to list. + # + # For example: `chatrooms` or `messages`. + # + # This is optional, and when not provided, Firestore will list documents + # from all collections under the provided `parent`. + # @param page_size [::Integer] + # Optional. The maximum number of documents to return in a single response. + # + # Firestore may return fewer than this value. + # @param page_token [::String] + # Optional. A page token, received from a previous `ListDocuments` response. + # + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters (with the exception of `page_size`) must match the values set + # in the request that generated the page token. + # @param order_by [::String] + # Optional. The optional ordering of the documents to return. + # + # For example: `priority desc, __name__ desc`. + # + # This mirrors the {::Google::Cloud::Firestore::V1::StructuredQuery#order_by `ORDER BY`} + # used in Firestore queries but in a string representation. When absent, + # documents are ordered based on `__name__ ASC`. + # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] + # Optional. The fields to return. If not set, returns all fields. + # + # If a document has a field that is not present in this mask, that field + # will not be returned in the response. + # @param transaction [::String] + # Perform the read as part of an already active transaction. + # + # Note: The following parameters are mutually exclusive: `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Perform the read at the provided time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param show_missing [::Boolean] + # If the list should show missing documents. + # + # A document is missing if it does not exist, but there are sub-documents + # nested underneath it. When true, such missing documents will be returned + # with a key but will not have fields, + # {::Google::Cloud::Firestore::V1::Document#create_time `create_time`}, or + # {::Google::Cloud::Firestore::V1::Document#update_time `update_time`} set. + # + # Requests with `show_missing` may not specify `where` or `order_by`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::V1::Document>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::V1::Document>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::ListDocumentsRequest.new + # + # # Call the list_documents method. + # result = client.list_documents request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Firestore::V1::Document. + # p item + # end + # + def list_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::ListDocumentsRequest + + # Converts hash and nil to an 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_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_documents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.list_documents request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @firestore_stub, :list_documents, "documents", 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 or inserts a document. + # + # @overload update_document(request, options = nil) + # Pass arguments to `update_document` via a request object, either of type + # {::Google::Cloud::Firestore::V1::UpdateDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::UpdateDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_document(document: nil, update_mask: nil, mask: nil, current_document: nil) + # Pass arguments to `update_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param document [::Google::Cloud::Firestore::V1::Document, ::Hash] + # Required. The updated document. + # Creates the document if it does not already exist. + # @param update_mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] + # The fields to update. + # None of the field paths in the mask may contain a reserved name. + # + # If the document exists on the server and has fields not referenced in the + # mask, they are left unchanged. + # Fields referenced in the mask, but not present in the input document, are + # deleted from the document on the server. + # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] + # The fields to return. If not set, returns all fields. + # + # If the document has a field that is not present in this mask, that field + # will not be returned in the response. + # @param current_document [::Google::Cloud::Firestore::V1::Precondition, ::Hash] + # An optional precondition on the document. + # The request will fail if this is set and not met by the target document. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::Document] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::Document] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::UpdateDocumentRequest.new + # + # # Call the update_document method. + # result = client.update_document request + # + # # The returned object is of type Google::Cloud::Firestore::V1::Document. + # p result + # + def update_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::UpdateDocumentRequest + + # Converts hash and nil to an 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_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_document.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.update_document 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 document. + # + # @overload delete_document(request, options = nil) + # Pass arguments to `delete_document` via a request object, either of type + # {::Google::Cloud::Firestore::V1::DeleteDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::DeleteDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_document(name: nil, current_document: nil) + # Pass arguments to `delete_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. The resource name of the Document to delete. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # @param current_document [::Google::Cloud::Firestore::V1::Precondition, ::Hash] + # An optional precondition on the document. + # The request will fail if this is set and not met by the target document. + # @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/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::DeleteDocumentRequest.new + # + # # Call the delete_document method. + # result = client.delete_document request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def delete_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::DeleteDocumentRequest + + # Converts hash and nil to an 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_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_document.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.delete_document 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 multiple documents. + # + # Documents returned by this method are not guaranteed to be returned in the + # same order that they were requested. + # + # @overload batch_get_documents(request, options = nil) + # Pass arguments to `batch_get_documents` via a request object, either of type + # {::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_get_documents(database: nil, documents: nil, mask: nil, transaction: nil, new_transaction: nil, read_time: nil) + # Pass arguments to `batch_get_documents` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @param documents [::Array<::String>] + # The names of the documents to retrieve. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # The request will fail if any of the document is not a child resource of the + # given `database`. Duplicate names will be elided. + # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] + # The fields to return. If not set, returns all fields. + # + # If a document has a field that is not present in this mask, that field will + # not be returned in the response. + # @param transaction [::String] + # Reads documents in a transaction. + # + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] + # Starts a new transaction and reads the documents. + # Defaults to a read-only transaction. + # The new transaction ID will be returned as the first response in the + # stream. + # + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Reads documents as they were at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @return [::Enumerable<::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new + # + # # Call the batch_get_documents method to start streaming. + # output = client.batch_get_documents request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse + # output.each do |current_response| + # p current_response + # end + # + def batch_get_documents request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_get_documents.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.batch_get_documents.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_get_documents.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + ::Gapic::Rest::ServerStream.new( + ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse, + ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q| + @firestore_stub.batch_get_documents request, options do |chunk| + in_q.deq + out_q.enq chunk + end + end + ) + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Starts a new transaction. + # + # @overload begin_transaction(request, options = nil) + # Pass arguments to `begin_transaction` via a request object, either of type + # {::Google::Cloud::Firestore::V1::BeginTransactionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::BeginTransactionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload begin_transaction(database: nil, options: nil) + # Pass arguments to `begin_transaction` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @param options [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] + # The options for the transaction. + # Defaults to a read-write transaction. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::BeginTransactionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::BeginTransactionResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::BeginTransactionRequest.new + # + # # Call the begin_transaction method. + # result = client.begin_transaction request + # + # # The returned object is of type Google::Cloud::Firestore::V1::BeginTransactionResponse. + # p result + # + def begin_transaction request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::BeginTransactionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.begin_transaction.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.begin_transaction.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.begin_transaction.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.begin_transaction 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 + + ## + # Commits a transaction, while optionally updating documents. + # + # @overload commit(request, options = nil) + # Pass arguments to `commit` via a request object, either of type + # {::Google::Cloud::Firestore::V1::CommitRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::CommitRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload commit(database: nil, writes: nil, transaction: nil) + # Pass arguments to `commit` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @param writes [::Array<::Google::Cloud::Firestore::V1::Write, ::Hash>] + # The writes to apply. + # + # Always executed atomically and in order. + # @param transaction [::String] + # If set, applies all writes in this transaction, and commits it. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::CommitResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::CommitResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::CommitRequest.new + # + # # Call the commit method. + # result = client.commit request + # + # # The returned object is of type Google::Cloud::Firestore::V1::CommitResponse. + # p result + # + def commit request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::CommitRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.commit.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.commit.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.commit.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.commit 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 + + ## + # Rolls back a transaction. + # + # @overload rollback(request, options = nil) + # Pass arguments to `rollback` via a request object, either of type + # {::Google::Cloud::Firestore::V1::RollbackRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::RollbackRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload rollback(database: nil, transaction: nil) + # Pass arguments to `rollback` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @param transaction [::String] + # Required. The transaction to roll back. + # @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/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::RollbackRequest.new + # + # # Call the rollback method. + # result = client.rollback request + # + # # The returned object is of type Google::Protobuf::Empty. + # p result + # + def rollback request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::RollbackRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.rollback.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.rollback.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.rollback.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.rollback 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 + + ## + # Runs a query. + # + # @overload run_query(request, options = nil) + # Pass arguments to `run_query` via a request object, either of type + # {::Google::Cloud::Firestore::V1::RunQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::RunQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_query(parent: nil, structured_query: nil, transaction: nil, new_transaction: nil, read_time: nil, explain_options: nil) + # Pass arguments to `run_query` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. In the format: + # `projects/{project_id}/databases/{database_id}/documents` or + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # For example: + # `projects/my-project/databases/my-database/documents` or + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @param structured_query [::Google::Cloud::Firestore::V1::StructuredQuery, ::Hash] + # A structured query. + # @param transaction [::String] + # Run the query within an already active transaction. + # + # The value here is the opaque transaction ID to execute the query in. + # + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] + # Starts a new transaction and reads the documents. + # Defaults to a read-only transaction. + # The new transaction ID will be returned as the first response in the + # stream. + # + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Reads documents as they were at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param explain_options [::Google::Cloud::Firestore::V1::ExplainOptions, ::Hash] + # Optional. Explain options for the query. If set, additional query + # statistics will be returned. If not, only query results will be returned. + # @return [::Enumerable<::Google::Cloud::Firestore::V1::RunQueryResponse>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::RunQueryRequest.new + # + # # Call the run_query method to start streaming. + # output = client.run_query request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Firestore::V1::RunQueryResponse + # output.each do |current_response| + # p current_response + # end + # + def run_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::RunQueryRequest + + # Converts hash and nil to an 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_query.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_query.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + ::Gapic::Rest::ServerStream.new( + ::Google::Cloud::Firestore::V1::RunQueryResponse, + ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q| + @firestore_stub.run_query request, options do |chunk| + in_q.deq + out_q.enq chunk + end + end + ) + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Executes a pipeline query. + # + # @overload execute_pipeline(request, options = nil) + # Pass arguments to `execute_pipeline` via a request object, either of type + # {::Google::Cloud::Firestore::V1::ExecutePipelineRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::ExecutePipelineRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload execute_pipeline(database: nil, structured_pipeline: nil, transaction: nil, new_transaction: nil, read_time: nil) + # Pass arguments to `execute_pipeline` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. Database identifier, in the form + # `projects/{project}/databases/{database}`. + # @param structured_pipeline [::Google::Cloud::Firestore::V1::StructuredPipeline, ::Hash] + # A pipelined operation. + # @param transaction [::String] + # Run the query within an already active transaction. + # + # The value here is the opaque transaction ID to execute the query in. + # + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] + # Execute the pipeline in a new transaction. + # + # The identifier of the newly created transaction will be returned in the + # first response on the stream. This defaults to a read-only transaction. + # + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Execute the pipeline in a snapshot transaction at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @return [::Enumerable<::Google::Cloud::Firestore::V1::ExecutePipelineResponse>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::ExecutePipelineRequest.new + # + # # Call the execute_pipeline method to start streaming. + # output = client.execute_pipeline request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Firestore::V1::ExecutePipelineResponse + # output.each do |current_response| + # p current_response + # end + # + def execute_pipeline request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::ExecutePipelineRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.execute_pipeline.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.execute_pipeline.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.execute_pipeline.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + ::Gapic::Rest::ServerStream.new( + ::Google::Cloud::Firestore::V1::ExecutePipelineResponse, + ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q| + @firestore_stub.execute_pipeline request, options do |chunk| + in_q.deq + out_q.enq chunk + end + end + ) + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Runs an aggregation query. + # + # Rather than producing {::Google::Cloud::Firestore::V1::Document Document} results like + # {::Google::Cloud::Firestore::V1::Firestore::Rest::Client#run_query Firestore.RunQuery}, this API + # allows running an aggregation to produce a series of + # {::Google::Cloud::Firestore::V1::AggregationResult AggregationResult} server-side. + # + # High-Level Example: + # + # ``` + # -- Return the number of documents in table given a filter. + # SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); + # ``` + # + # @overload run_aggregation_query(request, options = nil) + # Pass arguments to `run_aggregation_query` via a request object, either of type + # {::Google::Cloud::Firestore::V1::RunAggregationQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::RunAggregationQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_aggregation_query(parent: nil, structured_aggregation_query: nil, transaction: nil, new_transaction: nil, read_time: nil, explain_options: nil) + # Pass arguments to `run_aggregation_query` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. In the format: + # `projects/{project_id}/databases/{database_id}/documents` or + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # For example: + # `projects/my-project/databases/my-database/documents` or + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @param structured_aggregation_query [::Google::Cloud::Firestore::V1::StructuredAggregationQuery, ::Hash] + # An aggregation query. + # @param transaction [::String] + # Run the aggregation within an already active transaction. + # + # The value here is the opaque transaction ID to execute the query in. + # + # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] + # Starts a new transaction as part of the query, defaulting to read-only. + # + # The new transaction ID will be returned as the first response in the + # stream. + # + # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Executes the query at the given timestamp. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. + # @param explain_options [::Google::Cloud::Firestore::V1::ExplainOptions, ::Hash] + # Optional. Explain options for the query. If set, additional query + # statistics will be returned. If not, only query results will be returned. + # @return [::Enumerable<::Google::Cloud::Firestore::V1::RunAggregationQueryResponse>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new + # + # # Call the run_aggregation_query method to start streaming. + # output = client.run_aggregation_query request + # + # # The returned object is a streamed enumerable yielding elements of type + # # ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse + # output.each do |current_response| + # p current_response + # end + # + def run_aggregation_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::RunAggregationQueryRequest + + # Converts hash and nil to an 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_aggregation_query.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_aggregation_query.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.run_aggregation_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + ::Gapic::Rest::ServerStream.new( + ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse, + ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q| + @firestore_stub.run_aggregation_query request, options do |chunk| + in_q.deq + out_q.enq chunk + end + end + ) + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Partitions a query by returning partition cursors that can be used to run + # the query in parallel. The returned partition cursors are split points that + # can be used by RunQuery as starting/end points for the query results. + # + # @overload partition_query(request, options = nil) + # Pass arguments to `partition_query` via a request object, either of type + # {::Google::Cloud::Firestore::V1::PartitionQueryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::PartitionQueryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload partition_query(parent: nil, structured_query: nil, partition_count: nil, page_token: nil, page_size: nil, read_time: nil) + # Pass arguments to `partition_query` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 name. In the format: + # `projects/{project_id}/databases/{database_id}/documents`. + # Document resource names are not supported; only database resource names + # can be specified. + # @param structured_query [::Google::Cloud::Firestore::V1::StructuredQuery, ::Hash] + # A structured query. + # Query must specify collection with all descendants and be ordered by name + # ascending. Other filters, order bys, limits, offsets, and start/end + # cursors are not supported. + # @param partition_count [::Integer] + # The desired maximum number of partition points. + # The partitions may be returned across multiple pages of results. + # The number must be positive. The actual number of partitions + # returned may be fewer. + # + # For example, this may be set to one fewer than the number of parallel + # queries to be run, or in running a data pipeline job, one fewer than the + # number of workers or compute instances available. + # @param page_token [::String] + # The `next_page_token` value returned from a previous call to + # PartitionQuery that may be used to get an additional set of results. + # There are no ordering guarantees between sets of results. Thus, using + # multiple sets of results will require merging the different result sets. + # + # For example, two subsequent calls using a page_token may return: + # + # * cursor B, cursor M, cursor Q + # * cursor A, cursor U, cursor W + # + # To obtain a complete result set ordered with respect to the results of the + # query supplied to PartitionQuery, the results sets should be merged: + # cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + # @param page_size [::Integer] + # The maximum number of partitions to return in this call, subject to + # `partition_count`. + # + # For example, if `partition_count` = 10 and `page_size` = 8, the first call + # to PartitionQuery will return up to 8 partitions and a `next_page_token` + # if more results exist. A second call to PartitionQuery will return up to + # 2 partitions, to complete the total of 10 specified in `partition_count`. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Reads documents as they were at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::V1::Cursor>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::V1::Cursor>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::PartitionQueryRequest.new + # + # # Call the partition_query method. + # result = client.partition_query request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Firestore::V1::Cursor. + # p item + # end + # + def partition_query request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::PartitionQueryRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.partition_query.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.partition_query.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.partition_query.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.partition_query request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @firestore_stub, :partition_query, "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 + + ## + # Lists all the collection IDs underneath a document. + # + # @overload list_collection_ids(request, options = nil) + # Pass arguments to `list_collection_ids` via a request object, either of type + # {::Google::Cloud::Firestore::V1::ListCollectionIdsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::ListCollectionIdsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_collection_ids(parent: nil, page_size: nil, page_token: nil, read_time: nil) + # Pass arguments to `list_collection_ids` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 document. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # For example: + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @param page_size [::Integer] + # The maximum number of results to return. + # @param page_token [::String] + # A page token. Must be a value from + # {::Google::Cloud::Firestore::V1::ListCollectionIdsResponse ListCollectionIdsResponse}. + # @param read_time [::Google::Protobuf::Timestamp, ::Hash] + # Reads documents as they were at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::ListCollectionIdsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::ListCollectionIdsResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new + # + # # Call the list_collection_ids method. + # result = client.list_collection_ids request + # + # # The returned object is of type Google::Cloud::Firestore::V1::ListCollectionIdsResponse. + # p result + # + def list_collection_ids request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::ListCollectionIdsRequest + + # Converts hash and nil to an 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_collection_ids.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_collection_ids.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_collection_ids.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.list_collection_ids 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 + + ## + # Applies a batch of write operations. + # + # The BatchWrite method does not apply the write operations atomically + # and can apply them out of order. Method does not allow more than one write + # per document. Each write succeeds or fails independently. See the + # {::Google::Cloud::Firestore::V1::BatchWriteResponse BatchWriteResponse} for the + # success status of each write. + # + # If you require an atomically applied set of writes, use + # {::Google::Cloud::Firestore::V1::Firestore::Rest::Client#commit Commit} instead. + # + # @overload batch_write(request, options = nil) + # Pass arguments to `batch_write` via a request object, either of type + # {::Google::Cloud::Firestore::V1::BatchWriteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::BatchWriteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload batch_write(database: nil, writes: nil, labels: nil) + # Pass arguments to `batch_write` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param database [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @param writes [::Array<::Google::Cloud::Firestore::V1::Write, ::Hash>] + # The writes to apply. + # + # Method does not apply writes atomically and does not guarantee ordering. + # Each write succeeds or fails independently. You cannot write to the same + # document more than once per request. + # @param labels [::Hash{::String => ::String}] + # Labels associated with this batch write. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::BatchWriteResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::BatchWriteResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::BatchWriteRequest.new + # + # # Call the batch_write method. + # result = client.batch_write request + # + # # The returned object is of type Google::Cloud::Firestore::V1::BatchWriteResponse. + # p result + # + def batch_write request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::BatchWriteRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.batch_write.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.batch_write.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.batch_write.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.batch_write 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 new document. + # + # @overload create_document(request, options = nil) + # Pass arguments to `create_document` via a request object, either of type + # {::Google::Cloud::Firestore::V1::CreateDocumentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Firestore::V1::CreateDocumentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_document(parent: nil, collection_id: nil, document_id: nil, document: nil, mask: nil) + # Pass arguments to `create_document` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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. For example: + # `projects/{project_id}/databases/{database_id}/documents` or + # `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + # @param collection_id [::String] + # Required. The collection ID, relative to `parent`, to list. For example: + # `chatrooms`. + # @param document_id [::String] + # The client-assigned document ID to use for this document. + # + # Optional. If not specified, an ID will be assigned by the service. + # @param document [::Google::Cloud::Firestore::V1::Document, ::Hash] + # Required. The document to create. `name` must not be set. + # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] + # The fields to return. If not set, returns all fields. + # + # If the document has a field that is not present in this mask, that field + # will not be returned in the response. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::Document] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::Document] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/firestore/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Firestore::V1::CreateDocumentRequest.new + # + # # Call the create_document method. + # result = client.create_document request + # + # # The returned object is of type Google::Cloud::Firestore::V1::Document. + # p result + # + def create_document request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::CreateDocumentRequest + + # Converts hash and nil to an 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_document.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Firestore::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_document.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_document.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @firestore_stub.create_document 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 Firestore REST API. + # + # This class represents the configuration for Firestore 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::Firestore::V1::Firestore::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 + # # get_document to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_document.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_document.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 = "firestore.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 Firestore 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 `get_document` + # @return [::Gapic::Config::Method] + # + attr_reader :get_document + ## + # RPC-specific configuration for `list_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :list_documents + ## + # RPC-specific configuration for `update_document` + # @return [::Gapic::Config::Method] + # + attr_reader :update_document + ## + # RPC-specific configuration for `delete_document` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_document + ## + # RPC-specific configuration for `batch_get_documents` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_get_documents + ## + # RPC-specific configuration for `begin_transaction` + # @return [::Gapic::Config::Method] + # + attr_reader :begin_transaction + ## + # RPC-specific configuration for `commit` + # @return [::Gapic::Config::Method] + # + attr_reader :commit + ## + # RPC-specific configuration for `rollback` + # @return [::Gapic::Config::Method] + # + attr_reader :rollback + ## + # RPC-specific configuration for `run_query` + # @return [::Gapic::Config::Method] + # + attr_reader :run_query + ## + # RPC-specific configuration for `execute_pipeline` + # @return [::Gapic::Config::Method] + # + attr_reader :execute_pipeline + ## + # RPC-specific configuration for `run_aggregation_query` + # @return [::Gapic::Config::Method] + # + attr_reader :run_aggregation_query + ## + # RPC-specific configuration for `partition_query` + # @return [::Gapic::Config::Method] + # + attr_reader :partition_query + ## + # RPC-specific configuration for `list_collection_ids` + # @return [::Gapic::Config::Method] + # + attr_reader :list_collection_ids + ## + # RPC-specific configuration for `batch_write` + # @return [::Gapic::Config::Method] + # + attr_reader :batch_write + ## + # RPC-specific configuration for `create_document` + # @return [::Gapic::Config::Method] + # + attr_reader :create_document + + # @private + def initialize parent_rpcs = nil + get_document_config = parent_rpcs.get_document if parent_rpcs.respond_to? :get_document + @get_document = ::Gapic::Config::Method.new get_document_config + list_documents_config = parent_rpcs.list_documents if parent_rpcs.respond_to? :list_documents + @list_documents = ::Gapic::Config::Method.new list_documents_config + update_document_config = parent_rpcs.update_document if parent_rpcs.respond_to? :update_document + @update_document = ::Gapic::Config::Method.new update_document_config + delete_document_config = parent_rpcs.delete_document if parent_rpcs.respond_to? :delete_document + @delete_document = ::Gapic::Config::Method.new delete_document_config + batch_get_documents_config = parent_rpcs.batch_get_documents if parent_rpcs.respond_to? :batch_get_documents + @batch_get_documents = ::Gapic::Config::Method.new batch_get_documents_config + begin_transaction_config = parent_rpcs.begin_transaction if parent_rpcs.respond_to? :begin_transaction + @begin_transaction = ::Gapic::Config::Method.new begin_transaction_config + commit_config = parent_rpcs.commit if parent_rpcs.respond_to? :commit + @commit = ::Gapic::Config::Method.new commit_config + rollback_config = parent_rpcs.rollback if parent_rpcs.respond_to? :rollback + @rollback = ::Gapic::Config::Method.new rollback_config + run_query_config = parent_rpcs.run_query if parent_rpcs.respond_to? :run_query + @run_query = ::Gapic::Config::Method.new run_query_config + execute_pipeline_config = parent_rpcs.execute_pipeline if parent_rpcs.respond_to? :execute_pipeline + @execute_pipeline = ::Gapic::Config::Method.new execute_pipeline_config + run_aggregation_query_config = parent_rpcs.run_aggregation_query if parent_rpcs.respond_to? :run_aggregation_query + @run_aggregation_query = ::Gapic::Config::Method.new run_aggregation_query_config + partition_query_config = parent_rpcs.partition_query if parent_rpcs.respond_to? :partition_query + @partition_query = ::Gapic::Config::Method.new partition_query_config + list_collection_ids_config = parent_rpcs.list_collection_ids if parent_rpcs.respond_to? :list_collection_ids + @list_collection_ids = ::Gapic::Config::Method.new list_collection_ids_config + batch_write_config = parent_rpcs.batch_write if parent_rpcs.respond_to? :batch_write + @batch_write = ::Gapic::Config::Method.new batch_write_config + create_document_config = parent_rpcs.create_document if parent_rpcs.respond_to? :create_document + @create_document = ::Gapic::Config::Method.new create_document_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/service_stub.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/service_stub.rb new file mode 100644 index 000000000000..0cac6fe2306c --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/service_stub.rb @@ -0,0 +1,1026 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/v1/firestore_pb" + +module Google + module Cloud + module Firestore + module V1 + module Firestore + module Rest + ## + # REST service stub for the Firestore 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 get_document REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::GetDocumentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::Document] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::Document] + # A result object deserialized from the server's reply + def get_document request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_document_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_document", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::V1::Document.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_documents REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::ListDocumentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::ListDocumentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::ListDocumentsResponse] + # A result object deserialized from the server's reply + def list_documents request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_documents_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_documents", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::V1::ListDocumentsResponse.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_document REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::UpdateDocumentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::Document] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::Document] + # A result object deserialized from the server's reply + def update_document request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_document_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_document", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::V1::Document.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_document REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::DeleteDocumentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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_document request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_document_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_document", + 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 batch_get_documents REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yieldparam chunk [::String] The chunk of data received during server streaming. + # + # @return [::Gapic::Rest::TransportOperation] + def batch_get_documents(request_pb, options = nil, &) + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_documents_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_get_documents", + options: options, + is_server_streaming: true, + & + ) + ::Gapic::Rest::TransportOperation.new response + end + + ## + # Baseline implementation for the begin_transaction REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::BeginTransactionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::BeginTransactionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::BeginTransactionResponse] + # A result object deserialized from the server's reply + def begin_transaction request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_begin_transaction_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "begin_transaction", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::V1::BeginTransactionResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the commit REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::CommitRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::CommitResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::CommitResponse] + # A result object deserialized from the server's reply + def commit request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_commit_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "commit", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::V1::CommitResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the rollback REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::RollbackRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default 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 rollback request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_rollback_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "rollback", + 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 run_query REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::RunQueryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yieldparam chunk [::String] The chunk of data received during server streaming. + # + # @return [::Gapic::Rest::TransportOperation] + def run_query(request_pb, options = nil, &) + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_query_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_query", + options: options, + is_server_streaming: true, + & + ) + ::Gapic::Rest::TransportOperation.new response + end + + ## + # Baseline implementation for the execute_pipeline REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::ExecutePipelineRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yieldparam chunk [::String] The chunk of data received during server streaming. + # + # @return [::Gapic::Rest::TransportOperation] + def execute_pipeline(request_pb, options = nil, &) + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_execute_pipeline_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "execute_pipeline", + options: options, + is_server_streaming: true, + & + ) + ::Gapic::Rest::TransportOperation.new response + end + + ## + # Baseline implementation for the run_aggregation_query REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::RunAggregationQueryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yieldparam chunk [::String] The chunk of data received during server streaming. + # + # @return [::Gapic::Rest::TransportOperation] + def run_aggregation_query(request_pb, options = nil, &) + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_run_aggregation_query_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_aggregation_query", + options: options, + is_server_streaming: true, + & + ) + ::Gapic::Rest::TransportOperation.new response + end + + ## + # Baseline implementation for the partition_query REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::PartitionQueryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::PartitionQueryResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::PartitionQueryResponse] + # A result object deserialized from the server's reply + def partition_query request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_partition_query_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "partition_query", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::V1::PartitionQueryResponse.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_collection_ids REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::ListCollectionIdsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::ListCollectionIdsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::ListCollectionIdsResponse] + # A result object deserialized from the server's reply + def list_collection_ids request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_collection_ids_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_collection_ids", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::V1::ListCollectionIdsResponse.decode_json response.body, ignore_unknown_fields: true + catch :response do + yield result, operation if block_given? + result + end + end + + ## + # Baseline implementation for the batch_write REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::BatchWriteRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::BatchWriteResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::BatchWriteResponse] + # A result object deserialized from the server's reply + def batch_write request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_batch_write_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "batch_write", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::V1::BatchWriteResponse.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_document REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::CreateDocumentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Firestore::V1::Document] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Firestore::V1::Document] + # A result object deserialized from the server's reply + def create_document request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_document_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_document", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Firestore::V1::Document.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 get_document REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::GetDocumentRequest] + # 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_document_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_documents REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::ListDocumentsRequest] + # 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_documents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/{collection_id}", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true], + ["collection_id", %r{^[^/]+/?$}, false] + ] + ) + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/{collection_id}", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/?$}, false], + ["collection_id", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_document REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::UpdateDocumentRequest] + # 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_document_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{document.name}", + body: "document", + matches: [ + ["document.name", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_document REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::DeleteDocumentRequest] + # 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_document_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_get_documents REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_get_documents_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{database}/documents:batchGet", + body: "*", + matches: [ + ["database", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the begin_transaction REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::BeginTransactionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_begin_transaction_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{database}/documents:beginTransaction", + body: "*", + matches: [ + ["database", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the commit REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::CommitRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_commit_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{database}/documents:commit", + body: "*", + matches: [ + ["database", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the rollback REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::RollbackRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_rollback_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{database}/documents:rollback", + body: "*", + matches: [ + ["database", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_query REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::RunQueryRequest] + # 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_query_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:runQuery", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:runQuery", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the execute_pipeline REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::ExecutePipelineRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_execute_pipeline_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{database}/documents:executePipeline", + body: "*", + matches: [ + ["database", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the run_aggregation_query REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::RunAggregationQueryRequest] + # 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_aggregation_query_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:runAggregationQuery", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:runAggregationQuery", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the partition_query REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::PartitionQueryRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_partition_query_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:partitionQuery", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:partitionQuery", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_collection_ids REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::ListCollectionIdsRequest] + # 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_collection_ids_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:listCollectionIds", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/?$}, false] + ] + ) + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}:listCollectionIds", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the batch_write REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::BatchWriteRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_batch_write_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{database}/documents:batchWrite", + body: "*", + matches: [ + ["database", %r{^projects/[^/]+/databases/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_document REST call + # + # @param request_pb [::Google::Cloud::Firestore::V1::CreateDocumentRequest] + # 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_document_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/{collection_id}", + body: "document", + matches: [ + ["parent", %r{^projects/[^/]+/databases/[^/]+/documents(?:/.*)?$}, true], + ["collection_id", %r{^[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/rest.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/rest.rb new file mode 100644 index 000000000000..8498e99136a4 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/rest.rb @@ -0,0 +1,37 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/v1/firestore/rest" +require "google/cloud/firestore/v1/version" + +module Google + module Cloud + module Firestore + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/firestore/v1/rest" + # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/version.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/version.rb new file mode 100644 index 000000000000..6398d674ba15 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/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 Firestore + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/aggregation_result_pb.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/aggregation_result_pb.rb new file mode 100644 index 000000000000..910e6f9fe80f --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/aggregation_result_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/v1/aggregation_result.proto + +require 'google/protobuf' + +require 'google/firestore/v1/document_pb' + + +descriptor_data = "\n,google/firestore/v1/aggregation_result.proto\x12\x13google.firestore.v1\x1a\"google/firestore/v1/document.proto\"\xbe\x01\n\x11\x41ggregationResult\x12U\n\x10\x61ggregate_fields\x18\x02 \x03(\x0b\x32;.google.firestore.v1.AggregationResult.AggregateFieldsEntry\x1aR\n\x14\x41ggregateFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.Value:\x02\x38\x01\x42\xce\x01\n\x17\x63om.google.firestore.v1B\x16\x41ggregationResultProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xa2\x02\x04GCFS\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.firestore.v1.Value", "google/firestore/v1/document.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module V1 + AggregationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.AggregationResult").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/bloom_filter_pb.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/bloom_filter_pb.rb new file mode 100644 index 000000000000..a633a3ae5e40 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/bloom_filter_pb.rb @@ -0,0 +1,43 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/v1/bloom_filter.proto + +require 'google/protobuf' + + +descriptor_data = "\n&google/firestore/v1/bloom_filter.proto\x12\x13google.firestore.v1\".\n\x0b\x42itSequence\x12\x0e\n\x06\x62itmap\x18\x01 \x01(\x0c\x12\x0f\n\x07padding\x18\x02 \x01(\x05\"Q\n\x0b\x42loomFilter\x12.\n\x04\x62its\x18\x01 \x01(\x0b\x32 .google.firestore.v1.BitSequence\x12\x12\n\nhash_count\x18\x02 \x01(\x05\x42\xc8\x01\n\x17\x63om.google.firestore.v1B\x10\x42loomFilterProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xa2\x02\x04GCFS\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module V1 + BitSequence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.BitSequence").msgclass + BloomFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.BloomFilter").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/common_pb.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/common_pb.rb new file mode 100644 index 000000000000..e8950cc89c76 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/common_pb.rb @@ -0,0 +1,49 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/v1/common.proto + +require 'google/protobuf' + +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n google/firestore/v1/common.proto\x12\x13google.firestore.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"#\n\x0c\x44ocumentMask\x12\x13\n\x0b\x66ield_paths\x18\x01 \x03(\t\"e\n\x0cPrecondition\x12\x10\n\x06\x65xists\x18\x01 \x01(\x08H\x00\x12\x31\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x10\n\x0e\x63ondition_type\"\xa9\x02\n\x12TransactionOptions\x12\x45\n\tread_only\x18\x02 \x01(\x0b\x32\x30.google.firestore.v1.TransactionOptions.ReadOnlyH\x00\x12G\n\nread_write\x18\x03 \x01(\x0b\x32\x31.google.firestore.v1.TransactionOptions.ReadWriteH\x00\x1a&\n\tReadWrite\x12\x19\n\x11retry_transaction\x18\x01 \x01(\x0c\x1aS\n\x08ReadOnly\x12/\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x16\n\x14\x63onsistency_selectorB\x06\n\x04modeB\xc3\x01\n\x17\x63om.google.firestore.v1B\x0b\x43ommonProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xa2\x02\x04GCFS\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module V1 + DocumentMask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.DocumentMask").msgclass + Precondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Precondition").msgclass + TransactionOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.TransactionOptions").msgclass + TransactionOptions::ReadWrite = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.TransactionOptions.ReadWrite").msgclass + TransactionOptions::ReadOnly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.TransactionOptions.ReadOnly").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/document_pb.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/document_pb.rb new file mode 100644 index 000000000000..b8d6b31b5d00 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/document_pb.rb @@ -0,0 +1,55 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/v1/document.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/protobuf/struct_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/latlng_pb' + + +descriptor_data = "\n\"google/firestore/v1/document.proto\x12\x13google.firestore.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x18google/type/latlng.proto\"\x80\x02\n\x08\x44ocument\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x06\x66ields\x18\x02 \x03(\x0b\x32).google.firestore.v1.Document.FieldsEntry\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aI\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.Value:\x02\x38\x01\"\xc1\x04\n\x05Value\x12\x30\n\nnull_value\x18\x0b \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x17\n\rboolean_value\x18\x01 \x01(\x08H\x00\x12\x17\n\rinteger_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x35\n\x0ftimestamp_value\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x16\n\x0cstring_value\x18\x11 \x01(\tH\x00\x12\x15\n\x0b\x62ytes_value\x18\x12 \x01(\x0cH\x00\x12\x19\n\x0freference_value\x18\x05 \x01(\tH\x00\x12.\n\x0fgeo_point_value\x18\x08 \x01(\x0b\x32\x13.google.type.LatLngH\x00\x12\x36\n\x0b\x61rray_value\x18\t \x01(\x0b\x32\x1f.google.firestore.v1.ArrayValueH\x00\x12\x32\n\tmap_value\x18\x06 \x01(\x0b\x32\x1d.google.firestore.v1.MapValueH\x00\x12\x1f\n\x15\x66ield_reference_value\x18\x13 \x01(\tH\x00\x12\x37\n\x0e\x66unction_value\x18\x14 \x01(\x0b\x32\x1d.google.firestore.v1.FunctionH\x00\x12\x37\n\x0epipeline_value\x18\x15 \x01(\x0b\x32\x1d.google.firestore.v1.PipelineH\x00\x42\x0c\n\nvalue_type\"8\n\nArrayValue\x12*\n\x06values\x18\x01 \x03(\x0b\x32\x1a.google.firestore.v1.Value\"\x90\x01\n\x08MapValue\x12\x39\n\x06\x66ields\x18\x01 \x03(\x0b\x32).google.firestore.v1.MapValue.FieldsEntry\x1aI\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.Value:\x02\x38\x01\"\xda\x01\n\x08\x46unction\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12-\n\x04\x61rgs\x18\x02 \x03(\x0b\x32\x1a.google.firestore.v1.ValueB\x03\xe0\x41\x01\x12@\n\x07options\x18\x03 \x03(\x0b\x32*.google.firestore.v1.Function.OptionsEntryB\x03\xe0\x41\x01\x1aJ\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.Value:\x02\x38\x01\"\xa4\x02\n\x08Pipeline\x12\x38\n\x06stages\x18\x01 \x03(\x0b\x32#.google.firestore.v1.Pipeline.StageB\x03\xe0\x41\x02\x1a\xdd\x01\n\x05Stage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12-\n\x04\x61rgs\x18\x02 \x03(\x0b\x32\x1a.google.firestore.v1.ValueB\x03\xe0\x41\x01\x12\x46\n\x07options\x18\x03 \x03(\x0b\x32\x30.google.firestore.v1.Pipeline.Stage.OptionsEntryB\x03\xe0\x41\x01\x1aJ\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.Value:\x02\x38\x01\x42\xc5\x01\n\x17\x63om.google.firestore.v1B\rDocumentProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xa2\x02\x04GCFS\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.type.LatLng", "google/type/latlng.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module V1 + Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Document").msgclass + Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Value").msgclass + ArrayValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.ArrayValue").msgclass + MapValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.MapValue").msgclass + Function = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Function").msgclass + Pipeline = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Pipeline").msgclass + Pipeline::Stage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Pipeline.Stage").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/explain_stats_pb.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/explain_stats_pb.rb new file mode 100644 index 000000000000..8502d71e7acf --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/explain_stats_pb.rb @@ -0,0 +1,45 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/v1/explain_stats.proto + +require 'google/protobuf' + +require 'google/protobuf/any_pb' + + +descriptor_data = "\n\'google/firestore/v1/explain_stats.proto\x12\x13google.firestore.v1\x1a\x19google/protobuf/any.proto\"2\n\x0c\x45xplainStats\x12\"\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x14.google.protobuf.AnyB\xc2\x01\n\x17\x63om.google.firestore.v1B\x11\x45xplainStatsProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Any", "google/protobuf/any.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Firestore + module V1 + ExplainStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.ExplainStats").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/firestore_pb.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/firestore_pb.rb new file mode 100644 index 000000000000..ac0e1b9e7e37 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/firestore_pb.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/firestore/v1/firestore.proto + +require 'google/protobuf' + +require 'google/api/annotations_pb' +require 'google/api/client_pb' +require 'google/api/field_behavior_pb' +require 'google/api/routing_pb' +require 'google/firestore/v1/aggregation_result_pb' +require 'google/firestore/v1/common_pb' +require 'google/firestore/v1/document_pb' +require 'google/firestore/v1/explain_stats_pb' +require 'google/firestore/v1/pipeline_pb' +require 'google/firestore/v1/query_pb' +require 'google/firestore/v1/query_profile_pb' +require 'google/firestore/v1/write_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/timestamp_pb' +require 'google/protobuf/wrappers_pb' +require 'google/rpc/status_pb' + + +descriptor_data = "\n#google/firestore/v1/firestore.proto\x12\x13google.firestore.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x18google/api/routing.proto\x1a,google/firestore/v1/aggregation_result.proto\x1a google/firestore/v1/common.proto\x1a\"google/firestore/v1/document.proto\x1a\'google/firestore/v1/explain_stats.proto\x1a\"google/firestore/v1/pipeline.proto\x1a\x1fgoogle/firestore/v1/query.proto\x1a\'google/firestore/v1/query_profile.proto\x1a\x1fgoogle/firestore/v1/write.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xb8\x01\n\x12GetDocumentRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12/\n\x04mask\x18\x02 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\x12\x15\n\x0btransaction\x18\x03 \x01(\x0cH\x00\x12/\n\tread_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x16\n\x14\x63onsistency_selector\"\xbb\x02\n\x14ListDocumentsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcollection_id\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\x06 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x04mask\x18\x07 \x01(\x0b\x32!.google.firestore.v1.DocumentMaskB\x03\xe0\x41\x01\x12\x15\n\x0btransaction\x18\x08 \x01(\x0cH\x00\x12/\n\tread_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x14\n\x0cshow_missing\x18\x0c \x01(\x08\x42\x16\n\x14\x63onsistency_selector\"b\n\x15ListDocumentsResponse\x12\x30\n\tdocuments\x18\x01 \x03(\x0b\x32\x1d.google.firestore.v1.Document\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc4\x01\n\x15\x43reateDocumentRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcollection_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64ocument_id\x18\x03 \x01(\t\x12\x34\n\x08\x64ocument\x18\x04 \x01(\x0b\x32\x1d.google.firestore.v1.DocumentB\x03\xe0\x41\x02\x12/\n\x04mask\x18\x05 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\"\xf3\x01\n\x15UpdateDocumentRequest\x12\x34\n\x08\x64ocument\x18\x01 \x01(\x0b\x32\x1d.google.firestore.v1.DocumentB\x03\xe0\x41\x02\x12\x36\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\x12/\n\x04mask\x18\x03 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\x12;\n\x10\x63urrent_document\x18\x04 \x01(\x0b\x32!.google.firestore.v1.Precondition\"g\n\x15\x44\x65leteDocumentRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x10\x63urrent_document\x18\x02 \x01(\x0b\x32!.google.firestore.v1.Precondition\"\x99\x02\n\x18\x42\x61tchGetDocumentsRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tdocuments\x18\x02 \x03(\t\x12/\n\x04mask\x18\x03 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\x12\x15\n\x0btransaction\x18\x04 \x01(\x0cH\x00\x12\x42\n\x0fnew_transaction\x18\x05 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptionsH\x00\x12/\n\tread_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x16\n\x14\x63onsistency_selector\"\xac\x01\n\x19\x42\x61tchGetDocumentsResponse\x12.\n\x05\x66ound\x18\x01 \x01(\x0b\x32\x1d.google.firestore.v1.DocumentH\x00\x12\x11\n\x07missing\x18\x02 \x01(\tH\x00\x12\x13\n\x0btransaction\x18\x03 \x01(\x0c\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x08\n\x06result\"j\n\x17\x42\x65ginTransactionRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x07options\x18\x02 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptions\"/\n\x18\x42\x65ginTransactionResponse\x12\x13\n\x0btransaction\x18\x01 \x01(\x0c\"g\n\rCommitRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x06writes\x18\x02 \x03(\x0b\x32\x1a.google.firestore.v1.Write\x12\x13\n\x0btransaction\x18\x03 \x01(\x0c\"z\n\x0e\x43ommitResponse\x12\x37\n\rwrite_results\x18\x01 \x03(\x0b\x32 .google.firestore.v1.WriteResult\x12/\n\x0b\x63ommit_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"B\n\x0fRollbackRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0btransaction\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"\xdd\x02\n\x0fRunQueryRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12@\n\x10structured_query\x18\x02 \x01(\x0b\x32$.google.firestore.v1.StructuredQueryH\x00\x12\x15\n\x0btransaction\x18\x05 \x01(\x0cH\x01\x12\x42\n\x0fnew_transaction\x18\x06 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptionsH\x01\x12/\n\tread_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x41\n\x0f\x65xplain_options\x18\n \x01(\x0b\x32#.google.firestore.v1.ExplainOptionsB\x03\xe0\x41\x01\x42\x0c\n\nquery_typeB\x16\n\x14\x63onsistency_selector\"\x87\x02\n\x10RunQueryResponse\x12\x13\n\x0btransaction\x18\x02 \x01(\x0c\x12/\n\x08\x64ocument\x18\x01 \x01(\x0b\x32\x1d.google.firestore.v1.Document\x12-\n\tread_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fskipped_results\x18\x04 \x01(\x05\x12\x0e\n\x04\x64one\x18\x06 \x01(\x08H\x00\x12<\n\x0f\x65xplain_metrics\x18\x0b \x01(\x0b\x32#.google.firestore.v1.ExplainMetricsB\x17\n\x15\x63ontinuation_selector\"\xac\x02\n\x16\x45xecutePipelineRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x13structured_pipeline\x18\x02 \x01(\x0b\x32\'.google.firestore.v1.StructuredPipelineH\x00\x12\x15\n\x0btransaction\x18\x05 \x01(\x0cH\x01\x12\x42\n\x0fnew_transaction\x18\x06 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptionsH\x01\x12/\n\tread_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x42\x0f\n\rpipeline_typeB\x16\n\x14\x63onsistency_selector\"\xcc\x01\n\x17\x45xecutePipelineResponse\x12\x13\n\x0btransaction\x18\x01 \x01(\x0c\x12.\n\x07results\x18\x02 \x03(\x0b\x32\x1d.google.firestore.v1.Document\x12\x32\n\x0e\x65xecution_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\rexplain_stats\x18\x04 \x01(\x0b\x32!.google.firestore.v1.ExplainStats\"\xff\x02\n\x1aRunAggregationQueryRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12W\n\x1cstructured_aggregation_query\x18\x02 \x01(\x0b\x32/.google.firestore.v1.StructuredAggregationQueryH\x00\x12\x15\n\x0btransaction\x18\x04 \x01(\x0cH\x01\x12\x42\n\x0fnew_transaction\x18\x05 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptionsH\x01\x12/\n\tread_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x41\n\x0f\x65xplain_options\x18\x08 \x01(\x0b\x32#.google.firestore.v1.ExplainOptionsB\x03\xe0\x41\x01\x42\x0c\n\nquery_typeB\x16\n\x14\x63onsistency_selector\"\xd7\x01\n\x1bRunAggregationQueryResponse\x12\x36\n\x06result\x18\x01 \x01(\x0b\x32&.google.firestore.v1.AggregationResult\x12\x13\n\x0btransaction\x18\x02 \x01(\x0c\x12-\n\tread_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x0f\x65xplain_metrics\x18\n \x01(\x0b\x32#.google.firestore.v1.ExplainMetrics\"\x85\x02\n\x15PartitionQueryRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12@\n\x10structured_query\x18\x02 \x01(\x0b\x32$.google.firestore.v1.StructuredQueryH\x00\x12\x17\n\x0fpartition_count\x18\x03 \x01(\x03\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12/\n\tread_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x42\x0c\n\nquery_typeB\x16\n\x14\x63onsistency_selector\"b\n\x16PartitionQueryResponse\x12/\n\npartitions\x18\x01 \x03(\x0b\x32\x1b.google.firestore.v1.Cursor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe8\x01\n\x0cWriteRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tstream_id\x18\x02 \x01(\t\x12*\n\x06writes\x18\x03 \x03(\x0b\x32\x1a.google.firestore.v1.Write\x12\x14\n\x0cstream_token\x18\x04 \x01(\x0c\x12=\n\x06labels\x18\x05 \x03(\x0b\x32-.google.firestore.v1.WriteRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa2\x01\n\rWriteResponse\x12\x11\n\tstream_id\x18\x01 \x01(\t\x12\x14\n\x0cstream_token\x18\x02 \x01(\x0c\x12\x37\n\rwrite_results\x18\x03 \x03(\x0b\x32 .google.firestore.v1.WriteResult\x12/\n\x0b\x63ommit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xf2\x01\n\rListenRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\nadd_target\x18\x02 \x01(\x0b\x32\x1b.google.firestore.v1.TargetH\x00\x12\x17\n\rremove_target\x18\x03 \x01(\x05H\x00\x12>\n\x06labels\x18\x04 \x03(\x0b\x32..google.firestore.v1.ListenRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0f\n\rtarget_change\"\xd5\x02\n\x0eListenResponse\x12:\n\rtarget_change\x18\x02 \x01(\x0b\x32!.google.firestore.v1.TargetChangeH\x00\x12>\n\x0f\x64ocument_change\x18\x03 \x01(\x0b\x32#.google.firestore.v1.DocumentChangeH\x00\x12>\n\x0f\x64ocument_delete\x18\x04 \x01(\x0b\x32#.google.firestore.v1.DocumentDeleteH\x00\x12>\n\x0f\x64ocument_remove\x18\x06 \x01(\x0b\x32#.google.firestore.v1.DocumentRemoveH\x00\x12\x36\n\x06\x66ilter\x18\x05 \x01(\x0b\x32$.google.firestore.v1.ExistenceFilterH\x00\x42\x0f\n\rresponse_type\"\xd6\x03\n\x06Target\x12\x38\n\x05query\x18\x02 \x01(\x0b\x32\'.google.firestore.v1.Target.QueryTargetH\x00\x12@\n\tdocuments\x18\x03 \x01(\x0b\x32+.google.firestore.v1.Target.DocumentsTargetH\x00\x12\x16\n\x0cresume_token\x18\x04 \x01(\x0cH\x01\x12/\n\tread_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x11\n\ttarget_id\x18\x05 \x01(\x05\x12\x0c\n\x04once\x18\x06 \x01(\x08\x12\x33\n\x0e\x65xpected_count\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x1a$\n\x0f\x44ocumentsTarget\x12\x11\n\tdocuments\x18\x02 \x03(\t\x1am\n\x0bQueryTarget\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12@\n\x10structured_query\x18\x02 \x01(\x0b\x32$.google.firestore.v1.StructuredQueryH\x00\x42\x0c\n\nquery_typeB\r\n\x0btarget_typeB\r\n\x0bresume_type\"\xaa\x02\n\x0cTargetChange\x12N\n\x12target_change_type\x18\x01 \x01(\x0e\x32\x32.google.firestore.v1.TargetChange.TargetChangeType\x12\x12\n\ntarget_ids\x18\x02 \x03(\x05\x12!\n\x05\x63\x61use\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x14\n\x0cresume_token\x18\x04 \x01(\x0c\x12-\n\tread_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"N\n\x10TargetChangeType\x12\r\n\tNO_CHANGE\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x12\x0b\n\x07\x43URRENT\x10\x03\x12\t\n\x05RESET\x10\x04\"\x9f\x01\n\x18ListCollectionIdsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12/\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x16\n\x14\x63onsistency_selector\"L\n\x19ListCollectionIdsResponse\x12\x16\n\x0e\x63ollection_ids\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc9\x01\n\x11\x42\x61tchWriteRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x06writes\x18\x02 \x03(\x0b\x32\x1a.google.firestore.v1.Write\x12\x42\n\x06labels\x18\x03 \x03(\x0b\x32\x32.google.firestore.v1.BatchWriteRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"q\n\x12\x42\x61tchWriteResponse\x12\x37\n\rwrite_results\x18\x01 \x03(\x0b\x32 .google.firestore.v1.WriteResult\x12\"\n\x06status\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status2\xfb\x1b\n\tFirestore\x12\x8f\x01\n\x0bGetDocument\x12\'.google.firestore.v1.GetDocumentRequest\x1a\x1d.google.firestore.v1.Document\"8\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/databases/*/documents/*/**}\x12\xf5\x01\n\rListDocuments\x12).google.firestore.v1.ListDocumentsRequest\x1a*.google.firestore.v1.ListDocumentsResponse\"\x8c\x01\x82\xd3\xe4\x93\x02\x85\x01\x12\x42/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}Z?\x12=/v1/{parent=projects/*/databases/*/documents}/{collection_id}\x12\xbf\x01\n\x0eUpdateDocument\x12*.google.firestore.v1.UpdateDocumentRequest\x1a\x1d.google.firestore.v1.Document\"b\xda\x41\x14\x64ocument,update_mask\x82\xd3\xe4\x93\x02\x45\x32\x39/v1/{document.name=projects/*/databases/*/documents/*/**}:\x08\x64ocument\x12\x95\x01\n\x0e\x44\x65leteDocument\x12*.google.firestore.v1.DeleteDocumentRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/databases/*/documents/*/**}\x12\xb9\x01\n\x11\x42\x61tchGetDocuments\x12-.google.firestore.v1.BatchGetDocumentsRequest\x1a..google.firestore.v1.BatchGetDocumentsResponse\"C\x82\xd3\xe4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:batchGet:\x01*0\x01\x12\xc7\x01\n\x10\x42\x65ginTransaction\x12,.google.firestore.v1.BeginTransactionRequest\x1a-.google.firestore.v1.BeginTransactionResponse\"V\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x45\"@/v1/{database=projects/*/databases/*}/documents:beginTransaction:\x01*\x12\xa6\x01\n\x06\x43ommit\x12\".google.firestore.v1.CommitRequest\x1a#.google.firestore.v1.CommitResponse\"S\xda\x41\x0f\x64\x61tabase,writes\x82\xd3\xe4\x93\x02;\"6/v1/{database=projects/*/databases/*}/documents:commit:\x01*\x12\xa4\x01\n\x08Rollback\x12$.google.firestore.v1.RollbackRequest\x1a\x16.google.protobuf.Empty\"Z\xda\x41\x14\x64\x61tabase,transaction\x82\xd3\xe4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:rollback:\x01*\x12\xdf\x01\n\x08RunQuery\x12$.google.firestore.v1.RunQueryRequest\x1a%.google.firestore.v1.RunQueryResponse\"\x83\x01\x82\xd3\xe4\x93\x02}\"6/v1/{parent=projects/*/databases/*/documents}:runQuery:\x01*Z@\";/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery:\x01*0\x01\x12\x9e\x02\n\x0f\x45xecutePipeline\x12+.google.firestore.v1.ExecutePipelineRequest\x1a,.google.firestore.v1.ExecutePipelineResponse\"\xad\x01\x82\xd3\xe4\x93\x02\x44\"?/v1/{database=projects/*/databases/*}/documents:executePipeline:\x01*\x8a\xd3\xe4\x93\x02]\x12&\n\x08\x64\x61tabase\x12\x1aprojects/{project_id=*}/**\x12\x33\n\x08\x64\x61tabase\x12\'projects/*/databases/{database_id=*}/**0\x01\x12\x97\x02\n\x13RunAggregationQuery\x12/.google.firestore.v1.RunAggregationQueryRequest\x1a\x30.google.firestore.v1.RunAggregationQueryResponse\"\x9a\x01\x82\xd3\xe4\x93\x02\x93\x01\"A/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery:\x01*ZK\"F/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery:\x01*0\x01\x12\xfc\x01\n\x0ePartitionQuery\x12*.google.firestore.v1.PartitionQueryRequest\x1a+.google.firestore.v1.PartitionQueryResponse\"\x90\x01\x82\xd3\xe4\x93\x02\x89\x01\"] + # 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-firestore-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/routing.rb new file mode 100644 index 000000000000..d777329024e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/routing.rb @@ -0,0 +1,459 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Specifies the routing information that should be sent along with the request + # in the form of routing header. + # **NOTE:** All service configuration rules follow the "last one wins" order. + # + # The examples below will apply to an RPC which has the following request type: + # + # Message Definition: + # + # message Request { + # // The name of the Table + # // Values can be of the following formats: + # // - `projects//tables/
` + # // - `projects//instances//tables/
` + # // - `region//zones//tables/
` + # string table_name = 1; + # + # // This value specifies routing for replication. + # // It can be in the following formats: + # // - `profiles/` + # // - a legacy `profile_id` that can be any string + # string app_profile_id = 2; + # } + # + # Example message: + # + # { + # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, + # app_profile_id: profiles/prof_qux + # } + # + # The routing header consists of one or multiple key-value pairs. Every key + # and value must be percent-encoded, and joined together in the format of + # `key1=value1&key2=value2`. + # The examples below skip the percent-encoding for readability. + # + # Example 1 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key equal to the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`. + # routing_parameters { + # field: "app_profile_id" + # } + # }; + # + # result: + # + # x-goog-request-params: app_profile_id=profiles/prof_qux + # + # Example 2 + # + # Extracting a field from the request to put into the routing header + # unchanged, with the key different from the field name. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `app_profile_id`, but name it `routing_id` in the header. + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 3 + # + # Extracting a field from the request to put into the routing + # header, while matching a path template syntax on the field's value. + # + # NB: it is more useful to send nothing than to send garbage for the purpose + # of dynamic routing, since garbage pollutes cache. Thus the matching. + # + # Sub-example 3a + # + # The field matches the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with project-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Sub-example 3b + # + # The field does not match the template. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed (with region-based + # // syntax). + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # }; + # + # result: + # + # + # + # Sub-example 3c + # + # Multiple alternative conflictingly named path templates are + # specified. The one that matches is used to construct the header. + # + # annotation: + # + # option (google.api.routing) = { + # // Take the `table_name`, if it's well-formed, whether + # // using the region- or projects-based syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=regions/*/zones/*/**}" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_name=projects/*/instances/*/**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_name=projects/proj_foo/instances/instance_bar/table/table_baz + # + # Example 4 + # + # Extracting a single routing header key-value pair by matching a + # template syntax on (a part of) a single request field. + # + # annotation: + # + # option (google.api.routing) = { + # // Take just the project id from the `table_name` field. + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=projects/proj_foo + # + # Example 5 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on (parts of) a single request + # field. The last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // If the `table_name` does not have instances information, + # // take just the project id for routing. + # // Otherwise take project + instance. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*/instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # routing_id=projects/proj_foo/instances/instance_bar + # + # Example 6 + # + # Extracting multiple routing header key-value pairs by matching + # several non-conflicting path templates on (parts of) a single request field. + # + # Sub-example 6a + # + # Make the templates strict, so that if the `table_name` does not + # have an instance information, nothing is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code needs two keys instead of one composite + # // but works only for the tables with the "project-instance" name + # // syntax. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/instances/*/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Sub-example 6b + # + # Make the templates loose, so that if the `table_name` does not + # have an instance information, just the project id part is sent. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing code wants two keys instead of one composite + # // but will work with just the `project_id` for tables without + # // an instance in the `table_name`. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{instance_id=instances/*}/**" + # } + # }; + # + # result (is the same as 6a for our example message because it has the instance + # information): + # + # x-goog-request-params: + # project_id=projects/proj_foo&instance_id=instances/instance_bar + # + # Example 7 + # + # Extracting multiple routing header key-value pairs by matching + # several path templates on multiple request fields. + # + # NB: note that here there is no way to specify sending nothing if one of the + # fields does not match its template. E.g. if the `table_name` is in the wrong + # format, the `project_id` will not be sent, but the `routing_id` will be. + # The backend routing code has to be aware of that and be prepared to not + # receive a full complement of keys if it expects multiple. + # + # annotation: + # + # option (google.api.routing) = { + # // The routing needs both `project_id` and `routing_id` + # // (from the `app_profile_id` field) for routing. + # + # routing_parameters { + # field: "table_name" + # path_template: "{project_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # project_id=projects/proj_foo&routing_id=profiles/prof_qux + # + # Example 8 + # + # Extracting a single routing header key-value pair by matching + # several conflictingly named path templates on several request fields. The + # last template to match "wins" the conflict. + # + # annotation: + # + # option (google.api.routing) = { + # // The `routing_id` can be a project id or a region id depending on + # // the table name format, but only if the `app_profile_id` is not set. + # // If `app_profile_id` is set it should be used instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=regions/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # }; + # + # result: + # + # x-goog-request-params: routing_id=profiles/prof_qux + # + # Example 9 + # + # Bringing it all together. + # + # annotation: + # + # option (google.api.routing) = { + # // For routing both `table_location` and a `routing_id` are needed. + # // + # // table_location can be either an instance id or a region+zone id. + # // + # // For `routing_id`, take the value of `app_profile_id` + # // - If it's in the format `profiles/`, send + # // just the `` part. + # // - If it's any other literal, send it as is. + # // If the `app_profile_id` is empty, and the `table_name` starts with + # // the project_id, send that instead. + # + # routing_parameters { + # field: "table_name" + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{table_location=regions/*/zones/*}/tables/*" + # } + # routing_parameters { + # field: "table_name" + # path_template: "{routing_id=projects/*}/**" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "{routing_id=**}" + # } + # routing_parameters { + # field: "app_profile_id" + # path_template: "profiles/{routing_id=*}" + # } + # }; + # + # result: + # + # x-goog-request-params: + # table_location=instances/instance_bar&routing_id=prof_qux + # @!attribute [rw] routing_parameters + # @return [::Array<::Google::Api::RoutingParameter>] + # A collection of Routing Parameter specifications. + # **NOTE:** If multiple Routing Parameters describe the same key + # (via the `path_template` field or via the `field` field when + # `path_template` is not provided), "last one wins" rule + # determines which Parameter gets used. + # See the examples for more details. + class RoutingRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A projection from an input message to the GRPC or REST header. + # @!attribute [rw] field + # @return [::String] + # A request field to extract the header key-value pair from. + # @!attribute [rw] path_template + # @return [::String] + # A pattern matching the key-value field. Optional. + # If not specified, the whole field specified in the `field` field will be + # taken as value, and its name used as key. If specified, it MUST contain + # exactly one named segment (along with any number of unnamed segments) The + # pattern will be matched over the field specified in the `field` field, then + # if the match is successful: + # - the name of the single named segment will be used as a header name, + # - the match value of the segment will be used as a header value; + # if the match is NOT successful, nothing will be sent. + # + # Example: + # + # -- This is a field in the request message + # | that the header value will be extracted from. + # | + # | -- This is the key name in the + # | | routing header. + # V | + # field: "table_name" v + # path_template: "projects/*/{table_location=instances/*}/tables/*" + # ^ ^ + # | | + # In the {} brackets is the pattern that -- | + # specifies what to extract from the | + # field as a value to be sent. | + # | + # The string in the field must match the whole pattern -- + # before brackets, inside brackets, after brackets. + # + # When looking at this specific example, we can see that: + # - A key-value pair with the key `table_location` + # and the value matching `instances/*` should be added + # to the x-goog-request-params routing header. + # - The value is extracted from the request message's `table_name` field + # if it matches the full pattern specified: + # `projects/*/instances/*/tables/*`. + # + # **NB:** If the `path_template` field is not provided, the key name is + # equal to the field name, and the whole field should be sent as a value. + # This makes the pattern for the field and the value functionally equivalent + # to `**`, and the configuration + # + # { + # field: "table_name" + # } + # + # is a functionally equivalent shorthand to: + # + # { + # field: "table_name" + # path_template: "{table_name=**}" + # } + # + # See Example 1 for more details. + class RoutingParameter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/aggregation_result.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/aggregation_result.rb new file mode 100644 index 000000000000..cbb83ff369da --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/aggregation_result.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! + + +module Google + module Cloud + module Firestore + module V1 + # The result of a single bucket from a Firestore aggregation query. + # + # The keys of `aggregate_fields` are the same for all results in an aggregation + # query, unlike document queries which can have different fields present for + # each result. + # @!attribute [rw] aggregate_fields + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Firestore::V1::Value}] + # The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. + # + # The key is the + # {::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation#alias alias} + # assigned to the aggregation function on input and the size of this map + # equals the number of aggregation functions in the query. + class AggregationResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Firestore::V1::Value] + class AggregateFieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/bloom_filter.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/bloom_filter.rb new file mode 100644 index 000000000000..dd4118168b2c --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/bloom_filter.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! + + +module Google + module Cloud + module Firestore + module V1 + # A sequence of bits, encoded in a byte array. + # + # Each byte in the `bitmap` byte array stores 8 bits of the sequence. The only + # exception is the last byte, which may store 8 _or fewer_ bits. The `padding` + # defines the number of bits of the last byte to be ignored as "padding". The + # values of these "padding" bits are unspecified and must be ignored. + # + # To retrieve the first bit, bit 0, calculate: `(bitmap[0] & 0x01) != 0`. + # To retrieve the second bit, bit 1, calculate: `(bitmap[0] & 0x02) != 0`. + # To retrieve the third bit, bit 2, calculate: `(bitmap[0] & 0x04) != 0`. + # To retrieve the fourth bit, bit 3, calculate: `(bitmap[0] & 0x08) != 0`. + # To retrieve bit n, calculate: `(bitmap[n / 8] & (0x01 << (n % 8))) != 0`. + # + # The "size" of a `BitSequence` (the number of bits it contains) is calculated + # by this formula: `(bitmap.length * 8) - padding`. + # @!attribute [rw] bitmap + # @return [::String] + # The bytes that encode the bit sequence. + # May have a length of zero. + # @!attribute [rw] padding + # @return [::Integer] + # The number of bits of the last byte in `bitmap` to ignore as "padding". + # If the length of `bitmap` is zero, then this value must be `0`. + # Otherwise, this value must be between 0 and 7, inclusive. + class BitSequence + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter). + # + # The bloom filter hashes the entries with MD5 and treats the resulting 128-bit + # hash as 2 distinct 64-bit hash values, interpreted as unsigned integers + # using 2's complement encoding. + # + # These two hash values, named `h1` and `h2`, are then used to compute the + # `hash_count` hash values using the formula, starting at `i=0`: + # + # h(i) = h1 + (i * h2) + # + # These resulting values are then taken modulo the number of bits in the bloom + # filter to get the bits of the bloom filter to test for the given entry. + # @!attribute [rw] bits + # @return [::Google::Cloud::Firestore::V1::BitSequence] + # The bloom filter data. + # @!attribute [rw] hash_count + # @return [::Integer] + # The number of hashes used by the algorithm. + class BloomFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/common.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/common.rb new file mode 100644 index 000000000000..aa8ef8a9180c --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/common.rb @@ -0,0 +1,101 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module V1 + # A set of field paths on a document. + # Used to restrict a get or update operation on a document to a subset of its + # fields. + # This is different from standard field masks, as this is always scoped to a + # {::Google::Cloud::Firestore::V1::Document Document}, and takes in account the dynamic + # nature of {::Google::Cloud::Firestore::V1::Value Value}. + # @!attribute [rw] field_paths + # @return [::Array<::String>] + # The list of field paths in the mask. See + # {::Google::Cloud::Firestore::V1::Document#fields Document.fields} for a field path + # syntax reference. + class DocumentMask + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A precondition on a document, used for conditional operations. + # @!attribute [rw] exists + # @return [::Boolean] + # When set to `true`, the target document must exist. + # When set to `false`, the target document must not exist. + # + # Note: The following fields are mutually exclusive: `exists`, `update_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # When set, the target document must exist and have been last updated at + # that time. Timestamp must be microsecond aligned. + # + # Note: The following fields are mutually exclusive: `update_time`, `exists`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Precondition + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options for creating a new transaction. + # @!attribute [rw] read_only + # @return [::Google::Cloud::Firestore::V1::TransactionOptions::ReadOnly] + # The transaction can only be used for read operations. + # + # Note: The following fields are mutually exclusive: `read_only`, `read_write`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] read_write + # @return [::Google::Cloud::Firestore::V1::TransactionOptions::ReadWrite] + # The transaction can be used for both read and write operations. + # + # Note: The following fields are mutually exclusive: `read_write`, `read_only`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class TransactionOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Options for a transaction that can be used to read and write documents. + # + # Firestore does not allow 3rd party auth requests to create read-write. + # transactions. + # @!attribute [rw] retry_transaction + # @return [::String] + # An optional transaction to retry. + class ReadWrite + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Options for a transaction that can only be used to read documents. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Reads documents at the given time. + # + # This must be a microsecond precision timestamp within the past one + # hour, or if Point-in-Time Recovery is enabled, can additionally be a + # whole minute timestamp within the past 7 days. + class ReadOnly + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/document.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/document.rb new file mode 100644 index 000000000000..c42e0dce26f3 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/document.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module V1 + # A Firestore document. + # + # Must not exceed 1 MiB - 4 bytes. + # @!attribute [rw] name + # @return [::String] + # The resource name of the document, for example + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Firestore::V1::Value}] + # The document's fields. + # + # The map keys represent field names. + # + # Field names matching the regular expression `__.*__` are reserved. Reserved + # field names are forbidden except in certain documented contexts. The field + # names, represented as UTF-8, must not exceed 1,500 bytes and cannot be + # empty. + # + # Field paths may be used in other contexts to refer to structured fields + # defined here. For `map_value`, the field path is represented by a + # dot-delimited (`.`) string of segments. Each segment is either a simple + # field name (defined below) or a quoted field name. For example, the + # structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" + # }}}` would be represented by the field path `` foo.`x&y` ``. + # + # A simple field name contains only characters `a` to `z`, `A` to `Z`, + # `0` to `9`, or `_`, and must not start with `0` to `9`. For example, + # `foo_bar_17`. + # + # A quoted field name starts and ends with `` ` `` and + # may contain any character. Some characters, including `` ` ``, must be + # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and + # `` `bak\`tik` `` represents `` bak`tik ``. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the document was created. + # + # This value increases monotonically when a document is deleted then + # recreated. It can also be compared to values from other documents and + # the `read_time` of a query. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which the document was last changed. + # + # This value is initially set to the `create_time` then increases + # monotonically with each change to the document. It can also be + # compared to values from other documents and the `read_time` of a query. + class Document + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Firestore::V1::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A message that can hold any of the supported value types. + # @!attribute [rw] null_value + # @return [::Google::Protobuf::NullValue] + # A null value. + # + # Note: The following fields are mutually exclusive: `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] boolean_value + # @return [::Boolean] + # A boolean value. + # + # Note: The following fields are mutually exclusive: `boolean_value`, `null_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] integer_value + # @return [::Integer] + # An integer value. + # + # Note: The following fields are mutually exclusive: `integer_value`, `null_value`, `boolean_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] double_value + # @return [::Float] + # A double value. + # + # Note: The following fields are mutually exclusive: `double_value`, `null_value`, `boolean_value`, `integer_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] timestamp_value + # @return [::Google::Protobuf::Timestamp] + # A timestamp value. + # + # Precise only to microseconds. When stored, any additional precision is + # rounded down. + # + # Note: The following fields are mutually exclusive: `timestamp_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_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] + # A string value. + # + # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. + # Only the first 1,500 bytes of the UTF-8 representation are considered by + # queries. + # + # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] bytes_value + # @return [::String] + # A bytes value. + # + # Must not exceed 1 MiB - 89 bytes. + # Only the first 1,500 bytes are considered by queries. + # + # Note: The following fields are mutually exclusive: `bytes_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] reference_value + # @return [::String] + # A reference to a document. For example: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # + # Note: The following fields are mutually exclusive: `reference_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] geo_point_value + # @return [::Google::Type::LatLng] + # A geo point value representing a point on the surface of Earth. + # + # Note: The following fields are mutually exclusive: `geo_point_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] array_value + # @return [::Google::Cloud::Firestore::V1::ArrayValue] + # An array value. + # + # Cannot directly contain another array value, though can contain a + # map which contains another array. + # + # Note: The following fields are mutually exclusive: `array_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] map_value + # @return [::Google::Cloud::Firestore::V1::MapValue] + # A map value. + # + # Note: The following fields are mutually exclusive: `map_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] field_reference_value + # @return [::String] + # Value which references a field. + # + # This is considered relative (vs absolute) since it only refers to a field + # and not a field within a particular document. + # + # **Requires:** + # + # * Must follow [field reference][FieldReference.field_path] limitations. + # + # * Not allowed to be used when writing documents. + # + # Note: The following fields are mutually exclusive: `field_reference_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] function_value + # @return [::Google::Cloud::Firestore::V1::Function] + # A value that represents an unevaluated expression. + # + # **Requires:** + # + # * Not allowed to be used when writing documents. + # + # Note: The following fields are mutually exclusive: `function_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] pipeline_value + # @return [::Google::Cloud::Firestore::V1::Pipeline] + # A value that represents an unevaluated pipeline. + # + # **Requires:** + # + # * Not allowed to be used when writing documents. + # + # Note: The following fields are mutually exclusive: `pipeline_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_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 + + # An array value. + # @!attribute [rw] values + # @return [::Array<::Google::Cloud::Firestore::V1::Value>] + # Values in the array. + class ArrayValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A map value. + # @!attribute [rw] fields + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Firestore::V1::Value}] + # The map's fields. + # + # The map keys represent field names. Field names matching the regular + # expression `__.*__` are reserved. Reserved field names are forbidden except + # in certain documented contexts. The map keys, represented as UTF-8, must + # not exceed 1,500 bytes and cannot be empty. + class MapValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Firestore::V1::Value] + class FieldsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Represents an unevaluated scalar expression. + # + # For example, the expression `like(user_name, "%alice%")` is represented as: + # + # ``` + # name: "like" + # args { field_reference: "user_name" } + # args { string_value: "%alice%" } + # ``` + # @!attribute [rw] name + # @return [::String] + # Required. The name of the function to evaluate. + # + # **Requires:** + # + # * must be in snake case (lower case with underscore separator). + # @!attribute [rw] args + # @return [::Array<::Google::Cloud::Firestore::V1::Value>] + # Optional. Ordered list of arguments the given function expects. + # @!attribute [rw] options + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Firestore::V1::Value}] + # Optional. Optional named arguments that certain functions may support. + class Function + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Firestore::V1::Value] + class OptionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # A Firestore query represented as an ordered list of operations / stages. + # @!attribute [rw] stages + # @return [::Array<::Google::Cloud::Firestore::V1::Pipeline::Stage>] + # Required. Ordered list of stages to evaluate. + class Pipeline + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A single operation within a pipeline. + # + # A stage is made up of a unique name, and a list of arguments. The exact + # number of arguments & types is dependent on the stage type. + # + # To give an example, the stage `filter(state = "MD")` would be encoded as: + # + # ``` + # name: "filter" + # args { + # function_value { + # name: "eq" + # args { field_reference_value: "state" } + # args { string_value: "MD" } + # } + # } + # ``` + # + # See public documentation for the full list. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the stage to evaluate. + # + # **Requires:** + # + # * must be in snake case (lower case with underscore separator). + # @!attribute [rw] args + # @return [::Array<::Google::Cloud::Firestore::V1::Value>] + # Optional. Ordered list of arguments the given stage expects. + # @!attribute [rw] options + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Firestore::V1::Value}] + # Optional. Optional named arguments that certain functions may support. + class Stage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Firestore::V1::Value] + class OptionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/explain_stats.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/explain_stats.rb new file mode 100644 index 000000000000..1ef7dad15f8c --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/explain_stats.rb @@ -0,0 +1,41 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module V1 + # Pipeline explain stats. + # + # Depending on the explain options in the original request, this can contain + # the optimized plan and / or execution stats. + # @!attribute [rw] data + # @return [::Google::Protobuf::Any] + # The format depends on the `output_format` options in the request. + # + # Currently there are two supported options: `TEXT` and `JSON`. + # Both supply a `google.protobuf.StringValue`. + class ExplainStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/firestore.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/firestore.rb new file mode 100644 index 000000000000..a070482dd304 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/firestore.rb @@ -0,0 +1,1110 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module V1 + # The request for + # {::Google::Cloud::Firestore::V1::Firestore::Client#get_document Firestore.GetDocument}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Document to get. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # @!attribute [rw] mask + # @return [::Google::Cloud::Firestore::V1::DocumentMask] + # The fields to return. If not set, returns all fields. + # + # If the document has a field that is not present in this mask, that field + # will not be returned in the response. + # @!attribute [rw] transaction + # @return [::String] + # Reads the document in a transaction. + # + # Note: The following fields are mutually exclusive: `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Reads the version of the document at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following fields are mutually exclusive: `read_time`, `transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class GetDocumentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::V1::Firestore::Client#list_documents Firestore.ListDocuments}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. In the format: + # `projects/{project_id}/databases/{database_id}/documents` or + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # + # For example: + # `projects/my-project/databases/my-database/documents` or + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @!attribute [rw] collection_id + # @return [::String] + # Optional. The collection ID, relative to `parent`, to list. + # + # For example: `chatrooms` or `messages`. + # + # This is optional, and when not provided, Firestore will list documents + # from all collections under the provided `parent`. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The maximum number of documents to return in a single response. + # + # Firestore may return fewer than this value. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A page token, received from a previous `ListDocuments` response. + # + # Provide this to retrieve the subsequent page. When paginating, all other + # parameters (with the exception of `page_size`) must match the values set + # in the request that generated the page token. + # @!attribute [rw] order_by + # @return [::String] + # Optional. The optional ordering of the documents to return. + # + # For example: `priority desc, __name__ desc`. + # + # This mirrors the {::Google::Cloud::Firestore::V1::StructuredQuery#order_by `ORDER BY`} + # used in Firestore queries but in a string representation. When absent, + # documents are ordered based on `__name__ ASC`. + # @!attribute [rw] mask + # @return [::Google::Cloud::Firestore::V1::DocumentMask] + # Optional. The fields to return. If not set, returns all fields. + # + # If a document has a field that is not present in this mask, that field + # will not be returned in the response. + # @!attribute [rw] transaction + # @return [::String] + # Perform the read as part of an already active transaction. + # + # Note: The following fields are mutually exclusive: `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Perform the read at the provided time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following fields are mutually exclusive: `read_time`, `transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] show_missing + # @return [::Boolean] + # If the list should show missing documents. + # + # A document is missing if it does not exist, but there are sub-documents + # nested underneath it. When true, such missing documents will be returned + # with a key but will not have fields, + # {::Google::Cloud::Firestore::V1::Document#create_time `create_time`}, or + # {::Google::Cloud::Firestore::V1::Document#update_time `update_time`} set. + # + # Requests with `show_missing` may not specify `where` or `order_by`. + class ListDocumentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Firestore::V1::Firestore::Client#list_documents Firestore.ListDocuments}. + # @!attribute [rw] documents + # @return [::Array<::Google::Cloud::Firestore::V1::Document>] + # The Documents found. + # @!attribute [rw] next_page_token + # @return [::String] + # A token to retrieve the next page of documents. + # + # If this field is omitted, there are no subsequent pages. + class ListDocumentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::V1::Firestore::Client#create_document Firestore.CreateDocument}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource. For example: + # `projects/{project_id}/databases/{database_id}/documents` or + # `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` + # @!attribute [rw] collection_id + # @return [::String] + # Required. The collection ID, relative to `parent`, to list. For example: + # `chatrooms`. + # @!attribute [rw] document_id + # @return [::String] + # The client-assigned document ID to use for this document. + # + # Optional. If not specified, an ID will be assigned by the service. + # @!attribute [rw] document + # @return [::Google::Cloud::Firestore::V1::Document] + # Required. The document to create. `name` must not be set. + # @!attribute [rw] mask + # @return [::Google::Cloud::Firestore::V1::DocumentMask] + # The fields to return. If not set, returns all fields. + # + # If the document has a field that is not present in this mask, that field + # will not be returned in the response. + class CreateDocumentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::V1::Firestore::Client#update_document Firestore.UpdateDocument}. + # @!attribute [rw] document + # @return [::Google::Cloud::Firestore::V1::Document] + # Required. The updated document. + # Creates the document if it does not already exist. + # @!attribute [rw] update_mask + # @return [::Google::Cloud::Firestore::V1::DocumentMask] + # The fields to update. + # None of the field paths in the mask may contain a reserved name. + # + # If the document exists on the server and has fields not referenced in the + # mask, they are left unchanged. + # Fields referenced in the mask, but not present in the input document, are + # deleted from the document on the server. + # @!attribute [rw] mask + # @return [::Google::Cloud::Firestore::V1::DocumentMask] + # The fields to return. If not set, returns all fields. + # + # If the document has a field that is not present in this mask, that field + # will not be returned in the response. + # @!attribute [rw] current_document + # @return [::Google::Cloud::Firestore::V1::Precondition] + # An optional precondition on the document. + # The request will fail if this is set and not met by the target document. + class UpdateDocumentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::V1::Firestore::Client#delete_document Firestore.DeleteDocument}. + # @!attribute [rw] name + # @return [::String] + # Required. The resource name of the Document to delete. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # @!attribute [rw] current_document + # @return [::Google::Cloud::Firestore::V1::Precondition] + # An optional precondition on the document. + # The request will fail if this is set and not met by the target document. + class DeleteDocumentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents Firestore.BatchGetDocuments}. + # @!attribute [rw] database + # @return [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @!attribute [rw] documents + # @return [::Array<::String>] + # The names of the documents to retrieve. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # The request will fail if any of the document is not a child resource of the + # given `database`. Duplicate names will be elided. + # @!attribute [rw] mask + # @return [::Google::Cloud::Firestore::V1::DocumentMask] + # The fields to return. If not set, returns all fields. + # + # If a document has a field that is not present in this mask, that field will + # not be returned in the response. + # @!attribute [rw] transaction + # @return [::String] + # Reads documents in a transaction. + # + # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] new_transaction + # @return [::Google::Cloud::Firestore::V1::TransactionOptions] + # Starts a new transaction and reads the documents. + # Defaults to a read-only transaction. + # The new transaction ID will be returned as the first response in the + # stream. + # + # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Reads documents as they were at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class BatchGetDocumentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The streamed response for + # {::Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents Firestore.BatchGetDocuments}. + # @!attribute [rw] found + # @return [::Google::Cloud::Firestore::V1::Document] + # A document that was requested. + # + # Note: The following fields are mutually exclusive: `found`, `missing`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] missing + # @return [::String] + # A document name that was requested but does not exist. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # + # Note: The following fields are mutually exclusive: `missing`, `found`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] transaction + # @return [::String] + # The transaction that was started as part of this request. + # Will only be set in the first response, and only if + # {::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest#new_transaction BatchGetDocumentsRequest.new_transaction} + # was set in the request. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the document was read. + # This may be monotically increasing, in this case the previous documents in + # the result stream are guaranteed not to have changed between their + # read_time and this one. + class BatchGetDocumentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction Firestore.BeginTransaction}. + # @!attribute [rw] database + # @return [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @!attribute [rw] options + # @return [::Google::Cloud::Firestore::V1::TransactionOptions] + # The options for the transaction. + # Defaults to a read-write transaction. + class BeginTransactionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction Firestore.BeginTransaction}. + # @!attribute [rw] transaction + # @return [::String] + # The transaction that was started. + class BeginTransactionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#commit Firestore.Commit}. + # @!attribute [rw] database + # @return [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @!attribute [rw] writes + # @return [::Array<::Google::Cloud::Firestore::V1::Write>] + # The writes to apply. + # + # Always executed atomically and in order. + # @!attribute [rw] transaction + # @return [::String] + # If set, applies all writes in this transaction, and commits it. + class CommitRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for {::Google::Cloud::Firestore::V1::Firestore::Client#commit Firestore.Commit}. + # @!attribute [rw] write_results + # @return [::Array<::Google::Cloud::Firestore::V1::WriteResult>] + # The result of applying the writes. + # + # This i-th write result corresponds to the i-th write in the + # request. + # @!attribute [rw] commit_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the commit occurred. Any read with an equal or greater + # `read_time` is guaranteed to see the effects of the commit. + class CommitResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#rollback Firestore.Rollback}. + # @!attribute [rw] database + # @return [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @!attribute [rw] transaction + # @return [::String] + # Required. The transaction to roll back. + class RollbackRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#run_query Firestore.RunQuery}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. In the format: + # `projects/{project_id}/databases/{database_id}/documents` or + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # For example: + # `projects/my-project/databases/my-database/documents` or + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @!attribute [rw] structured_query + # @return [::Google::Cloud::Firestore::V1::StructuredQuery] + # A structured query. + # @!attribute [rw] transaction + # @return [::String] + # Run the query within an already active transaction. + # + # The value here is the opaque transaction ID to execute the query in. + # + # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] new_transaction + # @return [::Google::Cloud::Firestore::V1::TransactionOptions] + # Starts a new transaction and reads the documents. + # Defaults to a read-only transaction. + # The new transaction ID will be returned as the first response in the + # stream. + # + # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Reads documents as they were at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] explain_options + # @return [::Google::Cloud::Firestore::V1::ExplainOptions] + # Optional. Explain options for the query. If set, additional query + # statistics will be returned. If not, only query results will be returned. + class RunQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Firestore::V1::Firestore::Client#run_query Firestore.RunQuery}. + # @!attribute [rw] transaction + # @return [::String] + # The transaction that was started as part of this request. + # Can only be set in the first response, and only if + # {::Google::Cloud::Firestore::V1::RunQueryRequest#new_transaction RunQueryRequest.new_transaction} + # was set in the request. If set, no other fields will be set in this + # response. + # @!attribute [rw] document + # @return [::Google::Cloud::Firestore::V1::Document] + # A query result, not set when reporting partial progress. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the document was read. This may be monotonically + # increasing; in this case, the previous documents in the result stream are + # guaranteed not to have changed between their `read_time` and this one. + # + # If the query returns no results, a response with `read_time` and no + # `document` will be sent, and this represents the time at which the query + # was run. + # @!attribute [rw] skipped_results + # @return [::Integer] + # The number of results that have been skipped due to an offset between + # the last response and the current response. + # @!attribute [rw] done + # @return [::Boolean] + # If present, Firestore has completely finished the request and no more + # documents will be returned. + # @!attribute [rw] explain_metrics + # @return [::Google::Cloud::Firestore::V1::ExplainMetrics] + # Query explain metrics. This is only present when the + # {::Google::Cloud::Firestore::V1::RunQueryRequest#explain_options RunQueryRequest.explain_options} + # is provided, and it is sent only once with the last response in the stream. + class RunQueryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::V1::Firestore::Client#execute_pipeline Firestore.ExecutePipeline}. + # @!attribute [rw] database + # @return [::String] + # Required. Database identifier, in the form + # `projects/{project}/databases/{database}`. + # @!attribute [rw] structured_pipeline + # @return [::Google::Cloud::Firestore::V1::StructuredPipeline] + # A pipelined operation. + # @!attribute [rw] transaction + # @return [::String] + # Run the query within an already active transaction. + # + # The value here is the opaque transaction ID to execute the query in. + # + # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] new_transaction + # @return [::Google::Cloud::Firestore::V1::TransactionOptions] + # Execute the pipeline in a new transaction. + # + # The identifier of the newly created transaction will be returned in the + # first response on the stream. This defaults to a read-only transaction. + # + # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Execute the pipeline in a snapshot transaction at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ExecutePipelineRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for [Firestore.Execute][]. + # @!attribute [rw] transaction + # @return [::String] + # Newly created transaction identifier. + # + # This field is only specified as part of the first response from the server, + # alongside the `results` field when the original request specified + # [ExecuteRequest.new_transaction][]. + # @!attribute [rw] results + # @return [::Array<::Google::Cloud::Firestore::V1::Document>] + # An ordered batch of results returned executing a pipeline. + # + # The batch size is variable, and can even be zero for when only a partial + # progress message is returned. + # + # The fields present in the returned documents are only those that were + # explicitly requested in the pipeline, this includes those like + # {::Google::Cloud::Firestore::V1::Document#name `__name__`} and + # {::Google::Cloud::Firestore::V1::Document#update_time `__update_time__`}. This is + # explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` + # RPCs which always return such fields even when they are not specified in + # the {::Google::Cloud::Firestore::V1::DocumentMask `mask`}. + # @!attribute [rw] execution_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the results are valid. + # + # This is a (not strictly) monotonically increasing value across multiple + # responses in the same stream. The API guarantees that all previously + # returned results are still valid at the latest `execution_time`. This + # allows the API consumer to treat the query if it ran at the latest + # `execution_time` returned. + # + # If the query returns no results, a response with `execution_time` and no + # `results` will be sent, and this represents the time at which the operation + # was run. + # @!attribute [rw] explain_stats + # @return [::Google::Cloud::Firestore::V1::ExplainStats] + # Query explain stats. + # + # This is present on the **last** response if the request configured explain + # to run in 'analyze' or 'explain' mode in the pipeline options. If the query + # does not return any results, a response with `explain_stats` and no + # `results` will still be sent. + class ExecutePipelineResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query Firestore.RunAggregationQuery}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. In the format: + # `projects/{project_id}/databases/{database_id}/documents` or + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # For example: + # `projects/my-project/databases/my-database/documents` or + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @!attribute [rw] structured_aggregation_query + # @return [::Google::Cloud::Firestore::V1::StructuredAggregationQuery] + # An aggregation query. + # @!attribute [rw] transaction + # @return [::String] + # Run the aggregation within an already active transaction. + # + # The value here is the opaque transaction ID to execute the query in. + # + # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] new_transaction + # @return [::Google::Cloud::Firestore::V1::TransactionOptions] + # Starts a new transaction as part of the query, defaulting to read-only. + # + # The new transaction ID will be returned as the first response in the + # stream. + # + # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Executes the query at the given timestamp. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + # + # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] explain_options + # @return [::Google::Cloud::Firestore::V1::ExplainOptions] + # Optional. Explain options for the query. If set, additional query + # statistics will be returned. If not, only query results will be returned. + class RunAggregationQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query Firestore.RunAggregationQuery}. + # @!attribute [rw] result + # @return [::Google::Cloud::Firestore::V1::AggregationResult] + # A single aggregation result. + # + # Not present when reporting partial progress. + # @!attribute [rw] transaction + # @return [::String] + # The transaction that was started as part of this request. + # + # Only present on the first response when the request requested to start + # a new transaction. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the aggregate result was computed. This is always + # monotonically increasing; in this case, the previous AggregationResult in + # the result stream are guaranteed not to have changed between their + # `read_time` and this one. + # + # If the query returns no results, a response with `read_time` and no + # `result` will be sent, and this represents the time at which the query + # was run. + # @!attribute [rw] explain_metrics + # @return [::Google::Cloud::Firestore::V1::ExplainMetrics] + # Query explain metrics. This is only present when the + # {::Google::Cloud::Firestore::V1::RunAggregationQueryRequest#explain_options RunAggregationQueryRequest.explain_options} + # is provided, and it is sent only once with the last response in the stream. + class RunAggregationQueryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::V1::Firestore::Client#partition_query Firestore.PartitionQuery}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent resource name. In the format: + # `projects/{project_id}/databases/{database_id}/documents`. + # Document resource names are not supported; only database resource names + # can be specified. + # @!attribute [rw] structured_query + # @return [::Google::Cloud::Firestore::V1::StructuredQuery] + # A structured query. + # Query must specify collection with all descendants and be ordered by name + # ascending. Other filters, order bys, limits, offsets, and start/end + # cursors are not supported. + # @!attribute [rw] partition_count + # @return [::Integer] + # The desired maximum number of partition points. + # The partitions may be returned across multiple pages of results. + # The number must be positive. The actual number of partitions + # returned may be fewer. + # + # For example, this may be set to one fewer than the number of parallel + # queries to be run, or in running a data pipeline job, one fewer than the + # number of workers or compute instances available. + # @!attribute [rw] page_token + # @return [::String] + # The `next_page_token` value returned from a previous call to + # PartitionQuery that may be used to get an additional set of results. + # There are no ordering guarantees between sets of results. Thus, using + # multiple sets of results will require merging the different result sets. + # + # For example, two subsequent calls using a page_token may return: + # + # * cursor B, cursor M, cursor Q + # * cursor A, cursor U, cursor W + # + # To obtain a complete result set ordered with respect to the results of the + # query supplied to PartitionQuery, the results sets should be merged: + # cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of partitions to return in this call, subject to + # `partition_count`. + # + # For example, if `partition_count` = 10 and `page_size` = 8, the first call + # to PartitionQuery will return up to 8 partitions and a `next_page_token` + # if more results exist. A second call to PartitionQuery will return up to + # 2 partitions, to complete the total of 10 specified in `partition_count`. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Reads documents as they were at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + class PartitionQueryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response for + # {::Google::Cloud::Firestore::V1::Firestore::Client#partition_query Firestore.PartitionQuery}. + # @!attribute [rw] partitions + # @return [::Array<::Google::Cloud::Firestore::V1::Cursor>] + # Partition results. + # Each partition is a split point that can be used by RunQuery as a starting + # or end point for the query results. The RunQuery requests must be made with + # the same query supplied to this PartitionQuery request. The partition + # cursors will be ordered according to same ordering as the results of the + # query supplied to PartitionQuery. + # + # For example, if a PartitionQuery request returns partition cursors A and B, + # running the following three queries will return the entire result set of + # the original query: + # + # * query, end_at A + # * query, start_at A, end_at B + # * query, start_at B + # + # An empty result may indicate that the query has too few results to be + # partitioned, or that the query is not yet supported for partitioning. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that may be used to request an additional set of results, up + # to the number specified by `partition_count` in the PartitionQuery request. + # If blank, there are no more results. + class PartitionQueryResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#write Firestore.Write}. + # + # The first request creates a stream, or resumes an existing one from a token. + # + # When creating a new stream, the server replies with a response containing + # only an ID and a token, to use in the next request. + # + # When resuming a stream, the server first streams any responses later than the + # given token, then a response containing only an up-to-date token, to use in + # the next request. + # @!attribute [rw] database + # @return [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # This is only required in the first message. + # @!attribute [rw] stream_id + # @return [::String] + # The ID of the write stream to resume. + # This may only be set in the first message. When left empty, a new write + # stream will be created. + # @!attribute [rw] writes + # @return [::Array<::Google::Cloud::Firestore::V1::Write>] + # The writes to apply. + # + # Always executed atomically and in order. + # This must be empty on the first request. + # This may be empty on the last request. + # This must not be empty on all other requests. + # @!attribute [rw] stream_token + # @return [::String] + # A stream token that was previously sent by the server. + # + # The client should set this field to the token from the most recent + # {::Google::Cloud::Firestore::V1::WriteResponse WriteResponse} it has received. This + # acknowledges that the client has received responses up to this token. After + # sending this token, earlier tokens may not be used anymore. + # + # The server may close the stream if there are too many unacknowledged + # responses. + # + # Leave this field unset when creating a new stream. To resume a stream at + # a specific point, set this field and the `stream_id` field. + # + # Leave this field unset when creating a new stream. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels associated with this write request. + class WriteRequest + 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 + + # The response for {::Google::Cloud::Firestore::V1::Firestore::Client#write Firestore.Write}. + # @!attribute [rw] stream_id + # @return [::String] + # The ID of the stream. + # Only set on the first message, when a new stream was created. + # @!attribute [rw] stream_token + # @return [::String] + # A token that represents the position of this response in the stream. + # This can be used by a client to resume the stream at this point. + # + # This field is always set. + # @!attribute [rw] write_results + # @return [::Array<::Google::Cloud::Firestore::V1::WriteResult>] + # The result of applying the writes. + # + # This i-th write result corresponds to the i-th write in the + # request. + # @!attribute [rw] commit_time + # @return [::Google::Protobuf::Timestamp] + # The time at which the commit occurred. Any read with an equal or greater + # `read_time` is guaranteed to see the effects of the write. + class WriteResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request for {::Google::Cloud::Firestore::V1::Firestore::Client#listen Firestore.Listen} + # @!attribute [rw] database + # @return [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @!attribute [rw] add_target + # @return [::Google::Cloud::Firestore::V1::Target] + # A target to add to this stream. + # + # Note: The following fields are mutually exclusive: `add_target`, `remove_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] remove_target + # @return [::Integer] + # The ID of a target to remove from this stream. + # + # Note: The following fields are mutually exclusive: `remove_target`, `add_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels associated with this target change. + class ListenRequest + 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 + + # The response for {::Google::Cloud::Firestore::V1::Firestore::Client#listen Firestore.Listen}. + # @!attribute [rw] target_change + # @return [::Google::Cloud::Firestore::V1::TargetChange] + # Targets have changed. + # + # Note: The following fields are mutually exclusive: `target_change`, `document_change`, `document_delete`, `document_remove`, `filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] document_change + # @return [::Google::Cloud::Firestore::V1::DocumentChange] + # A {::Google::Cloud::Firestore::V1::Document Document} has changed. + # + # Note: The following fields are mutually exclusive: `document_change`, `target_change`, `document_delete`, `document_remove`, `filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] document_delete + # @return [::Google::Cloud::Firestore::V1::DocumentDelete] + # A {::Google::Cloud::Firestore::V1::Document Document} has been deleted. + # + # Note: The following fields are mutually exclusive: `document_delete`, `target_change`, `document_change`, `document_remove`, `filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] document_remove + # @return [::Google::Cloud::Firestore::V1::DocumentRemove] + # A {::Google::Cloud::Firestore::V1::Document Document} has been removed from a target + # (because it is no longer relevant to that target). + # + # Note: The following fields are mutually exclusive: `document_remove`, `target_change`, `document_change`, `document_delete`, `filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] filter + # @return [::Google::Cloud::Firestore::V1::ExistenceFilter] + # A filter to apply to the set of documents previously returned for the + # given target. + # + # Returned when documents may have been removed from the given target, but + # the exact documents are unknown. + # + # Note: The following fields are mutually exclusive: `filter`, `target_change`, `document_change`, `document_delete`, `document_remove`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ListenResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A specification of a set of documents to listen to. + # @!attribute [rw] query + # @return [::Google::Cloud::Firestore::V1::Target::QueryTarget] + # A target specified by a query. + # + # Note: The following fields are mutually exclusive: `query`, `documents`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] documents + # @return [::Google::Cloud::Firestore::V1::Target::DocumentsTarget] + # A target specified by a set of document names. + # + # Note: The following fields are mutually exclusive: `documents`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] resume_token + # @return [::String] + # A resume token from a prior + # {::Google::Cloud::Firestore::V1::TargetChange TargetChange} for an identical target. + # + # Using a resume token with a different target is unsupported and may fail. + # + # Note: The following fields are mutually exclusive: `resume_token`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Start listening after a specific `read_time`. + # + # The client must know the state of matching documents at this time. + # + # Note: The following fields are mutually exclusive: `read_time`, `resume_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] target_id + # @return [::Integer] + # The target ID that identifies the target on the stream. Must be a positive + # number and non-zero. + # + # If `target_id` is 0 (or unspecified), the server will assign an ID for this + # target and return that in a `TargetChange::ADD` event. Once a target with + # `target_id=0` is added, all subsequent targets must also have + # `target_id=0`. If an `AddTarget` request with `target_id != 0` is + # sent to the server after a target with `target_id=0` is added, the server + # will immediately send a response with a `TargetChange::Remove` event. + # + # Note that if the client sends multiple `AddTarget` requests + # without an ID, the order of IDs returned in `TargetChange.target_ids` are + # undefined. Therefore, clients should provide a target ID instead of relying + # on the server to assign one. + # + # If `target_id` is non-zero, there must not be an existing active target on + # this stream with the same ID. + # @!attribute [rw] once + # @return [::Boolean] + # If the target should be removed once it is current and consistent. + # @!attribute [rw] expected_count + # @return [::Google::Protobuf::Int32Value] + # The number of documents that last matched the query at the resume token or + # read time. + # + # This value is only relevant when a `resume_type` is provided. This value + # being present and greater than zero signals that the client wants + # `ExistenceFilter.unchanged_names` to be included in the response. + class Target + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A target specified by a set of documents names. + # @!attribute [rw] documents + # @return [::Array<::String>] + # The names of the documents to retrieve. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # The request will fail if any of the document is not a child resource of + # the given `database`. Duplicate names will be elided. + class DocumentsTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A target specified by a query. + # @!attribute [rw] parent + # @return [::String] + # The parent resource name. In the format: + # `projects/{project_id}/databases/{database_id}/documents` or + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # For example: + # `projects/my-project/databases/my-database/documents` or + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @!attribute [rw] structured_query + # @return [::Google::Cloud::Firestore::V1::StructuredQuery] + # A structured query. + class QueryTarget + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Targets being watched have changed. + # @!attribute [rw] target_change_type + # @return [::Google::Cloud::Firestore::V1::TargetChange::TargetChangeType] + # The type of change that occurred. + # @!attribute [rw] target_ids + # @return [::Array<::Integer>] + # The target IDs of targets that have changed. + # + # If empty, the change applies to all targets. + # + # The order of the target IDs is not defined. + # @!attribute [rw] cause + # @return [::Google::Rpc::Status] + # The error that resulted in this change, if applicable. + # @!attribute [rw] resume_token + # @return [::String] + # A token that can be used to resume the stream for the given `target_ids`, + # or all targets if `target_ids` is empty. + # + # Not set on every target change. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # The consistent `read_time` for the given `target_ids` (omitted when the + # target_ids are not at a consistent snapshot). + # + # The stream is guaranteed to send a `read_time` with `target_ids` empty + # whenever the entire stream reaches a new consistent snapshot. ADD, + # CURRENT, and RESET messages are guaranteed to (eventually) result in a + # new consistent snapshot (while NO_CHANGE and REMOVE messages are not). + # + # For a given stream, `read_time` is guaranteed to be monotonically + # increasing. + class TargetChange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The type of change. + module TargetChangeType + # No change has occurred. Used only to send an updated `resume_token`. + NO_CHANGE = 0 + + # The targets have been added. + ADD = 1 + + # The targets have been removed. + REMOVE = 2 + + # The targets reflect all changes committed before the targets were added + # to the stream. + # + # This will be sent after or with a `read_time` that is greater than or + # equal to the time at which the targets were added. + # + # Listeners can wait for this change if read-after-write semantics + # are desired. + CURRENT = 3 + + # The targets have been reset, and a new initial state for the targets + # will be returned in subsequent changes. + # + # After the initial state is complete, `CURRENT` will be returned even + # if the target was previously indicated to be `CURRENT`. + RESET = 4 + end + end + + # The request for + # {::Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids Firestore.ListCollectionIds}. + # @!attribute [rw] parent + # @return [::String] + # Required. The parent document. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # For example: + # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` + # @!attribute [rw] page_size + # @return [::Integer] + # The maximum number of results to return. + # @!attribute [rw] page_token + # @return [::String] + # A page token. Must be a value from + # {::Google::Cloud::Firestore::V1::ListCollectionIdsResponse ListCollectionIdsResponse}. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # Reads documents as they were at the given time. + # + # This must be a microsecond precision timestamp within the past one hour, + # or if Point-in-Time Recovery is enabled, can additionally be a whole + # minute timestamp within the past 7 days. + class ListCollectionIdsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The response from + # {::Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids Firestore.ListCollectionIds}. + # @!attribute [rw] collection_ids + # @return [::Array<::String>] + # The collection ids. + # @!attribute [rw] next_page_token + # @return [::String] + # A page token that may be used to continue the list. + class ListCollectionIdsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The request for + # {::Google::Cloud::Firestore::V1::Firestore::Client#batch_write Firestore.BatchWrite}. + # @!attribute [rw] database + # @return [::String] + # Required. The database name. In the format: + # `projects/{project_id}/databases/{database_id}`. + # @!attribute [rw] writes + # @return [::Array<::Google::Cloud::Firestore::V1::Write>] + # The writes to apply. + # + # Method does not apply writes atomically and does not guarantee ordering. + # Each write succeeds or fails independently. You cannot write to the same + # document more than once per request. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels associated with this batch write. + class BatchWriteRequest + 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 + + # The response from + # {::Google::Cloud::Firestore::V1::Firestore::Client#batch_write Firestore.BatchWrite}. + # @!attribute [rw] write_results + # @return [::Array<::Google::Cloud::Firestore::V1::WriteResult>] + # The result of applying the writes. + # + # This i-th write result corresponds to the i-th write in the + # request. + # @!attribute [rw] status + # @return [::Array<::Google::Rpc::Status>] + # The status of applying the writes. + # + # This i-th write status corresponds to the i-th write in the + # request. + class BatchWriteResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/pipeline.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/pipeline.rb new file mode 100644 index 000000000000..f46ac594fed8 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/pipeline.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! + + +module Google + module Cloud + module Firestore + module V1 + # A Firestore query represented as an ordered list of operations / stages. + # + # This is considered the top-level function which plans and executes a query. + # It is logically equivalent to `query(stages, options)`, but prevents the + # client from having to build a function wrapper. + # @!attribute [rw] pipeline + # @return [::Google::Cloud::Firestore::V1::Pipeline] + # Required. The pipeline query to execute. + # @!attribute [rw] options + # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Firestore::V1::Value}] + # Optional. Optional query-level arguments. + class StructuredPipeline + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::Google::Cloud::Firestore::V1::Value] + class OptionsEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query.rb new file mode 100644 index 000000000000..88beb633529b --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query.rb @@ -0,0 +1,629 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module V1 + # A Firestore query. + # + # The query stages are executed in the following order: + # 1. from + # 2. where + # 3. select + # 4. order_by + start_at + end_at + # 5. offset + # 6. limit + # 7. find_nearest + # @!attribute [rw] select + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::Projection] + # Optional sub-set of the fields to return. + # + # This acts as a {::Google::Cloud::Firestore::V1::DocumentMask DocumentMask} over the + # documents returned from a query. When not set, assumes that the caller + # wants all fields returned. + # @!attribute [rw] from + # @return [::Array<::Google::Cloud::Firestore::V1::StructuredQuery::CollectionSelector>] + # The collections to query. + # @!attribute [rw] where + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::Filter] + # The filter to apply. + # @!attribute [rw] order_by + # @return [::Array<::Google::Cloud::Firestore::V1::StructuredQuery::Order>] + # The order to apply to the query results. + # + # Firestore allows callers to provide a full ordering, a partial ordering, or + # no ordering at all. In all cases, Firestore guarantees a stable ordering + # through the following rules: + # + # * The `order_by` is required to reference all fields used with an + # inequality filter. + # * All fields that are required to be in the `order_by` but are not already + # present are appended in lexicographical ordering of the field name. + # * If an order on `__name__` is not specified, it is appended by default. + # + # Fields are appended with the same sort direction as the last order + # specified, or 'ASCENDING' if no order was specified. For example: + # + # * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` + # * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` + # * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` + # * `WHERE __name__ > ... AND a > 1` becomes + # `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` + # @!attribute [rw] start_at + # @return [::Google::Cloud::Firestore::V1::Cursor] + # A potential prefix of a position in the result set to start the query at. + # + # The ordering of the result set is based on the `ORDER BY` clause of the + # original query. + # + # ``` + # SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; + # ``` + # + # This query's results are ordered by `(b ASC, __name__ ASC)`. + # + # Cursors can reference either the full ordering or a prefix of the location, + # though it cannot reference more fields than what are in the provided + # `ORDER BY`. + # + # Continuing off the example above, attaching the following start cursors + # will have varying impact: + # + # - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND + # b > 2 AND __name__ > /k/123`. + # - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. + # + # Unlike `OFFSET` which requires scanning over the first N results to skip, + # a start cursor allows the query to begin at a logical position. This + # position is not required to match an actual result, it will scan forward + # from this position to find the next document. + # + # Requires: + # + # * The number of values cannot be greater than the number of fields + # specified in the `ORDER BY` clause. + # @!attribute [rw] end_at + # @return [::Google::Cloud::Firestore::V1::Cursor] + # A potential prefix of a position in the result set to end the query at. + # + # This is similar to `START_AT` but with it controlling the end position + # rather than the start position. + # + # Requires: + # + # * The number of values cannot be greater than the number of fields + # specified in the `ORDER BY` clause. + # @!attribute [rw] offset + # @return [::Integer] + # The number of documents to skip before returning the first result. + # + # This applies after the constraints specified by the `WHERE`, `START AT`, & + # `END AT` but before the `LIMIT` clause. + # + # Requires: + # + # * The value must be greater than or equal to zero if specified. + # @!attribute [rw] limit + # @return [::Google::Protobuf::Int32Value] + # The maximum number of results to return. + # + # Applies after all other constraints. + # + # Requires: + # + # * The value must be greater than or equal to zero if specified. + # @!attribute [rw] find_nearest + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FindNearest] + # Optional. A potential nearest neighbors search. + # + # Applies after all other filters and ordering. + # + # Finds the closest vector embeddings to the given query vector. + class StructuredQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A selection of a collection, such as `messages as m1`. + # @!attribute [rw] collection_id + # @return [::String] + # The collection ID. + # When set, selects only collections with this ID. + # @!attribute [rw] all_descendants + # @return [::Boolean] + # When false, selects only collections that are immediate children of + # the `parent` specified in the containing `RunQueryRequest`. + # When true, selects all descendant collections. + class CollectionSelector + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A filter. + # @!attribute [rw] composite_filter + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::CompositeFilter] + # A composite filter. + # + # Note: The following fields are mutually exclusive: `composite_filter`, `field_filter`, `unary_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] field_filter + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldFilter] + # A filter on a document field. + # + # Note: The following fields are mutually exclusive: `field_filter`, `composite_filter`, `unary_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] unary_filter + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::UnaryFilter] + # A filter that takes exactly one argument. + # + # Note: The following fields are mutually exclusive: `unary_filter`, `composite_filter`, `field_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Filter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A filter that merges multiple other filters using the given operator. + # @!attribute [rw] op + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::CompositeFilter::Operator] + # The operator for combining multiple filters. + # @!attribute [rw] filters + # @return [::Array<::Google::Cloud::Firestore::V1::StructuredQuery::Filter>] + # The list of filters to combine. + # + # Requires: + # + # * At least one filter is present. + class CompositeFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A composite filter operator. + module Operator + # Unspecified. This value must not be used. + OPERATOR_UNSPECIFIED = 0 + + # Documents are required to satisfy all of the combined filters. + AND = 1 + + # Documents are required to satisfy at least one of the combined filters. + OR = 2 + end + end + + # A filter on a specific field. + # @!attribute [rw] field + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference] + # The field to filter by. + # @!attribute [rw] op + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldFilter::Operator] + # The operator to filter by. + # @!attribute [rw] value + # @return [::Google::Cloud::Firestore::V1::Value] + # The value to compare to. + class FieldFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A field filter operator. + module Operator + # Unspecified. This value must not be used. + OPERATOR_UNSPECIFIED = 0 + + # The given `field` is less than the given `value`. + # + # Requires: + # + # * That `field` come first in `order_by`. + LESS_THAN = 1 + + # The given `field` is less than or equal to the given `value`. + # + # Requires: + # + # * That `field` come first in `order_by`. + LESS_THAN_OR_EQUAL = 2 + + # The given `field` is greater than the given `value`. + # + # Requires: + # + # * That `field` come first in `order_by`. + GREATER_THAN = 3 + + # The given `field` is greater than or equal to the given `value`. + # + # Requires: + # + # * That `field` come first in `order_by`. + GREATER_THAN_OR_EQUAL = 4 + + # The given `field` is equal to the given `value`. + EQUAL = 5 + + # The given `field` is not equal to the given `value`. + # + # Requires: + # + # * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + # * That `field` comes first in the `order_by`. + NOT_EQUAL = 6 + + # The given `field` is an array that contains the given `value`. + ARRAY_CONTAINS = 7 + + # The given `field` is equal to at least one value in the given array. + # + # Requires: + # + # * That `value` is a non-empty `ArrayValue`, subject to disjunction + # limits. + # * No `NOT_IN` filters in the same query. + IN = 8 + + # The given `field` is an array that contains any of the values in the + # given array. + # + # Requires: + # + # * That `value` is a non-empty `ArrayValue`, subject to disjunction + # limits. + # * No other `ARRAY_CONTAINS_ANY` filters within the same disjunction. + # * No `NOT_IN` filters in the same query. + ARRAY_CONTAINS_ANY = 9 + + # The value of the `field` is not in the given array. + # + # Requires: + # + # * That `value` is a non-empty `ArrayValue` with at most 10 values. + # * No other `OR`, `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`, + # `IS_NOT_NULL`, or `IS_NOT_NAN`. + # * That `field` comes first in the `order_by`. + NOT_IN = 10 + end + end + + # A filter with a single operand. + # @!attribute [rw] op + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::UnaryFilter::Operator] + # The unary operator to apply. + # @!attribute [rw] field + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference] + # The field to which to apply the operator. + class UnaryFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A unary operator. + module Operator + # Unspecified. This value must not be used. + OPERATOR_UNSPECIFIED = 0 + + # The given `field` is equal to `NaN`. + IS_NAN = 2 + + # The given `field` is equal to `NULL`. + IS_NULL = 3 + + # The given `field` is not equal to `NaN`. + # + # Requires: + # + # * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + # * That `field` comes first in the `order_by`. + IS_NOT_NAN = 4 + + # The given `field` is not equal to `NULL`. + # + # Requires: + # + # * A single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. + # * That `field` comes first in the `order_by`. + IS_NOT_NULL = 5 + end + end + + # An order on a field. + # @!attribute [rw] field + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference] + # The field to order by. + # @!attribute [rw] direction + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::Direction] + # The direction to order by. Defaults to `ASCENDING`. + class Order + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A reference to a field in a document, ex: `stats.operations`. + # @!attribute [rw] field_path + # @return [::String] + # A reference to a field in a document. + # + # Requires: + # + # * MUST be a dot-delimited (`.`) string of segments, where each segment + # conforms to {::Google::Cloud::Firestore::V1::Document#fields document field name} + # limitations. + class FieldReference + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The projection of document's fields to return. + # @!attribute [rw] fields + # @return [::Array<::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference>] + # The fields to return. + # + # If empty, all fields are returned. To only return the name + # of the document, use `['__name__']`. + class Projection + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Nearest Neighbors search config. The ordering provided by FindNearest + # supersedes the order_by stage. If multiple documents have the same vector + # distance, the returned document order is not guaranteed to be stable + # between queries. + # @!attribute [rw] vector_field + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference] + # Required. An indexed vector field to search upon. Only documents which + # contain vectors whose dimensionality match the query_vector can be + # returned. + # @!attribute [rw] query_vector + # @return [::Google::Cloud::Firestore::V1::Value] + # Required. The query vector that we are searching on. Must be a vector of + # no more than 2048 dimensions. + # @!attribute [rw] distance_measure + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FindNearest::DistanceMeasure] + # Required. The distance measure to use, required. + # @!attribute [rw] limit + # @return [::Google::Protobuf::Int32Value] + # Required. The number of nearest neighbors to return. Must be a positive + # integer of no more than 1000. + # @!attribute [rw] distance_result_field + # @return [::String] + # Optional. Optional name of the field to output the result of the vector + # distance calculation. Must conform to [document field + # name][google.firestore.v1.Document.fields] limitations. + # @!attribute [rw] distance_threshold + # @return [::Google::Protobuf::DoubleValue] + # Optional. Option to specify a threshold for which no less similar + # documents will be returned. The behavior of the specified + # `distance_measure` will affect the meaning of the distance threshold. + # Since DOT_PRODUCT distances increase when the vectors are more similar, + # the comparison is inverted. + # + # * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` + # * For DOT_PRODUCT: `WHERE distance >= distance_threshold` + class FindNearest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # The distance measure to use when comparing vectors. + module DistanceMeasure + # Should not be set. + DISTANCE_MEASURE_UNSPECIFIED = 0 + + # Measures the EUCLIDEAN distance between the vectors. See + # [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn + # more. The resulting distance decreases the more similar two vectors + # are. + EUCLIDEAN = 1 + + # COSINE distance compares vectors based on the angle between them, which + # allows you to measure similarity that isn't based on the vectors + # magnitude. We recommend using DOT_PRODUCT with unit normalized vectors + # instead of COSINE distance, which is mathematically equivalent with + # better performance. See [Cosine + # Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn + # more about COSINE similarity and COSINE distance. The resulting + # COSINE distance decreases the more similar two vectors are. + COSINE = 2 + + # Similar to cosine but is affected by the magnitude of the vectors. See + # [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more. + # The resulting distance increases the more similar two vectors are. + DOT_PRODUCT = 3 + end + end + + # A sort direction. + module Direction + # Unspecified. + DIRECTION_UNSPECIFIED = 0 + + # Ascending. + ASCENDING = 1 + + # Descending. + DESCENDING = 2 + end + end + + # Firestore query for running an aggregation over a + # {::Google::Cloud::Firestore::V1::StructuredQuery StructuredQuery}. + # @!attribute [rw] structured_query + # @return [::Google::Cloud::Firestore::V1::StructuredQuery] + # Nested structured query. + # @!attribute [rw] aggregations + # @return [::Array<::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation>] + # Optional. Series of aggregations to apply over the results of the + # `structured_query`. + # + # Requires: + # + # * A minimum of one and maximum of five aggregations per query. + class StructuredAggregationQuery + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines an aggregation that produces a single result. + # @!attribute [rw] count + # @return [::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation::Count] + # Count aggregator. + # + # Note: The following fields are mutually exclusive: `count`, `sum`, `avg`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] sum + # @return [::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation::Sum] + # Sum aggregator. + # + # Note: The following fields are mutually exclusive: `sum`, `count`, `avg`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] avg + # @return [::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation::Avg] + # Average aggregator. + # + # Note: The following fields are mutually exclusive: `avg`, `count`, `sum`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] alias + # @return [::String] + # Optional. Optional name of the field to store the result of the + # aggregation into. + # + # If not provided, Firestore will pick a default name following the format + # `field_`. For example: + # + # ``` + # AGGREGATE + # COUNT_UP_TO(1) AS count_up_to_1, + # COUNT_UP_TO(2), + # COUNT_UP_TO(3) AS count_up_to_3, + # COUNT(*) + # OVER ( + # ... + # ); + # ``` + # + # becomes: + # + # ``` + # AGGREGATE + # COUNT_UP_TO(1) AS count_up_to_1, + # COUNT_UP_TO(2) AS field_1, + # COUNT_UP_TO(3) AS count_up_to_3, + # COUNT(*) AS field_2 + # OVER ( + # ... + # ); + # ``` + # + # Requires: + # + # * Must be unique across all aggregation aliases. + # * Conform to {::Google::Cloud::Firestore::V1::Document#fields document field name} + # limitations. + class Aggregation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Count of documents that match the query. + # + # The `COUNT(*)` aggregation function operates on the entire document + # so it does not require a field reference. + # @!attribute [rw] up_to + # @return [::Google::Protobuf::Int64Value] + # Optional. Optional constraint on the maximum number of documents to + # count. + # + # This provides a way to set an upper bound on the number of documents + # to scan, limiting latency, and cost. + # + # Unspecified is interpreted as no bound. + # + # High-Level Example: + # + # ``` + # AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); + # ``` + # + # Requires: + # + # * Must be greater than zero when present. + class Count + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Sum of the values of the requested field. + # + # * Only numeric values will be aggregated. All non-numeric values + # including `NULL` are skipped. + # + # * If the aggregated values contain `NaN`, returns `NaN`. Infinity math + # follows IEEE-754 standards. + # + # * If the aggregated value set is empty, returns 0. + # + # * Returns a 64-bit integer if all aggregated numbers are integers and the + # sum result does not overflow. Otherwise, the result is returned as a + # double. Note that even if all the aggregated values are integers, the + # result is returned as a double if it cannot fit within a 64-bit signed + # integer. When this occurs, the returned value will lose precision. + # + # * When underflow occurs, floating-point aggregation is non-deterministic. + # This means that running the same query repeatedly without any changes to + # the underlying values could produce slightly different results each + # time. In those cases, values should be stored as integers over + # floating-point numbers. + # @!attribute [rw] field + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference] + # The field to aggregate on. + class Sum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Average of the values of the requested field. + # + # * Only numeric values will be aggregated. All non-numeric values + # including `NULL` are skipped. + # + # * If the aggregated values contain `NaN`, returns `NaN`. Infinity math + # follows IEEE-754 standards. + # + # * If the aggregated value set is empty, returns `NULL`. + # + # * Always returns the result as a double. + # @!attribute [rw] field + # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference] + # The field to aggregate on. + class Avg + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + + # A position in a query result set. + # @!attribute [rw] values + # @return [::Array<::Google::Cloud::Firestore::V1::Value>] + # The values that represent a position, in the order they appear in + # the order by clause of a query. + # + # Can contain fewer values than specified in the order by clause. + # @!attribute [rw] before + # @return [::Boolean] + # If the position is just before or just after the given values, relative + # to the sort order defined by the query. + class Cursor + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query_profile.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query_profile.rb new file mode 100644 index 000000000000..2c04e4f0a820 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query_profile.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 Cloud + module Firestore + module V1 + # Explain options for the query. + # @!attribute [rw] analyze + # @return [::Boolean] + # Optional. Whether to execute this query. + # + # When false (the default), the query will be planned, returning only + # metrics from the planning stages. + # + # When true, the query will be planned and executed, returning the full + # query results along with both planning and execution stage metrics. + class ExplainOptions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Explain metrics for the query. + # @!attribute [rw] plan_summary + # @return [::Google::Cloud::Firestore::V1::PlanSummary] + # Planning phase information for the query. + # @!attribute [rw] execution_stats + # @return [::Google::Cloud::Firestore::V1::ExecutionStats] + # Aggregated stats from the execution of the query. Only present when + # {::Google::Cloud::Firestore::V1::ExplainOptions#analyze ExplainOptions.analyze} is set + # to true. + class ExplainMetrics + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Planning phase information for the query. + # @!attribute [rw] indexes_used + # @return [::Array<::Google::Protobuf::Struct>] + # The indexes selected for the query. For example: + # [ + # \\{"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, + # \\{"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} + # ] + class PlanSummary + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Execution statistics for the query. + # @!attribute [rw] results_returned + # @return [::Integer] + # Total number of results returned, including documents, projections, + # aggregation results, keys. + # @!attribute [rw] execution_duration + # @return [::Google::Protobuf::Duration] + # Total time to execute the query in the backend. + # @!attribute [rw] read_operations + # @return [::Integer] + # Total billable read operations. + # @!attribute [rw] debug_stats + # @return [::Google::Protobuf::Struct] + # Debugging statistics from the execution of the query. Note that the + # debugging stats are subject to change as Firestore evolves. It could + # include: + # { + # "indexes_entries_scanned": "1000", + # "documents_scanned": "20", + # "billing_details" : { + # "documents_billable": "20", + # "index_entries_billable": "1000", + # "min_query_cost": "0" + # } + # } + class ExecutionStats + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/write.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/write.rb new file mode 100644 index 000000000000..ee5975f34b2c --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/write.rb @@ -0,0 +1,317 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Firestore + module V1 + # A write on a document. + # @!attribute [rw] update + # @return [::Google::Cloud::Firestore::V1::Document] + # A document to write. + # + # Note: The following fields are mutually exclusive: `update`, `delete`, `transform`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] delete + # @return [::String] + # A document name to delete. In the format: + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # + # Note: The following fields are mutually exclusive: `delete`, `update`, `transform`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] transform + # @return [::Google::Cloud::Firestore::V1::DocumentTransform] + # Applies a transformation to a document. + # + # Note: The following fields are mutually exclusive: `transform`, `update`, `delete`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] update_mask + # @return [::Google::Cloud::Firestore::V1::DocumentMask] + # The fields to update in this write. + # + # This field can be set only when the operation is `update`. + # If the mask is not set for an `update` and the document exists, any + # existing data will be overwritten. + # If the mask is set and the document on the server has fields not covered by + # the mask, they are left unchanged. + # Fields referenced in the mask, but not present in the input document, are + # deleted from the document on the server. + # The field paths in this mask must not contain a reserved field name. + # @!attribute [rw] update_transforms + # @return [::Array<::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform>] + # The transforms to perform after update. + # + # This field can be set only when the operation is `update`. If present, this + # write is equivalent to performing `update` and `transform` to the same + # document atomically and in order. + # @!attribute [rw] current_document + # @return [::Google::Cloud::Firestore::V1::Precondition] + # An optional precondition on the document. + # + # The write will fail if this is set and not met by the target document. + class Write + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A transformation of a document. + # @!attribute [rw] document + # @return [::String] + # The name of the document to transform. + # @!attribute [rw] field_transforms + # @return [::Array<::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform>] + # The list of transformations to apply to the fields of the document, in + # order. + # This must not be empty. + class DocumentTransform + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A transformation of a field of the document. + # @!attribute [rw] field_path + # @return [::String] + # The path of the field. See + # {::Google::Cloud::Firestore::V1::Document#fields Document.fields} for the field path + # syntax reference. + # @!attribute [rw] set_to_server_value + # @return [::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform::ServerValue] + # Sets the field to the given server value. + # + # Note: The following fields are mutually exclusive: `set_to_server_value`, `increment`, `maximum`, `minimum`, `append_missing_elements`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] increment + # @return [::Google::Cloud::Firestore::V1::Value] + # Adds the given value to the field's current value. + # + # This must be an integer or a double value. + # If the field is not an integer or double, or if the field does not yet + # exist, the transformation will set the field to the given value. + # If either of the given value or the current field value are doubles, + # both values will be interpreted as doubles. Double arithmetic and + # representation of double values follow IEEE 754 semantics. + # If there is positive/negative integer overflow, the field is resolved + # to the largest magnitude positive/negative integer. + # + # Note: The following fields are mutually exclusive: `increment`, `set_to_server_value`, `maximum`, `minimum`, `append_missing_elements`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] maximum + # @return [::Google::Cloud::Firestore::V1::Value] + # Sets the field to the maximum of its current value and the given value. + # + # This must be an integer or a double value. + # If the field is not an integer or double, or if the field does not yet + # exist, the transformation will set the field to the given value. + # If a maximum operation is applied where the field and the input value + # are of mixed types (that is - one is an integer and one is a double) + # the field takes on the type of the larger operand. If the operands are + # equivalent (e.g. 3 and 3.0), the field does not change. + # 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and + # zero input value is always the stored value. + # The maximum of any numeric value x and NaN is NaN. + # + # Note: The following fields are mutually exclusive: `maximum`, `set_to_server_value`, `increment`, `minimum`, `append_missing_elements`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] minimum + # @return [::Google::Cloud::Firestore::V1::Value] + # Sets the field to the minimum of its current value and the given value. + # + # This must be an integer or a double value. + # If the field is not an integer or double, or if the field does not yet + # exist, the transformation will set the field to the input value. + # If a minimum operation is applied where the field and the input value + # are of mixed types (that is - one is an integer and one is a double) + # the field takes on the type of the smaller operand. If the operands are + # equivalent (e.g. 3 and 3.0), the field does not change. + # 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and + # zero input value is always the stored value. + # The minimum of any numeric value x and NaN is NaN. + # + # Note: The following fields are mutually exclusive: `minimum`, `set_to_server_value`, `increment`, `maximum`, `append_missing_elements`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] append_missing_elements + # @return [::Google::Cloud::Firestore::V1::ArrayValue] + # Append the given elements in order if they are not already present in + # the current field value. + # If the field is not an array, or if the field does not yet exist, it is + # first set to the empty array. + # + # Equivalent numbers of different types (e.g. 3L and 3.0) are + # considered equal when checking if a value is missing. + # NaN is equal to NaN, and Null is equal to Null. + # If the input contains multiple equivalent values, only the first will + # be considered. + # + # The corresponding transform_result will be the null value. + # + # Note: The following fields are mutually exclusive: `append_missing_elements`, `set_to_server_value`, `increment`, `maximum`, `minimum`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] remove_all_from_array + # @return [::Google::Cloud::Firestore::V1::ArrayValue] + # Remove all of the given elements from the array in the field. + # If the field is not an array, or if the field does not yet exist, it is + # set to the empty array. + # + # Equivalent numbers of the different types (e.g. 3L and 3.0) are + # considered equal when deciding whether an element should be removed. + # NaN is equal to NaN, and Null is equal to Null. + # This will remove all equivalent values if there are duplicates. + # + # The corresponding transform_result will be the null value. + # + # Note: The following fields are mutually exclusive: `remove_all_from_array`, `set_to_server_value`, `increment`, `maximum`, `minimum`, `append_missing_elements`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class FieldTransform + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # A value that is calculated by the server. + module ServerValue + # Unspecified. This value must not be used. + SERVER_VALUE_UNSPECIFIED = 0 + + # The time at which the server processed the request, with millisecond + # precision. If used on multiple fields (same or different documents) in + # a transaction, all the fields will get the same server timestamp. + REQUEST_TIME = 1 + end + end + end + + # The result of applying a write. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The last update time of the document after applying the write. Not set + # after a `delete`. + # + # If the write did not actually change the document, this will be the + # previous update_time. + # @!attribute [rw] transform_results + # @return [::Array<::Google::Cloud::Firestore::V1::Value>] + # The results of applying each + # {::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform DocumentTransform.FieldTransform}, + # in the same order. + class WriteResult + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A {::Google::Cloud::Firestore::V1::Document Document} has changed. + # + # May be the result of multiple {::Google::Cloud::Firestore::V1::Write writes}, including + # deletes, that ultimately resulted in a new value for the + # {::Google::Cloud::Firestore::V1::Document Document}. + # + # Multiple {::Google::Cloud::Firestore::V1::DocumentChange DocumentChange} messages may be + # returned for the same logical change, if multiple targets are affected. + # @!attribute [rw] document + # @return [::Google::Cloud::Firestore::V1::Document] + # The new state of the {::Google::Cloud::Firestore::V1::Document Document}. + # + # If `mask` is set, contains only fields that were updated or added. + # @!attribute [rw] target_ids + # @return [::Array<::Integer>] + # A set of target IDs of targets that match this document. + # @!attribute [rw] removed_target_ids + # @return [::Array<::Integer>] + # A set of target IDs for targets that no longer match this document. + class DocumentChange + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A {::Google::Cloud::Firestore::V1::Document Document} has been deleted. + # + # May be the result of multiple {::Google::Cloud::Firestore::V1::Write writes}, including + # updates, the last of which deleted the + # {::Google::Cloud::Firestore::V1::Document Document}. + # + # Multiple {::Google::Cloud::Firestore::V1::DocumentDelete DocumentDelete} messages may be + # returned for the same logical delete, if multiple targets are affected. + # @!attribute [rw] document + # @return [::String] + # The resource name of the {::Google::Cloud::Firestore::V1::Document Document} that was + # deleted. + # @!attribute [rw] removed_target_ids + # @return [::Array<::Integer>] + # A set of target IDs for targets that previously matched this entity. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # The read timestamp at which the delete was observed. + # + # Greater or equal to the `commit_time` of the delete. + class DocumentDelete + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A {::Google::Cloud::Firestore::V1::Document Document} has been removed from the view of + # the targets. + # + # Sent if the document is no longer relevant to a target and is out of view. + # Can be sent instead of a DocumentDelete or a DocumentChange if the server + # can not send the new value of the document. + # + # Multiple {::Google::Cloud::Firestore::V1::DocumentRemove DocumentRemove} messages may be + # returned for the same logical write or delete, if multiple targets are + # affected. + # @!attribute [rw] document + # @return [::String] + # The resource name of the {::Google::Cloud::Firestore::V1::Document Document} that has + # gone out of view. + # @!attribute [rw] removed_target_ids + # @return [::Array<::Integer>] + # A set of target IDs for targets that previously matched this document. + # @!attribute [rw] read_time + # @return [::Google::Protobuf::Timestamp] + # The read timestamp at which the remove was observed. + # + # Greater or equal to the `commit_time` of the change/delete/remove. + class DocumentRemove + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A digest of all the documents that match a given target. + # @!attribute [rw] target_id + # @return [::Integer] + # The target ID to which this filter applies. + # @!attribute [rw] count + # @return [::Integer] + # The total count of documents that match + # {::Google::Cloud::Firestore::V1::ExistenceFilter#target_id target_id}. + # + # If different from the count of documents in the client that match, the + # client must manually determine which documents no longer match the target. + # + # The client can use the `unchanged_names` bloom filter to assist with + # this determination by testing ALL the document names against the filter; + # if the document name is NOT in the filter, it means the document no + # longer matches the target. + # @!attribute [rw] unchanged_names + # @return [::Google::Cloud::Firestore::V1::BloomFilter] + # A bloom filter that, despite its name, contains the UTF-8 byte encodings of + # the resource names of ALL the documents that match + # {::Google::Cloud::Firestore::V1::ExistenceFilter#target_id target_id}, in the form + # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. + # + # This bloom filter may be omitted at the server's discretion, such as if it + # is deemed that the client will not make use of it or if it is too + # computationally expensive to calculate or transmit. Clients must gracefully + # handle this field being absent by falling back to the logic used before + # this field existed; that is, re-add the target without a resume token to + # figure out which documents in the client's cache are out of sync. + class ExistenceFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/struct.rb new file mode 100644 index 000000000000..39e1aca868d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/wrappers.rb new file mode 100644 index 000000000000..1b485b0c3456 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/wrappers.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # Wrapper message for `double`. + # + # The JSON representation for `DoubleValue` is JSON number. + # @!attribute [rw] value + # @return [::Float] + # The double value. + class DoubleValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `float`. + # + # The JSON representation for `FloatValue` is JSON number. + # @!attribute [rw] value + # @return [::Float] + # The float value. + class FloatValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int64`. + # + # The JSON representation for `Int64Value` is JSON string. + # @!attribute [rw] value + # @return [::Integer] + # The int64 value. + class Int64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint64`. + # + # The JSON representation for `UInt64Value` is JSON string. + # @!attribute [rw] value + # @return [::Integer] + # The uint64 value. + class UInt64Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `int32`. + # + # The JSON representation for `Int32Value` is JSON number. + # @!attribute [rw] value + # @return [::Integer] + # The int32 value. + class Int32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `uint32`. + # + # The JSON representation for `UInt32Value` is JSON number. + # @!attribute [rw] value + # @return [::Integer] + # The uint32 value. + class UInt32Value + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bool`. + # + # The JSON representation for `BoolValue` is JSON `true` and `false`. + # @!attribute [rw] value + # @return [::Boolean] + # The bool value. + class BoolValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `string`. + # + # The JSON representation for `StringValue` is JSON string. + # @!attribute [rw] value + # @return [::String] + # The string value. + class StringValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Wrapper message for `bytes`. + # + # The JSON representation for `BytesValue` is JSON string. + # @!attribute [rw] value + # @return [::String] + # The bytes value. + class BytesValue + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/type/latlng.rb new file mode 100644 index 000000000000..c15e78a39a56 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/type/latlng.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 + # An object that represents a latitude/longitude pair. This is expressed as a + # pair of doubles to represent degrees latitude and degrees longitude. Unless + # specified otherwise, this must conform to the + # WGS84 + # standard. Values must be within normalized ranges. + # @!attribute [rw] latitude + # @return [::Float] + # The latitude in degrees. It must be in the range [-90.0, +90.0]. + # @!attribute [rw] longitude + # @return [::Float] + # The longitude in degrees. It must be in the range [-180.0, +180.0]. + class LatLng + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-firestore-v1/snippets/Gemfile new file mode 100644 index 000000000000..6aafafebdfaa --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-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-firestore-v1", path: "../" +else + gem "google-cloud-firestore-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-firestore-v1/snippets/firestore/batch_get_documents.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_get_documents.rb new file mode 100644 index 000000000000..f71efdc2f1b1 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_get_documents.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! + +# [START firestore_v1_generated_Firestore_BatchGetDocuments_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the batch_get_documents call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents. +# +def batch_get_documents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new + + # Call the batch_get_documents method to start streaming. + output = client.batch_get_documents request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse + output.each do |current_response| + p current_response + end +end +# [END firestore_v1_generated_Firestore_BatchGetDocuments_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_write.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_write.rb new file mode 100644 index 000000000000..93e3a3f3ac99 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_write.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 firestore_v1_generated_Firestore_BatchWrite_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the batch_write call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#batch_write. +# +def batch_write + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::BatchWriteRequest.new + + # Call the batch_write method. + result = client.batch_write request + + # The returned object is of type Google::Cloud::Firestore::V1::BatchWriteResponse. + p result +end +# [END firestore_v1_generated_Firestore_BatchWrite_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/begin_transaction.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/begin_transaction.rb new file mode 100644 index 000000000000..110bf9f094b8 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/begin_transaction.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 firestore_v1_generated_Firestore_BeginTransaction_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the begin_transaction call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction. +# +def begin_transaction + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::BeginTransactionRequest.new + + # Call the begin_transaction method. + result = client.begin_transaction request + + # The returned object is of type Google::Cloud::Firestore::V1::BeginTransactionResponse. + p result +end +# [END firestore_v1_generated_Firestore_BeginTransaction_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/commit.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/commit.rb new file mode 100644 index 000000000000..728f621b5c42 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/commit.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 firestore_v1_generated_Firestore_Commit_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the commit call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#commit. +# +def commit + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::CommitRequest.new + + # Call the commit method. + result = client.commit request + + # The returned object is of type Google::Cloud::Firestore::V1::CommitResponse. + p result +end +# [END firestore_v1_generated_Firestore_Commit_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/create_document.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/create_document.rb new file mode 100644 index 000000000000..91b0ca458e0b --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/create_document.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 firestore_v1_generated_Firestore_CreateDocument_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the create_document call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#create_document. +# +def create_document + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::CreateDocumentRequest.new + + # Call the create_document method. + result = client.create_document request + + # The returned object is of type Google::Cloud::Firestore::V1::Document. + p result +end +# [END firestore_v1_generated_Firestore_CreateDocument_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/delete_document.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/delete_document.rb new file mode 100644 index 000000000000..58f88b2364df --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/delete_document.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 firestore_v1_generated_Firestore_DeleteDocument_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the delete_document call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#delete_document. +# +def delete_document + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::DeleteDocumentRequest.new + + # Call the delete_document method. + result = client.delete_document request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END firestore_v1_generated_Firestore_DeleteDocument_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/execute_pipeline.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/execute_pipeline.rb new file mode 100644 index 000000000000..2113693e5c50 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/execute_pipeline.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! + +# [START firestore_v1_generated_Firestore_ExecutePipeline_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the execute_pipeline call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#execute_pipeline. +# +def execute_pipeline + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::ExecutePipelineRequest.new + + # Call the execute_pipeline method to start streaming. + output = client.execute_pipeline request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Firestore::V1::ExecutePipelineResponse + output.each do |current_response| + p current_response + end +end +# [END firestore_v1_generated_Firestore_ExecutePipeline_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/get_document.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/get_document.rb new file mode 100644 index 000000000000..6b7bb9690798 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/get_document.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 firestore_v1_generated_Firestore_GetDocument_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the get_document call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#get_document. +# +def get_document + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::GetDocumentRequest.new + + # Call the get_document method. + result = client.get_document request + + # The returned object is of type Google::Cloud::Firestore::V1::Document. + p result +end +# [END firestore_v1_generated_Firestore_GetDocument_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_collection_ids.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_collection_ids.rb new file mode 100644 index 000000000000..9fd9635f9731 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_collection_ids.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 firestore_v1_generated_Firestore_ListCollectionIds_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the list_collection_ids call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids. +# +def list_collection_ids + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new + + # Call the list_collection_ids method. + result = client.list_collection_ids request + + # The returned object is of type Google::Cloud::Firestore::V1::ListCollectionIdsResponse. + p result +end +# [END firestore_v1_generated_Firestore_ListCollectionIds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_documents.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_documents.rb new file mode 100644 index 000000000000..50b574e03e61 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_documents.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 firestore_v1_generated_Firestore_ListDocuments_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the list_documents call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#list_documents. +# +def list_documents + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::ListDocumentsRequest.new + + # Call the list_documents method. + result = client.list_documents request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Firestore::V1::Document. + p item + end +end +# [END firestore_v1_generated_Firestore_ListDocuments_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/listen.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/listen.rb new file mode 100644 index 000000000000..d704f8f68040 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/listen.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! + +# [START firestore_v1_generated_Firestore_Listen_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the listen call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#listen. +# +def listen + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create an input stream. + input = Gapic::StreamInput.new + + # Call the listen method to start streaming. + output = client.listen input + + # Send requests on the stream. For each request object, set fields by + # passing keyword arguments. Be sure to close the stream when done. + input << Google::Cloud::Firestore::V1::ListenRequest.new + input << Google::Cloud::Firestore::V1::ListenRequest.new + input.close + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Firestore::V1::ListenResponse + output.each do |current_response| + p current_response + end +end +# [END firestore_v1_generated_Firestore_Listen_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/partition_query.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/partition_query.rb new file mode 100644 index 000000000000..3b642ca7464a --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/partition_query.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 firestore_v1_generated_Firestore_PartitionQuery_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the partition_query call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#partition_query. +# +def partition_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::PartitionQueryRequest.new + + # Call the partition_query method. + result = client.partition_query request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Firestore::V1::Cursor. + p item + end +end +# [END firestore_v1_generated_Firestore_PartitionQuery_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/rollback.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/rollback.rb new file mode 100644 index 000000000000..5a48928fa963 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/rollback.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 firestore_v1_generated_Firestore_Rollback_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the rollback call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#rollback. +# +def rollback + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::RollbackRequest.new + + # Call the rollback method. + result = client.rollback request + + # The returned object is of type Google::Protobuf::Empty. + p result +end +# [END firestore_v1_generated_Firestore_Rollback_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_aggregation_query.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_aggregation_query.rb new file mode 100644 index 000000000000..feb15a4d908f --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_aggregation_query.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! + +# [START firestore_v1_generated_Firestore_RunAggregationQuery_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the run_aggregation_query call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query. +# +def run_aggregation_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new + + # Call the run_aggregation_query method to start streaming. + output = client.run_aggregation_query request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse + output.each do |current_response| + p current_response + end +end +# [END firestore_v1_generated_Firestore_RunAggregationQuery_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_query.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_query.rb new file mode 100644 index 000000000000..741c1e754894 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_query.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! + +# [START firestore_v1_generated_Firestore_RunQuery_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the run_query call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#run_query. +# +def run_query + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::RunQueryRequest.new + + # Call the run_query method to start streaming. + output = client.run_query request + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Firestore::V1::RunQueryResponse + output.each do |current_response| + p current_response + end +end +# [END firestore_v1_generated_Firestore_RunQuery_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/update_document.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/update_document.rb new file mode 100644 index 000000000000..c1c4d96bad4b --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/update_document.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 firestore_v1_generated_Firestore_UpdateDocument_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the update_document call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#update_document. +# +def update_document + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Firestore::V1::UpdateDocumentRequest.new + + # Call the update_document method. + result = client.update_document request + + # The returned object is of type Google::Cloud::Firestore::V1::Document. + p result +end +# [END firestore_v1_generated_Firestore_UpdateDocument_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/write.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/write.rb new file mode 100644 index 000000000000..55103736dd0e --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/write.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! + +# [START firestore_v1_generated_Firestore_Write_sync] +require "google/cloud/firestore/v1" + +## +# Snippet for the write call in the Firestore service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Firestore::V1::Firestore::Client#write. +# +def write + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Firestore::V1::Firestore::Client.new + + # Create an input stream. + input = Gapic::StreamInput.new + + # Call the write method to start streaming. + output = client.write input + + # Send requests on the stream. For each request object, set fields by + # passing keyword arguments. Be sure to close the stream when done. + input << Google::Cloud::Firestore::V1::WriteRequest.new + input << Google::Cloud::Firestore::V1::WriteRequest.new + input.close + + # The returned object is a streamed enumerable yielding elements of type + # ::Google::Cloud::Firestore::V1::WriteResponse + output.each do |current_response| + p current_response + end +end +# [END firestore_v1_generated_Firestore_Write_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/snippet_metadata_google.firestore.v1.json b/owl-bot-staging/google-cloud-firestore-v1/snippets/snippet_metadata_google.firestore.v1.json new file mode 100644 index 000000000000..87be441de1ce --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/snippets/snippet_metadata_google.firestore.v1.json @@ -0,0 +1,695 @@ +{ + "client_library": { + "name": "google-cloud-firestore-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.firestore.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "firestore_v1_generated_Firestore_GetDocument_sync", + "title": "Snippet for the get_document call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#get_document.", + "file": "firestore/get_document.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_document", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#get_document", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::GetDocumentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::Document", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "GetDocument", + "full_name": "google.firestore.v1.Firestore.GetDocument", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_ListDocuments_sync", + "title": "Snippet for the list_documents call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#list_documents.", + "file": "firestore/list_documents.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_documents", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#list_documents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::ListDocumentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::ListDocumentsResponse", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "ListDocuments", + "full_name": "google.firestore.v1.Firestore.ListDocuments", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_UpdateDocument_sync", + "title": "Snippet for the update_document call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#update_document.", + "file": "firestore/update_document.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_document", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#update_document", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::UpdateDocumentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::Document", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "UpdateDocument", + "full_name": "google.firestore.v1.Firestore.UpdateDocument", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_DeleteDocument_sync", + "title": "Snippet for the delete_document call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#delete_document.", + "file": "firestore/delete_document.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_document", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#delete_document", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::DeleteDocumentRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "DeleteDocument", + "full_name": "google.firestore.v1.Firestore.DeleteDocument", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_BatchGetDocuments_sync", + "title": "Snippet for the batch_get_documents call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents.", + "file": "firestore/batch_get_documents.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_get_documents", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "BatchGetDocuments", + "full_name": "google.firestore.v1.Firestore.BatchGetDocuments", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_BeginTransaction_sync", + "title": "Snippet for the begin_transaction call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction.", + "file": "firestore/begin_transaction.rb", + "language": "RUBY", + "client_method": { + "short_name": "begin_transaction", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::BeginTransactionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::BeginTransactionResponse", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "BeginTransaction", + "full_name": "google.firestore.v1.Firestore.BeginTransaction", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_Commit_sync", + "title": "Snippet for the commit call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#commit.", + "file": "firestore/commit.rb", + "language": "RUBY", + "client_method": { + "short_name": "commit", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#commit", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::CommitRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::CommitResponse", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "Commit", + "full_name": "google.firestore.v1.Firestore.Commit", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_Rollback_sync", + "title": "Snippet for the rollback call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#rollback.", + "file": "firestore/rollback.rb", + "language": "RUBY", + "client_method": { + "short_name": "rollback", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#rollback", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::RollbackRequest", + "name": "request" + } + ], + "result_type": "::Google::Protobuf::Empty", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "Rollback", + "full_name": "google.firestore.v1.Firestore.Rollback", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_RunQuery_sync", + "title": "Snippet for the run_query call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#run_query.", + "file": "firestore/run_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_query", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#run_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::RunQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::RunQueryResponse", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "RunQuery", + "full_name": "google.firestore.v1.Firestore.RunQuery", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_ExecutePipeline_sync", + "title": "Snippet for the execute_pipeline call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#execute_pipeline.", + "file": "firestore/execute_pipeline.rb", + "language": "RUBY", + "client_method": { + "short_name": "execute_pipeline", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#execute_pipeline", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::ExecutePipelineRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::ExecutePipelineResponse", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "ExecutePipeline", + "full_name": "google.firestore.v1.Firestore.ExecutePipeline", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_RunAggregationQuery_sync", + "title": "Snippet for the run_aggregation_query call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query.", + "file": "firestore/run_aggregation_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "run_aggregation_query", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::RunAggregationQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::RunAggregationQueryResponse", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "RunAggregationQuery", + "full_name": "google.firestore.v1.Firestore.RunAggregationQuery", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 49, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_PartitionQuery_sync", + "title": "Snippet for the partition_query call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#partition_query.", + "file": "firestore/partition_query.rb", + "language": "RUBY", + "client_method": { + "short_name": "partition_query", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#partition_query", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::PartitionQueryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::PartitionQueryResponse", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "PartitionQuery", + "full_name": "google.firestore.v1.Firestore.PartitionQuery", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_Write_sync", + "title": "Snippet for the write call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#write.", + "file": "firestore/write.rb", + "language": "RUBY", + "client_method": { + "short_name": "write", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#write", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::WriteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::WriteResponse", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "Write", + "full_name": "google.firestore.v1.Firestore.Write", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 55, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_Listen_sync", + "title": "Snippet for the listen call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#listen.", + "file": "firestore/listen.rb", + "language": "RUBY", + "client_method": { + "short_name": "listen", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#listen", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::ListenRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::ListenResponse", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "Listen", + "full_name": "google.firestore.v1.Firestore.Listen", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 55, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_ListCollectionIds_sync", + "title": "Snippet for the list_collection_ids call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids.", + "file": "firestore/list_collection_ids.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_collection_ids", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::ListCollectionIdsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::ListCollectionIdsResponse", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "ListCollectionIds", + "full_name": "google.firestore.v1.Firestore.ListCollectionIds", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_BatchWrite_sync", + "title": "Snippet for the batch_write call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#batch_write.", + "file": "firestore/batch_write.rb", + "language": "RUBY", + "client_method": { + "short_name": "batch_write", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#batch_write", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::BatchWriteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::BatchWriteResponse", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "BatchWrite", + "full_name": "google.firestore.v1.Firestore.BatchWrite", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "firestore_v1_generated_Firestore_CreateDocument_sync", + "title": "Snippet for the create_document call in the Firestore service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#create_document.", + "file": "firestore/create_document.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_document", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#create_document", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Firestore::V1::CreateDocumentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Firestore::V1::Document", + "client": { + "short_name": "Firestore::Client", + "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" + }, + "method": { + "short_name": "CreateDocument", + "full_name": "google.firestore.v1.Firestore.CreateDocument", + "service": { + "short_name": "Firestore", + "full_name": "google.firestore.v1.Firestore" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_rest_test.rb b/owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_rest_test.rb new file mode 100644 index 000000000000..f743e99d9d50 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_rest_test.rb @@ -0,0 +1,951 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/v1/firestore_pb" +require "google/cloud/firestore/v1/firestore/rest" + + +class ::Google::Cloud::Firestore::V1::Firestore::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_get_document + # Create test objects. + client_result = ::Google::Cloud::Firestore::V1::Document.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + mask = {} + transaction = "hello world" + + get_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_get_document_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_document_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_document({ name: name, mask: mask, transaction: transaction }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_document name: name, mask: mask, transaction: transaction do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_document ::Google::Cloud::Firestore::V1::GetDocumentRequest.new(name: name, mask: mask, transaction: transaction) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_document({ name: name, mask: mask, transaction: transaction }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_document(::Google::Cloud::Firestore::V1::GetDocumentRequest.new(name: name, mask: mask, transaction: transaction), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_document_client_stub.call_count + end + end + end + + def test_list_documents + # Create test objects. + client_result = ::Google::Cloud::Firestore::V1::ListDocumentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + collection_id = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + mask = {} + transaction = "hello world" + show_missing = true + + list_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_list_documents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_documents_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_documents({ parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_documents parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_documents ::Google::Cloud::Firestore::V1::ListDocumentsRequest.new(parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_documents({ parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_documents(::Google::Cloud::Firestore::V1::ListDocumentsRequest.new(parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_documents_client_stub.call_count + end + end + end + + def test_update_document + # Create test objects. + client_result = ::Google::Cloud::Firestore::V1::Document.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + document = {} + update_mask = {} + mask = {} + current_document = {} + + update_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_update_document_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_document_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_document({ document: document, update_mask: update_mask, mask: mask, current_document: current_document }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_document document: document, update_mask: update_mask, mask: mask, current_document: current_document do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_document ::Google::Cloud::Firestore::V1::UpdateDocumentRequest.new(document: document, update_mask: update_mask, mask: mask, current_document: current_document) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_document({ document: document, update_mask: update_mask, mask: mask, current_document: current_document }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_document(::Google::Cloud::Firestore::V1::UpdateDocumentRequest.new(document: document, update_mask: update_mask, mask: mask, current_document: current_document), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_document_client_stub.call_count + end + end + end + + def test_delete_document + # 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" + current_document = {} + + delete_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_delete_document_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_document_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_document({ name: name, current_document: current_document }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_document name: name, current_document: current_document do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_document ::Google::Cloud::Firestore::V1::DeleteDocumentRequest.new(name: name, current_document: current_document) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_document({ name: name, current_document: current_document }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_document(::Google::Cloud::Firestore::V1::DeleteDocumentRequest.new(name: name, current_document: current_document), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_document_client_stub.call_count + end + end + end + + def test_batch_get_documents + # Create test objects. + client_result = ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + database = "hello world" + documents = ["hello world"] + mask = {} + transaction = "hello world" + + batch_get_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, is_server_streaming:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_batch_get_documents_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_get_documents_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_get_documents({ database: database, documents: documents, mask: mask, transaction: transaction }) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use named arguments + client.batch_get_documents database: database, documents: documents, mask: mask, transaction: transaction do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object + client.batch_get_documents ::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new(database: database, documents: documents, mask: mask, transaction: transaction) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use hash object with options + client.batch_get_documents({ database: database, documents: documents, mask: mask, transaction: transaction }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object with options + client.batch_get_documents(::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new(database: database, documents: documents, mask: mask, transaction: transaction), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Verify method calls + assert_equal 5, batch_get_documents_client_stub.call_count + end + end + end + + def test_begin_transaction + # Create test objects. + client_result = ::Google::Cloud::Firestore::V1::BeginTransactionResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + database = "hello world" + options = {} + + begin_transaction_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_begin_transaction_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, begin_transaction_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.begin_transaction({ database: database, options: options }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.begin_transaction database: database, options: options do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.begin_transaction ::Google::Cloud::Firestore::V1::BeginTransactionRequest.new(database: database, options: options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.begin_transaction({ database: database, options: options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.begin_transaction(::Google::Cloud::Firestore::V1::BeginTransactionRequest.new(database: database, options: options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, begin_transaction_client_stub.call_count + end + end + end + + def test_commit + # Create test objects. + client_result = ::Google::Cloud::Firestore::V1::CommitResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + database = "hello world" + writes = [{}] + transaction = "hello world" + + commit_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_commit_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, commit_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.commit({ database: database, writes: writes, transaction: transaction }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.commit database: database, writes: writes, transaction: transaction do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.commit ::Google::Cloud::Firestore::V1::CommitRequest.new(database: database, writes: writes, transaction: transaction) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.commit({ database: database, writes: writes, transaction: transaction }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.commit(::Google::Cloud::Firestore::V1::CommitRequest.new(database: database, writes: writes, transaction: transaction), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, commit_client_stub.call_count + end + end + end + + def test_rollback + # 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. + database = "hello world" + transaction = "hello world" + + rollback_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_rollback_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, rollback_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.rollback({ database: database, transaction: transaction }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.rollback database: database, transaction: transaction do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.rollback ::Google::Cloud::Firestore::V1::RollbackRequest.new(database: database, transaction: transaction) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.rollback({ database: database, transaction: transaction }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.rollback(::Google::Cloud::Firestore::V1::RollbackRequest.new(database: database, transaction: transaction), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, rollback_client_stub.call_count + end + end + end + + def test_run_query + # Create test objects. + client_result = ::Google::Cloud::Firestore::V1::RunQueryResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + structured_query = {} + transaction = "hello world" + explain_options = {} + + run_query_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, is_server_streaming:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_run_query_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_query_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_query({ parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options }) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use named arguments + client.run_query parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object + client.run_query ::Google::Cloud::Firestore::V1::RunQueryRequest.new(parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use hash object with options + client.run_query({ parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object with options + client.run_query(::Google::Cloud::Firestore::V1::RunQueryRequest.new(parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Verify method calls + assert_equal 5, run_query_client_stub.call_count + end + end + end + + def test_execute_pipeline + # Create test objects. + client_result = ::Google::Cloud::Firestore::V1::ExecutePipelineResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + database = "hello world" + structured_pipeline = {} + transaction = "hello world" + + execute_pipeline_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, is_server_streaming:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_execute_pipeline_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, execute_pipeline_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.execute_pipeline({ database: database, structured_pipeline: structured_pipeline, transaction: transaction }) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use named arguments + client.execute_pipeline database: database, structured_pipeline: structured_pipeline, transaction: transaction do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object + client.execute_pipeline ::Google::Cloud::Firestore::V1::ExecutePipelineRequest.new(database: database, structured_pipeline: structured_pipeline, transaction: transaction) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use hash object with options + client.execute_pipeline({ database: database, structured_pipeline: structured_pipeline, transaction: transaction }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object with options + client.execute_pipeline(::Google::Cloud::Firestore::V1::ExecutePipelineRequest.new(database: database, structured_pipeline: structured_pipeline, transaction: transaction), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Verify method calls + assert_equal 5, execute_pipeline_client_stub.call_count + end + end + end + + def test_run_aggregation_query + # Create test objects. + client_result = ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + structured_aggregation_query = {} + transaction = "hello world" + explain_options = {} + + run_aggregation_query_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, is_server_streaming:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_run_aggregation_query_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, run_aggregation_query_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.run_aggregation_query({ parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options }) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use named arguments + client.run_aggregation_query parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object + client.run_aggregation_query ::Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new(parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use hash object with options + client.run_aggregation_query({ parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Use protobuf object with options + client.run_aggregation_query(::Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new(parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end.first + + # Verify method calls + assert_equal 5, run_aggregation_query_client_stub.call_count + end + end + end + + def test_partition_query + # Create test objects. + client_result = ::Google::Cloud::Firestore::V1::PartitionQueryResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + structured_query = {} + partition_count = 42 + page_token = "hello world" + page_size = 42 + read_time = {} + + partition_query_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_partition_query_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, partition_query_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.partition_query({ parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.partition_query parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.partition_query ::Google::Cloud::Firestore::V1::PartitionQueryRequest.new(parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.partition_query({ parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.partition_query(::Google::Cloud::Firestore::V1::PartitionQueryRequest.new(parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, partition_query_client_stub.call_count + end + end + end + + def test_list_collection_ids + # Create test objects. + client_result = ::Google::Cloud::Firestore::V1::ListCollectionIdsResponse.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" + read_time = {} + + list_collection_ids_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_list_collection_ids_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_collection_ids_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_collection_ids({ parent: parent, page_size: page_size, page_token: page_token, read_time: read_time }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_collection_ids parent: parent, page_size: page_size, page_token: page_token, read_time: read_time do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_collection_ids ::Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new(parent: parent, page_size: page_size, page_token: page_token, read_time: read_time) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_collection_ids({ parent: parent, page_size: page_size, page_token: page_token, read_time: read_time }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_collection_ids(::Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new(parent: parent, page_size: page_size, page_token: page_token, read_time: read_time), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_collection_ids_client_stub.call_count + end + end + end + + def test_batch_write + # Create test objects. + client_result = ::Google::Cloud::Firestore::V1::BatchWriteResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + database = "hello world" + writes = [{}] + labels = {} + + batch_write_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_batch_write_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, batch_write_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.batch_write({ database: database, writes: writes, labels: labels }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.batch_write database: database, writes: writes, labels: labels do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.batch_write ::Google::Cloud::Firestore::V1::BatchWriteRequest.new(database: database, writes: writes, labels: labels) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.batch_write({ database: database, writes: writes, labels: labels }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.batch_write(::Google::Cloud::Firestore::V1::BatchWriteRequest.new(database: database, writes: writes, labels: labels), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, batch_write_client_stub.call_count + end + end + end + + def test_create_document + # Create test objects. + client_result = ::Google::Cloud::Firestore::V1::Document.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + collection_id = "hello world" + document_id = "hello world" + document = {} + mask = {} + + create_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_create_document_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_document_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_document({ parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_document parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_document ::Google::Cloud::Firestore::V1::CreateDocumentRequest.new(parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_document({ parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_document(::Google::Cloud::Firestore::V1::CreateDocumentRequest.new(parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_document_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::Firestore::V1::Firestore::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::Firestore::V1::Firestore::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_test.rb b/owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_test.rb new file mode 100644 index 000000000000..2c489e91476d --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_test.rb @@ -0,0 +1,1329 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/firestore/v1/firestore_pb" +require "google/cloud/firestore/v1/firestore" + +class ::Google::Cloud::Firestore::V1::Firestore::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_get_document + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::Document.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + mask = {} + transaction = "hello world" + + get_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_document, name + assert_kind_of ::Google::Cloud::Firestore::V1::GetDocumentRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::DocumentMask), request["mask"] + assert_equal "hello world", request["transaction"] + assert_equal :transaction, request.consistency_selector + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_document_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_document({ name: name, mask: mask, transaction: transaction }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_document name: name, mask: mask, transaction: transaction do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_document ::Google::Cloud::Firestore::V1::GetDocumentRequest.new(name: name, mask: mask, transaction: transaction) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_document({ name: name, mask: mask, transaction: transaction }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_document(::Google::Cloud::Firestore::V1::GetDocumentRequest.new(name: name, mask: mask, transaction: transaction), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_document_client_stub.call_rpc_count + end + end + + def test_list_documents + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::ListDocumentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + collection_id = "hello world" + page_size = 42 + page_token = "hello world" + order_by = "hello world" + mask = {} + transaction = "hello world" + show_missing = true + + list_documents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_documents, name + assert_kind_of ::Google::Cloud::Firestore::V1::ListDocumentsRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["collection_id"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal "hello world", request["order_by"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::DocumentMask), request["mask"] + assert_equal "hello world", request["transaction"] + assert_equal :transaction, request.consistency_selector + assert_equal true, request["show_missing"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_documents_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_documents({ parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing }) 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_documents parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing 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_documents ::Google::Cloud::Firestore::V1::ListDocumentsRequest.new(parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing) 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_documents({ parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing }, 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_documents(::Google::Cloud::Firestore::V1::ListDocumentsRequest.new(parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing), 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_documents_client_stub.call_rpc_count + end + end + + def test_update_document + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::Document.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + document = {} + update_mask = {} + mask = {} + current_document = {} + + update_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_document, name + assert_kind_of ::Google::Cloud::Firestore::V1::UpdateDocumentRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::Document), request["document"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::DocumentMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::DocumentMask), request["mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::Precondition), request["current_document"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_document_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_document({ document: document, update_mask: update_mask, mask: mask, current_document: current_document }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.update_document document: document, update_mask: update_mask, mask: mask, current_document: current_document do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.update_document ::Google::Cloud::Firestore::V1::UpdateDocumentRequest.new(document: document, update_mask: update_mask, mask: mask, current_document: current_document) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.update_document({ document: document, update_mask: update_mask, mask: mask, current_document: current_document }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.update_document(::Google::Cloud::Firestore::V1::UpdateDocumentRequest.new(document: document, update_mask: update_mask, mask: mask, current_document: current_document), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, update_document_client_stub.call_rpc_count + end + end + + def test_delete_document + # 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" + current_document = {} + + delete_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_document, name + assert_kind_of ::Google::Cloud::Firestore::V1::DeleteDocumentRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::Precondition), request["current_document"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_document_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_document({ name: name, current_document: current_document }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.delete_document name: name, current_document: current_document do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.delete_document ::Google::Cloud::Firestore::V1::DeleteDocumentRequest.new(name: name, current_document: current_document) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.delete_document({ name: name, current_document: current_document }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.delete_document(::Google::Cloud::Firestore::V1::DeleteDocumentRequest.new(name: name, current_document: current_document), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, delete_document_client_stub.call_rpc_count + end + end + + def test_batch_get_documents + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a server streaming method. + database = "hello world" + documents = ["hello world"] + mask = {} + transaction = "hello world" + + batch_get_documents_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :batch_get_documents, name + assert_kind_of ::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest, request + assert_equal "hello world", request["database"] + assert_equal ["hello world"], request["documents"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::DocumentMask), request["mask"] + assert_equal "hello world", request["transaction"] + assert_equal :transaction, request.consistency_selector + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_get_documents_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_get_documents({ database: database, documents: documents, mask: mask, transaction: transaction }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_get_documents database: database, documents: documents, mask: mask, transaction: transaction do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_get_documents ::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new(database: database, documents: documents, mask: mask, transaction: transaction) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_get_documents({ database: database, documents: documents, mask: mask, transaction: transaction }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_get_documents(::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new(database: database, documents: documents, mask: mask, transaction: transaction), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_get_documents_client_stub.call_rpc_count + end + end + + def test_begin_transaction + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::BeginTransactionResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + database = "hello world" + options = {} + + begin_transaction_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :begin_transaction, name + assert_kind_of ::Google::Cloud::Firestore::V1::BeginTransactionRequest, request + assert_equal "hello world", request["database"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::TransactionOptions), request["options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, begin_transaction_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.begin_transaction({ database: database, options: options }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.begin_transaction database: database, options: options do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.begin_transaction ::Google::Cloud::Firestore::V1::BeginTransactionRequest.new(database: database, options: options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.begin_transaction({ database: database, options: options }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.begin_transaction(::Google::Cloud::Firestore::V1::BeginTransactionRequest.new(database: database, options: options), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, begin_transaction_client_stub.call_rpc_count + end + end + + def test_commit + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::CommitResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + database = "hello world" + writes = [{}] + transaction = "hello world" + + commit_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :commit, name + assert_kind_of ::Google::Cloud::Firestore::V1::CommitRequest, request + assert_equal "hello world", request["database"] + assert_kind_of ::Google::Cloud::Firestore::V1::Write, request["writes"].first + assert_equal "hello world", request["transaction"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, commit_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.commit({ database: database, writes: writes, transaction: transaction }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.commit database: database, writes: writes, transaction: transaction do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.commit ::Google::Cloud::Firestore::V1::CommitRequest.new(database: database, writes: writes, transaction: transaction) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.commit({ database: database, writes: writes, transaction: transaction }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.commit(::Google::Cloud::Firestore::V1::CommitRequest.new(database: database, writes: writes, transaction: transaction), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, commit_client_stub.call_rpc_count + end + end + + def test_rollback + # 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. + database = "hello world" + transaction = "hello world" + + rollback_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :rollback, name + assert_kind_of ::Google::Cloud::Firestore::V1::RollbackRequest, request + assert_equal "hello world", request["database"] + assert_equal "hello world", request["transaction"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, rollback_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.rollback({ database: database, transaction: transaction }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.rollback database: database, transaction: transaction do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.rollback ::Google::Cloud::Firestore::V1::RollbackRequest.new(database: database, transaction: transaction) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.rollback({ database: database, transaction: transaction }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.rollback(::Google::Cloud::Firestore::V1::RollbackRequest.new(database: database, transaction: transaction), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, rollback_client_stub.call_rpc_count + end + end + + def test_run_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::RunQueryResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a server streaming method. + parent = "hello world" + structured_query = {} + transaction = "hello world" + explain_options = {} + + run_query_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :run_query, name + assert_kind_of ::Google::Cloud::Firestore::V1::RunQueryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::StructuredQuery), request["structured_query"] + assert_equal :structured_query, request.query_type + assert_equal "hello world", request["transaction"] + assert_equal :transaction, request.consistency_selector + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::ExplainOptions), request["explain_options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_query_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_query({ parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::RunQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.run_query parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::RunQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.run_query ::Google::Cloud::Firestore::V1::RunQueryRequest.new(parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::RunQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.run_query({ parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::RunQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.run_query(::Google::Cloud::Firestore::V1::RunQueryRequest.new(parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::RunQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_query_client_stub.call_rpc_count + end + end + + def test_execute_pipeline + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::ExecutePipelineResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a server streaming method. + database = "hello world" + structured_pipeline = {} + transaction = "hello world" + + execute_pipeline_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :execute_pipeline, name + assert_kind_of ::Google::Cloud::Firestore::V1::ExecutePipelineRequest, request + assert_equal "hello world", request["database"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::StructuredPipeline), request["structured_pipeline"] + assert_equal :structured_pipeline, request.pipeline_type + assert_equal "hello world", request["transaction"] + assert_equal :transaction, request.consistency_selector + refute_nil options + end + + Gapic::ServiceStub.stub :new, execute_pipeline_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.execute_pipeline({ database: database, structured_pipeline: structured_pipeline, transaction: transaction }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::ExecutePipelineResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.execute_pipeline database: database, structured_pipeline: structured_pipeline, transaction: transaction do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::ExecutePipelineResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.execute_pipeline ::Google::Cloud::Firestore::V1::ExecutePipelineRequest.new(database: database, structured_pipeline: structured_pipeline, transaction: transaction) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::ExecutePipelineResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.execute_pipeline({ database: database, structured_pipeline: structured_pipeline, transaction: transaction }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::ExecutePipelineResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.execute_pipeline(::Google::Cloud::Firestore::V1::ExecutePipelineRequest.new(database: database, structured_pipeline: structured_pipeline, transaction: transaction), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::ExecutePipelineResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, execute_pipeline_client_stub.call_rpc_count + end + end + + def test_run_aggregation_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a server streaming method. + parent = "hello world" + structured_aggregation_query = {} + transaction = "hello world" + explain_options = {} + + run_aggregation_query_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :run_aggregation_query, name + assert_kind_of ::Google::Cloud::Firestore::V1::RunAggregationQueryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::StructuredAggregationQuery), request["structured_aggregation_query"] + assert_equal :structured_aggregation_query, request.query_type + assert_equal "hello world", request["transaction"] + assert_equal :transaction, request.consistency_selector + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::ExplainOptions), request["explain_options"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, run_aggregation_query_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.run_aggregation_query({ parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options }) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Use named arguments + client.run_aggregation_query parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.run_aggregation_query ::Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new(parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.run_aggregation_query({ parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options }, grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.run_aggregation_query(::Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new(parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options), grpc_options) do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse, r + end + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, run_aggregation_query_client_stub.call_rpc_count + end + end + + def test_partition_query + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::PartitionQueryResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + structured_query = {} + partition_count = 42 + page_token = "hello world" + page_size = 42 + read_time = {} + + partition_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :partition_query, name + assert_kind_of ::Google::Cloud::Firestore::V1::PartitionQueryRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::StructuredQuery), request["structured_query"] + assert_equal :structured_query, request.query_type + assert_equal 42, request["partition_count"] + assert_equal "hello world", request["page_token"] + assert_equal 42, request["page_size"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal :read_time, request.consistency_selector + refute_nil options + end + + Gapic::ServiceStub.stub :new, partition_query_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.partition_query({ parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time }) 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.partition_query parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time 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.partition_query ::Google::Cloud::Firestore::V1::PartitionQueryRequest.new(parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time) 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.partition_query({ parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time }, 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.partition_query(::Google::Cloud::Firestore::V1::PartitionQueryRequest.new(parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time), 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, partition_query_client_stub.call_rpc_count + end + end + + def test_write + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::WriteResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a bidi streaming method. + database = "hello world" + stream_id = "hello world" + writes = [{}] + stream_token = "hello world" + labels = {} + + write_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :write, name + assert_kind_of Enumerable, request + refute_nil options + request + end + + Gapic::ServiceStub.stub :new, write_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use enumerable object with hash and protobuf object. + request_hash = { database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels } + request_proto = ::Google::Cloud::Firestore::V1::WriteRequest.new database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels + enum_input = [request_hash, request_proto].to_enum + client.write enum_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::WriteResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common). + request_hash = { database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels } + request_proto = ::Google::Cloud::Firestore::V1::WriteRequest.new database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels + stream_input = Gapic::StreamInput.new + client.write stream_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::WriteResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Use enumerable object with hash and protobuf object with options. + request_hash = { database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels } + request_proto = ::Google::Cloud::Firestore::V1::WriteRequest.new database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels + enum_input = [request_hash, request_proto].to_enum + client.write enum_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::WriteResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common) with options. + request_hash = { database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels } + request_proto = ::Google::Cloud::Firestore::V1::WriteRequest.new database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels + stream_input = Gapic::StreamInput.new + client.write stream_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::WriteResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Verify method calls + assert_equal 4, write_client_stub.call_rpc_count + write_client_stub.requests.each do |request| + request.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::WriteRequest, r + assert_equal "hello world", r["database"] + assert_equal "hello world", r["stream_id"] + assert_kind_of ::Google::Cloud::Firestore::V1::Write, r["writes"].first + assert_equal "hello world", r["stream_token"] + assert_equal({}, r["labels"].to_h) + end + end + end + end + + def test_listen + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::ListenResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a bidi streaming method. + database = "hello world" + add_target = {} + labels = {} + + listen_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| + assert_equal :listen, name + assert_kind_of Enumerable, request + refute_nil options + request + end + + Gapic::ServiceStub.stub :new, listen_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use enumerable object with hash and protobuf object. + request_hash = { database: database, add_target: add_target, labels: labels } + request_proto = ::Google::Cloud::Firestore::V1::ListenRequest.new database: database, add_target: add_target, labels: labels + enum_input = [request_hash, request_proto].to_enum + client.listen enum_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::ListenResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common). + request_hash = { database: database, add_target: add_target, labels: labels } + request_proto = ::Google::Cloud::Firestore::V1::ListenRequest.new database: database, add_target: add_target, labels: labels + stream_input = Gapic::StreamInput.new + client.listen stream_input do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::ListenResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Use enumerable object with hash and protobuf object with options. + request_hash = { database: database, add_target: add_target, labels: labels } + request_proto = ::Google::Cloud::Firestore::V1::ListenRequest.new database: database, add_target: add_target, labels: labels + enum_input = [request_hash, request_proto].to_enum + client.listen enum_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::ListenResponse, r + end + assert_equal grpc_operation, operation + end + + # Use stream input object (from gapic-common) with options. + request_hash = { database: database, add_target: add_target, labels: labels } + request_proto = ::Google::Cloud::Firestore::V1::ListenRequest.new database: database, add_target: add_target, labels: labels + stream_input = Gapic::StreamInput.new + client.listen stream_input, grpc_options do |response, operation| + assert_kind_of Enumerable, response + response.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::ListenResponse, r + end + assert_equal grpc_operation, operation + end + stream_input << request_hash + stream_input << request_proto + stream_input.close + + # Verify method calls + assert_equal 4, listen_client_stub.call_rpc_count + listen_client_stub.requests.each do |request| + request.to_a.each do |r| + assert_kind_of ::Google::Cloud::Firestore::V1::ListenRequest, r + assert_equal "hello world", r["database"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::Target), r["add_target"] + assert_equal :add_target, r.target_change + assert_equal({}, r["labels"].to_h) + end + end + end + end + + def test_list_collection_ids + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::ListCollectionIdsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + read_time = {} + + list_collection_ids_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_collection_ids, name + assert_kind_of ::Google::Cloud::Firestore::V1::ListCollectionIdsRequest, request + assert_equal "hello world", request["parent"] + assert_equal 42, request["page_size"] + assert_equal "hello world", request["page_token"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] + assert_equal :read_time, request.consistency_selector + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_collection_ids_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_collection_ids({ parent: parent, page_size: page_size, page_token: page_token, read_time: read_time }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_collection_ids parent: parent, page_size: page_size, page_token: page_token, read_time: read_time do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_collection_ids ::Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new(parent: parent, page_size: page_size, page_token: page_token, read_time: read_time) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_collection_ids({ parent: parent, page_size: page_size, page_token: page_token, read_time: read_time }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_collection_ids(::Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new(parent: parent, page_size: page_size, page_token: page_token, read_time: read_time), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_collection_ids_client_stub.call_rpc_count + end + end + + def test_batch_write + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::BatchWriteResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + database = "hello world" + writes = [{}] + labels = {} + + batch_write_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :batch_write, name + assert_kind_of ::Google::Cloud::Firestore::V1::BatchWriteRequest, request + assert_equal "hello world", request["database"] + assert_kind_of ::Google::Cloud::Firestore::V1::Write, request["writes"].first + assert_equal({}, request["labels"].to_h) + refute_nil options + end + + Gapic::ServiceStub.stub :new, batch_write_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.batch_write({ database: database, writes: writes, labels: labels }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.batch_write database: database, writes: writes, labels: labels do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.batch_write ::Google::Cloud::Firestore::V1::BatchWriteRequest.new(database: database, writes: writes, labels: labels) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.batch_write({ database: database, writes: writes, labels: labels }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.batch_write(::Google::Cloud::Firestore::V1::BatchWriteRequest.new(database: database, writes: writes, labels: labels), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, batch_write_client_stub.call_rpc_count + end + end + + def test_create_document + # Create GRPC objects. + grpc_response = ::Google::Cloud::Firestore::V1::Document.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + collection_id = "hello world" + document_id = "hello world" + document = {} + mask = {} + + create_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_document, name + assert_kind_of ::Google::Cloud::Firestore::V1::CreateDocumentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["collection_id"] + assert_equal "hello world", request["document_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::Document), request["document"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::DocumentMask), request["mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_document_client_stub do + # Create client + client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_document({ parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.create_document parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.create_document ::Google::Cloud::Firestore::V1::CreateDocumentRequest.new(parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.create_document({ parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.create_document(::Google::Cloud::Firestore::V1::CreateDocumentRequest.new(parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, create_document_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::Firestore::V1::Firestore::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::Firestore::V1::Firestore::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::Firestore::V1::Firestore::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Firestore::V1::Firestore::Client, client + assert_equal creds, client.configure.credentials + end + end +end diff --git a/owl-bot-staging/google-cloud-firestore-v1/test/helper.rb b/owl-bot-staging/google-cloud-firestore-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-firestore-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-functions-v1/.gitignore b/owl-bot-staging/google-cloud-functions-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-functions-v1/.repo-metadata.json new file mode 100644 index 000000000000..2a8c7f5edb4e --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudfunctions.googleapis.com", + "api_shortname": "cloudfunctions", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v1/latest", + "distribution_name": "google-cloud-functions-v1", + "is_cloud": true, + "language": "ruby", + "name": "cloudfunctions", + "name_pretty": "Cloud Functions V1 API", + "product_documentation": "https://cloud.google.com/functions", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Cloud Functions API manages lightweight user-provided functions executed in response to events. Note that google-cloud-functions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-functions instead. See the readme for more details.", + "ruby-cloud-env-prefix": "FUNCTIONS", + "ruby-cloud-product-url": "https://cloud.google.com/functions", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-functions-v1/.rubocop.yml b/owl-bot-staging/google-cloud-functions-v1/.rubocop.yml new file mode 100644 index 000000000000..4a540ce1fbcf --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-functions-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-functions-v1.rb" diff --git a/owl-bot-staging/google-cloud-functions-v1/.toys.rb b/owl-bot-staging/google-cloud-functions-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/.yardopts b/owl-bot-staging/google-cloud-functions-v1/.yardopts new file mode 100644 index 000000000000..1b753a8c44a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Functions 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-functions-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-functions-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..593505e94f8d --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-functions-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-functions-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/functions/v1" + +client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/functions/v1" + +::Google::Cloud::Functions::V1::CloudFunctionsService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Functions::V1::CloudFunctionsService::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-functions-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/functions/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Functions::V1::CloudFunctionsService::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-functions-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-functions-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-functions-v1/Gemfile b/owl-bot-staging/google-cloud-functions-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-functions-v1/LICENSE.md b/owl-bot-staging/google-cloud-functions-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/README.md b/owl-bot-staging/google-cloud-functions-v1/README.md new file mode 100644 index 000000000000..02b8c3d4d377 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Functions V1 API + +Manages lightweight user-provided functions executed in response to events. + +The Cloud Functions API manages lightweight user-provided functions executed in response to events. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Functions V1 API. Most users should consider using +the main client gem, +[google-cloud-functions](https://rubygems.org/gems/google-cloud-functions). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-functions-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/cloudfunctions.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/functions/v1" + +client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new +request = ::Google::Cloud::Functions::V1::ListFunctionsRequest.new # (request fields as keyword arguments...) +response = client.list_functions request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/functions) +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/functions/v1" +require "logger" + +client = ::Google::Cloud::Functions::V1::CloudFunctionsService::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-functions`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-functions-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-functions`. +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-functions-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-functions-v1/Rakefile b/owl-bot-staging/google-cloud-functions-v1/Rakefile new file mode 100644 index 000000000000..5ad2a500c44b --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["FUNCTIONS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["FUNCTIONS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["FUNCTIONS_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 FUNCTIONS_TEST_PROJECT=test123 FUNCTIONS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/functions/v1/cloud_functions_service/credentials" + ::Google::Cloud::Functions::V1::CloudFunctionsService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["FUNCTIONS_PROJECT"] = project + ENV["FUNCTIONS_TEST_PROJECT"] = project + ENV["FUNCTIONS_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-functions-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-functions-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-functions-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-functions-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-functions-v1" + header "google-cloud-functions-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-functions-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-functions-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-functions-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-functions-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-functions-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-functions-v1/gapic_metadata.json new file mode 100644 index 000000000000..efed26695e1f --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/gapic_metadata.json @@ -0,0 +1,73 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.functions.v1", + "libraryPackage": "::Google::Cloud::Functions::V1", + "services": { + "CloudFunctionsService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client", + "rpcs": { + "ListFunctions": { + "methods": [ + "list_functions" + ] + }, + "GetFunction": { + "methods": [ + "get_function" + ] + }, + "CreateFunction": { + "methods": [ + "create_function" + ] + }, + "UpdateFunction": { + "methods": [ + "update_function" + ] + }, + "DeleteFunction": { + "methods": [ + "delete_function" + ] + }, + "CallFunction": { + "methods": [ + "call_function" + ] + }, + "GenerateUploadUrl": { + "methods": [ + "generate_upload_url" + ] + }, + "GenerateDownloadUrl": { + "methods": [ + "generate_download_url" + ] + }, + "SetIamPolicy": { + "methods": [ + "set_iam_policy" + ] + }, + "GetIamPolicy": { + "methods": [ + "get_iam_policy" + ] + }, + "TestIamPermissions": { + "methods": [ + "test_iam_permissions" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-functions-v1/google-cloud-functions-v1.gemspec b/owl-bot-staging/google-cloud-functions-v1/google-cloud-functions-v1.gemspec new file mode 100644 index 000000000000..864e659253bd --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/google-cloud-functions-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/functions/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-functions-v1" + gem.version = Google::Cloud::Functions::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Cloud Functions API manages lightweight user-provided functions executed in response to events. Note that google-cloud-functions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-functions instead. See the readme for more details." + gem.summary = "Manages lightweight user-provided functions executed in response to events." + 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.1" + + 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-functions-v1/lib/google-cloud-functions-v1.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google-cloud-functions-v1.rb new file mode 100644 index 000000000000..613e87341848 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google-cloud-functions-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/functions/v1" diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1.rb new file mode 100644 index 000000000000..a402fa182c2c --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1.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/functions/v1/cloud_functions_service" +require "google/cloud/functions/v1/version" + +module Google + module Cloud + module Functions + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/functions/v1" + # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/functions/v1" + # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/functions/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/bindings_override.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/bindings_override.rb new file mode 100644 index 000000000000..0b74fa564e8f --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/bindings_override.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Functions + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/functions/v1/rest" + # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Functions"] + 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.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 + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service.rb new file mode 100644 index 000000000000..7a1c82286200 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_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/functions/v1/version" + +require "google/cloud/functions/v1/cloud_functions_service/credentials" +require "google/cloud/functions/v1/cloud_functions_service/paths" +require "google/cloud/functions/v1/cloud_functions_service/operations" +require "google/cloud/functions/v1/cloud_functions_service/client" +require "google/cloud/functions/v1/cloud_functions_service/rest" + +module Google + module Cloud + module Functions + module V1 + ## + # A service that application uses to manipulate triggers and functions. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/functions/v1/cloud_functions_service" + # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/functions/v1/cloud_functions_service/rest" + # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + module CloudFunctionsService + end + end + end + end +end + +helper_path = ::File.join __dir__, "cloud_functions_service", "helpers.rb" +require "google/cloud/functions/v1/cloud_functions_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/client.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/client.rb new file mode 100644 index 000000000000..5e42cd2dbb87 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/client.rb @@ -0,0 +1,1609 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions/v1/functions_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Functions + module V1 + module CloudFunctionsService + ## + # Client for the CloudFunctionsService service. + # + # A service that application uses to manipulate triggers and functions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_functions_service_stub + + ## + # Configure the CloudFunctionsService Client class. + # + # See {::Google::Cloud::Functions::V1::CloudFunctionsService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudFunctionsService clients + # ::Google::Cloud::Functions::V1::CloudFunctionsService::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", "Functions", "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.list_functions.timeout = 600.0 + default_config.rpcs.list_functions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_function.timeout = 600.0 + default_config.rpcs.get_function.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_function.timeout = 600.0 + + default_config.rpcs.update_function.timeout = 600.0 + default_config.rpcs.update_function.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_function.timeout = 600.0 + default_config.rpcs.delete_function.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.call_function.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudFunctionsService 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::Functions::V1::CloudFunctionsService::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 + @cloud_functions_service_stub.universe_domain + end + + ## + # Create a new CloudFunctionsService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudFunctionsService 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/functions/v1/functions_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 + + @cloud_functions_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Functions::V1::CloudFunctionsService::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 + ) + + @cloud_functions_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 = @cloud_functions_service_stub.endpoint + config.universe_domain = @cloud_functions_service_stub.universe_domain + config.logger = @cloud_functions_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 = @cloud_functions_service_stub.endpoint + config.universe_domain = @cloud_functions_service_stub.universe_domain + config.logger = @cloud_functions_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Functions::V1::CloudFunctionsService::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 + @cloud_functions_service_stub.logger + end + + # Service calls + + ## + # Returns a list of functions that belong to the requested project. + # + # @overload list_functions(request, options = nil) + # Pass arguments to `list_functions` via a request object, either of type + # {::Google::Cloud::Functions::V1::ListFunctionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::ListFunctionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_functions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_functions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The project and location from which the function should be listed, + # specified in the format `projects/*/locations/*` + # If you want to list functions in all locations, use "-" in place of a + # location. When listing functions in all locations, if one or more + # location(s) are unreachable, the response will contain functions from all + # reachable locations along with the names of any unreachable locations. + # @param page_size [::Integer] + # Maximum number of functions to return per call. + # @param page_token [::String] + # The value returned by the last + # `ListFunctionsResponse`; indicates that + # this is a continuation of a prior `ListFunctions` call, and that the + # system should return the next page of data. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Functions::V1::CloudFunction>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Functions::V1::CloudFunction>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::ListFunctionsRequest.new + # + # # Call the list_functions method. + # result = client.list_functions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Functions::V1::CloudFunction. + # p item + # end + # + def list_functions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::ListFunctionsRequest + + # Converts hash and nil to 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_functions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-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_functions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_functions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.call_rpc :list_functions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @cloud_functions_service_stub, :list_functions, 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 + + ## + # Returns a function with the given name from the requested project. + # + # @overload get_function(request, options = nil) + # Pass arguments to `get_function` via a request object, either of type + # {::Google::Cloud::Functions::V1::GetFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::GetFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_function(name: nil, version_id: nil) + # Pass arguments to `get_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 function which details should be obtained. + # @param version_id [::Integer] + # Optional. The optional version of the function whose details should be + # obtained. The version of a 1st Gen function is an integer that starts from + # 1 and gets incremented on redeployments. Each deployment creates a config + # version of the underlying function. GCF may keep historical configs for old + # versions. This field can be specified to fetch the historical configs. + # Leave it blank or set to 0 to get the latest version of the function. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Functions::V1::CloudFunction] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Functions::V1::CloudFunction] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::GetFunctionRequest.new + # + # # Call the get_function method. + # result = client.get_function request + # + # # The returned object is of type Google::Cloud::Functions::V1::CloudFunction. + # p result + # + def get_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::GetFunctionRequest + + # Converts hash and nil to 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-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_function.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.call_rpc :get_function, 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 new function. If a function with the given name already exists in + # the specified project, the long running operation will return + # `ALREADY_EXISTS` error. + # + # @overload create_function(request, options = nil) + # Pass arguments to `create_function` via a request object, either of type + # {::Google::Cloud::Functions::V1::CreateFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::CreateFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_function(location: nil, function: nil) + # Pass arguments to `create_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param location [::String] + # Required. The project and location in which the function should be created, + # specified in the format `projects/*/locations/*` + # @param function [::Google::Cloud::Functions::V1::CloudFunction, ::Hash] + # Required. Function to be created. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::CreateFunctionRequest.new + # + # # Call the create_function method. + # result = client.create_function request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::CreateFunctionRequest + + # Converts hash and nil to 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.location + header_params["location"] = request.location + end + + request_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_function.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.call_rpc :create_function, 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 existing function. + # + # @overload update_function(request, options = nil) + # Pass arguments to `update_function` via a request object, either of type + # {::Google::Cloud::Functions::V1::UpdateFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::UpdateFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_function(function: nil, update_mask: nil) + # Pass arguments to `update_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param function [::Google::Cloud::Functions::V1::CloudFunction, ::Hash] + # Required. New version of the function. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields in `CloudFunction` that have to be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::UpdateFunctionRequest.new + # + # # Call the update_function method. + # result = client.update_function request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::UpdateFunctionRequest + + # Converts hash and nil to 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.function&.name + header_params["function.name"] = request.function.name + end + + request_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_function.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.call_rpc :update_function, 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 function with the given name from the specified project. If the + # given function is used by some trigger, the trigger will be updated to + # remove this function. + # + # @overload delete_function(request, options = nil) + # Pass arguments to `delete_function` via a request object, either of type + # {::Google::Cloud::Functions::V1::DeleteFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::DeleteFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_function(name: nil) + # Pass arguments to `delete_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 function which should be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::DeleteFunctionRequest.new + # + # # Call the delete_function method. + # result = client.delete_function request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::DeleteFunctionRequest + + # Converts hash and nil to 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-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_function.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.call_rpc :delete_function, 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 + + ## + # Synchronously invokes a deployed Cloud Function. To be used for testing + # purposes as very limited traffic is allowed. For more information on + # the actual limits, refer to + # [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits). + # + # @overload call_function(request, options = nil) + # Pass arguments to `call_function` via a request object, either of type + # {::Google::Cloud::Functions::V1::CallFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::CallFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload call_function(name: nil, data: nil) + # Pass arguments to `call_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 function to be called. + # @param data [::String] + # Required. Input to be passed to the function. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Functions::V1::CallFunctionResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Functions::V1::CallFunctionResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::CallFunctionRequest.new + # + # # Call the call_function method. + # result = client.call_function request + # + # # The returned object is of type Google::Cloud::Functions::V1::CallFunctionResponse. + # p result + # + def call_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::CallFunctionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.call_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-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.call_function.timeout, + metadata: metadata, + retry_policy: @config.rpcs.call_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.call_rpc :call_function, 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 a signed URL for uploading a function source code. + # For more information about the signed URL usage see: + # https://cloud.google.com/storage/docs/access-control/signed-urls. + # Once the function source code upload is complete, the used signed + # URL should be provided in CreateFunction or UpdateFunction request + # as a reference to the function source code. + # + # When uploading source code to the generated signed URL, please follow + # these restrictions: + # + # * Source file type should be a zip file. + # * Source file size should not exceed 100MB limit. + # * No credentials should be attached - the signed URLs provide access to the + # target bucket using internal service identity; if credentials were + # attached, the identity from the credentials would be used, but that + # identity does not have permissions to upload files to the URL. + # + # When making a HTTP PUT request, these two headers need to be specified: + # + # * `content-type: application/zip` + # * `x-goog-content-length-range: 0,104857600` + # + # And this header SHOULD NOT be specified: + # + # * `Authorization: Bearer YOUR_TOKEN` + # + # @overload generate_upload_url(request, options = nil) + # Pass arguments to `generate_upload_url` via a request object, either of type + # {::Google::Cloud::Functions::V1::GenerateUploadUrlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::GenerateUploadUrlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_upload_url(parent: nil, kms_key_name: nil) + # Pass arguments to `generate_upload_url` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The project and location in which the Google Cloud Storage signed URL + # should be generated, specified in the format `projects/*/locations/*`. + # @param kms_key_name [::String] + # Resource name of a KMS crypto key (managed by the user) used to + # encrypt/decrypt function source code objects in intermediate Cloud Storage + # buckets. When you generate an upload url and upload your source code, it + # gets copied to an intermediate Cloud Storage bucket. The source code is + # then copied to a versioned directory in the sources bucket in the consumer + # project during the function deployment. + # + # It must match the pattern + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + # + # The Google Cloud Functions service account + # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be + # granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter + # (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the + # Key/KeyRing/Project/Organization (least access preferred). GCF will + # delegate access to the Google Storage service account in the internal + # project. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Functions::V1::GenerateUploadUrlResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Functions::V1::GenerateUploadUrlResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new + # + # # Call the generate_upload_url method. + # result = client.generate_upload_url request + # + # # The returned object is of type Google::Cloud::Functions::V1::GenerateUploadUrlResponse. + # p result + # + def generate_upload_url request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::GenerateUploadUrlRequest + + # Converts hash and nil to 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_upload_url.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-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.generate_upload_url.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_upload_url.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.call_rpc :generate_upload_url, 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 a signed URL for downloading deployed function source code. + # The URL is only valid for a limited period and should be used within + # minutes after generation. + # For more information about the signed URL usage see: + # https://cloud.google.com/storage/docs/access-control/signed-urls + # + # @overload generate_download_url(request, options = nil) + # Pass arguments to `generate_download_url` via a request object, either of type + # {::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_download_url(name: nil, version_id: nil) + # Pass arguments to `generate_download_url` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of function for which source code Google Cloud Storage signed + # URL should be generated. + # @param version_id [::Integer] + # The optional version of function. If not set, default, current version + # is used. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new + # + # # Call the generate_download_url method. + # result = client.generate_download_url request + # + # # The returned object is of type Google::Cloud::Functions::V1::GenerateDownloadUrlResponse. + # p result + # + def generate_download_url request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest + + # Converts hash and nil to 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_download_url.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION + metadata[:"x-goog-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_download_url.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_download_url.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.call_rpc :generate_download_url, 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 IAM access control policy on the specified function. + # Replaces any existing policy. + # + # @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/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::VERSION + metadata[:"x-goog-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 + + @cloud_functions_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 + + ## + # Gets the IAM access control policy for a function. + # Returns an empty policy if the function exists and does not have a policy + # set. + # + # @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/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::VERSION + metadata[:"x-goog-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 + + @cloud_functions_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 + + ## + # Tests the specified permissions against the IAM access control policy + # for a function. + # If the function does not exist, this will return an empty set of + # permissions, not a NOT_FOUND error. + # + # @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/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::VERSION + metadata[:"x-goog-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 + + @cloud_functions_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 + + ## + # Configuration class for the CloudFunctionsService API. + # + # This class represents the configuration for CloudFunctionsService, + # 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::Functions::V1::CloudFunctionsService::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_functions to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_functions.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_functions.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::Functions::V1::CloudFunctionsService::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 = "cloudfunctions.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 CloudFunctionsService 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_functions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_functions + ## + # RPC-specific configuration for `get_function` + # @return [::Gapic::Config::Method] + # + attr_reader :get_function + ## + # RPC-specific configuration for `create_function` + # @return [::Gapic::Config::Method] + # + attr_reader :create_function + ## + # RPC-specific configuration for `update_function` + # @return [::Gapic::Config::Method] + # + attr_reader :update_function + ## + # RPC-specific configuration for `delete_function` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_function + ## + # RPC-specific configuration for `call_function` + # @return [::Gapic::Config::Method] + # + attr_reader :call_function + ## + # RPC-specific configuration for `generate_upload_url` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_upload_url + ## + # RPC-specific configuration for `generate_download_url` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_download_url + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + list_functions_config = parent_rpcs.list_functions if parent_rpcs.respond_to? :list_functions + @list_functions = ::Gapic::Config::Method.new list_functions_config + get_function_config = parent_rpcs.get_function if parent_rpcs.respond_to? :get_function + @get_function = ::Gapic::Config::Method.new get_function_config + create_function_config = parent_rpcs.create_function if parent_rpcs.respond_to? :create_function + @create_function = ::Gapic::Config::Method.new create_function_config + update_function_config = parent_rpcs.update_function if parent_rpcs.respond_to? :update_function + @update_function = ::Gapic::Config::Method.new update_function_config + delete_function_config = parent_rpcs.delete_function if parent_rpcs.respond_to? :delete_function + @delete_function = ::Gapic::Config::Method.new delete_function_config + call_function_config = parent_rpcs.call_function if parent_rpcs.respond_to? :call_function + @call_function = ::Gapic::Config::Method.new call_function_config + generate_upload_url_config = parent_rpcs.generate_upload_url if parent_rpcs.respond_to? :generate_upload_url + @generate_upload_url = ::Gapic::Config::Method.new generate_upload_url_config + generate_download_url_config = parent_rpcs.generate_download_url if parent_rpcs.respond_to? :generate_download_url + @generate_download_url = ::Gapic::Config::Method.new generate_download_url_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 + 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 + 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 + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/credentials.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/credentials.rb new file mode 100644 index 000000000000..7a899a1a9767 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/credentials.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! + +require "googleauth" + +module Google + module Cloud + module Functions + module V1 + module CloudFunctionsService + # Credentials for the CloudFunctionsService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "FUNCTIONS_CREDENTIALS", + "FUNCTIONS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "FUNCTIONS_CREDENTIALS_JSON", + "FUNCTIONS_KEYFILE_JSON", + "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-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb new file mode 100644 index 000000000000..b9762001de1a --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb @@ -0,0 +1,833 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Functions + module V1 + module CloudFunctionsService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CloudFunctionsService 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 CloudFunctionsService 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::Functions::V1::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.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::Functions::V1::VERSION + metadata[:"x-goog-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::Functions::V1::VERSION + metadata[:"x-goog-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::Functions::V1::VERSION + metadata[:"x-goog-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::Functions::V1::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 = "cloudfunctions.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-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/paths.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/paths.rb new file mode 100644 index 000000000000..c363b2f96c71 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_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 Functions + module V1 + module CloudFunctionsService + # Path helper methods for the CloudFunctionsService API. + module Paths + ## + # Create a fully-qualified CloudFunction resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/functions/{function}` + # + # @param project [String] + # @param location [String] + # @param function [String] + # + # @return [::String] + def cloud_function_path project:, location:, function: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/functions/#{function}" + end + + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_key_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + 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 Repository resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # + # @return [::String] + def repository_path project:, location:, repository: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest.rb new file mode 100644 index 000000000000..e9d93d046095 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_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/functions/v1/version" +require "google/cloud/functions/v1/bindings_override" + +require "google/cloud/functions/v1/cloud_functions_service/credentials" +require "google/cloud/functions/v1/cloud_functions_service/paths" +require "google/cloud/functions/v1/cloud_functions_service/rest/operations" +require "google/cloud/functions/v1/cloud_functions_service/rest/client" + +module Google + module Cloud + module Functions + module V1 + ## + # A service that application uses to manipulate triggers and functions. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/functions/v1/cloud_functions_service/rest" + # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + module CloudFunctionsService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/functions/v1/cloud_functions_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/client.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/client.rb new file mode 100644 index 000000000000..f16435c6c1ee --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/client.rb @@ -0,0 +1,1497 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions/v1/functions_pb" +require "google/cloud/functions/v1/cloud_functions_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Functions + module V1 + module CloudFunctionsService + module Rest + ## + # REST client for the CloudFunctionsService service. + # + # A service that application uses to manipulate triggers and functions. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :cloud_functions_service_stub + + ## + # Configure the CloudFunctionsService Client class. + # + # See {::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all CloudFunctionsService clients + # ::Google::Cloud::Functions::V1::CloudFunctionsService::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", "Functions", "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.list_functions.timeout = 600.0 + default_config.rpcs.list_functions.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.get_function.timeout = 600.0 + default_config.rpcs.get_function.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.create_function.timeout = 600.0 + + default_config.rpcs.update_function.timeout = 600.0 + default_config.rpcs.update_function.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.delete_function.timeout = 600.0 + default_config.rpcs.delete_function.retry_policy = { + initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] + } + + default_config.rpcs.call_function.timeout = 600.0 + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the CloudFunctionsService 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::Functions::V1::CloudFunctionsService::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 + @cloud_functions_service_stub.universe_domain + end + + ## + # Create a new CloudFunctionsService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the CloudFunctionsService 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::Functions::V1::CloudFunctionsService::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 + + @cloud_functions_service_stub = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @cloud_functions_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 = @cloud_functions_service_stub.endpoint + config.universe_domain = @cloud_functions_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @cloud_functions_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 = @cloud_functions_service_stub.endpoint + config.universe_domain = @cloud_functions_service_stub.universe_domain + config.logger = @cloud_functions_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Functions::V1::CloudFunctionsService::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 + @cloud_functions_service_stub.logger + end + + # Service calls + + ## + # Returns a list of functions that belong to the requested project. + # + # @overload list_functions(request, options = nil) + # Pass arguments to `list_functions` via a request object, either of type + # {::Google::Cloud::Functions::V1::ListFunctionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::ListFunctionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_functions(parent: nil, page_size: nil, page_token: nil) + # Pass arguments to `list_functions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The project and location from which the function should be listed, + # specified in the format `projects/*/locations/*` + # If you want to list functions in all locations, use "-" in place of a + # location. When listing functions in all locations, if one or more + # location(s) are unreachable, the response will contain functions from all + # reachable locations along with the names of any unreachable locations. + # @param page_size [::Integer] + # Maximum number of functions to return per call. + # @param page_token [::String] + # The value returned by the last + # `ListFunctionsResponse`; indicates that + # this is a continuation of a prior `ListFunctions` call, and that the + # system should return the next page of data. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Functions::V1::CloudFunction>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Functions::V1::CloudFunction>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::ListFunctionsRequest.new + # + # # Call the list_functions method. + # result = client.list_functions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Functions::V1::CloudFunction. + # p item + # end + # + def list_functions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::ListFunctionsRequest + + # Converts hash and nil to an 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_functions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_functions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_functions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.list_functions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @cloud_functions_service_stub, :list_functions, "functions", 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 + + ## + # Returns a function with the given name from the requested project. + # + # @overload get_function(request, options = nil) + # Pass arguments to `get_function` via a request object, either of type + # {::Google::Cloud::Functions::V1::GetFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::GetFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_function(name: nil, version_id: nil) + # Pass arguments to `get_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 function which details should be obtained. + # @param version_id [::Integer] + # Optional. The optional version of the function whose details should be + # obtained. The version of a 1st Gen function is an integer that starts from + # 1 and gets incremented on redeployments. Each deployment creates a config + # version of the underlying function. GCF may keep historical configs for old + # versions. This field can be specified to fetch the historical configs. + # Leave it blank or set to 0 to get the latest version of the function. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V1::CloudFunction] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V1::CloudFunction] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::GetFunctionRequest.new + # + # # Call the get_function method. + # result = client.get_function request + # + # # The returned object is of type Google::Cloud::Functions::V1::CloudFunction. + # p result + # + def get_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::GetFunctionRequest + + # Converts hash and nil to an 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_function.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.get_function 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 new function. If a function with the given name already exists in + # the specified project, the long running operation will return + # `ALREADY_EXISTS` error. + # + # @overload create_function(request, options = nil) + # Pass arguments to `create_function` via a request object, either of type + # {::Google::Cloud::Functions::V1::CreateFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::CreateFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_function(location: nil, function: nil) + # Pass arguments to `create_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param location [::String] + # Required. The project and location in which the function should be created, + # specified in the format `projects/*/locations/*` + # @param function [::Google::Cloud::Functions::V1::CloudFunction, ::Hash] + # Required. Function to be created. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::CreateFunctionRequest.new + # + # # Call the create_function method. + # result = client.create_function request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::CreateFunctionRequest + + # Converts hash and nil to an 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_function.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.create_function 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 existing function. + # + # @overload update_function(request, options = nil) + # Pass arguments to `update_function` via a request object, either of type + # {::Google::Cloud::Functions::V1::UpdateFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::UpdateFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_function(function: nil, update_mask: nil) + # Pass arguments to `update_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param function [::Google::Cloud::Functions::V1::CloudFunction, ::Hash] + # Required. New version of the function. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. The list of fields in `CloudFunction` that have to be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::UpdateFunctionRequest.new + # + # # Call the update_function method. + # result = client.update_function request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::UpdateFunctionRequest + + # Converts hash and nil to an 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_function.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.update_function 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 function with the given name from the specified project. If the + # given function is used by some trigger, the trigger will be updated to + # remove this function. + # + # @overload delete_function(request, options = nil) + # Pass arguments to `delete_function` via a request object, either of type + # {::Google::Cloud::Functions::V1::DeleteFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::DeleteFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_function(name: nil) + # Pass arguments to `delete_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 function which should be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::DeleteFunctionRequest.new + # + # # Call the delete_function method. + # result = client.delete_function request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::DeleteFunctionRequest + + # Converts hash and nil to an 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_function.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.delete_function 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 + + ## + # Synchronously invokes a deployed Cloud Function. To be used for testing + # purposes as very limited traffic is allowed. For more information on + # the actual limits, refer to + # [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits). + # + # @overload call_function(request, options = nil) + # Pass arguments to `call_function` via a request object, either of type + # {::Google::Cloud::Functions::V1::CallFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::CallFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload call_function(name: nil, data: nil) + # Pass arguments to `call_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 function to be called. + # @param data [::String] + # Required. Input to be passed to the function. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V1::CallFunctionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V1::CallFunctionResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::CallFunctionRequest.new + # + # # Call the call_function method. + # result = client.call_function request + # + # # The returned object is of type Google::Cloud::Functions::V1::CallFunctionResponse. + # p result + # + def call_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::CallFunctionRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.call_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.call_function.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.call_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.call_function 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 a signed URL for uploading a function source code. + # For more information about the signed URL usage see: + # https://cloud.google.com/storage/docs/access-control/signed-urls. + # Once the function source code upload is complete, the used signed + # URL should be provided in CreateFunction or UpdateFunction request + # as a reference to the function source code. + # + # When uploading source code to the generated signed URL, please follow + # these restrictions: + # + # * Source file type should be a zip file. + # * Source file size should not exceed 100MB limit. + # * No credentials should be attached - the signed URLs provide access to the + # target bucket using internal service identity; if credentials were + # attached, the identity from the credentials would be used, but that + # identity does not have permissions to upload files to the URL. + # + # When making a HTTP PUT request, these two headers need to be specified: + # + # * `content-type: application/zip` + # * `x-goog-content-length-range: 0,104857600` + # + # And this header SHOULD NOT be specified: + # + # * `Authorization: Bearer YOUR_TOKEN` + # + # @overload generate_upload_url(request, options = nil) + # Pass arguments to `generate_upload_url` via a request object, either of type + # {::Google::Cloud::Functions::V1::GenerateUploadUrlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::GenerateUploadUrlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_upload_url(parent: nil, kms_key_name: nil) + # Pass arguments to `generate_upload_url` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # The project and location in which the Google Cloud Storage signed URL + # should be generated, specified in the format `projects/*/locations/*`. + # @param kms_key_name [::String] + # Resource name of a KMS crypto key (managed by the user) used to + # encrypt/decrypt function source code objects in intermediate Cloud Storage + # buckets. When you generate an upload url and upload your source code, it + # gets copied to an intermediate Cloud Storage bucket. The source code is + # then copied to a versioned directory in the sources bucket in the consumer + # project during the function deployment. + # + # It must match the pattern + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + # + # The Google Cloud Functions service account + # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be + # granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter + # (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the + # Key/KeyRing/Project/Organization (least access preferred). GCF will + # delegate access to the Google Storage service account in the internal + # project. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V1::GenerateUploadUrlResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V1::GenerateUploadUrlResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new + # + # # Call the generate_upload_url method. + # result = client.generate_upload_url request + # + # # The returned object is of type Google::Cloud::Functions::V1::GenerateUploadUrlResponse. + # p result + # + def generate_upload_url request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::GenerateUploadUrlRequest + + # Converts hash and nil to an 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_upload_url.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_upload_url.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_upload_url.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.generate_upload_url 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 a signed URL for downloading deployed function source code. + # The URL is only valid for a limited period and should be used within + # minutes after generation. + # For more information about the signed URL usage see: + # https://cloud.google.com/storage/docs/access-control/signed-urls + # + # @overload generate_download_url(request, options = nil) + # Pass arguments to `generate_download_url` via a request object, either of type + # {::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_download_url(name: nil, version_id: nil) + # Pass arguments to `generate_download_url` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # The name of function for which source code Google Cloud Storage signed + # URL should be generated. + # @param version_id [::Integer] + # The optional version of function. If not set, default, current version + # is used. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new + # + # # Call the generate_download_url method. + # result = client.generate_download_url request + # + # # The returned object is of type Google::Cloud::Functions::V1::GenerateDownloadUrlResponse. + # p result + # + def generate_download_url request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest + + # Converts hash and nil to an 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_download_url.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_download_url.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_download_url.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @cloud_functions_service_stub.generate_download_url 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 IAM access control policy on the specified function. + # Replaces any existing policy. + # + # @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/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @cloud_functions_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 + + ## + # Gets the IAM access control policy for a function. + # Returns an empty policy if the function exists and does not have a policy + # set. + # + # @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/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @cloud_functions_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 + + ## + # Tests the specified permissions against the IAM access control policy + # for a function. + # If the function does not exist, this will return an empty set of + # permissions, not a NOT_FOUND error. + # + # @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/functions/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @cloud_functions_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 + + ## + # Configuration class for the CloudFunctionsService REST API. + # + # This class represents the configuration for CloudFunctionsService 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::Functions::V1::CloudFunctionsService::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_functions to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_functions.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_functions.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 = "cloudfunctions.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 CloudFunctionsService 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_functions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_functions + ## + # RPC-specific configuration for `get_function` + # @return [::Gapic::Config::Method] + # + attr_reader :get_function + ## + # RPC-specific configuration for `create_function` + # @return [::Gapic::Config::Method] + # + attr_reader :create_function + ## + # RPC-specific configuration for `update_function` + # @return [::Gapic::Config::Method] + # + attr_reader :update_function + ## + # RPC-specific configuration for `delete_function` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_function + ## + # RPC-specific configuration for `call_function` + # @return [::Gapic::Config::Method] + # + attr_reader :call_function + ## + # RPC-specific configuration for `generate_upload_url` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_upload_url + ## + # RPC-specific configuration for `generate_download_url` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_download_url + ## + # RPC-specific configuration for `set_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :set_iam_policy + ## + # RPC-specific configuration for `get_iam_policy` + # @return [::Gapic::Config::Method] + # + attr_reader :get_iam_policy + ## + # RPC-specific configuration for `test_iam_permissions` + # @return [::Gapic::Config::Method] + # + attr_reader :test_iam_permissions + + # @private + def initialize parent_rpcs = nil + list_functions_config = parent_rpcs.list_functions if parent_rpcs.respond_to? :list_functions + @list_functions = ::Gapic::Config::Method.new list_functions_config + get_function_config = parent_rpcs.get_function if parent_rpcs.respond_to? :get_function + @get_function = ::Gapic::Config::Method.new get_function_config + create_function_config = parent_rpcs.create_function if parent_rpcs.respond_to? :create_function + @create_function = ::Gapic::Config::Method.new create_function_config + update_function_config = parent_rpcs.update_function if parent_rpcs.respond_to? :update_function + @update_function = ::Gapic::Config::Method.new update_function_config + delete_function_config = parent_rpcs.delete_function if parent_rpcs.respond_to? :delete_function + @delete_function = ::Gapic::Config::Method.new delete_function_config + call_function_config = parent_rpcs.call_function if parent_rpcs.respond_to? :call_function + @call_function = ::Gapic::Config::Method.new call_function_config + generate_upload_url_config = parent_rpcs.generate_upload_url if parent_rpcs.respond_to? :generate_upload_url + @generate_upload_url = ::Gapic::Config::Method.new generate_upload_url_config + generate_download_url_config = parent_rpcs.generate_download_url if parent_rpcs.respond_to? :generate_download_url + @generate_download_url = ::Gapic::Config::Method.new generate_download_url_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 + 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 + 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 + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/operations.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/operations.rb new file mode 100644 index 000000000000..84628a5f6367 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/operations.rb @@ -0,0 +1,923 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Functions + module V1 + module CloudFunctionsService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the CloudFunctionsService 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 CloudFunctionsService 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::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Functions::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "cloudfunctions.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/operations", + matches: [] + ) + 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{^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{^operations(?:/.*)?$}, true] + ] + ) + 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{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/service_stub.rb new file mode 100644 index 000000000000..d808569a35b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/service_stub.rb @@ -0,0 +1,759 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions/v1/functions_pb" + +module Google + module Cloud + module Functions + module V1 + module CloudFunctionsService + module Rest + ## + # REST service stub for the CloudFunctionsService 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 list_functions REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::ListFunctionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V1::ListFunctionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V1::ListFunctionsResponse] + # A result object deserialized from the server's reply + def list_functions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_functions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_functions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Functions::V1::ListFunctionsResponse.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_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::GetFunctionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V1::CloudFunction] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V1::CloudFunction] + # A result object deserialized from the server's reply + def get_function request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_function_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_function", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Functions::V1::CloudFunction.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_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::CreateFunctionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_function request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_function_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_function", + 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_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::UpdateFunctionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_function request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_function_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_function", + 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_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::DeleteFunctionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_function request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_function_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_function", + 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 call_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::CallFunctionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V1::CallFunctionResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V1::CallFunctionResponse] + # A result object deserialized from the server's reply + def call_function request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_call_function_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "call_function", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Functions::V1::CallFunctionResponse.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_upload_url REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::GenerateUploadUrlRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V1::GenerateUploadUrlResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V1::GenerateUploadUrlResponse] + # A result object deserialized from the server's reply + def generate_upload_url request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_upload_url_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_upload_url", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Functions::V1::GenerateUploadUrlResponse.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_download_url REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse] + # A result object deserialized from the server's reply + def generate_download_url request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_download_url_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_download_url", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse.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 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 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 + + ## + # @private + # + # GRPC transcoding helper method for the list_functions REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::ListFunctionsRequest] + # 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_functions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/functions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::GetFunctionRequest] + # 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_function_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::CreateFunctionRequest] + # 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_function_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{location}/functions", + body: "function", + matches: [ + ["location", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::UpdateFunctionRequest] + # 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_function_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{function.name}", + body: "function", + matches: [ + ["function.name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::DeleteFunctionRequest] + # 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_function_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the call_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::CallFunctionRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_call_function_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:call", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_upload_url REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::GenerateUploadUrlRequest] + # 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_upload_url_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/functions:generateUploadUrl", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_download_url REST call + # + # @param request_pb [::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest] + # 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_download_url_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:generateDownloadUrl", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] + ] + ) + 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/[^/]+/functions/[^/]+/?$}, false] + ] + ) + 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/[^/]+/functions/[^/]+/?$}, false] + ] + ) + 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/[^/]+/functions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_pb.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_pb.rb new file mode 100644 index 000000000000..c5c8a134c7c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_pb.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/functions/v1/functions.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/functions/v1/operations_pb' +require 'google/iam/v1/iam_policy_pb' +require 'google/iam/v1/policy_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n)google/cloud/functions/v1/functions.proto\x12\x19google.cloud.functions.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/functions/v1/operations.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\x14\n\rCloudFunction\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1c\n\x12source_archive_url\x18\x03 \x01(\tH\x00\x12H\n\x11source_repository\x18\x04 \x01(\x0b\x32+.google.cloud.functions.v1.SourceRepositoryH\x00\x12\x1b\n\x11source_upload_url\x18\x10 \x01(\tH\x00\x12@\n\rhttps_trigger\x18\x05 \x01(\x0b\x32\'.google.cloud.functions.v1.HttpsTriggerH\x01\x12@\n\revent_trigger\x18\x06 \x01(\x0b\x32\'.google.cloud.functions.v1.EventTriggerH\x01\x12\x43\n\x06status\x18\x07 \x01(\x0e\x32..google.cloud.functions.v1.CloudFunctionStatusB\x03\xe0\x41\x03\x12\x13\n\x0b\x65ntry_point\x18\x08 \x01(\t\x12\x0f\n\x07runtime\x18\x13 \x01(\t\x12*\n\x07timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1b\n\x13\x61vailable_memory_mb\x18\n \x01(\x05\x12\x1d\n\x15service_account_email\x18\x0b \x01(\t\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\nversion_id\x18\x0e \x01(\x03\x42\x03\xe0\x41\x03\x12\x44\n\x06labels\x18\x0f \x03(\x0b\x32\x34.google.cloud.functions.v1.CloudFunction.LabelsEntry\x12\x61\n\x15\x65nvironment_variables\x18\x11 \x03(\x0b\x32\x42.google.cloud.functions.v1.CloudFunction.EnvironmentVariablesEntry\x12l\n\x1b\x62uild_environment_variables\x18\x1c \x03(\x0b\x32G.google.cloud.functions.v1.CloudFunction.BuildEnvironmentVariablesEntry\x12\x13\n\x07network\x18\x12 \x01(\tB\x02\x18\x01\x12\x15\n\rmax_instances\x18\x14 \x01(\x05\x12\x15\n\rmin_instances\x18 \x01(\x05\x12\x15\n\rvpc_connector\x18\x16 \x01(\t\x12j\n\x1dvpc_connector_egress_settings\x18\x17 \x01(\x0e\x32\x43.google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings\x12R\n\x10ingress_settings\x18\x18 \x01(\x0e\x32\x38.google.cloud.functions.v1.CloudFunction.IngressSettings\x12<\n\x0ckms_key_name\x18\x19 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x19\n\x11\x62uild_worker_pool\x18\x1a \x01(\t\x12\x15\n\x08\x62uild_id\x18\x1b \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nbuild_name\x18! \x01(\tB\x03\xe0\x41\x03\x12M\n\x1csecret_environment_variables\x18\x1d \x03(\x0b\x32\'.google.cloud.functions.v1.SecretEnvVar\x12?\n\x0esecret_volumes\x18\x1e \x03(\x0b\x32\'.google.cloud.functions.v1.SecretVolume\x12\x19\n\x0csource_token\x18\x1f \x01(\tB\x03\xe0\x41\x04\x12J\n\x11\x64ocker_repository\x18\" \x01(\tB/\xfa\x41,\n*artifactregistry.googleapis.com/Repository\x12T\n\x0f\x64ocker_registry\x18# \x01(\x0e\x32\x37.google.cloud.functions.v1.CloudFunction.DockerRegistryB\x02\x18\x01\x12\x61\n\x17\x61utomatic_update_policy\x18( \x01(\x0b\x32>.google.cloud.functions.v1.CloudFunction.AutomaticUpdatePolicyH\x02\x12`\n\x17on_deploy_update_policy\x18) \x01(\x0b\x32=.google.cloud.functions.v1.CloudFunction.OnDeployUpdatePolicyH\x02\x12\x1d\n\x15\x62uild_service_account\x18+ \x01(\t\x1a\x17\n\x15\x41utomaticUpdatePolicy\x1a\x34\n\x14OnDeployUpdatePolicy\x12\x1c\n\x0fruntime_version\x18\x01 \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\x1a;\n\x19\x45nvironmentVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a@\n\x1e\x42uildEnvironmentVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"u\n\x1aVpcConnectorEgressSettings\x12-\n)VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED\x10\x00\x12\x17\n\x13PRIVATE_RANGES_ONLY\x10\x01\x12\x0f\n\x0b\x41LL_TRAFFIC\x10\x02\"x\n\x0fIngressSettings\x12 \n\x1cINGRESS_SETTINGS_UNSPECIFIED\x10\x00\x12\r\n\tALLOW_ALL\x10\x01\x12\x17\n\x13\x41LLOW_INTERNAL_ONLY\x10\x02\x12\x1b\n\x17\x41LLOW_INTERNAL_AND_GCLB\x10\x03\"`\n\x0e\x44ockerRegistry\x12\x1f\n\x1b\x44OCKER_REGISTRY_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43ONTAINER_REGISTRY\x10\x01\x12\x15\n\x11\x41RTIFACT_REGISTRY\x10\x02:n\xea\x41k\n+cloudfunctions.googleapis.com/CloudFunction\x12\n\x1aGenerateDownloadUrlRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nversion_id\x18\x02 \x01(\x04\"3\n\x1bGenerateDownloadUrlResponse\x12\x14\n\x0c\x64ownload_url\x18\x01 \x01(\t*\x92\x01\n\x13\x43loudFunctionStatus\x12%\n!CLOUD_FUNCTION_STATUS_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07OFFLINE\x10\x02\x12\x16\n\x12\x44\x45PLOY_IN_PROGRESS\x10\x03\x12\x16\n\x12\x44\x45LETE_IN_PROGRESS\x10\x04\x12\x0b\n\x07UNKNOWN\x10\x05\x32\x97\x11\n\x15\x43loudFunctionsService\x12\xa9\x01\n\rListFunctions\x12/.google.cloud.functions.v1.ListFunctionsRequest\x1a\x30.google.cloud.functions.v1.ListFunctionsResponse\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/functions\x12\xa4\x01\n\x0bGetFunction\x12-.google.cloud.functions.v1.GetFunctionRequest\x1a(.google.cloud.functions.v1.CloudFunction\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/functions/*}\x12\xdf\x01\n\x0e\x43reateFunction\x12\x30.google.cloud.functions.v1.CreateFunctionRequest\x1a\x1d.google.longrunning.Operation\"|\xca\x41$\n\rCloudFunction\x12\x13OperationMetadataV1\xda\x41\x11location,function\x82\xd3\xe4\x93\x02;\"//v1/{location=projects/*/locations/*}/functions:\x08\x66unction\x12\xdd\x01\n\x0eUpdateFunction\x12\x30.google.cloud.functions.v1.UpdateFunctionRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41$\n\rCloudFunction\x12\x13OperationMetadataV1\xda\x41\x08\x66unction\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{function.name=projects/*/locations/*/functions/*}:\x08\x66unction\x12\xce\x01\n\x0e\x44\x65leteFunction\x12\x30.google.cloud.functions.v1.DeleteFunctionRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41,\n\x15google.protobuf.Empty\x12\x13OperationMetadataV1\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/functions/*}\x12\xba\x01\n\x0c\x43\x61llFunction\x12..google.cloud.functions.v1.CallFunctionRequest\x1a/.google.cloud.functions.v1.CallFunctionResponse\"I\xda\x41\tname,data\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=projects/*/locations/*/functions/*}:call:\x01*\x12\xca\x01\n\x11GenerateUploadUrl\x12\x33.google.cloud.functions.v1.GenerateUploadUrlRequest\x1a\x34.google.cloud.functions.v1.GenerateUploadUrlResponse\"J\x82\xd3\xe4\x93\x02\x44\"?/v1/{parent=projects/*/locations/*}/functions:generateUploadUrl:\x01*\x12\xd2\x01\n\x13GenerateDownloadUrl\x12\x35.google.cloud.functions.v1.GenerateDownloadUrlRequest\x1a\x36.google.cloud.functions.v1.GenerateDownloadUrlResponse\"L\x82\xd3\xe4\x93\x02\x46\"A/v1/{name=projects/*/locations/*/functions/*}:generateDownloadUrl:\x01*\x12\x94\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"I\x82\xd3\xe4\x93\x02\x43\">/v1/{resource=projects/*/locations/*/functions/*}:setIamPolicy:\x01*\x12\x91\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"F\x82\xd3\xe4\x93\x02@\x12>/v1/{resource=projects/*/locations/*/functions/*}:getIamPolicy\x12\xba\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"O\x82\xd3\xe4\x93\x02I\"D/v1/{resource=projects/*/locations/*/functions/*}:testIamPermissions:\x01*\x1aQ\xca\x41\x1d\x63loudfunctions.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe1\x02\n\x1d\x63om.google.cloud.functions.v1B\x0e\x46unctionsProtoP\x01Z;cloud.google.com/go/functions/apiv1/functionspb;functionspb\xa2\x02\x03GCF\xea\x41o\n*artifactregistry.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}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.Duration", "google/protobuf/duration.proto"], + ["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 + +module Google + module Cloud + module Functions + module V1 + CloudFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction").msgclass + CloudFunction::AutomaticUpdatePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction.AutomaticUpdatePolicy").msgclass + CloudFunction::OnDeployUpdatePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction.OnDeployUpdatePolicy").msgclass + CloudFunction::VpcConnectorEgressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings").enummodule + CloudFunction::IngressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction.IngressSettings").enummodule + CloudFunction::DockerRegistry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction.DockerRegistry").enummodule + SourceRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.SourceRepository").msgclass + HttpsTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.HttpsTrigger").msgclass + HttpsTrigger::SecurityLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.HttpsTrigger.SecurityLevel").enummodule + EventTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.EventTrigger").msgclass + FailurePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.FailurePolicy").msgclass + FailurePolicy::Retry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.FailurePolicy.Retry").msgclass + SecretEnvVar = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.SecretEnvVar").msgclass + SecretVolume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.SecretVolume").msgclass + SecretVolume::SecretVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.SecretVolume.SecretVersion").msgclass + CreateFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CreateFunctionRequest").msgclass + UpdateFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.UpdateFunctionRequest").msgclass + GetFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GetFunctionRequest").msgclass + ListFunctionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.ListFunctionsRequest").msgclass + ListFunctionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.ListFunctionsResponse").msgclass + DeleteFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.DeleteFunctionRequest").msgclass + CallFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CallFunctionRequest").msgclass + CallFunctionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CallFunctionResponse").msgclass + GenerateUploadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GenerateUploadUrlRequest").msgclass + GenerateUploadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GenerateUploadUrlResponse").msgclass + GenerateDownloadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GenerateDownloadUrlRequest").msgclass + GenerateDownloadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GenerateDownloadUrlResponse").msgclass + CloudFunctionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunctionStatus").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_services_pb.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_services_pb.rb new file mode 100644 index 000000000000..5290851160a8 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_services_pb.rb @@ -0,0 +1,106 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/functions/v1/functions.proto for package 'google.cloud.functions.v1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/functions/v1/functions_pb' + +module Google + module Cloud + module Functions + module V1 + module CloudFunctionsService + # A service that application uses to manipulate triggers and functions. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.functions.v1.CloudFunctionsService' + + # Returns a list of functions that belong to the requested project. + rpc :ListFunctions, ::Google::Cloud::Functions::V1::ListFunctionsRequest, ::Google::Cloud::Functions::V1::ListFunctionsResponse + # Returns a function with the given name from the requested project. + rpc :GetFunction, ::Google::Cloud::Functions::V1::GetFunctionRequest, ::Google::Cloud::Functions::V1::CloudFunction + # Creates a new function. If a function with the given name already exists in + # the specified project, the long running operation will return + # `ALREADY_EXISTS` error. + rpc :CreateFunction, ::Google::Cloud::Functions::V1::CreateFunctionRequest, ::Google::Longrunning::Operation + # Updates existing function. + rpc :UpdateFunction, ::Google::Cloud::Functions::V1::UpdateFunctionRequest, ::Google::Longrunning::Operation + # Deletes a function with the given name from the specified project. If the + # given function is used by some trigger, the trigger will be updated to + # remove this function. + rpc :DeleteFunction, ::Google::Cloud::Functions::V1::DeleteFunctionRequest, ::Google::Longrunning::Operation + # Synchronously invokes a deployed Cloud Function. To be used for testing + # purposes as very limited traffic is allowed. For more information on + # the actual limits, refer to + # [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits). + rpc :CallFunction, ::Google::Cloud::Functions::V1::CallFunctionRequest, ::Google::Cloud::Functions::V1::CallFunctionResponse + # Returns a signed URL for uploading a function source code. + # For more information about the signed URL usage see: + # https://cloud.google.com/storage/docs/access-control/signed-urls. + # Once the function source code upload is complete, the used signed + # URL should be provided in CreateFunction or UpdateFunction request + # as a reference to the function source code. + # + # When uploading source code to the generated signed URL, please follow + # these restrictions: + # + # * Source file type should be a zip file. + # * Source file size should not exceed 100MB limit. + # * No credentials should be attached - the signed URLs provide access to the + # target bucket using internal service identity; if credentials were + # attached, the identity from the credentials would be used, but that + # identity does not have permissions to upload files to the URL. + # + # When making a HTTP PUT request, these two headers need to be specified: + # + # * `content-type: application/zip` + # * `x-goog-content-length-range: 0,104857600` + # + # And this header SHOULD NOT be specified: + # + # * `Authorization: Bearer YOUR_TOKEN` + rpc :GenerateUploadUrl, ::Google::Cloud::Functions::V1::GenerateUploadUrlRequest, ::Google::Cloud::Functions::V1::GenerateUploadUrlResponse + # Returns a signed URL for downloading deployed function source code. + # The URL is only valid for a limited period and should be used within + # minutes after generation. + # For more information about the signed URL usage see: + # https://cloud.google.com/storage/docs/access-control/signed-urls + rpc :GenerateDownloadUrl, ::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest, ::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse + # Sets the IAM access control policy on the specified function. + # Replaces any existing policy. + rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy + # Gets the IAM access control policy for a function. + # Returns an empty policy if the function exists and does not have a policy + # set. + rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy + # Tests the specified permissions against the IAM access control policy + # for a function. + # If the function does not exist, this will return an empty set of + # permissions, not a NOT_FOUND error. + rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/operations_pb.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/operations_pb.rb new file mode 100644 index 000000000000..d7eed75eb7b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/operations_pb.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/functions/v1/operations.proto + +require 'google/protobuf' + +require 'google/protobuf/any_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n*google/cloud/functions/v1/operations.proto\x12\x19google.cloud.functions.v1\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\x02\n\x13OperationMetadataV1\x12\x0e\n\x06target\x18\x01 \x01(\t\x12\x36\n\x04type\x18\x02 \x01(\x0e\x32(.google.cloud.functions.v1.OperationType\x12%\n\x07request\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x12\n\nversion_id\x18\x04 \x01(\x03\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x62uild_id\x18\x06 \x01(\t\x12\x14\n\x0csource_token\x18\x07 \x01(\t\x12\x12\n\nbuild_name\x18\x08 \x01(\t*i\n\rOperationType\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43REATE_FUNCTION\x10\x01\x12\x13\n\x0fUPDATE_FUNCTION\x10\x02\x12\x13\n\x0f\x44\x45LETE_FUNCTION\x10\x03\x42x\n\x1d\x63om.google.cloud.functions.v1B\x18\x46unctionsOperationsProtoP\x01Z;cloud.google.com/go/functions/apiv1/functionspb;functionspbb\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.Any", "google/protobuf/any.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Functions + module V1 + OperationMetadataV1 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.OperationMetadataV1").msgclass + OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.OperationType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/rest.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/rest.rb new file mode 100644 index 000000000000..5de47e912399 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions/v1/cloud_functions_service/rest" +require "google/cloud/functions/v1/bindings_override" +require "google/cloud/functions/v1/version" + +module Google + module Cloud + module Functions + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/functions/v1/rest" + # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/version.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/version.rb new file mode 100644 index 000000000000..88469f088295 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/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 Functions + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-functions-v1/proto_docs/README.md new file mode 100644 index 000000000000..c72962cd9589 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Functions 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-functions-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/cloud/functions/v1/functions.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/functions.rb new file mode 100644 index 000000000000..2ddf770f156f --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/functions.rb @@ -0,0 +1,773 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Functions + module V1 + # Describes a Cloud Function that contains user computation executed in + # response to an event. It encapsulate function and triggers configurations. + # @!attribute [rw] name + # @return [::String] + # A user-defined name of the function. Function names must be unique + # globally and match pattern `projects/*/locations/*/functions/*` + # @!attribute [rw] description + # @return [::String] + # User-provided description of a function. + # @!attribute [rw] source_archive_url + # @return [::String] + # The Google Cloud Storage URL, starting with `gs://`, pointing to the zip + # archive which contains the function. + # + # Note: The following fields are mutually exclusive: `source_archive_url`, `source_repository`, `source_upload_url`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] source_repository + # @return [::Google::Cloud::Functions::V1::SourceRepository] + # **Beta Feature** + # + # The source repository where a function is hosted. + # + # Note: The following fields are mutually exclusive: `source_repository`, `source_archive_url`, `source_upload_url`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] source_upload_url + # @return [::String] + # The Google Cloud Storage signed URL used for source uploading, generated + # by calling [google.cloud.functions.v1.GenerateUploadUrl]. + # + # The signature is validated on write methods (Create, Update) + # The signature is stripped from the Function object on read methods (Get, + # List) + # + # Note: The following fields are mutually exclusive: `source_upload_url`, `source_archive_url`, `source_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] https_trigger + # @return [::Google::Cloud::Functions::V1::HttpsTrigger] + # An HTTPS endpoint type of source that can be triggered via URL. + # + # Note: The following fields are mutually exclusive: `https_trigger`, `event_trigger`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] event_trigger + # @return [::Google::Cloud::Functions::V1::EventTrigger] + # A source that fires events in response to a condition in another service. + # + # Note: The following fields are mutually exclusive: `event_trigger`, `https_trigger`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] status + # @return [::Google::Cloud::Functions::V1::CloudFunctionStatus] + # Output only. Status of the function deployment. + # @!attribute [rw] entry_point + # @return [::String] + # The name of the function (as defined in source code) that will be + # executed. Defaults to the resource name suffix (ID of the function), if not + # specified. + # @!attribute [rw] runtime + # @return [::String] + # The runtime in which to run the function. Required when deploying a new + # function, optional when updating an existing function. For a complete + # list of possible choices, see the + # [`gcloud` command + # reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + # @!attribute [rw] timeout + # @return [::Google::Protobuf::Duration] + # The function execution timeout. Execution is considered failed and + # can be terminated if the function is not completed at the end of the + # timeout period. Defaults to 60 seconds. + # @!attribute [rw] available_memory_mb + # @return [::Integer] + # The amount of memory in MB available for a function. + # Defaults to 256MB. + # @!attribute [rw] service_account_email + # @return [::String] + # The email of the function's service account. If empty, defaults to + # `{project_id}@appspot.gserviceaccount.com`. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update timestamp of a Cloud Function. + # @!attribute [r] version_id + # @return [::Integer] + # Output only. The version identifier of the Cloud Function. Each deployment + # attempt results in a new version of a function being created. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels associated with this Cloud Function. + # @!attribute [rw] environment_variables + # @return [::Google::Protobuf::Map{::String => ::String}] + # Environment variables that shall be available during function execution. + # @!attribute [rw] build_environment_variables + # @return [::Google::Protobuf::Map{::String => ::String}] + # Build environment variables that shall be available during build time. + # @!attribute [rw] network + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::String] + # Deprecated: use vpc_connector + # @!attribute [rw] max_instances + # @return [::Integer] + # The limit on the maximum number of function instances that may coexist at a + # given time. + # + # In some cases, such as rapid traffic surges, Cloud Functions may, for a + # short period of time, create more instances than the specified max + # instances limit. If your function cannot tolerate this temporary behavior, + # you may want to factor in a safety margin and set a lower max instances + # value than your function can tolerate. + # + # See the [Max + # Instances](https://cloud.google.com/functions/docs/max-instances) Guide for + # more details. + # @!attribute [rw] min_instances + # @return [::Integer] + # A lower bound for the number function instances that may coexist at a + # given time. + # @!attribute [rw] vpc_connector + # @return [::String] + # The VPC Network Connector that this cloud function can connect to. It can + # be either the fully-qualified URI, or the short name of the network + # connector resource. The format of this field is + # `projects/*/locations/*/connectors/*` + # + # This field is mutually exclusive with `network` field and will eventually + # replace it. + # + # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for + # more information on connecting Cloud projects. + # @!attribute [rw] vpc_connector_egress_settings + # @return [::Google::Cloud::Functions::V1::CloudFunction::VpcConnectorEgressSettings] + # The egress settings for the connector, controlling what traffic is diverted + # through it. + # @!attribute [rw] ingress_settings + # @return [::Google::Cloud::Functions::V1::CloudFunction::IngressSettings] + # The ingress settings for the function, controlling what traffic can reach + # it. + # @!attribute [rw] kms_key_name + # @return [::String] + # Resource name of a KMS crypto key (managed by the user) used to + # encrypt/decrypt function resources. + # + # It must match the pattern + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + # + # If specified, you must also provide an artifact registry repository using + # the `docker_repository` field that was created with the same KMS crypto + # key. + # + # The following service accounts need to be granted the role 'Cloud KMS + # CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' + # on the Key/KeyRing/Project/Organization (least access preferred). + # + # 1. Google Cloud Functions service account + # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - + # Required to protect the function's image. + # 2. Google Storage service account + # (service-\\{project_number}@gs-project-accounts.iam.gserviceaccount.com) - + # Required to protect the function's source code. + # If this service account does not exist, deploying a function without a + # KMS key or retrieving the service agent name provisions it. For more + # information, see + # https://cloud.google.com/storage/docs/projects#service-agents and + # https://cloud.google.com/storage/docs/getting-service-agent#gsutil. + # + # Google Cloud Functions delegates access to service agents to protect + # function resources in internal projects that are not accessible by the + # end user. + # @!attribute [rw] build_worker_pool + # @return [::String] + # Name of the Cloud Build Custom Worker Pool that should be used to build the + # function. The format of this field is + # `projects/{project}/locations/{region}/workerPools/{workerPool}` where + # `{project}` and `{region}` are the project id and region respectively where + # the worker pool is defined and `{workerPool}` is the short name of the + # worker pool. + # + # If the project id is not the same as the function, then the Cloud + # Functions Service Agent + # (`service-@gcf-admin-robot.iam.gserviceaccount.com`) must + # be granted the role Cloud Build Custom Workers Builder + # (`roles/cloudbuild.customworkers.builder`) in the project. + # @!attribute [r] build_id + # @return [::String] + # Output only. The Cloud Build ID of the latest successful deployment of the + # function. + # @!attribute [r] build_name + # @return [::String] + # Output only. The Cloud Build Name of the function deployment. + # `projects//locations//builds/`. + # @!attribute [rw] secret_environment_variables + # @return [::Array<::Google::Cloud::Functions::V1::SecretEnvVar>] + # Secret environment variables configuration. + # @!attribute [rw] secret_volumes + # @return [::Array<::Google::Cloud::Functions::V1::SecretVolume>] + # Secret volumes configuration. + # @!attribute [rw] source_token + # @return [::String] + # Input only. An identifier for Firebase function sources. Disclaimer: This + # field is only supported for Firebase function deployments. + # @!attribute [rw] docker_repository + # @return [::String] + # User-managed repository created in Artifact Registry to which the + # function's Docker image will be pushed after it is built by Cloud Build. + # May optionally be encrypted with a customer-managed encryption key (CMEK). + # If unspecified and `docker_registry` is not explicitly set to + # `CONTAINER_REGISTRY`, GCF will create and use a default Artifact Registry + # repository named 'gcf-artifacts' in the region. + # + # It must match the pattern + # `projects/{project}/locations/{location}/repositories/{repository}`. + # + # Cross-project repositories are not supported. + # Cross-location repositories are not supported. + # Repository format must be 'DOCKER'. + # @!attribute [rw] docker_registry + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Functions::V1::CloudFunction::DockerRegistry] + # Docker Registry to use for this deployment. + # As of March 2025, `CONTAINER_REGISTRY` option is no longer + # available in response to Container Registry's deprecation: + # https://cloud.google.com/artifact-registry/docs/transition/transition-from-gcr + # Please use Artifact Registry instead, which is the default choice. + # + # If unspecified, it defaults to `ARTIFACT_REGISTRY`. + # If `docker_repository` field is specified, this field should either be left + # unspecified or set to `ARTIFACT_REGISTRY`. + # @!attribute [rw] automatic_update_policy + # @return [::Google::Cloud::Functions::V1::CloudFunction::AutomaticUpdatePolicy] + # Note: The following fields are mutually exclusive: `automatic_update_policy`, `on_deploy_update_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] on_deploy_update_policy + # @return [::Google::Cloud::Functions::V1::CloudFunction::OnDeployUpdatePolicy] + # Note: The following fields are mutually exclusive: `on_deploy_update_policy`, `automatic_update_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] build_service_account + # @return [::String] + # A service account the user provides for use with Cloud Build. The format of + # this field is + # `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. + class CloudFunction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Security patches are applied automatically to the runtime without requiring + # the function to be redeployed. + class AutomaticUpdatePolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Security patches are only applied when a function is redeployed. + # @!attribute [r] runtime_version + # @return [::String] + # Output only. Contains the runtime version which was used during latest + # function deployment. + class OnDeployUpdatePolicy + 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 [::String] + class EnvironmentVariablesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class BuildEnvironmentVariablesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Available egress settings. + # + # This controls what traffic is diverted through the VPC Access Connector + # resource. By default PRIVATE_RANGES_ONLY will be used. + module VpcConnectorEgressSettings + # Unspecified. + VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0 + + # Use the VPC Access Connector only for private IP space from RFC1918. + PRIVATE_RANGES_ONLY = 1 + + # Force the use of VPC Access Connector for all egress traffic from the + # function. + ALL_TRAFFIC = 2 + end + + # Available ingress settings. + # + # This controls what traffic can reach the function. + # + # If unspecified, ALLOW_ALL will be used. + module IngressSettings + # Unspecified. + INGRESS_SETTINGS_UNSPECIFIED = 0 + + # Allow HTTP traffic from public and private sources. + ALLOW_ALL = 1 + + # Allow HTTP traffic from only private VPC sources. + ALLOW_INTERNAL_ONLY = 2 + + # Allow HTTP traffic from private VPC sources and through GCLB. + ALLOW_INTERNAL_AND_GCLB = 3 + end + + # Docker Registry to use for storing function Docker images. + module DockerRegistry + # Unspecified. + DOCKER_REGISTRY_UNSPECIFIED = 0 + + # Docker images will be stored in multi-regional Container Registry + # repositories named `gcf`. + CONTAINER_REGISTRY = 1 + + # Docker images will be stored in regional Artifact Registry repositories. + # By default, GCF will create and use repositories named `gcf-artifacts` + # in every region in which a function is deployed. But the repository to + # use can also be specified by the user using the `docker_repository` + # field. + ARTIFACT_REGISTRY = 2 + end + end + + # Describes SourceRepository, used to represent parameters related to + # source repository where a function is hosted. + # @!attribute [rw] url + # @return [::String] + # The URL pointing to the hosted repository where the function is defined. + # There are supported Cloud Source Repository URLs in the following + # formats: + # + # To refer to a specific commit: + # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` + # To refer to a moveable alias (branch): + # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` + # In particular, to refer to HEAD use `master` moveable alias. + # To refer to a specific fixed alias (tag): + # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` + # + # You may omit `paths/*` if you want to use the main directory. The function + # response may add an empty `/paths/` to the URL. + # @!attribute [r] deployed_url + # @return [::String] + # Output only. The URL pointing to the hosted repository where the function + # were defined at the time of deployment. It always points to a specific + # commit in the format described above. + class SourceRepository + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes HttpsTrigger, could be used to connect web hooks to function. + # @!attribute [r] url + # @return [::String] + # Output only. The deployed url for the function. + # @!attribute [rw] security_level + # @return [::Google::Cloud::Functions::V1::HttpsTrigger::SecurityLevel] + # The security level for the function. + class HttpsTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Available security level settings. + # + # This controls the methods to enforce security (HTTPS) on a URL. + # + # If unspecified, SECURE_OPTIONAL will be used. + module SecurityLevel + # Unspecified. + SECURITY_LEVEL_UNSPECIFIED = 0 + + # Requests for a URL that match this handler that do not use HTTPS are + # automatically redirected to the HTTPS URL with the same path. Query + # parameters are reserved for the redirect. + SECURE_ALWAYS = 1 + + # Both HTTP and HTTPS requests with URLs that match the handler succeed + # without redirects. The application can examine the request to determine + # which protocol was used and respond accordingly. + SECURE_OPTIONAL = 2 + end + end + + # Describes EventTrigger, used to request events be sent from another + # service. + # @!attribute [rw] event_type + # @return [::String] + # Required. The type of event to observe. For example: + # `providers/cloud.storage/eventTypes/object.change` and + # `providers/cloud.pubsub/eventTypes/topic.publish`. + # + # Event types match pattern `providers/*/eventTypes/*.*`. + # The pattern contains: + # + # 1. namespace: For example, `cloud.storage` and + # `google.firebase.analytics`. + # 2. resource type: The type of resource on which event occurs. For + # example, the Google Cloud Storage API includes the type `object`. + # 3. action: The action that generates the event. For example, action for + # a Google Cloud Storage Object is 'change'. + # These parts are lower case. + # @!attribute [rw] resource + # @return [::String] + # Required. The resource(s) from which to observe events, for example, + # `projects/_/buckets/myBucket`. + # + # Not all syntactically correct values are accepted by all services. For + # example: + # + # 1. The authorization model must support it. Google Cloud Functions + # only allows EventTriggers to be deployed that observe resources in the + # same project as the `CloudFunction`. + # 2. The resource type must match the pattern expected for an + # `event_type`. For example, an `EventTrigger` that has an + # `event_type` of "google.pubsub.topic.publish" should have a resource + # that matches Google Cloud Pub/Sub topics. + # + # Additionally, some services may support short names when creating an + # `EventTrigger`. These will always be returned in the normalized "long" + # format. + # + # See each *service's* documentation for supported formats. + # @!attribute [rw] service + # @return [::String] + # The hostname of the service that should be observed. + # + # If no string is provided, the default service implementing the API will + # be used. For example, `storage.googleapis.com` is the default for all + # event types in the `google.storage` namespace. + # @!attribute [rw] failure_policy + # @return [::Google::Cloud::Functions::V1::FailurePolicy] + # Specifies policy for failed executions. + class EventTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the policy in case of function's execution failure. + # If empty, then defaults to ignoring failures (i.e. not retrying them). + # @!attribute [rw] retry + # @return [::Google::Cloud::Functions::V1::FailurePolicy::Retry] + # If specified, then the function will be retried in case of a failure. + class FailurePolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes the retry policy in case of function's execution failure. + # A function execution will be retried on any failure. + # A failed execution will be retried up to 7 days with an exponential backoff + # (capped at 10 seconds). + # Retried execution is charged as any other execution. + class Retry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Configuration for a secret environment variable. It has the information + # necessary to fetch the secret value from secret manager and expose it as an + # environment variable. + # @!attribute [rw] key + # @return [::String] + # Name of the environment variable. + # @!attribute [rw] project_id + # @return [::String] + # Project identifier (preferably project number but can also be the project + # ID) of the project that contains the secret. If not set, it will be + # populated with the function's project assuming that the secret exists in + # the same project as of the function. + # @!attribute [rw] secret + # @return [::String] + # Name of the secret in secret manager (not the full resource name). + # @!attribute [rw] version + # @return [::String] + # Version of the secret (version number or the string 'latest'). It is + # recommended to use a numeric version for secret environment variables as + # any updates to the secret value is not reflected until new instances start. + class SecretEnvVar + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a secret volume. It has the information necessary to fetch + # the secret value from secret manager and make it available as files mounted + # at the requested paths within the application container. Secret value is not + # a part of the configuration. Every filesystem read operation performs a + # lookup in secret manager to retrieve the secret value. + # @!attribute [rw] mount_path + # @return [::String] + # The path within the container to mount the secret volume. For example, + # setting the mount_path as `/etc/secrets` would mount the secret value files + # under the `/etc/secrets` directory. This directory will also be completely + # shadowed and unavailable to mount any other secrets. + # + # Recommended mount paths: /etc/secrets + # Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log + # @!attribute [rw] project_id + # @return [::String] + # Project identifier (preferrably project number but can also be the project + # ID) of the project that contains the secret. If not set, it will be + # populated with the function's project assuming that the secret exists in + # the same project as of the function. + # @!attribute [rw] secret + # @return [::String] + # Name of the secret in secret manager (not the full resource name). + # @!attribute [rw] versions + # @return [::Array<::Google::Cloud::Functions::V1::SecretVolume::SecretVersion>] + # List of secret versions to mount for this secret. If empty, the `latest` + # version of the secret will be made available in a file named after the + # secret under the mount point. + class SecretVolume + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for a single version. + # @!attribute [rw] version + # @return [::String] + # Version of the secret (version number or the string 'latest'). It is + # preferable to use `latest` version with secret volumes as secret value + # changes are reflected immediately. + # @!attribute [rw] path + # @return [::String] + # Relative path of the file under the mount path where the secret value for + # this version will be fetched and made available. For example, setting the + # mount_path as '/etc/secrets' and path as `/secret_foo` would mount the + # secret value file at `/etc/secrets/secret_foo`. + class SecretVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Request for the `CreateFunction` method. + # @!attribute [rw] location + # @return [::String] + # Required. The project and location in which the function should be created, + # specified in the format `projects/*/locations/*` + # @!attribute [rw] function + # @return [::Google::Cloud::Functions::V1::CloudFunction] + # Required. Function to be created. + class CreateFunctionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `UpdateFunction` method. + # @!attribute [rw] function + # @return [::Google::Cloud::Functions::V1::CloudFunction] + # Required. New version of the function. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. The list of fields in `CloudFunction` that have to be updated. + class UpdateFunctionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetFunction` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the function which details should be obtained. + # @!attribute [rw] version_id + # @return [::Integer] + # Optional. The optional version of the function whose details should be + # obtained. The version of a 1st Gen function is an integer that starts from + # 1 and gets incremented on redeployments. Each deployment creates a config + # version of the underlying function. GCF may keep historical configs for old + # versions. This field can be specified to fetch the historical configs. + # Leave it blank or set to 0 to get the latest version of the function. + class GetFunctionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListFunctions` method. + # @!attribute [rw] parent + # @return [::String] + # The project and location from which the function should be listed, + # specified in the format `projects/*/locations/*` + # If you want to list functions in all locations, use "-" in place of a + # location. When listing functions in all locations, if one or more + # location(s) are unreachable, the response will contain functions from all + # reachable locations along with the names of any unreachable locations. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of functions to return per call. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last + # `ListFunctionsResponse`; indicates that + # this is a continuation of a prior `ListFunctions` call, and that the + # system should return the next page of data. + class ListFunctionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListFunctions` method. + # @!attribute [rw] functions + # @return [::Array<::Google::Cloud::Functions::V1::CloudFunction>] + # The functions that match the request. + # @!attribute [rw] next_page_token + # @return [::String] + # If not empty, indicates that there may be more functions that match + # the request; this value should be passed in a new + # {::Google::Cloud::Functions::V1::ListFunctionsRequest google.cloud.functions.v1.ListFunctionsRequest} + # to get more functions. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. The response does not include any + # functions from these locations. + class ListFunctionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `DeleteFunction` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the function which should be deleted. + class DeleteFunctionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `CallFunction` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the function to be called. + # @!attribute [rw] data + # @return [::String] + # Required. Input to be passed to the function. + class CallFunctionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of `CallFunction` method. + # @!attribute [rw] execution_id + # @return [::String] + # Execution id of function invocation. + # @!attribute [rw] result + # @return [::String] + # Result populated for successful execution of synchronous function. Will + # not be populated if function does not return a result through context. + # @!attribute [rw] error + # @return [::String] + # Either system or user-function generated error. Set if execution + # was not successful. + class CallFunctionResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of `GenerateSourceUploadUrl` method. + # @!attribute [rw] parent + # @return [::String] + # The project and location in which the Google Cloud Storage signed URL + # should be generated, specified in the format `projects/*/locations/*`. + # @!attribute [rw] kms_key_name + # @return [::String] + # Resource name of a KMS crypto key (managed by the user) used to + # encrypt/decrypt function source code objects in intermediate Cloud Storage + # buckets. When you generate an upload url and upload your source code, it + # gets copied to an intermediate Cloud Storage bucket. The source code is + # then copied to a versioned directory in the sources bucket in the consumer + # project during the function deployment. + # + # It must match the pattern + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + # + # The Google Cloud Functions service account + # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be + # granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter + # (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the + # Key/KeyRing/Project/Organization (least access preferred). GCF will + # delegate access to the Google Storage service account in the internal + # project. + class GenerateUploadUrlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of `GenerateSourceUploadUrl` method. + # @!attribute [rw] upload_url + # @return [::String] + # The generated Google Cloud Storage signed URL that should be used for a + # function source code upload. The uploaded file should be a zip archive + # which contains a function. + class GenerateUploadUrlResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of `GenerateDownloadUrl` method. + # @!attribute [rw] name + # @return [::String] + # The name of function for which source code Google Cloud Storage signed + # URL should be generated. + # @!attribute [rw] version_id + # @return [::Integer] + # The optional version of function. If not set, default, current version + # is used. + class GenerateDownloadUrlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of `GenerateDownloadUrl` method. + # @!attribute [rw] download_url + # @return [::String] + # The generated Google Cloud Storage signed URL that should be used for + # function source code download. + class GenerateDownloadUrlResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the current stage of a deployment. + module CloudFunctionStatus + # Not specified. Invalid state. + CLOUD_FUNCTION_STATUS_UNSPECIFIED = 0 + + # Function has been successfully deployed and is serving. + ACTIVE = 1 + + # Function deployment failed and the function isn’t serving. + OFFLINE = 2 + + # Function is being created or updated. + DEPLOY_IN_PROGRESS = 3 + + # Function is being deleted. + DELETE_IN_PROGRESS = 4 + + # Function deployment failed and the function serving state is undefined. + # The function should be updated or deleted to move it out of this state. + UNKNOWN = 5 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/operations.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/operations.rb new file mode 100644 index 000000000000..a24751dbd8a1 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/operations.rb @@ -0,0 +1,77 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Functions + module V1 + # Metadata describing an {::Google::Longrunning::Operation Operation} + # @!attribute [rw] target + # @return [::String] + # Target of the operation - for example + # `projects/project-1/locations/region-1/functions/function-1` + # @!attribute [rw] type + # @return [::Google::Cloud::Functions::V1::OperationType] + # Type of operation. + # @!attribute [rw] request + # @return [::Google::Protobuf::Any] + # The original request that started the operation. + # @!attribute [rw] version_id + # @return [::Integer] + # Version id of the function created or updated by an API call. + # This field is only populated for Create and Update operations. + # @!attribute [rw] update_time + # @return [::Google::Protobuf::Timestamp] + # The last update timestamp of the operation. + # @!attribute [rw] build_id + # @return [::String] + # The Cloud Build ID of the function created or updated by an API call. + # This field is only populated for Create and Update operations. + # @!attribute [rw] source_token + # @return [::String] + # An identifier for Firebase function sources. Disclaimer: This field is only + # supported for Firebase function deployments. + # @!attribute [rw] build_name + # @return [::String] + # The Cloud Build Name of the function deployment. + # This field is only populated for Create and Update operations. + # `projects//locations//builds/`. + class OperationMetadataV1 + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A type of an operation. + module OperationType + # Unknown operation type. + OPERATION_UNSPECIFIED = 0 + + # Triggered by CreateFunction call + CREATE_FUNCTION = 1 + + # Triggered by UpdateFunction call + UPDATE_FUNCTION = 2 + + # Triggered by DeleteFunction call. + DELETE_FUNCTION = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-functions-v1/snippets/Gemfile new file mode 100644 index 000000000000..9a80fdfbcccd --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-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-functions-v1", path: "../" +else + gem "google-cloud-functions-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-functions-v1/snippets/cloud_functions_service/call_function.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/call_function.rb new file mode 100644 index 000000000000..d019cb903d6f --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/call_function.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 cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_sync] +require "google/cloud/functions/v1" + +## +# Snippet for the call_function call in the CloudFunctionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V1::CloudFunctionsService::Client#call_function. +# +def call_function + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V1::CallFunctionRequest.new + + # Call the call_function method. + result = client.call_function request + + # The returned object is of type Google::Cloud::Functions::V1::CallFunctionResponse. + p result +end +# [END cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/create_function.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/create_function.rb new file mode 100644 index 000000000000..7f4eac9fead3 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/create_function.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 cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_sync] +require "google/cloud/functions/v1" + +## +# Snippet for the create_function call in the CloudFunctionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V1::CloudFunctionsService::Client#create_function. +# +def create_function + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V1::CreateFunctionRequest.new + + # Call the create_function method. + result = client.create_function request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/delete_function.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/delete_function.rb new file mode 100644 index 000000000000..5b2ab6b2aee6 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/delete_function.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 cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_sync] +require "google/cloud/functions/v1" + +## +# Snippet for the delete_function call in the CloudFunctionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V1::CloudFunctionsService::Client#delete_function. +# +def delete_function + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V1::DeleteFunctionRequest.new + + # Call the delete_function method. + result = client.delete_function request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_download_url.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_download_url.rb new file mode 100644 index 000000000000..fe3eaf68ac58 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_download_url.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 cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_sync] +require "google/cloud/functions/v1" + +## +# Snippet for the generate_download_url call in the CloudFunctionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V1::CloudFunctionsService::Client#generate_download_url. +# +def generate_download_url + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new + + # Call the generate_download_url method. + result = client.generate_download_url request + + # The returned object is of type Google::Cloud::Functions::V1::GenerateDownloadUrlResponse. + p result +end +# [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_upload_url.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_upload_url.rb new file mode 100644 index 000000000000..0f62710b00ef --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_upload_url.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 cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync] +require "google/cloud/functions/v1" + +## +# Snippet for the generate_upload_url call in the CloudFunctionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V1::CloudFunctionsService::Client#generate_upload_url. +# +def generate_upload_url + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new + + # Call the generate_upload_url method. + result = client.generate_upload_url request + + # The returned object is of type Google::Cloud::Functions::V1::GenerateUploadUrlResponse. + p result +end +# [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_function.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_function.rb new file mode 100644 index 000000000000..240fd6259b26 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_function.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 cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_sync] +require "google/cloud/functions/v1" + +## +# Snippet for the get_function call in the CloudFunctionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V1::CloudFunctionsService::Client#get_function. +# +def get_function + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V1::GetFunctionRequest.new + + # Call the get_function method. + result = client.get_function request + + # The returned object is of type Google::Cloud::Functions::V1::CloudFunction. + p result +end +# [END cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_iam_policy.rb new file mode 100644 index 000000000000..05cd95bebc89 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_iam_policy.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 cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_sync] +require "google/cloud/functions/v1" + +## +# Snippet for the get_iam_policy call in the CloudFunctionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V1::CloudFunctionsService::Client#get_iam_policy. +# +def get_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V1::CloudFunctionsService::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 cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/list_functions.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/list_functions.rb new file mode 100644 index 000000000000..b929f6e87aeb --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/list_functions.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 cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_sync] +require "google/cloud/functions/v1" + +## +# Snippet for the list_functions call in the CloudFunctionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V1::CloudFunctionsService::Client#list_functions. +# +def list_functions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V1::ListFunctionsRequest.new + + # Call the list_functions method. + result = client.list_functions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Functions::V1::CloudFunction. + p item + end +end +# [END cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/set_iam_policy.rb new file mode 100644 index 000000000000..06da7de008f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/set_iam_policy.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 cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_sync] +require "google/cloud/functions/v1" + +## +# Snippet for the set_iam_policy call in the CloudFunctionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V1::CloudFunctionsService::Client#set_iam_policy. +# +def set_iam_policy + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V1::CloudFunctionsService::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 cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/test_iam_permissions.rb new file mode 100644 index 000000000000..e1a8a26fb0c2 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/test_iam_permissions.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 cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_sync] +require "google/cloud/functions/v1" + +## +# Snippet for the test_iam_permissions call in the CloudFunctionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V1::CloudFunctionsService::Client#test_iam_permissions. +# +def test_iam_permissions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V1::CloudFunctionsService::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 cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/update_function.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/update_function.rb new file mode 100644 index 000000000000..74dea02b9f0e --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/update_function.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 cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_sync] +require "google/cloud/functions/v1" + +## +# Snippet for the update_function call in the CloudFunctionsService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V1::CloudFunctionsService::Client#update_function. +# +def update_function + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V1::UpdateFunctionRequest.new + + # Call the update_function method. + result = client.update_function request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/snippet_metadata_google.cloud.functions.v1.json b/owl-bot-staging/google-cloud-functions-v1/snippets/snippet_metadata_google.cloud.functions.v1.json new file mode 100644 index 000000000000..c2a5bbd6e0bb --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/snippets/snippet_metadata_google.cloud.functions.v1.json @@ -0,0 +1,455 @@ +{ + "client_library": { + "name": "google-cloud-functions-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.functions.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_sync", + "title": "Snippet for the list_functions call in the CloudFunctionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#list_functions.", + "file": "cloud_functions_service/list_functions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_functions", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#list_functions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V1::ListFunctionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Functions::V1::ListFunctionsResponse", + "client": { + "short_name": "CloudFunctionsService::Client", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" + }, + "method": { + "short_name": "ListFunctions", + "full_name": "google.cloud.functions.v1.CloudFunctionsService.ListFunctions", + "service": { + "short_name": "CloudFunctionsService", + "full_name": "google.cloud.functions.v1.CloudFunctionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_sync", + "title": "Snippet for the get_function call in the CloudFunctionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#get_function.", + "file": "cloud_functions_service/get_function.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_function", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#get_function", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V1::GetFunctionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Functions::V1::CloudFunction", + "client": { + "short_name": "CloudFunctionsService::Client", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" + }, + "method": { + "short_name": "GetFunction", + "full_name": "google.cloud.functions.v1.CloudFunctionsService.GetFunction", + "service": { + "short_name": "CloudFunctionsService", + "full_name": "google.cloud.functions.v1.CloudFunctionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_sync", + "title": "Snippet for the create_function call in the CloudFunctionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#create_function.", + "file": "cloud_functions_service/create_function.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_function", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#create_function", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V1::CreateFunctionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFunctionsService::Client", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" + }, + "method": { + "short_name": "CreateFunction", + "full_name": "google.cloud.functions.v1.CloudFunctionsService.CreateFunction", + "service": { + "short_name": "CloudFunctionsService", + "full_name": "google.cloud.functions.v1.CloudFunctionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_sync", + "title": "Snippet for the update_function call in the CloudFunctionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#update_function.", + "file": "cloud_functions_service/update_function.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_function", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#update_function", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V1::UpdateFunctionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFunctionsService::Client", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" + }, + "method": { + "short_name": "UpdateFunction", + "full_name": "google.cloud.functions.v1.CloudFunctionsService.UpdateFunction", + "service": { + "short_name": "CloudFunctionsService", + "full_name": "google.cloud.functions.v1.CloudFunctionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_sync", + "title": "Snippet for the delete_function call in the CloudFunctionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#delete_function.", + "file": "cloud_functions_service/delete_function.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_function", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#delete_function", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V1::DeleteFunctionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "CloudFunctionsService::Client", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" + }, + "method": { + "short_name": "DeleteFunction", + "full_name": "google.cloud.functions.v1.CloudFunctionsService.DeleteFunction", + "service": { + "short_name": "CloudFunctionsService", + "full_name": "google.cloud.functions.v1.CloudFunctionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_sync", + "title": "Snippet for the call_function call in the CloudFunctionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#call_function.", + "file": "cloud_functions_service/call_function.rb", + "language": "RUBY", + "client_method": { + "short_name": "call_function", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#call_function", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V1::CallFunctionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Functions::V1::CallFunctionResponse", + "client": { + "short_name": "CloudFunctionsService::Client", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" + }, + "method": { + "short_name": "CallFunction", + "full_name": "google.cloud.functions.v1.CloudFunctionsService.CallFunction", + "service": { + "short_name": "CloudFunctionsService", + "full_name": "google.cloud.functions.v1.CloudFunctionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync", + "title": "Snippet for the generate_upload_url call in the CloudFunctionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#generate_upload_url.", + "file": "cloud_functions_service/generate_upload_url.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_upload_url", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#generate_upload_url", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V1::GenerateUploadUrlRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Functions::V1::GenerateUploadUrlResponse", + "client": { + "short_name": "CloudFunctionsService::Client", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" + }, + "method": { + "short_name": "GenerateUploadUrl", + "full_name": "google.cloud.functions.v1.CloudFunctionsService.GenerateUploadUrl", + "service": { + "short_name": "CloudFunctionsService", + "full_name": "google.cloud.functions.v1.CloudFunctionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_sync", + "title": "Snippet for the generate_download_url call in the CloudFunctionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#generate_download_url.", + "file": "cloud_functions_service/generate_download_url.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_download_url", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#generate_download_url", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse", + "client": { + "short_name": "CloudFunctionsService::Client", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" + }, + "method": { + "short_name": "GenerateDownloadUrl", + "full_name": "google.cloud.functions.v1.CloudFunctionsService.GenerateDownloadUrl", + "service": { + "short_name": "CloudFunctionsService", + "full_name": "google.cloud.functions.v1.CloudFunctionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_sync", + "title": "Snippet for the set_iam_policy call in the CloudFunctionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#set_iam_policy.", + "file": "cloud_functions_service/set_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "set_iam_policy", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#set_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::SetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "CloudFunctionsService::Client", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" + }, + "method": { + "short_name": "SetIamPolicy", + "full_name": "google.cloud.functions.v1.CloudFunctionsService.SetIamPolicy", + "service": { + "short_name": "CloudFunctionsService", + "full_name": "google.cloud.functions.v1.CloudFunctionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_sync", + "title": "Snippet for the get_iam_policy call in the CloudFunctionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#get_iam_policy.", + "file": "cloud_functions_service/get_iam_policy.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_iam_policy", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#get_iam_policy", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::GetIamPolicyRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::Policy", + "client": { + "short_name": "CloudFunctionsService::Client", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" + }, + "method": { + "short_name": "GetIamPolicy", + "full_name": "google.cloud.functions.v1.CloudFunctionsService.GetIamPolicy", + "service": { + "short_name": "CloudFunctionsService", + "full_name": "google.cloud.functions.v1.CloudFunctionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_sync", + "title": "Snippet for the test_iam_permissions call in the CloudFunctionsService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#test_iam_permissions.", + "file": "cloud_functions_service/test_iam_permissions.rb", + "language": "RUBY", + "client_method": { + "short_name": "test_iam_permissions", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#test_iam_permissions", + "async": false, + "parameters": [ + { + "type": "::Google::Iam::V1::TestIamPermissionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", + "client": { + "short_name": "CloudFunctionsService::Client", + "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" + }, + "method": { + "short_name": "TestIamPermissions", + "full_name": "google.cloud.functions.v1.CloudFunctionsService.TestIamPermissions", + "service": { + "short_name": "CloudFunctionsService", + "full_name": "google.cloud.functions.v1.CloudFunctionsService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_operations_test.rb b/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_operations_test.rb new file mode 100644 index 000000000000..7728081afeaf --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_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/functions/v1/functions_pb" +require "google/cloud/functions/v1/functions_services_pb" +require "google/cloud/functions/v1/cloud_functions_service" + +class ::Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_paths_test.rb b/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_paths_test.rb new file mode 100644 index 000000000000..b74cec4601f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_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/functions/v1/cloud_functions_service" + +class ::Google::Cloud::Functions::V1::CloudFunctionsService::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_cloud_function_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.cloud_function_path project: "value0", location: "value1", function: "value2" + assert_equal "projects/value0/locations/value1/functions/value2", path + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/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::Functions::V1::CloudFunctionsService::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_repository_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.repository_path project: "value0", location: "value1", repository: "value2" + assert_equal "projects/value0/locations/value1/repositories/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_rest_test.rb b/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_rest_test.rb new file mode 100644 index 000000000000..aa19f269708a --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_rest_test.rb @@ -0,0 +1,705 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions/v1/functions_pb" +require "google/cloud/functions/v1/cloud_functions_service/rest" + + +class ::Google::Cloud::Functions::V1::CloudFunctionsService::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_list_functions + # Create test objects. + client_result = ::Google::Cloud::Functions::V1::ListFunctionsResponse.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_functions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_list_functions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_functions_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_functions({ 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_functions 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_functions ::Google::Cloud::Functions::V1::ListFunctionsRequest.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_functions({ 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_functions(::Google::Cloud::Functions::V1::ListFunctionsRequest.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_functions_client_stub.call_count + end + end + end + + def test_get_function + # Create test objects. + client_result = ::Google::Cloud::Functions::V1::CloudFunction.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + version_id = 42 + + get_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_get_function_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_function({ name: name, version_id: version_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_function name: name, version_id: version_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_function ::Google::Cloud::Functions::V1::GetFunctionRequest.new(name: name, version_id: version_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_function({ name: name, version_id: version_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_function(::Google::Cloud::Functions::V1::GetFunctionRequest.new(name: name, version_id: version_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_function_client_stub.call_count + end + end + end + + def test_create_function + # 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. + location = "hello world" + function = {} + + create_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_create_function_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_function({ location: location, function: function }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_function location: location, function: function do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_function ::Google::Cloud::Functions::V1::CreateFunctionRequest.new(location: location, function: function) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_function({ location: location, function: function }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_function(::Google::Cloud::Functions::V1::CreateFunctionRequest.new(location: location, function: function), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_function_client_stub.call_count + end + end + end + + def test_update_function + # 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. + function = {} + update_mask = {} + + update_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_update_function_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_function({ function: function, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_function function: function, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_function ::Google::Cloud::Functions::V1::UpdateFunctionRequest.new(function: function, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_function({ function: function, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_function(::Google::Cloud::Functions::V1::UpdateFunctionRequest.new(function: function, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_function_client_stub.call_count + end + end + end + + def test_delete_function + # 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_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_delete_function_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_function({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_function name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_function ::Google::Cloud::Functions::V1::DeleteFunctionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_function({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_function(::Google::Cloud::Functions::V1::DeleteFunctionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_function_client_stub.call_count + end + end + end + + def test_call_function + # Create test objects. + client_result = ::Google::Cloud::Functions::V1::CallFunctionResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + data = "hello world" + + call_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_call_function_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, call_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.call_function({ name: name, data: data }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.call_function name: name, data: data do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.call_function ::Google::Cloud::Functions::V1::CallFunctionRequest.new(name: name, data: data) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.call_function({ name: name, data: data }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.call_function(::Google::Cloud::Functions::V1::CallFunctionRequest.new(name: name, data: data), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, call_function_client_stub.call_count + end + end + end + + def test_generate_upload_url + # Create test objects. + client_result = ::Google::Cloud::Functions::V1::GenerateUploadUrlResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + kms_key_name = "hello world" + + generate_upload_url_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_generate_upload_url_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_upload_url_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_upload_url parent: parent, kms_key_name: kms_key_name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_upload_url ::Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_upload_url(::Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_upload_url_client_stub.call_count + end + end + end + + def test_generate_download_url + # Create test objects. + client_result = ::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + version_id = 42 + + generate_download_url_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_generate_download_url_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_download_url_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_download_url({ name: name, version_id: version_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_download_url name: name, version_id: version_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_download_url ::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new(name: name, version_id: version_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_download_url({ name: name, version_id: version_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_download_url(::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new(name: name, version_id: version_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_download_url_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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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_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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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_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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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_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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_test.rb b/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_test.rb new file mode 100644 index 000000000000..c109970c7545 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_test.rb @@ -0,0 +1,800 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions/v1/functions_pb" +require "google/cloud/functions/v1/cloud_functions_service" + +class ::Google::Cloud::Functions::V1::CloudFunctionsService::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_list_functions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Functions::V1::ListFunctionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_functions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_functions, name + assert_kind_of ::Google::Cloud::Functions::V1::ListFunctionsRequest, 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_functions_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_functions({ 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_functions 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_functions ::Google::Cloud::Functions::V1::ListFunctionsRequest.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_functions({ 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_functions(::Google::Cloud::Functions::V1::ListFunctionsRequest.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_functions_client_stub.call_rpc_count + end + end + + def test_get_function + # Create GRPC objects. + grpc_response = ::Google::Cloud::Functions::V1::CloudFunction.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + version_id = 42 + + get_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_function, name + assert_kind_of ::Google::Cloud::Functions::V1::GetFunctionRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["version_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_function({ name: name, version_id: version_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_function name: name, version_id: version_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_function ::Google::Cloud::Functions::V1::GetFunctionRequest.new(name: name, version_id: version_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_function({ name: name, version_id: version_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_function(::Google::Cloud::Functions::V1::GetFunctionRequest.new(name: name, version_id: version_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_function_client_stub.call_rpc_count + end + end + + def test_create_function + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + location = "hello world" + function = {} + + create_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_function, name + assert_kind_of ::Google::Cloud::Functions::V1::CreateFunctionRequest, request + assert_equal "hello world", request["location"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Functions::V1::CloudFunction), request["function"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_function({ location: location, function: function }) do |response, 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_function location: location, function: function do |response, 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_function ::Google::Cloud::Functions::V1::CreateFunctionRequest.new(location: location, function: function) do |response, operation| + assert_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_function({ location: location, function: function }, grpc_options) do |response, operation| + assert_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_function(::Google::Cloud::Functions::V1::CreateFunctionRequest.new(location: location, function: function), grpc_options) do |response, operation| + assert_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_function_client_stub.call_rpc_count + end + end + + def test_update_function + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + function = {} + update_mask = {} + + update_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_function, name + assert_kind_of ::Google::Cloud::Functions::V1::UpdateFunctionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Functions::V1::CloudFunction), request["function"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_function({ function: function, 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_function function: function, 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_function ::Google::Cloud::Functions::V1::UpdateFunctionRequest.new(function: function, 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_function({ function: function, 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_function(::Google::Cloud::Functions::V1::UpdateFunctionRequest.new(function: function, 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_function_client_stub.call_rpc_count + end + end + + def test_delete_function + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_function, name + assert_kind_of ::Google::Cloud::Functions::V1::DeleteFunctionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_function({ 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_function 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_function ::Google::Cloud::Functions::V1::DeleteFunctionRequest.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_function({ 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_function(::Google::Cloud::Functions::V1::DeleteFunctionRequest.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_function_client_stub.call_rpc_count + end + end + + def test_call_function + # Create GRPC objects. + grpc_response = ::Google::Cloud::Functions::V1::CallFunctionResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + data = "hello world" + + call_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :call_function, name + assert_kind_of ::Google::Cloud::Functions::V1::CallFunctionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["data"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, call_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.call_function({ name: name, data: data }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.call_function name: name, data: data do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.call_function ::Google::Cloud::Functions::V1::CallFunctionRequest.new(name: name, data: data) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.call_function({ name: name, data: data }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.call_function(::Google::Cloud::Functions::V1::CallFunctionRequest.new(name: name, data: data), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, call_function_client_stub.call_rpc_count + end + end + + def test_generate_upload_url + # Create GRPC objects. + grpc_response = ::Google::Cloud::Functions::V1::GenerateUploadUrlResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + kms_key_name = "hello world" + + generate_upload_url_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_upload_url, name + assert_kind_of ::Google::Cloud::Functions::V1::GenerateUploadUrlRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["kms_key_name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_upload_url_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_upload_url parent: parent, kms_key_name: kms_key_name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_upload_url ::Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_upload_url(::Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_upload_url_client_stub.call_rpc_count + end + end + + def test_generate_download_url + # Create GRPC objects. + grpc_response = ::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + version_id = 42 + + generate_download_url_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_download_url, name + assert_kind_of ::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest, request + assert_equal "hello world", request["name"] + assert_equal 42, request["version_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_download_url_client_stub do + # Create client + client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_download_url({ name: name, version_id: version_id }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_download_url name: name, version_id: version_id do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_download_url ::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new(name: name, version_id: version_id) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_download_url({ name: name, version_id: version_id }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_download_url(::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new(name: name, version_id: version_id), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_download_url_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::Functions::V1::CloudFunctionsService::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_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::Functions::V1::CloudFunctionsService::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_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::Functions::V1::CloudFunctionsService::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_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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Functions::V1::CloudFunctionsService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-functions-v1/test/helper.rb b/owl-bot-staging/google-cloud-functions-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-functions-v2/.gitignore b/owl-bot-staging/google-cloud-functions-v2/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/.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-functions-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-functions-v2/.repo-metadata.json new file mode 100644 index 000000000000..08adcec8c106 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudfunctions.googleapis.com", + "api_shortname": "cloudfunctions", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v2/latest", + "distribution_name": "google-cloud-functions-v2", + "is_cloud": true, + "language": "ruby", + "name": "cloudfunctions", + "name_pretty": "Cloud Functions V2 API", + "product_documentation": "https://cloud.google.com/functions", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Cloud Functions API manages lightweight user-provided functions executed in response to events. Note that google-cloud-functions-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-functions instead. See the readme for more details.", + "ruby-cloud-env-prefix": "FUNCTIONS", + "ruby-cloud-product-url": "https://cloud.google.com/functions", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-functions-v2/.rubocop.yml b/owl-bot-staging/google-cloud-functions-v2/.rubocop.yml new file mode 100644 index 000000000000..e04c1f319ea6 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-functions-v2.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-functions-v2.rb" diff --git a/owl-bot-staging/google-cloud-functions-v2/.toys.rb b/owl-bot-staging/google-cloud-functions-v2/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/.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-functions-v2/.yardopts b/owl-bot-staging/google-cloud-functions-v2/.yardopts new file mode 100644 index 000000000000..11de90a5a867 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Cloud Functions V2 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-functions-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-functions-v2/AUTHENTICATION.md new file mode 100644 index 000000000000..76016ac8ea3a --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-functions-v2 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-functions-v2 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/functions/v2" + +client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/functions/v2" + +::Google::Cloud::Functions::V2::FunctionService::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::Functions::V2::FunctionService::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-functions-v2 +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/functions/v2" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::Functions::V2::FunctionService::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-functions-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-functions-v2/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-functions-v2/Gemfile b/owl-bot-staging/google-cloud-functions-v2/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-functions-v2/LICENSE.md b/owl-bot-staging/google-cloud-functions-v2/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/README.md b/owl-bot-staging/google-cloud-functions-v2/README.md new file mode 100644 index 000000000000..6b8fd954d9b9 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Cloud Functions V2 API + +Manages lightweight user-provided functions executed in response to events. + +The Cloud Functions API manages lightweight user-provided functions executed in response to events. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Cloud Functions V2 API. Most users should consider using +the main client gem, +[google-cloud-functions](https://rubygems.org/gems/google-cloud-functions). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-functions-v2 +``` + +## 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/cloudfunctions.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/functions/v2" + +client = ::Google::Cloud::Functions::V2::FunctionService::Client.new +request = ::Google::Cloud::Functions::V2::GetFunctionRequest.new # (request fields as keyword arguments...) +response = client.get_function request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v2/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/functions) +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/functions/v2" +require "logger" + +client = ::Google::Cloud::Functions::V2::FunctionService::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-functions`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-functions-v2`. +_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-functions`. +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-functions-v2`. + +### 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-functions-v2/Rakefile b/owl-bot-staging/google-cloud-functions-v2/Rakefile new file mode 100644 index 000000000000..43cbac85a00e --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2 acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["FUNCTIONS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["FUNCTIONS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["FUNCTIONS_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 FUNCTIONS_TEST_PROJECT=test123 FUNCTIONS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/functions/v2/function_service/credentials" + ::Google::Cloud::Functions::V2::FunctionService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["FUNCTIONS_PROJECT"] = project + ENV["FUNCTIONS_TEST_PROJECT"] = project + ENV["FUNCTIONS_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-functions-v2 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-functions-v2 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-functions-v2 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-functions-v2 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-functions-v2" + header "google-cloud-functions-v2 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-functions-v2 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-functions-v2 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-functions-v2 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-functions-v2 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-functions-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-functions-v2/gapic_metadata.json new file mode 100644 index 000000000000..6c52f2c01618 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/gapic_metadata.json @@ -0,0 +1,58 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.functions.v2", + "libraryPackage": "::Google::Cloud::Functions::V2", + "services": { + "FunctionService": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::Functions::V2::FunctionService::Client", + "rpcs": { + "GetFunction": { + "methods": [ + "get_function" + ] + }, + "ListFunctions": { + "methods": [ + "list_functions" + ] + }, + "CreateFunction": { + "methods": [ + "create_function" + ] + }, + "UpdateFunction": { + "methods": [ + "update_function" + ] + }, + "DeleteFunction": { + "methods": [ + "delete_function" + ] + }, + "GenerateUploadUrl": { + "methods": [ + "generate_upload_url" + ] + }, + "GenerateDownloadUrl": { + "methods": [ + "generate_download_url" + ] + }, + "ListRuntimes": { + "methods": [ + "list_runtimes" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-functions-v2/google-cloud-functions-v2.gemspec b/owl-bot-staging/google-cloud-functions-v2/google-cloud-functions-v2.gemspec new file mode 100644 index 000000000000..0d784ec8066c --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/google-cloud-functions-v2.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/functions/v2/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-functions-v2" + gem.version = Google::Cloud::Functions::V2::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Cloud Functions API manages lightweight user-provided functions executed in response to events. Note that google-cloud-functions-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-functions instead. See the readme for more details." + gem.summary = "Manages lightweight user-provided functions executed in response to events." + 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.1" + + 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-functions-v2/lib/google-cloud-functions-v2.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google-cloud-functions-v2.rb new file mode 100644 index 000000000000..35e10a3c86b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google-cloud-functions-v2.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/functions/v2" diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2.rb new file mode 100644 index 000000000000..a28199a9890c --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2.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/functions/v2/function_service" +require "google/cloud/functions/v2/version" + +module Google + module Cloud + module Functions + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/functions/v2" + # client = ::Google::Cloud::Functions::V2::FunctionService::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/functions/v2" + # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + module V2 + end + end + end +end + +helper_path = ::File.join __dir__, "v2", "_helpers.rb" +require "google/cloud/functions/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/bindings_override.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/bindings_override.rb new file mode 100644 index 000000000000..09ac613e7bf1 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/bindings_override.rb @@ -0,0 +1,97 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Functions + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/functions/v2/rest" + # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + module V2 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "Functions"] + 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.ListLocations"] = [ + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v2/{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: "/v2/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v2/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ + + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v2/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service.rb new file mode 100644 index 000000000000..1850fed09cb2 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_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/functions/v2/version" + +require "google/cloud/functions/v2/function_service/credentials" +require "google/cloud/functions/v2/function_service/paths" +require "google/cloud/functions/v2/function_service/operations" +require "google/cloud/functions/v2/function_service/client" +require "google/cloud/functions/v2/function_service/rest" + +module Google + module Cloud + module Functions + module V2 + ## + # Google Cloud Functions is used to deploy functions that are executed by + # Google in response to various events. Data connected with that event is + # passed to a function as the input data. + # + # A **function** is a resource which describes a function that should be + # executed and how it is triggered. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/functions/v2/function_service" + # client = ::Google::Cloud::Functions::V2::FunctionService::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/functions/v2/function_service/rest" + # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + module FunctionService + end + end + end + end +end + +helper_path = ::File.join __dir__, "function_service", "helpers.rb" +require "google/cloud/functions/v2/function_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/client.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/client.rb new file mode 100644 index 000000000000..ed23f8db3f23 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/client.rb @@ -0,0 +1,1300 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions/v2/functions_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module Functions + module V2 + module FunctionService + ## + # Client for the FunctionService service. + # + # Google Cloud Functions is used to deploy functions that are executed by + # Google in response to various events. Data connected with that event is + # passed to a function as the input data. + # + # A **function** is a resource which describes a function that should be + # executed and how it is triggered. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :function_service_stub + + ## + # Configure the FunctionService Client class. + # + # See {::Google::Cloud::Functions::V2::FunctionService::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FunctionService clients + # ::Google::Cloud::Functions::V2::FunctionService::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", "Functions", "V2"] + 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 FunctionService 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::Functions::V2::FunctionService::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 + @function_service_stub.universe_domain + end + + ## + # Create a new FunctionService client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Functions::V2::FunctionService::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FunctionService 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/functions/v2/functions_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 + + @function_service_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::Functions::V2::FunctionService::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 + ) + + @function_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 = @function_service_stub.endpoint + config.universe_domain = @function_service_stub.universe_domain + config.logger = @function_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 = @function_service_stub.endpoint + config.universe_domain = @function_service_stub.universe_domain + config.logger = @function_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Functions::V2::FunctionService::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 + @function_service_stub.logger + end + + # Service calls + + ## + # Returns a function with the given name from the requested project. + # + # @overload get_function(request, options = nil) + # Pass arguments to `get_function` via a request object, either of type + # {::Google::Cloud::Functions::V2::GetFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::GetFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_function(name: nil, revision: nil) + # Pass arguments to `get_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 function which details should be obtained. + # @param revision [::String] + # Optional. The optional version of the 1st gen function whose details should + # be obtained. The version of a 1st gen function is an integer that starts + # from 1 and gets incremented on redeployments. GCF may keep historical + # configs for old versions of 1st gen function. This field can be specified + # to fetch the historical configs. This field is valid only for GCF 1st gen + # function. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Functions::V2::Function] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Functions::V2::Function] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::GetFunctionRequest.new + # + # # Call the get_function method. + # result = client.get_function request + # + # # The returned object is of type Google::Cloud::Functions::V2::Function. + # p result + # + def get_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::GetFunctionRequest + + # Converts hash and nil to 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-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_function.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.call_rpc :get_function, 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 a list of functions that belong to the requested project. + # + # @overload list_functions(request, options = nil) + # Pass arguments to `list_functions` via a request object, either of type + # {::Google::Cloud::Functions::V2::ListFunctionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::ListFunctionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_functions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_functions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location from which the function should be + # listed, specified in the format `projects/*/locations/*` If you want to + # list functions in all locations, use "-" in place of a location. When + # listing functions in all locations, if one or more location(s) are + # unreachable, the response will contain functions from all reachable + # locations along with the names of any unreachable locations. + # @param page_size [::Integer] + # Maximum number of functions to return per call. The largest allowed + # page_size is 1,000, if the page_size is omitted or specified as greater + # than 1,000 then it will be replaced as 1,000. The size of the list + # response can be less than specified when used with filters. + # @param page_token [::String] + # The value returned by the last + # `ListFunctionsResponse`; indicates that + # this is a continuation of a prior `ListFunctions` call, and that the + # system should return the next page of data. + # @param filter [::String] + # The filter for Functions that match the filter expression, + # following the syntax outlined in https://google.aip.dev/160. + # @param order_by [::String] + # The sorting order of the resources returned. Value should be a comma + # separated list of fields. The default sorting order is ascending. + # See https://google.aip.dev/132#ordering. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Functions::V2::Function>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::Functions::V2::Function>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::ListFunctionsRequest.new + # + # # Call the list_functions method. + # result = client.list_functions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Functions::V2::Function. + # p item + # end + # + def list_functions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::ListFunctionsRequest + + # Converts hash and nil to 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_functions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-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_functions.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_functions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.call_rpc :list_functions, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @function_service_stub, :list_functions, 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 function. If a function with the given name already exists in + # the specified project, the long running operation will return + # `ALREADY_EXISTS` error. + # + # @overload create_function(request, options = nil) + # Pass arguments to `create_function` via a request object, either of type + # {::Google::Cloud::Functions::V2::CreateFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::CreateFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_function(parent: nil, function: nil, function_id: nil) + # Pass arguments to `create_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location in which the function should be created, + # specified in the format `projects/*/locations/*` + # @param function [::Google::Cloud::Functions::V2::Function, ::Hash] + # Required. Function to be created. + # @param function_id [::String] + # The ID to use for the function, which will become the final component of + # the function's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::CreateFunctionRequest.new + # + # # Call the create_function method. + # result = client.create_function request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::CreateFunctionRequest + + # Converts hash and nil to 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-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_function.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.call_rpc :create_function, 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 existing function. + # + # @overload update_function(request, options = nil) + # Pass arguments to `update_function` via a request object, either of type + # {::Google::Cloud::Functions::V2::UpdateFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::UpdateFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_function(function: nil, update_mask: nil) + # Pass arguments to `update_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param function [::Google::Cloud::Functions::V2::Function, ::Hash] + # Required. New version of the function. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If no field mask is provided, all fields will be updated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::UpdateFunctionRequest.new + # + # # Call the update_function method. + # result = client.update_function request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::UpdateFunctionRequest + + # Converts hash and nil to 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.function&.name + header_params["function.name"] = request.function.name + end + + request_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_function.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.call_rpc :update_function, 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 function with the given name from the specified project. If the + # given function is used by some trigger, the trigger will be updated to + # remove this function. + # + # @overload delete_function(request, options = nil) + # Pass arguments to `delete_function` via a request object, either of type + # {::Google::Cloud::Functions::V2::DeleteFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::DeleteFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_function(name: nil) + # Pass arguments to `delete_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 function which should be deleted. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::DeleteFunctionRequest.new + # + # # Call the delete_function method. + # result = client.delete_function request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::DeleteFunctionRequest + + # Converts hash and nil to 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-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_function.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.call_rpc :delete_function, request, options: options do |response, operation| + response = ::Gapic::Operation.new response, @operations_client, options: options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a signed URL for uploading a function source code. + # For more information about the signed URL usage see: + # https://cloud.google.com/storage/docs/access-control/signed-urls. + # Once the function source code upload is complete, the used signed + # URL should be provided in CreateFunction or UpdateFunction request + # as a reference to the function source code. + # + # When uploading source code to the generated signed URL, please follow + # these restrictions: + # + # * Source file type should be a zip file. + # * No credentials should be attached - the signed URLs provide access to the + # target bucket using internal service identity; if credentials were + # attached, the identity from the credentials would be used, but that + # identity does not have permissions to upload files to the URL. + # + # When making a HTTP PUT request, specify this header: + # + # * `content-type: application/zip` + # + # Do not specify this header: + # + # * `Authorization: Bearer YOUR_TOKEN` + # + # @overload generate_upload_url(request, options = nil) + # Pass arguments to `generate_upload_url` via a request object, either of type + # {::Google::Cloud::Functions::V2::GenerateUploadUrlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::GenerateUploadUrlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_upload_url(parent: nil, kms_key_name: nil, environment: nil) + # Pass arguments to `generate_upload_url` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location in which the Google Cloud Storage signed + # URL should be generated, specified in the format `projects/*/locations/*`. + # @param kms_key_name [::String] + # Resource name of a KMS crypto key (managed by the user) used to + # encrypt/decrypt function source code objects in intermediate Cloud Storage + # buckets. When you generate an upload url and upload your source code, it + # gets copied to an intermediate Cloud Storage bucket. The source code is + # then copied to a versioned directory in the sources bucket in the consumer + # project during the function deployment. + # + # It must match the pattern + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + # + # The Google Cloud Functions service account + # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be + # granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter + # (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the + # Key/KeyRing/Project/Organization (least access preferred). + # @param environment [::Google::Cloud::Functions::V2::Environment] + # The function environment the generated upload url will be used for. + # The upload url for 2nd Gen functions can also be used for 1st gen + # functions, but not vice versa. If not specified, 2nd generation-style + # upload URLs are generated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new + # + # # Call the generate_upload_url method. + # result = client.generate_upload_url request + # + # # The returned object is of type Google::Cloud::Functions::V2::GenerateUploadUrlResponse. + # p result + # + def generate_upload_url request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::GenerateUploadUrlRequest + + # Converts hash and nil to 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_upload_url.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-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.generate_upload_url.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_upload_url.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.call_rpc :generate_upload_url, 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 a signed URL for downloading deployed function source code. + # The URL is only valid for a limited period and should be used within + # 30 minutes of generation. + # For more information about the signed URL usage see: + # https://cloud.google.com/storage/docs/access-control/signed-urls + # + # @overload generate_download_url(request, options = nil) + # Pass arguments to `generate_download_url` via a request object, either of type + # {::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_download_url(name: nil) + # Pass arguments to `generate_download_url` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 function for which source code Google Cloud Storage + # signed URL should be generated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.new + # + # # Call the generate_download_url method. + # result = client.generate_download_url request + # + # # The returned object is of type Google::Cloud::Functions::V2::GenerateDownloadUrlResponse. + # p result + # + def generate_download_url request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest + + # Converts hash and nil to 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_download_url.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-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_download_url.timeout, + metadata: metadata, + retry_policy: @config.rpcs.generate_download_url.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.call_rpc :generate_download_url, 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 a list of runtimes that are supported for the requested project. + # + # @overload list_runtimes(request, options = nil) + # Pass arguments to `list_runtimes` via a request object, either of type + # {::Google::Cloud::Functions::V2::ListRuntimesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::ListRuntimesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_runtimes(parent: nil, filter: nil) + # Pass arguments to `list_runtimes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location from which the runtimes should be + # listed, specified in the format `projects/*/locations/*` + # @param filter [::String] + # The filter for Runtimes that match the filter expression, + # following the syntax outlined in https://google.aip.dev/160. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::Functions::V2::ListRuntimesResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::Functions::V2::ListRuntimesResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::ListRuntimesRequest.new + # + # # Call the list_runtimes method. + # result = client.list_runtimes request + # + # # The returned object is of type Google::Cloud::Functions::V2::ListRuntimesResponse. + # p result + # + def list_runtimes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::ListRuntimesRequest + + # Converts hash and nil to 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_runtimes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION + metadata[:"x-goog-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_runtimes.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_runtimes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.call_rpc :list_runtimes, 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 FunctionService API. + # + # This class represents the configuration for FunctionService, + # 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::Functions::V2::FunctionService::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 + # # get_function to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Functions::V2::FunctionService::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_function.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_function.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::Functions::V2::FunctionService::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 = "cloudfunctions.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 FunctionService 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 `get_function` + # @return [::Gapic::Config::Method] + # + attr_reader :get_function + ## + # RPC-specific configuration for `list_functions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_functions + ## + # RPC-specific configuration for `create_function` + # @return [::Gapic::Config::Method] + # + attr_reader :create_function + ## + # RPC-specific configuration for `update_function` + # @return [::Gapic::Config::Method] + # + attr_reader :update_function + ## + # RPC-specific configuration for `delete_function` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_function + ## + # RPC-specific configuration for `generate_upload_url` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_upload_url + ## + # RPC-specific configuration for `generate_download_url` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_download_url + ## + # RPC-specific configuration for `list_runtimes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_runtimes + + # @private + def initialize parent_rpcs = nil + get_function_config = parent_rpcs.get_function if parent_rpcs.respond_to? :get_function + @get_function = ::Gapic::Config::Method.new get_function_config + list_functions_config = parent_rpcs.list_functions if parent_rpcs.respond_to? :list_functions + @list_functions = ::Gapic::Config::Method.new list_functions_config + create_function_config = parent_rpcs.create_function if parent_rpcs.respond_to? :create_function + @create_function = ::Gapic::Config::Method.new create_function_config + update_function_config = parent_rpcs.update_function if parent_rpcs.respond_to? :update_function + @update_function = ::Gapic::Config::Method.new update_function_config + delete_function_config = parent_rpcs.delete_function if parent_rpcs.respond_to? :delete_function + @delete_function = ::Gapic::Config::Method.new delete_function_config + generate_upload_url_config = parent_rpcs.generate_upload_url if parent_rpcs.respond_to? :generate_upload_url + @generate_upload_url = ::Gapic::Config::Method.new generate_upload_url_config + generate_download_url_config = parent_rpcs.generate_download_url if parent_rpcs.respond_to? :generate_download_url + @generate_download_url = ::Gapic::Config::Method.new generate_download_url_config + list_runtimes_config = parent_rpcs.list_runtimes if parent_rpcs.respond_to? :list_runtimes + @list_runtimes = ::Gapic::Config::Method.new list_runtimes_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/credentials.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/credentials.rb new file mode 100644 index 000000000000..4eae4ef2d81a --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/credentials.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! + +require "googleauth" + +module Google + module Cloud + module Functions + module V2 + module FunctionService + # Credentials for the FunctionService API. + class Credentials < ::Google::Auth::Credentials + self.scope = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + self.env_vars = [ + "FUNCTIONS_CREDENTIALS", + "FUNCTIONS_KEYFILE", + "GOOGLE_CLOUD_CREDENTIALS", + "GOOGLE_CLOUD_KEYFILE", + "GCLOUD_KEYFILE", + "FUNCTIONS_CREDENTIALS_JSON", + "FUNCTIONS_KEYFILE_JSON", + "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-functions-v2/lib/google/cloud/functions/v2/function_service/operations.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/operations.rb new file mode 100644 index 000000000000..f18a12a5b48a --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_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 Functions + module V2 + module FunctionService + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the FunctionService 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 FunctionService 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::Functions::V2::VERSION + metadata[:"x-goog-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::Functions::V2::VERSION + metadata[:"x-goog-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::Functions::V2::VERSION + metadata[:"x-goog-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::Functions::V2::VERSION + metadata[:"x-goog-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::Functions::V2::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 = "cloudfunctions.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-functions-v2/lib/google/cloud/functions/v2/function_service/paths.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/paths.rb new file mode 100644 index 000000000000..9ee1da7e125e --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/paths.rb @@ -0,0 +1,240 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Functions + module V2 + module FunctionService + # Path helper methods for the FunctionService API. + module Paths + ## + # Create a fully-qualified Build resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/builds/{build}` + # + # @param project [String] + # @param location [String] + # @param build [String] + # + # @return [::String] + def build_path project:, location:, build: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/builds/#{build}" + end + + ## + # Create a fully-qualified Channel resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/channels/{channel}` + # + # @param project [String] + # @param location [String] + # @param channel [String] + # + # @return [::String] + def channel_path project:, location:, channel: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/channels/#{channel}" + end + + ## + # Create a fully-qualified Connector resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/connectors/{connector}` + # + # @param project [String] + # @param location [String] + # @param connector [String] + # + # @return [::String] + def connector_path project:, location:, connector: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/connectors/#{connector}" + end + + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_key_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + end + + ## + # Create a fully-qualified Function resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/functions/{function}` + # + # @param project [String] + # @param location [String] + # @param function [String] + # + # @return [::String] + def function_path project:, location:, function: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/functions/#{function}" + 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 Repository resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/repositories/{repository}` + # + # @param project [String] + # @param location [String] + # @param repository [String] + # + # @return [::String] + def repository_path project:, location:, repository: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/repositories/#{repository}" + end + + ## + # Create a fully-qualified Service resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/services/{service}` + # + # @param project [String] + # @param location [String] + # @param service [String] + # + # @return [::String] + def service_path project:, location:, service: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/services/#{service}" + end + + ## + # Create a fully-qualified Topic resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/topics/{topic}` + # + # @param project [String] + # @param topic [String] + # + # @return [::String] + def topic_path project:, topic: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + + "projects/#{project}/topics/#{topic}" + end + + ## + # Create a fully-qualified Trigger resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/triggers/{trigger}` + # + # @param project [String] + # @param location [String] + # @param trigger [String] + # + # @return [::String] + def trigger_path project:, location:, trigger: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/triggers/#{trigger}" + end + + ## + # Create a fully-qualified WorkerPool resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/workerPools/{worker_pool}` + # + # @param project [String] + # @param location [String] + # @param worker_pool [String] + # + # @return [::String] + def worker_pool_path project:, location:, worker_pool: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/workerPools/#{worker_pool}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest.rb new file mode 100644 index 000000000000..9420f12600a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_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/functions/v2/version" +require "google/cloud/functions/v2/bindings_override" + +require "google/cloud/functions/v2/function_service/credentials" +require "google/cloud/functions/v2/function_service/paths" +require "google/cloud/functions/v2/function_service/rest/operations" +require "google/cloud/functions/v2/function_service/rest/client" + +module Google + module Cloud + module Functions + module V2 + ## + # Google Cloud Functions is used to deploy functions that are executed by + # Google in response to various events. Data connected with that event is + # passed to a function as the input data. + # + # A **function** is a resource which describes a function that should be + # executed and how it is triggered. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/functions/v2/function_service/rest" + # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + module FunctionService + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/functions/v2/function_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/client.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/client.rb new file mode 100644 index 000000000000..19a0474f3058 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/client.rb @@ -0,0 +1,1210 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions/v2/functions_pb" +require "google/cloud/functions/v2/function_service/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module Functions + module V2 + module FunctionService + module Rest + ## + # REST client for the FunctionService service. + # + # Google Cloud Functions is used to deploy functions that are executed by + # Google in response to various events. Data connected with that event is + # passed to a function as the input data. + # + # A **function** is a resource which describes a function that should be + # executed and how it is triggered. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :function_service_stub + + ## + # Configure the FunctionService Client class. + # + # See {::Google::Cloud::Functions::V2::FunctionService::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all FunctionService clients + # ::Google::Cloud::Functions::V2::FunctionService::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", "Functions", "V2"] + 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 FunctionService 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::Functions::V2::FunctionService::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 + @function_service_stub.universe_domain + end + + ## + # Create a new FunctionService REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the FunctionService 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::Functions::V2::FunctionService::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 + + @function_service_stub = ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @function_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 = @function_service_stub.endpoint + config.universe_domain = @function_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @function_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 = @function_service_stub.endpoint + config.universe_domain = @function_service_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @function_service_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::Functions::V2::FunctionService::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 + @function_service_stub.logger + end + + # Service calls + + ## + # Returns a function with the given name from the requested project. + # + # @overload get_function(request, options = nil) + # Pass arguments to `get_function` via a request object, either of type + # {::Google::Cloud::Functions::V2::GetFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::GetFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_function(name: nil, revision: nil) + # Pass arguments to `get_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 function which details should be obtained. + # @param revision [::String] + # Optional. The optional version of the 1st gen function whose details should + # be obtained. The version of a 1st gen function is an integer that starts + # from 1 and gets incremented on redeployments. GCF may keep historical + # configs for old versions of 1st gen function. This field can be specified + # to fetch the historical configs. This field is valid only for GCF 1st gen + # function. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V2::Function] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V2::Function] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::GetFunctionRequest.new + # + # # Call the get_function method. + # result = client.get_function request + # + # # The returned object is of type Google::Cloud::Functions::V2::Function. + # p result + # + def get_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::GetFunctionRequest + + # Converts hash and nil to an 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_function.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.get_function 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 a list of functions that belong to the requested project. + # + # @overload list_functions(request, options = nil) + # Pass arguments to `list_functions` via a request object, either of type + # {::Google::Cloud::Functions::V2::ListFunctionsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::ListFunctionsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_functions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_functions` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location from which the function should be + # listed, specified in the format `projects/*/locations/*` If you want to + # list functions in all locations, use "-" in place of a location. When + # listing functions in all locations, if one or more location(s) are + # unreachable, the response will contain functions from all reachable + # locations along with the names of any unreachable locations. + # @param page_size [::Integer] + # Maximum number of functions to return per call. The largest allowed + # page_size is 1,000, if the page_size is omitted or specified as greater + # than 1,000 then it will be replaced as 1,000. The size of the list + # response can be less than specified when used with filters. + # @param page_token [::String] + # The value returned by the last + # `ListFunctionsResponse`; indicates that + # this is a continuation of a prior `ListFunctions` call, and that the + # system should return the next page of data. + # @param filter [::String] + # The filter for Functions that match the filter expression, + # following the syntax outlined in https://google.aip.dev/160. + # @param order_by [::String] + # The sorting order of the resources returned. Value should be a comma + # separated list of fields. The default sorting order is ascending. + # See https://google.aip.dev/132#ordering. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Functions::V2::Function>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Functions::V2::Function>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::ListFunctionsRequest.new + # + # # Call the list_functions method. + # result = client.list_functions request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::Functions::V2::Function. + # p item + # end + # + def list_functions request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::ListFunctionsRequest + + # Converts hash and nil to an 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_functions.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_functions.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_functions.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.list_functions request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @function_service_stub, :list_functions, "functions", 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 function. If a function with the given name already exists in + # the specified project, the long running operation will return + # `ALREADY_EXISTS` error. + # + # @overload create_function(request, options = nil) + # Pass arguments to `create_function` via a request object, either of type + # {::Google::Cloud::Functions::V2::CreateFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::CreateFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_function(parent: nil, function: nil, function_id: nil) + # Pass arguments to `create_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location in which the function should be created, + # specified in the format `projects/*/locations/*` + # @param function [::Google::Cloud::Functions::V2::Function, ::Hash] + # Required. Function to be created. + # @param function_id [::String] + # The ID to use for the function, which will become the final component of + # the function's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::CreateFunctionRequest.new + # + # # Call the create_function method. + # result = client.create_function request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::CreateFunctionRequest + + # Converts hash and nil to an 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_function.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.create_function 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 existing function. + # + # @overload update_function(request, options = nil) + # Pass arguments to `update_function` via a request object, either of type + # {::Google::Cloud::Functions::V2::UpdateFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::UpdateFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_function(function: nil, update_mask: nil) + # Pass arguments to `update_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param function [::Google::Cloud::Functions::V2::Function, ::Hash] + # Required. New version of the function. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # The list of fields to be updated. + # If no field mask is provided, all fields will be updated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::UpdateFunctionRequest.new + # + # # Call the update_function method. + # result = client.update_function request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::UpdateFunctionRequest + + # Converts hash and nil to an 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_function.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.update_function 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 function with the given name from the specified project. If the + # given function is used by some trigger, the trigger will be updated to + # remove this function. + # + # @overload delete_function(request, options = nil) + # Pass arguments to `delete_function` via a request object, either of type + # {::Google::Cloud::Functions::V2::DeleteFunctionRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::DeleteFunctionRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_function(name: nil) + # Pass arguments to `delete_function` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 function which should be deleted. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::DeleteFunctionRequest.new + # + # # Call the delete_function method. + # result = client.delete_function request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_function request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::DeleteFunctionRequest + + # Converts hash and nil to an 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_function.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_function.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_function.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.delete_function request, options do |result, operation| + result = ::Gapic::Operation.new result, @operations_client, options: options + yield result, operation if block_given? + throw :response, result + end + rescue ::Gapic::Rest::Error => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Returns a signed URL for uploading a function source code. + # For more information about the signed URL usage see: + # https://cloud.google.com/storage/docs/access-control/signed-urls. + # Once the function source code upload is complete, the used signed + # URL should be provided in CreateFunction or UpdateFunction request + # as a reference to the function source code. + # + # When uploading source code to the generated signed URL, please follow + # these restrictions: + # + # * Source file type should be a zip file. + # * No credentials should be attached - the signed URLs provide access to the + # target bucket using internal service identity; if credentials were + # attached, the identity from the credentials would be used, but that + # identity does not have permissions to upload files to the URL. + # + # When making a HTTP PUT request, specify this header: + # + # * `content-type: application/zip` + # + # Do not specify this header: + # + # * `Authorization: Bearer YOUR_TOKEN` + # + # @overload generate_upload_url(request, options = nil) + # Pass arguments to `generate_upload_url` via a request object, either of type + # {::Google::Cloud::Functions::V2::GenerateUploadUrlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::GenerateUploadUrlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_upload_url(parent: nil, kms_key_name: nil, environment: nil) + # Pass arguments to `generate_upload_url` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location in which the Google Cloud Storage signed + # URL should be generated, specified in the format `projects/*/locations/*`. + # @param kms_key_name [::String] + # Resource name of a KMS crypto key (managed by the user) used to + # encrypt/decrypt function source code objects in intermediate Cloud Storage + # buckets. When you generate an upload url and upload your source code, it + # gets copied to an intermediate Cloud Storage bucket. The source code is + # then copied to a versioned directory in the sources bucket in the consumer + # project during the function deployment. + # + # It must match the pattern + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + # + # The Google Cloud Functions service account + # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be + # granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter + # (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the + # Key/KeyRing/Project/Organization (least access preferred). + # @param environment [::Google::Cloud::Functions::V2::Environment] + # The function environment the generated upload url will be used for. + # The upload url for 2nd Gen functions can also be used for 1st gen + # functions, but not vice versa. If not specified, 2nd generation-style + # upload URLs are generated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new + # + # # Call the generate_upload_url method. + # result = client.generate_upload_url request + # + # # The returned object is of type Google::Cloud::Functions::V2::GenerateUploadUrlResponse. + # p result + # + def generate_upload_url request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::GenerateUploadUrlRequest + + # Converts hash and nil to an 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_upload_url.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_upload_url.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_upload_url.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.generate_upload_url 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 a signed URL for downloading deployed function source code. + # The URL is only valid for a limited period and should be used within + # 30 minutes of generation. + # For more information about the signed URL usage see: + # https://cloud.google.com/storage/docs/access-control/signed-urls + # + # @overload generate_download_url(request, options = nil) + # Pass arguments to `generate_download_url` via a request object, either of type + # {::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_download_url(name: nil) + # Pass arguments to `generate_download_url` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 function for which source code Google Cloud Storage + # signed URL should be generated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.new + # + # # Call the generate_download_url method. + # result = client.generate_download_url request + # + # # The returned object is of type Google::Cloud::Functions::V2::GenerateDownloadUrlResponse. + # p result + # + def generate_download_url request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest + + # Converts hash and nil to an 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_download_url.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_download_url.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.generate_download_url.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.generate_download_url 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 a list of runtimes that are supported for the requested project. + # + # @overload list_runtimes(request, options = nil) + # Pass arguments to `list_runtimes` via a request object, either of type + # {::Google::Cloud::Functions::V2::ListRuntimesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::Functions::V2::ListRuntimesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_runtimes(parent: nil, filter: nil) + # Pass arguments to `list_runtimes` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location from which the runtimes should be + # listed, specified in the format `projects/*/locations/*` + # @param filter [::String] + # The filter for Runtimes that match the filter expression, + # following the syntax outlined in https://google.aip.dev/160. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V2::ListRuntimesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V2::ListRuntimesResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/functions/v2" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::Functions::V2::ListRuntimesRequest.new + # + # # Call the list_runtimes method. + # result = client.list_runtimes request + # + # # The returned object is of type Google::Cloud::Functions::V2::ListRuntimesResponse. + # p result + # + def list_runtimes request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::ListRuntimesRequest + + # Converts hash and nil to an 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_runtimes.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::Functions::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_runtimes.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_runtimes.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @function_service_stub.list_runtimes 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 FunctionService REST API. + # + # This class represents the configuration for FunctionService 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::Functions::V2::FunctionService::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 + # # get_function to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.get_function.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.get_function.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 = "cloudfunctions.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 FunctionService 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 `get_function` + # @return [::Gapic::Config::Method] + # + attr_reader :get_function + ## + # RPC-specific configuration for `list_functions` + # @return [::Gapic::Config::Method] + # + attr_reader :list_functions + ## + # RPC-specific configuration for `create_function` + # @return [::Gapic::Config::Method] + # + attr_reader :create_function + ## + # RPC-specific configuration for `update_function` + # @return [::Gapic::Config::Method] + # + attr_reader :update_function + ## + # RPC-specific configuration for `delete_function` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_function + ## + # RPC-specific configuration for `generate_upload_url` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_upload_url + ## + # RPC-specific configuration for `generate_download_url` + # @return [::Gapic::Config::Method] + # + attr_reader :generate_download_url + ## + # RPC-specific configuration for `list_runtimes` + # @return [::Gapic::Config::Method] + # + attr_reader :list_runtimes + + # @private + def initialize parent_rpcs = nil + get_function_config = parent_rpcs.get_function if parent_rpcs.respond_to? :get_function + @get_function = ::Gapic::Config::Method.new get_function_config + list_functions_config = parent_rpcs.list_functions if parent_rpcs.respond_to? :list_functions + @list_functions = ::Gapic::Config::Method.new list_functions_config + create_function_config = parent_rpcs.create_function if parent_rpcs.respond_to? :create_function + @create_function = ::Gapic::Config::Method.new create_function_config + update_function_config = parent_rpcs.update_function if parent_rpcs.respond_to? :update_function + @update_function = ::Gapic::Config::Method.new update_function_config + delete_function_config = parent_rpcs.delete_function if parent_rpcs.respond_to? :delete_function + @delete_function = ::Gapic::Config::Method.new delete_function_config + generate_upload_url_config = parent_rpcs.generate_upload_url if parent_rpcs.respond_to? :generate_upload_url + @generate_upload_url = ::Gapic::Config::Method.new generate_upload_url_config + generate_download_url_config = parent_rpcs.generate_download_url if parent_rpcs.respond_to? :generate_download_url + @generate_download_url = ::Gapic::Config::Method.new generate_download_url_config + list_runtimes_config = parent_rpcs.list_runtimes if parent_rpcs.respond_to? :list_runtimes + @list_runtimes = ::Gapic::Config::Method.new list_runtimes_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/operations.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/operations.rb new file mode 100644 index 000000000000..24561364963c --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 Functions + module V2 + module FunctionService + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the FunctionService 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 FunctionService 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::Functions::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Functions::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Functions::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::Functions::V2::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "cloudfunctions.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: "/v2/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^operations(?:/.*)?$}, true] + ] + ) + 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{^operations(?:/.*)?$}, true] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/service_stub.rb new file mode 100644 index 000000000000..a6c8c2dab360 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/service_stub.rb @@ -0,0 +1,573 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions/v2/functions_pb" + +module Google + module Cloud + module Functions + module V2 + module FunctionService + module Rest + ## + # REST service stub for the FunctionService 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 get_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::GetFunctionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V2::Function] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V2::Function] + # A result object deserialized from the server's reply + def get_function request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_function_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_function", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Functions::V2::Function.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_functions REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::ListFunctionsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V2::ListFunctionsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V2::ListFunctionsResponse] + # A result object deserialized from the server's reply + def list_functions request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_functions_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_functions", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Functions::V2::ListFunctionsResponse.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_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::CreateFunctionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_function request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_function_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_function", + 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_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::UpdateFunctionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_function request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_function_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_function", + 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_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::DeleteFunctionRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_function request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_function_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_function", + 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 generate_upload_url REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::GenerateUploadUrlRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse] + # A result object deserialized from the server's reply + def generate_upload_url request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_upload_url_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_upload_url", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Functions::V2::GenerateUploadUrlResponse.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_download_url REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse] + # A result object deserialized from the server's reply + def generate_download_url request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_generate_download_url_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_download_url", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse.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_runtimes REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::ListRuntimesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::Functions::V2::ListRuntimesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::Functions::V2::ListRuntimesResponse] + # A result object deserialized from the server's reply + def list_runtimes request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_runtimes_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_runtimes", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::Functions::V2::ListRuntimesResponse.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 get_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::GetFunctionRequest] + # 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_function_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_functions REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::ListFunctionsRequest] + # 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_functions_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/functions", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::CreateFunctionRequest] + # 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_function_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/functions", + body: "function", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::UpdateFunctionRequest] + # 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_function_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v2/{function.name}", + body: "function", + matches: [ + ["function.name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_function REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::DeleteFunctionRequest] + # 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_function_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v2/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_upload_url REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::GenerateUploadUrlRequest] + # 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_upload_url_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{parent}/functions:generateUploadUrl", + body: "*", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the generate_download_url REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest] + # 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_download_url_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v2/{name}:generateDownloadUrl", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_runtimes REST call + # + # @param request_pb [::Google::Cloud::Functions::V2::ListRuntimesRequest] + # 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_runtimes_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v2/{parent}/runtimes", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_pb.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_pb.rb new file mode 100644 index 000000000000..0939a5e38cf3 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_pb.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/functions/v2/functions.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/longrunning/operations_pb' +require 'google/protobuf/any_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/date_pb' + + +descriptor_data = "\n)google/cloud/functions/v2/functions.proto\x12\x19google.cloud.functions.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\"\xd9\x07\n\x08\x46unction\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12<\n\x0c\x62uild_config\x18\x03 \x01(\x0b\x32&.google.cloud.functions.v2.BuildConfig\x12@\n\x0eservice_config\x18\x04 \x01(\x0b\x32(.google.cloud.functions.v2.ServiceConfig\x12>\n\revent_trigger\x18\x05 \x01(\x0b\x32\'.google.cloud.functions.v2.EventTrigger\x12=\n\x05state\x18\x06 \x01(\x0e\x32).google.cloud.functions.v2.Function.StateB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x08 \x03(\x0b\x32/.google.cloud.functions.v2.Function.LabelsEntry\x12\x44\n\x0estate_messages\x18\t \x03(\x0b\x32\'.google.cloud.functions.v2.StateMessageB\x03\xe0\x41\x03\x12;\n\x0b\x65nvironment\x18\n \x01(\x0e\x32&.google.cloud.functions.v2.Environment\x12\x10\n\x03url\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12<\n\x0ckms_key_name\x18\x19 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x1a\n\rsatisfies_pzs\x18\x1b \x01(\x08\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\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\"`\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tDEPLOYING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0b\n\x07UNKNOWN\x10\x05:~\xea\x41{\n&cloudfunctions.googleapis.com/Function\x12\n\x0bworker_pool\x18\x05 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12_\n\x15\x65nvironment_variables\x18\x06 \x03(\x0b\x32@.google.cloud.functions.v2.BuildConfig.EnvironmentVariablesEntry\x12R\n\x0f\x64ocker_registry\x18\n \x01(\x0e\x32\x35.google.cloud.functions.v2.BuildConfig.DockerRegistryB\x02\x18\x01\x12J\n\x11\x64ocker_repository\x18\x07 \x01(\tB/\xfa\x41,\n*artifactregistry.googleapis.com/Repository\x12\x17\n\x0fservice_account\x18\x1b \x01(\t\x1a;\n\x19\x45nvironmentVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x0e\x44ockerRegistry\x12\x1f\n\x1b\x44OCKER_REGISTRY_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43ONTAINER_REGISTRY\x10\x01\x12\x15\n\x11\x41RTIFACT_REGISTRY\x10\x02\x42\x17\n\x15runtime_update_policy\"\xd4\n\n\rServiceConfig\x12\x33\n\x07service\x18\x01 \x01(\tB\"\xe0\x41\x03\xfa\x41\x1c\n\x1arun.googleapis.com/Service\x12\x17\n\x0ftimeout_seconds\x18\x02 \x01(\x05\x12\x18\n\x10\x61vailable_memory\x18\r \x01(\t\x12\x15\n\ravailable_cpu\x18\x16 \x01(\t\x12\x61\n\x15\x65nvironment_variables\x18\x04 \x03(\x0b\x32\x42.google.cloud.functions.v2.ServiceConfig.EnvironmentVariablesEntry\x12\x1a\n\x12max_instance_count\x18\x05 \x01(\x05\x12\x1a\n\x12min_instance_count\x18\x0c \x01(\x05\x12>\n\rvpc_connector\x18\x06 \x01(\tB\'\xfa\x41$\n\"vpcaccess.googleapis.com/Connector\x12j\n\x1dvpc_connector_egress_settings\x18\x07 \x01(\x0e\x32\x43.google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings\x12R\n\x10ingress_settings\x18\x08 \x01(\x0e\x32\x38.google.cloud.functions.v2.ServiceConfig.IngressSettings\x12\x10\n\x03uri\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x15service_account_email\x18\n \x01(\t\x12&\n\x1e\x61ll_traffic_on_latest_revision\x18\x10 \x01(\x08\x12M\n\x1csecret_environment_variables\x18\x11 \x03(\x0b\x32\'.google.cloud.functions.v2.SecretEnvVar\x12?\n\x0esecret_volumes\x18\x13 \x03(\x0b\x32\'.google.cloud.functions.v2.SecretVolume\x12\x15\n\x08revision\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12(\n max_instance_request_concurrency\x18\x14 \x01(\x05\x12N\n\x0esecurity_level\x18\x15 \x01(\x0e\x32\x36.google.cloud.functions.v2.ServiceConfig.SecurityLevel\x12(\n\x1b\x62inary_authorization_policy\x18\x17 \x01(\tB\x03\xe0\x41\x01\x1a;\n\x19\x45nvironmentVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"u\n\x1aVpcConnectorEgressSettings\x12-\n)VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED\x10\x00\x12\x17\n\x13PRIVATE_RANGES_ONLY\x10\x01\x12\x0f\n\x0b\x41LL_TRAFFIC\x10\x02\"x\n\x0fIngressSettings\x12 \n\x1cINGRESS_SETTINGS_UNSPECIFIED\x10\x00\x12\r\n\tALLOW_ALL\x10\x01\x12\x17\n\x13\x41LLOW_INTERNAL_ONLY\x10\x02\x12\x1b\n\x17\x41LLOW_INTERNAL_AND_GCLB\x10\x03\"W\n\rSecurityLevel\x12\x1e\n\x1aSECURITY_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rSECURE_ALWAYS\x10\x01\x12\x13\n\x0fSECURE_OPTIONAL\x10\x02\"P\n\x0cSecretEnvVar\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x0e\n\x06secret\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\"\xbf\x01\n\x0cSecretVolume\x12\x12\n\nmount_path\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x0e\n\x06secret\x18\x03 \x01(\t\x12G\n\x08versions\x18\x04 \x03(\x0b\x32\x35.google.cloud.functions.v2.SecretVolume.SecretVersion\x1a.\n\rSecretVersion\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"\x9b\x04\n\x0c\x45ventTrigger\x12\x38\n\x07trigger\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Trigger\x12\x16\n\x0etrigger_region\x18\x02 \x01(\t\x12\x17\n\nevent_type\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12=\n\revent_filters\x18\x04 \x03(\x0b\x32&.google.cloud.functions.v2.EventFilter\x12\x39\n\x0cpubsub_topic\x18\x05 \x01(\tB#\xe0\x41\x01\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\"\n\x15service_account_email\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0cretry_policy\x18\x07 \x01(\x0e\x32\x33.google.cloud.functions.v2.EventTrigger.RetryPolicyB\x03\xe0\x41\x01\x12\x38\n\x07\x63hannel\x18\x08 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Channel\x12\x14\n\x07service\x18\t \x01(\tB\x03\xe0\x41\x01\"b\n\x0bRetryPolicy\x12\x1c\n\x18RETRY_POLICY_UNSPECIFIED\x10\x00\x12\x1d\n\x19RETRY_POLICY_DO_NOT_RETRY\x10\x01\x12\x16\n\x12RETRY_POLICY_RETRY\x10\x02\"P\n\x0b\x45ventFilter\x12\x16\n\tattribute\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08operator\x18\x03 \x01(\tB\x03\xe0\x41\x01\"i\n\x12GetFunctionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&cloudfunctions.googleapis.com/Function\x12\x15\n\x08revision\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x9f\x01\n\x14ListFunctionsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&cloudfunctions.googleapis.com/Function\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"}\n\x15ListFunctionsResponse\x12\x36\n\tfunctions\x18\x01 \x03(\x0b\x32#.google.cloud.functions.v2.Function\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xa3\x01\n\x15\x43reateFunctionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\x08\x66unction\x18\x02 \x01(\x0b\x32#.google.cloud.functions.v2.FunctionB\x03\xe0\x41\x02\x12\x13\n\x0b\x66unction_id\x18\x03 \x01(\t\"\x84\x01\n\x15UpdateFunctionRequest\x12:\n\x08\x66unction\x18\x01 \x01(\x0b\x32#.google.cloud.functions.v2.FunctionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x15\x44\x65leteFunctionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&cloudfunctions.googleapis.com/Function\"\xd0\x01\n\x18GenerateUploadUrlRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x0ckms_key_name\x18\x02 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12;\n\x0b\x65nvironment\x18\x03 \x01(\x0e\x32&.google.cloud.functions.v2.Environment\"q\n\x19GenerateUploadUrlResponse\x12\x12\n\nupload_url\x18\x01 \x01(\t\x12@\n\x0estorage_source\x18\x02 \x01(\x0b\x32(.google.cloud.functions.v2.StorageSource\"Z\n\x1aGenerateDownloadUrlRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&cloudfunctions.googleapis.com/Function\"3\n\x1bGenerateDownloadUrlResponse\x12\x14\n\x0c\x64ownload_url\x18\x01 \x01(\t\"`\n\x13ListRuntimesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\"\x89\x04\n\x14ListRuntimesResponse\x12I\n\x08runtimes\x18\x01 \x03(\x0b\x32\x37.google.cloud.functions.v2.ListRuntimesResponse.Runtime\x1a\xa4\x02\n\x07Runtime\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12K\n\x05stage\x18\x02 \x01(\x0e\x32<.google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage\x12\x10\n\x08warnings\x18\x03 \x03(\t\x12;\n\x0b\x65nvironment\x18\x04 \x01(\x0e\x32&.google.cloud.functions.v2.Environment\x12+\n\x10\x64\x65precation_date\x18\x06 \x01(\x0b\x32\x11.google.type.Date\x12,\n\x11\x64\x65\x63ommission_date\x18\x07 \x01(\x0b\x32\x11.google.type.Date\"\x7f\n\x0cRuntimeStage\x12\x1d\n\x19RUNTIME_STAGE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44\x45VELOPMENT\x10\x01\x12\t\n\x05\x41LPHA\x10\x02\x12\x08\n\x04\x42\x45TA\x10\x03\x12\x06\n\x02GA\x10\x04\x12\x0e\n\nDEPRECATED\x10\x05\x12\x12\n\x0e\x44\x45\x43OMMISSIONED\x10\x06\"\x17\n\x15\x41utomaticUpdatePolicy\"4\n\x14OnDeployUpdatePolicy\x12\x1c\n\x0fruntime_version\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xa4\x03\n\x11OperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06target\x18\x03 \x01(\t\x12\x0c\n\x04verb\x18\x04 \x01(\t\x12\x15\n\rstatus_detail\x18\x05 \x01(\t\x12\x18\n\x10\x63\x61ncel_requested\x18\x06 \x01(\x08\x12\x13\n\x0b\x61pi_version\x18\x07 \x01(\t\x12.\n\x10request_resource\x18\x08 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x30\n\x06stages\x18\t \x03(\x0b\x32 .google.cloud.functions.v2.Stage\x12\x14\n\x0csource_token\x18\n \x01(\t\x12\x12\n\nbuild_name\x18\r \x01(\t\x12@\n\x0eoperation_type\x18\x0b \x01(\x0e\x32(.google.cloud.functions.v2.OperationType\"P\n\x10LocationMetadata\x12<\n\x0c\x65nvironments\x18\x01 \x03(\x0e\x32&.google.cloud.functions.v2.Environment\"\xc4\x03\n\x05Stage\x12\x33\n\x04name\x18\x01 \x01(\x0e\x32%.google.cloud.functions.v2.Stage.Name\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x35\n\x05state\x18\x03 \x01(\x0e\x32&.google.cloud.functions.v2.Stage.State\x12\x10\n\x08resource\x18\x04 \x01(\t\x12\x14\n\x0cresource_uri\x18\x05 \x01(\t\x12?\n\x0estate_messages\x18\x06 \x03(\x0b\x32\'.google.cloud.functions.v2.StateMessage\"\x84\x01\n\x04Name\x12\x14\n\x10NAME_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41RTIFACT_REGISTRY\x10\x01\x12\t\n\x05\x42UILD\x10\x02\x12\x0b\n\x07SERVICE\x10\x03\x12\x0b\n\x07TRIGGER\x10\x04\x12\x14\n\x10SERVICE_ROLLBACK\x10\x05\x12\x14\n\x10TRIGGER_ROLLBACK\x10\x06\"N\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNOT_STARTED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\x0c\n\x08\x43OMPLETE\x10\x03*m\n\rOperationType\x12\x1d\n\x19OPERATIONTYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43REATE_FUNCTION\x10\x01\x12\x13\n\x0fUPDATE_FUNCTION\x10\x02\x12\x13\n\x0f\x44\x45LETE_FUNCTION\x10\x03*@\n\x0b\x45nvironment\x12\x1b\n\x17\x45NVIRONMENT_UNSPECIFIED\x10\x00\x12\t\n\x05GEN_1\x10\x01\x12\t\n\x05GEN_2\x10\x02\x32\xaa\x0e\n\x0f\x46unctionService\x12\x9f\x01\n\x0bGetFunction\x12-.google.cloud.functions.v2.GetFunctionRequest\x1a#.google.cloud.functions.v2.Function\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/functions/*}\x12\xb2\x01\n\rListFunctions\x12/.google.cloud.functions.v2.ListFunctionsRequest\x1a\x30.google.cloud.functions.v2.ListFunctionsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/functions\x12\x95\x02\n\x0e\x43reateFunction\x12\x30.google.cloud.functions.v2.CreateFunctionRequest\x1a\x1d.google.longrunning.Operation\"\xb1\x01\xca\x41Q\n\"google.cloud.functions.v2.Function\x12+google.cloud.functions.v2.OperationMetadata\xda\x41\x1bparent,function,function_id\x82\xd3\xe4\x93\x02\x39\"-/v2/{parent=projects/*/locations/*}/functions:\x08\x66unction\x12\x97\x02\n\x0eUpdateFunction\x12\x30.google.cloud.functions.v2.UpdateFunctionRequest\x1a\x1d.google.longrunning.Operation\"\xb3\x01\xca\x41Q\n\"google.cloud.functions.v2.Function\x12+google.cloud.functions.v2.OperationMetadata\xda\x41\x14\x66unction,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v2/{function.name=projects/*/locations/*/functions/*}:\x08\x66unction\x12\xe7\x01\n\x0e\x44\x65leteFunction\x12\x30.google.cloud.functions.v2.DeleteFunctionRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x44\n\x15google.protobuf.Empty\x12+google.cloud.functions.v2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v2/{name=projects/*/locations/*/functions/*}\x12\xca\x01\n\x11GenerateUploadUrl\x12\x33.google.cloud.functions.v2.GenerateUploadUrlRequest\x1a\x34.google.cloud.functions.v2.GenerateUploadUrlResponse\"J\x82\xd3\xe4\x93\x02\x44\"?/v2/{parent=projects/*/locations/*}/functions:generateUploadUrl:\x01*\x12\xd2\x01\n\x13GenerateDownloadUrl\x12\x35.google.cloud.functions.v2.GenerateDownloadUrlRequest\x1a\x36.google.cloud.functions.v2.GenerateDownloadUrlResponse\"L\x82\xd3\xe4\x93\x02\x46\"A/v2/{name=projects/*/locations/*/functions/*}:generateDownloadUrl:\x01*\x12\xae\x01\n\x0cListRuntimes\x12..google.cloud.functions.v2.ListRuntimesRequest\x1a/.google.cloud.functions.v2.ListRuntimesResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v2/{parent=projects/*/locations/*}/runtimes\x1aQ\xca\x41\x1d\x63loudfunctions.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xee\x07\n\x1d\x63om.google.cloud.functions.v2B\x0e\x46unctionsProtoP\x01Z;cloud.google.com/go/functions/apiv2/functionspb;functionspb\xa2\x02\x03GCF\xea\x41o\n*artifactregistry.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}\xea\x41Y\n\x1f\x63loudbuild.googleapis.com/Build\x12\x36projects/{project}/locations/{location}/builds/{build}\xea\x41i\n$cloudbuild.googleapis.com/WorkerPool\x12\x41projects/{project}/locations/{location}/workerPools/{worker_pool}\xea\x41X\n\x1arun.googleapis.com/Service\x12:projects/{project}/locations/{location}/services/{service}\xea\x41\x64\n\"vpcaccess.googleapis.com/Connector\x12>projects/{project}/locations/{location}/connectors/{connector}\xea\x41]\n\x1f\x65ventarc.googleapis.com/Trigger\x12:projects/{project}/locations/{location}/triggers/{trigger}\xea\x41]\n\x1f\x65ventarc.googleapis.com/Channel\x12:projects/{project}/locations/{location}/channels/{channel}\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}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"], + ["google.type.Date", "google/type/date.proto"], + ["google.protobuf.Any", "google/protobuf/any.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module Functions + module V2 + Function = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Function").msgclass + Function::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Function.State").enummodule + StateMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.StateMessage").msgclass + StateMessage::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.StateMessage.Severity").enummodule + StorageSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.StorageSource").msgclass + RepoSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.RepoSource").msgclass + Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Source").msgclass + SourceProvenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SourceProvenance").msgclass + BuildConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.BuildConfig").msgclass + BuildConfig::DockerRegistry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.BuildConfig.DockerRegistry").enummodule + ServiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig").msgclass + ServiceConfig::VpcConnectorEgressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings").enummodule + ServiceConfig::IngressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig.IngressSettings").enummodule + ServiceConfig::SecurityLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig.SecurityLevel").enummodule + SecretEnvVar = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SecretEnvVar").msgclass + SecretVolume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SecretVolume").msgclass + SecretVolume::SecretVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SecretVolume.SecretVersion").msgclass + EventTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.EventTrigger").msgclass + EventTrigger::RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.EventTrigger.RetryPolicy").enummodule + EventFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.EventFilter").msgclass + GetFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GetFunctionRequest").msgclass + ListFunctionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListFunctionsRequest").msgclass + ListFunctionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListFunctionsResponse").msgclass + CreateFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.CreateFunctionRequest").msgclass + UpdateFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.UpdateFunctionRequest").msgclass + DeleteFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.DeleteFunctionRequest").msgclass + GenerateUploadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GenerateUploadUrlRequest").msgclass + GenerateUploadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GenerateUploadUrlResponse").msgclass + GenerateDownloadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GenerateDownloadUrlRequest").msgclass + GenerateDownloadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GenerateDownloadUrlResponse").msgclass + ListRuntimesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListRuntimesRequest").msgclass + ListRuntimesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListRuntimesResponse").msgclass + ListRuntimesResponse::Runtime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListRuntimesResponse.Runtime").msgclass + ListRuntimesResponse::RuntimeStage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage").enummodule + AutomaticUpdatePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.AutomaticUpdatePolicy").msgclass + OnDeployUpdatePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.OnDeployUpdatePolicy").msgclass + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.OperationMetadata").msgclass + LocationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.LocationMetadata").msgclass + Stage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Stage").msgclass + Stage::Name = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Stage.Name").enummodule + Stage::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Stage.State").enummodule + OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.OperationType").enummodule + Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Environment").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_services_pb.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_services_pb.rb new file mode 100644 index 000000000000..161b4140d5f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_services_pb.rb @@ -0,0 +1,94 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/functions/v2/functions.proto for package 'google.cloud.functions.v2' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/functions/v2/functions_pb' + +module Google + module Cloud + module Functions + module V2 + module FunctionService + # Google Cloud Functions is used to deploy functions that are executed by + # Google in response to various events. Data connected with that event is + # passed to a function as the input data. + # + # A **function** is a resource which describes a function that should be + # executed and how it is triggered. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.functions.v2.FunctionService' + + # Returns a function with the given name from the requested project. + rpc :GetFunction, ::Google::Cloud::Functions::V2::GetFunctionRequest, ::Google::Cloud::Functions::V2::Function + # Returns a list of functions that belong to the requested project. + rpc :ListFunctions, ::Google::Cloud::Functions::V2::ListFunctionsRequest, ::Google::Cloud::Functions::V2::ListFunctionsResponse + # Creates a new function. If a function with the given name already exists in + # the specified project, the long running operation will return + # `ALREADY_EXISTS` error. + rpc :CreateFunction, ::Google::Cloud::Functions::V2::CreateFunctionRequest, ::Google::Longrunning::Operation + # Updates existing function. + rpc :UpdateFunction, ::Google::Cloud::Functions::V2::UpdateFunctionRequest, ::Google::Longrunning::Operation + # Deletes a function with the given name from the specified project. If the + # given function is used by some trigger, the trigger will be updated to + # remove this function. + rpc :DeleteFunction, ::Google::Cloud::Functions::V2::DeleteFunctionRequest, ::Google::Longrunning::Operation + # Returns a signed URL for uploading a function source code. + # For more information about the signed URL usage see: + # https://cloud.google.com/storage/docs/access-control/signed-urls. + # Once the function source code upload is complete, the used signed + # URL should be provided in CreateFunction or UpdateFunction request + # as a reference to the function source code. + # + # When uploading source code to the generated signed URL, please follow + # these restrictions: + # + # * Source file type should be a zip file. + # * No credentials should be attached - the signed URLs provide access to the + # target bucket using internal service identity; if credentials were + # attached, the identity from the credentials would be used, but that + # identity does not have permissions to upload files to the URL. + # + # When making a HTTP PUT request, specify this header: + # + # * `content-type: application/zip` + # + # Do not specify this header: + # + # * `Authorization: Bearer YOUR_TOKEN` + rpc :GenerateUploadUrl, ::Google::Cloud::Functions::V2::GenerateUploadUrlRequest, ::Google::Cloud::Functions::V2::GenerateUploadUrlResponse + # Returns a signed URL for downloading deployed function source code. + # The URL is only valid for a limited period and should be used within + # 30 minutes of generation. + # For more information about the signed URL usage see: + # https://cloud.google.com/storage/docs/access-control/signed-urls + rpc :GenerateDownloadUrl, ::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest, ::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse + # Returns a list of runtimes that are supported for the requested project. + rpc :ListRuntimes, ::Google::Cloud::Functions::V2::ListRuntimesRequest, ::Google::Cloud::Functions::V2::ListRuntimesResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/rest.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/rest.rb new file mode 100644 index 000000000000..f1568ca2a93e --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions/v2/function_service/rest" +require "google/cloud/functions/v2/bindings_override" +require "google/cloud/functions/v2/version" + +module Google + module Cloud + module Functions + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/functions/v2/rest" + # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new + # + module V2 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/version.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/version.rb new file mode 100644 index 000000000000..dcacdf1f9499 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/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 Functions + module V2 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-functions-v2/proto_docs/README.md new file mode 100644 index 000000000000..a7d67d286369 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/proto_docs/README.md @@ -0,0 +1,4 @@ +# Cloud Functions V2 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-functions-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/cloud/functions/v2/functions.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/cloud/functions/v2/functions.rb new file mode 100644 index 000000000000..52e1d1eee684 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/cloud/functions/v2/functions.rb @@ -0,0 +1,1129 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 Functions + module V2 + # Describes a Cloud Function that contains user computation executed in + # response to an event. It encapsulates function and trigger configurations. + # @!attribute [rw] name + # @return [::String] + # A user-defined name of the function. Function names must be unique + # globally and match pattern `projects/*/locations/*/functions/*` + # @!attribute [rw] description + # @return [::String] + # User-provided description of a function. + # @!attribute [rw] build_config + # @return [::Google::Cloud::Functions::V2::BuildConfig] + # Describes the Build step of the function that builds a container from the + # given source. + # @!attribute [rw] service_config + # @return [::Google::Cloud::Functions::V2::ServiceConfig] + # Describes the Service being deployed. Currently deploys services to Cloud + # Run (fully managed). + # @!attribute [rw] event_trigger + # @return [::Google::Cloud::Functions::V2::EventTrigger] + # An Eventarc trigger managed by Google Cloud Functions that fires events in + # response to a condition in another service. + # @!attribute [r] state + # @return [::Google::Cloud::Functions::V2::Function::State] + # Output only. State of the function. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The last update timestamp of a Cloud Function. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Labels associated with this Cloud Function. + # @!attribute [r] state_messages + # @return [::Array<::Google::Cloud::Functions::V2::StateMessage>] + # Output only. State Messages for this Cloud Function. + # @!attribute [rw] environment + # @return [::Google::Cloud::Functions::V2::Environment] + # Describe whether the function is 1st Gen or 2nd Gen. + # @!attribute [r] url + # @return [::String] + # Output only. The deployed url for the function. + # @!attribute [rw] kms_key_name + # @return [::String] + # Resource name of a KMS crypto key (managed by the user) used to + # encrypt/decrypt function resources. + # + # It must match the pattern + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. Reserved for future use. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The create timestamp of a Cloud Function. This is only + # applicable to 2nd Gen functions. + class Function + 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 + + # Describes the current state of the function. + module State + # Not specified. Invalid state. + STATE_UNSPECIFIED = 0 + + # Function has been successfully deployed and is serving. + ACTIVE = 1 + + # Function deployment failed and the function is not serving. + FAILED = 2 + + # Function is being created or updated. + DEPLOYING = 3 + + # Function is being deleted. + DELETING = 4 + + # Function deployment failed and the function serving state is undefined. + # The function should be updated or deleted to move it out of this state. + UNKNOWN = 5 + end + end + + # Informational messages about the state of the Cloud Function or Operation. + # @!attribute [rw] severity + # @return [::Google::Cloud::Functions::V2::StateMessage::Severity] + # Severity of the state message. + # @!attribute [rw] type + # @return [::String] + # One-word CamelCase type of the state message. + # @!attribute [rw] message + # @return [::String] + # The message. + class StateMessage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Severity of the state message. + module Severity + # Not specified. Invalid severity. + SEVERITY_UNSPECIFIED = 0 + + # ERROR-level severity. + ERROR = 1 + + # WARNING-level severity. + WARNING = 2 + + # INFO-level severity. + INFO = 3 + end + end + + # Location of the source in an archive file in Google Cloud Storage. + # @!attribute [rw] bucket + # @return [::String] + # Google Cloud Storage bucket containing the source (see + # [Bucket Name + # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). + # @!attribute [rw] object + # @return [::String] + # Google Cloud Storage object containing the source. + # + # This object must be a gzipped archive file (`.tar.gz`) containing source to + # build. + # @!attribute [rw] generation + # @return [::Integer] + # Google Cloud Storage generation for the object. If the generation is + # omitted, the latest generation will be used. + # @!attribute [rw] source_upload_url + # @return [::String] + # When the specified storage bucket is a 1st gen function uploard url bucket, + # this field should be set as the generated upload url for 1st gen + # deployment. + class StorageSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Location of the source in a Google Cloud Source Repository. + # @!attribute [rw] branch_name + # @return [::String] + # Regex matching branches to build. + # + # The syntax of the regular expressions accepted is the syntax accepted by + # RE2 and described at https://github.com/google/re2/wiki/Syntax + # + # Note: The following fields are mutually exclusive: `branch_name`, `tag_name`, `commit_sha`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] tag_name + # @return [::String] + # Regex matching tags to build. + # + # The syntax of the regular expressions accepted is the syntax accepted by + # RE2 and described at https://github.com/google/re2/wiki/Syntax + # + # Note: The following fields are mutually exclusive: `tag_name`, `branch_name`, `commit_sha`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] commit_sha + # @return [::String] + # Explicit commit SHA to build. + # + # Note: The following fields are mutually exclusive: `commit_sha`, `branch_name`, `tag_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] project_id + # @return [::String] + # ID of the project that owns the Cloud Source Repository. If omitted, the + # project ID requesting the build is assumed. + # @!attribute [rw] repo_name + # @return [::String] + # Name of the Cloud Source Repository. + # @!attribute [rw] dir + # @return [::String] + # Directory, relative to the source root, in which to run the build. + # + # This must be a relative path. If a step's `dir` is specified and is an + # absolute path, this value is ignored for that step's execution. + # eg. helloworld (no leading slash allowed) + # @!attribute [rw] invert_regex + # @return [::Boolean] + # Only trigger a build if the revision regex does NOT match the revision + # regex. + class RepoSource + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The location of the function source code. + # @!attribute [rw] storage_source + # @return [::Google::Cloud::Functions::V2::StorageSource] + # If provided, get the source from this location in Google Cloud Storage. + # + # Note: The following fields are mutually exclusive: `storage_source`, `repo_source`, `git_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] repo_source + # @return [::Google::Cloud::Functions::V2::RepoSource] + # If provided, get the source from this location in a Cloud Source + # Repository. + # + # Note: The following fields are mutually exclusive: `repo_source`, `storage_source`, `git_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] git_uri + # @return [::String] + # If provided, get the source from GitHub repository. This option is valid + # only for GCF 1st Gen function. + # Example: https://github.com///blob// + # + # Note: The following fields are mutually exclusive: `git_uri`, `storage_source`, `repo_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class Source + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Provenance of the source. Ways to find the original source, or verify that + # some source was used for this build. + # @!attribute [rw] resolved_storage_source + # @return [::Google::Cloud::Functions::V2::StorageSource] + # A copy of the build's `source.storage_source`, if exists, with any + # generations resolved. + # @!attribute [rw] resolved_repo_source + # @return [::Google::Cloud::Functions::V2::RepoSource] + # A copy of the build's `source.repo_source`, if exists, with any + # revisions resolved. + # @!attribute [rw] git_uri + # @return [::String] + # A copy of the build's `source.git_uri`, if exists, with any commits + # resolved. + class SourceProvenance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Describes the Build step of the function that builds a container from the + # given source. + # @!attribute [rw] automatic_update_policy + # @return [::Google::Cloud::Functions::V2::AutomaticUpdatePolicy] + # Note: The following fields are mutually exclusive: `automatic_update_policy`, `on_deploy_update_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] on_deploy_update_policy + # @return [::Google::Cloud::Functions::V2::OnDeployUpdatePolicy] + # Note: The following fields are mutually exclusive: `on_deploy_update_policy`, `automatic_update_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] build + # @return [::String] + # Output only. The Cloud Build name of the latest successful deployment of + # the function. + # @!attribute [rw] runtime + # @return [::String] + # The runtime in which to run the function. Required when deploying a new + # function, optional when updating an existing function. For a complete + # list of possible choices, see the + # [`gcloud` command + # reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). + # @!attribute [rw] entry_point + # @return [::String] + # The name of the function (as defined in source code) that will be + # executed. Defaults to the resource name suffix, if not specified. For + # backward compatibility, if function with given name is not found, then the + # system will try to use function named "function". + # For Node.js this is name of a function exported by the module specified + # in `source_location`. + # @!attribute [rw] source + # @return [::Google::Cloud::Functions::V2::Source] + # The location of the function source code. + # @!attribute [r] source_provenance + # @return [::Google::Cloud::Functions::V2::SourceProvenance] + # Output only. A permanent fixed identifier for source. + # @!attribute [rw] worker_pool + # @return [::String] + # Name of the Cloud Build Custom Worker Pool that should be used to build the + # function. The format of this field is + # `projects/{project}/locations/{region}/workerPools/{workerPool}` where + # \\{project} and \\{region} are the project id and region respectively where the + # worker pool is defined and \\{workerPool} is the short name of the worker + # pool. + # + # If the project id is not the same as the function, then the Cloud + # Functions Service Agent + # (service-@gcf-admin-robot.iam.gserviceaccount.com) must be + # granted the role Cloud Build Custom Workers Builder + # (roles/cloudbuild.customworkers.builder) in the project. + # @!attribute [rw] environment_variables + # @return [::Google::Protobuf::Map{::String => ::String}] + # User-provided build-time environment variables for the function + # @!attribute [rw] docker_registry + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Cloud::Functions::V2::BuildConfig::DockerRegistry] + # Docker Registry to use for this deployment. This configuration is only + # applicable to 1st Gen functions, 2nd Gen functions can only use Artifact + # Registry. + # Deprecated: As of March 2025, `CONTAINER_REGISTRY` option is no longer + # available in response to Container Registry's deprecation: + # https://cloud.google.com/artifact-registry/docs/transition/transition-from-gcr + # Please use Artifact Registry instead, which is the default choice. + # + # If unspecified, it defaults to `ARTIFACT_REGISTRY`. + # If `docker_repository` field is specified, this field should either be left + # unspecified or set to `ARTIFACT_REGISTRY`. + # @!attribute [rw] docker_repository + # @return [::String] + # Repository in Artifact Registry to which the function docker image will be + # pushed after it is built by Cloud Build. If specified by user, it is + # created and managed by user with a customer managed encryption key. + # Otherwise, GCF will create and use a repository named 'gcf-artifacts' + # for every deployed region. + # + # It must match the pattern + # `projects/{project}/locations/{location}/repositories/{repository}`. + # Repository format must be 'DOCKER'. + # @!attribute [rw] service_account + # @return [::String] + # Service account to be used for building the container. The format of this + # field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. + class BuildConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class EnvironmentVariablesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Docker Registry to use for storing function Docker images. + module DockerRegistry + # Unspecified. + DOCKER_REGISTRY_UNSPECIFIED = 0 + + # Docker images will be stored in multi-regional Container Registry + # repositories named `gcf`. + CONTAINER_REGISTRY = 1 + + # Docker images will be stored in regional Artifact Registry repositories. + # By default, GCF will create and use repositories named `gcf-artifacts` + # in every region in which a function is deployed. But the repository to + # use can also be specified by the user using the `docker_repository` + # field. + ARTIFACT_REGISTRY = 2 + end + end + + # Describes the Service being deployed. + # Currently Supported : Cloud Run (fully managed). + # @!attribute [r] service + # @return [::String] + # Output only. Name of the service associated with a Function. + # The format of this field is + # `projects/{project}/locations/{region}/services/{service}` + # @!attribute [rw] timeout_seconds + # @return [::Integer] + # The function execution timeout. Execution is considered failed and + # can be terminated if the function is not completed at the end of the + # timeout period. Defaults to 60 seconds. + # @!attribute [rw] available_memory + # @return [::String] + # The amount of memory available for a function. + # Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is + # supplied the value is interpreted as bytes. + # See + # https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go + # a full description. + # @!attribute [rw] available_cpu + # @return [::String] + # The number of CPUs used in a single container instance. + # Default value is calculated from available memory. + # Supports the same values as Cloud Run, see + # https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements + # Example: "1" indicates 1 vCPU + # @!attribute [rw] environment_variables + # @return [::Google::Protobuf::Map{::String => ::String}] + # Environment variables that shall be available during function execution. + # @!attribute [rw] max_instance_count + # @return [::Integer] + # The limit on the maximum number of function instances that may coexist at a + # given time. + # + # In some cases, such as rapid traffic surges, Cloud Functions may, for a + # short period of time, create more instances than the specified max + # instances limit. If your function cannot tolerate this temporary behavior, + # you may want to factor in a safety margin and set a lower max instances + # value than your function can tolerate. + # + # See the [Max + # Instances](https://cloud.google.com/functions/docs/max-instances) Guide for + # more details. + # @!attribute [rw] min_instance_count + # @return [::Integer] + # The limit on the minimum number of function instances that may coexist at a + # given time. + # + # Function instances are kept in idle state for a short period after they + # finished executing the request to reduce cold start time for subsequent + # requests. Setting a minimum instance count will ensure that the given + # number of instances are kept running in idle state always. This can help + # with cold start times when jump in incoming request count occurs after the + # idle instance would have been stopped in the default case. + # @!attribute [rw] vpc_connector + # @return [::String] + # The Serverless VPC Access connector that this cloud function can connect + # to. The format of this field is `projects/*/locations/*/connectors/*`. + # @!attribute [rw] vpc_connector_egress_settings + # @return [::Google::Cloud::Functions::V2::ServiceConfig::VpcConnectorEgressSettings] + # The egress settings for the connector, controlling what traffic is diverted + # through it. + # @!attribute [rw] ingress_settings + # @return [::Google::Cloud::Functions::V2::ServiceConfig::IngressSettings] + # The ingress settings for the function, controlling what traffic can reach + # it. + # @!attribute [r] uri + # @return [::String] + # Output only. URI of the Service deployed. + # @!attribute [rw] service_account_email + # @return [::String] + # The email of the service's service account. If empty, defaults to + # `{project_number}-compute@developer.gserviceaccount.com`. + # @!attribute [rw] all_traffic_on_latest_revision + # @return [::Boolean] + # Whether 100% of traffic is routed to the latest revision. + # On CreateFunction and UpdateFunction, when set to true, the revision being + # deployed will serve 100% of traffic, ignoring any traffic split settings, + # if any. On GetFunction, true will be returned if the latest revision is + # serving 100% of traffic. + # @!attribute [rw] secret_environment_variables + # @return [::Array<::Google::Cloud::Functions::V2::SecretEnvVar>] + # Secret environment variables configuration. + # @!attribute [rw] secret_volumes + # @return [::Array<::Google::Cloud::Functions::V2::SecretVolume>] + # Secret volumes configuration. + # @!attribute [r] revision + # @return [::String] + # Output only. The name of service revision. + # @!attribute [rw] max_instance_request_concurrency + # @return [::Integer] + # Sets the maximum number of concurrent requests that each instance + # can receive. Defaults to 1. + # @!attribute [rw] security_level + # @return [::Google::Cloud::Functions::V2::ServiceConfig::SecurityLevel] + # Security level configure whether the function only accepts https. + # This configuration is only applicable to 1st Gen functions with Http + # trigger. By default https is optional for 1st Gen functions; 2nd Gen + # functions are https ONLY. + # @!attribute [rw] binary_authorization_policy + # @return [::String] + # Optional. The binary authorization policy to be checked when deploying the + # Cloud Run service. + class ServiceConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class EnvironmentVariablesEntry + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Available egress settings. + # + # This controls what traffic is diverted through the VPC Access Connector + # resource. By default PRIVATE_RANGES_ONLY will be used. + module VpcConnectorEgressSettings + # Unspecified. + VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0 + + # Use the VPC Access Connector only for private IP space from RFC1918. + PRIVATE_RANGES_ONLY = 1 + + # Force the use of VPC Access Connector for all egress traffic from the + # function. + ALL_TRAFFIC = 2 + end + + # Available ingress settings. + # + # This controls what traffic can reach the function. + # + # If unspecified, ALLOW_ALL will be used. + module IngressSettings + # Unspecified. + INGRESS_SETTINGS_UNSPECIFIED = 0 + + # Allow HTTP traffic from public and private sources. + ALLOW_ALL = 1 + + # Allow HTTP traffic from only private VPC sources. + ALLOW_INTERNAL_ONLY = 2 + + # Allow HTTP traffic from private VPC sources and through GCLB. + ALLOW_INTERNAL_AND_GCLB = 3 + end + + # Available security level settings. + # + # This enforces security protocol on function URL. + # + # Security level is only configurable for 1st Gen functions, If unspecified, + # SECURE_OPTIONAL will be used. 2nd Gen functions are SECURE_ALWAYS ONLY. + module SecurityLevel + # Unspecified. + SECURITY_LEVEL_UNSPECIFIED = 0 + + # Requests for a URL that match this handler that do not use HTTPS are + # automatically redirected to the HTTPS URL with the same path. Query + # parameters are reserved for the redirect. + SECURE_ALWAYS = 1 + + # Both HTTP and HTTPS requests with URLs that match the handler succeed + # without redirects. The application can examine the request to determine + # which protocol was used and respond accordingly. + SECURE_OPTIONAL = 2 + end + end + + # Configuration for a secret environment variable. It has the information + # necessary to fetch the secret value from secret manager and expose it as an + # environment variable. + # @!attribute [rw] key + # @return [::String] + # Name of the environment variable. + # @!attribute [rw] project_id + # @return [::String] + # Project identifier (preferably project number but can also be the + # project ID) of the project that contains the secret. If not set, it is + # assumed that the secret is in the same project as the function. + # @!attribute [rw] secret + # @return [::String] + # Name of the secret in secret manager (not the full resource name). + # @!attribute [rw] version + # @return [::String] + # Version of the secret (version number or the string 'latest'). It is + # recommended to use a numeric version for secret environment variables as + # any updates to the secret value is not reflected until new instances + # start. + class SecretEnvVar + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a secret volume. It has the information necessary to fetch + # the secret value from secret manager and make it available as files mounted + # at the requested paths within the application container. + # @!attribute [rw] mount_path + # @return [::String] + # The path within the container to mount the secret volume. For example, + # setting the mount_path as `/etc/secrets` would mount the secret value files + # under the `/etc/secrets` directory. This directory will also be completely + # shadowed and unavailable to mount any other secrets. + # Recommended mount path: /etc/secrets + # @!attribute [rw] project_id + # @return [::String] + # Project identifier (preferably project number but can also be the project + # ID) of the project that contains the secret. If not set, it is + # assumed that the secret is in the same project as the function. + # @!attribute [rw] secret + # @return [::String] + # Name of the secret in secret manager (not the full resource name). + # @!attribute [rw] versions + # @return [::Array<::Google::Cloud::Functions::V2::SecretVolume::SecretVersion>] + # List of secret versions to mount for this secret. If empty, the `latest` + # version of the secret will be made available in a file named after the + # secret under the mount point. + class SecretVolume + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Configuration for a single version. + # @!attribute [rw] version + # @return [::String] + # Version of the secret (version number or the string 'latest'). It is + # preferable to use `latest` version with secret volumes as secret value + # changes are reflected immediately. + # @!attribute [rw] path + # @return [::String] + # Relative path of the file under the mount path where the secret value for + # this version will be fetched and made available. For example, setting the + # mount_path as '/etc/secrets' and path as `secret_foo` would mount the + # secret value file at `/etc/secrets/secret_foo`. + class SecretVersion + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Describes EventTrigger, used to request events to be sent from another + # service. + # @!attribute [r] trigger + # @return [::String] + # Output only. The resource name of the Eventarc trigger. The format of this + # field is `projects/{project}/locations/{region}/triggers/{trigger}`. + # @!attribute [rw] trigger_region + # @return [::String] + # The region that the trigger will be in. The trigger will only receive + # events originating in this region. It can be the same + # region as the function, a different region or multi-region, or the global + # region. If not provided, defaults to the same region as the function. + # @!attribute [rw] event_type + # @return [::String] + # Required. The type of event to observe. For example: + # `google.cloud.audit.log.v1.written` or + # `google.cloud.pubsub.topic.v1.messagePublished`. + # @!attribute [rw] event_filters + # @return [::Array<::Google::Cloud::Functions::V2::EventFilter>] + # Criteria used to filter events. + # @!attribute [rw] pubsub_topic + # @return [::String] + # Optional. The name of a Pub/Sub topic in the same project that will be used + # as the transport topic for the event delivery. Format: + # `projects/{project}/topics/{topic}`. + # + # This is only valid for events of type + # `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here + # will not be deleted at function deletion. + # @!attribute [rw] service_account_email + # @return [::String] + # Optional. The email of the trigger's service account. The service account + # must have permission to invoke Cloud Run services, the permission is + # `run.routes.invoke`. + # If empty, defaults to the Compute Engine default service account: + # `{project_number}-compute@developer.gserviceaccount.com`. + # @!attribute [rw] retry_policy + # @return [::Google::Cloud::Functions::V2::EventTrigger::RetryPolicy] + # Optional. If unset, then defaults to ignoring failures (i.e. not retrying + # them). + # @!attribute [rw] channel + # @return [::String] + # Optional. The name of the channel associated with the trigger in + # `projects/{project}/locations/{location}/channels/{channel}` format. + # You must provide a channel to receive events from Eventarc SaaS partners. + # @!attribute [rw] service + # @return [::String] + # Optional. The hostname of the service that 1st Gen function should be + # observed. + # + # If no string is provided, the default service implementing the API will + # be used. For example, `storage.googleapis.com` is the default for all + # event types in the `google.storage` namespace. + # + # The field is only applicable to 1st Gen functions. + class EventTrigger + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes the retry policy in case of function's execution failure. + # Retried execution is charged as any other execution. + module RetryPolicy + # Not specified. + RETRY_POLICY_UNSPECIFIED = 0 + + # Do not retry. + RETRY_POLICY_DO_NOT_RETRY = 1 + + # Retry on any failure, retry up to 7 days with an exponential backoff + # (capped at 10 seconds). + RETRY_POLICY_RETRY = 2 + end + end + + # Filters events based on exact matches on the CloudEvents attributes. + # @!attribute [rw] attribute + # @return [::String] + # Required. The name of a CloudEvents attribute. + # @!attribute [rw] value + # @return [::String] + # Required. The value for the attribute. + # @!attribute [rw] operator + # @return [::String] + # Optional. The operator used for matching the events with the value of the + # filter. If not specified, only events that have an exact key-value pair + # specified in the filter are matched. The only allowed value is + # `match-path-pattern`. + class EventFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `GetFunction` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the function which details should be obtained. + # @!attribute [rw] revision + # @return [::String] + # Optional. The optional version of the 1st gen function whose details should + # be obtained. The version of a 1st gen function is an integer that starts + # from 1 and gets incremented on redeployments. GCF may keep historical + # configs for old versions of 1st gen function. This field can be specified + # to fetch the historical configs. This field is valid only for GCF 1st gen + # function. + class GetFunctionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListFunctions` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the function should be + # listed, specified in the format `projects/*/locations/*` If you want to + # list functions in all locations, use "-" in place of a location. When + # listing functions in all locations, if one or more location(s) are + # unreachable, the response will contain functions from all reachable + # locations along with the names of any unreachable locations. + # @!attribute [rw] page_size + # @return [::Integer] + # Maximum number of functions to return per call. The largest allowed + # page_size is 1,000, if the page_size is omitted or specified as greater + # than 1,000 then it will be replaced as 1,000. The size of the list + # response can be less than specified when used with filters. + # @!attribute [rw] page_token + # @return [::String] + # The value returned by the last + # `ListFunctionsResponse`; indicates that + # this is a continuation of a prior `ListFunctions` call, and that the + # system should return the next page of data. + # @!attribute [rw] filter + # @return [::String] + # The filter for Functions that match the filter expression, + # following the syntax outlined in https://google.aip.dev/160. + # @!attribute [rw] order_by + # @return [::String] + # The sorting order of the resources returned. Value should be a comma + # separated list of fields. The default sorting order is ascending. + # See https://google.aip.dev/132#ordering. + class ListFunctionsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListFunctions` method. + # @!attribute [rw] functions + # @return [::Array<::Google::Cloud::Functions::V2::Function>] + # The functions that match the request. + # @!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 + # @return [::Array<::String>] + # Locations that could not be reached. The response does not include any + # functions from these locations. + class ListFunctionsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `CreateFunction` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location in which the function should be created, + # specified in the format `projects/*/locations/*` + # @!attribute [rw] function + # @return [::Google::Cloud::Functions::V2::Function] + # Required. Function to be created. + # @!attribute [rw] function_id + # @return [::String] + # The ID to use for the function, which will become the final component of + # the function's resource name. + # + # This value should be 4-63 characters, and valid characters + # are /[a-z][0-9]-/. + class CreateFunctionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `UpdateFunction` method. + # @!attribute [rw] function + # @return [::Google::Cloud::Functions::V2::Function] + # Required. New version of the function. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # The list of fields to be updated. + # If no field mask is provided, all fields will be updated. + class UpdateFunctionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `DeleteFunction` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the function which should be deleted. + class DeleteFunctionRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of `GenerateSourceUploadUrl` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location in which the Google Cloud Storage signed + # URL should be generated, specified in the format `projects/*/locations/*`. + # @!attribute [rw] kms_key_name + # @return [::String] + # Resource name of a KMS crypto key (managed by the user) used to + # encrypt/decrypt function source code objects in intermediate Cloud Storage + # buckets. When you generate an upload url and upload your source code, it + # gets copied to an intermediate Cloud Storage bucket. The source code is + # then copied to a versioned directory in the sources bucket in the consumer + # project during the function deployment. + # + # It must match the pattern + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. + # + # The Google Cloud Functions service account + # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be + # granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter + # (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the + # Key/KeyRing/Project/Organization (least access preferred). + # @!attribute [rw] environment + # @return [::Google::Cloud::Functions::V2::Environment] + # The function environment the generated upload url will be used for. + # The upload url for 2nd Gen functions can also be used for 1st gen + # functions, but not vice versa. If not specified, 2nd generation-style + # upload URLs are generated. + class GenerateUploadUrlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of `GenerateSourceUploadUrl` method. + # @!attribute [rw] upload_url + # @return [::String] + # The generated Google Cloud Storage signed URL that should be used for a + # function source code upload. The uploaded file should be a zip archive + # which contains a function. + # @!attribute [rw] storage_source + # @return [::Google::Cloud::Functions::V2::StorageSource] + # The location of the source code in the upload bucket. + # + # Once the archive is uploaded using the `upload_url` use this field to + # set the `function.build_config.source.storage_source` + # during CreateFunction and UpdateFunction. + # + # Generation defaults to 0, as Cloud Storage provides a new generation only + # upon uploading a new object or version of an object. + class GenerateUploadUrlResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request of `GenerateDownloadUrl` method. + # @!attribute [rw] name + # @return [::String] + # Required. The name of function for which source code Google Cloud Storage + # signed URL should be generated. + class GenerateDownloadUrlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response of `GenerateDownloadUrl` method. + # @!attribute [rw] download_url + # @return [::String] + # The generated Google Cloud Storage signed URL that should be used for + # function source code download. + class GenerateDownloadUrlResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request for the `ListRuntimes` method. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location from which the runtimes should be + # listed, specified in the format `projects/*/locations/*` + # @!attribute [rw] filter + # @return [::String] + # The filter for Runtimes that match the filter expression, + # following the syntax outlined in https://google.aip.dev/160. + class ListRuntimesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response for the `ListRuntimes` method. + # @!attribute [rw] runtimes + # @return [::Array<::Google::Cloud::Functions::V2::ListRuntimesResponse::Runtime>] + # The runtimes that match the request. + class ListRuntimesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Describes a runtime and any special information (e.g., deprecation status) + # related to it. + # @!attribute [rw] name + # @return [::String] + # The name of the runtime, e.g., 'go113', 'nodejs12', etc. + # @!attribute [rw] display_name + # @return [::String] + # The user facing name, eg 'Go 1.13', 'Node.js 12', etc. + # @!attribute [rw] stage + # @return [::Google::Cloud::Functions::V2::ListRuntimesResponse::RuntimeStage] + # The stage of life this runtime is in, e.g., BETA, GA, etc. + # @!attribute [rw] warnings + # @return [::Array<::String>] + # Warning messages, e.g., a deprecation warning. + # @!attribute [rw] environment + # @return [::Google::Cloud::Functions::V2::Environment] + # The environment for the runtime. + # @!attribute [rw] deprecation_date + # @return [::Google::Type::Date] + # Deprecation date for the runtime. + # @!attribute [rw] decommission_date + # @return [::Google::Type::Date] + # Decommission date for the runtime. + class Runtime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # The various stages that a runtime can be in. + module RuntimeStage + # Not specified. + RUNTIME_STAGE_UNSPECIFIED = 0 + + # The runtime is in development. + DEVELOPMENT = 1 + + # The runtime is in the Alpha stage. + ALPHA = 2 + + # The runtime is in the Beta stage. + BETA = 3 + + # The runtime is generally available. + GA = 4 + + # The runtime is deprecated. + DEPRECATED = 5 + + # The runtime is no longer supported. + DECOMMISSIONED = 6 + end + end + + # Security patches are applied automatically to the runtime without requiring + # the function to be redeployed. + class AutomaticUpdatePolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Security patches are only applied when a function is redeployed. + # @!attribute [r] runtime_version + # @return [::String] + # Output only. contains the runtime version which was used during latest + # function deployment. + class OnDeployUpdatePolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the metadata of the long-running operation. + # @!attribute [rw] create_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation was created. + # @!attribute [rw] end_time + # @return [::Google::Protobuf::Timestamp] + # The time the operation finished running. + # @!attribute [rw] target + # @return [::String] + # Server-defined resource path for the target of the operation. + # @!attribute [rw] verb + # @return [::String] + # Name of the verb executed by the operation. + # @!attribute [rw] status_detail + # @return [::String] + # Human-readable status of the operation, if any. + # @!attribute [rw] cancel_requested + # @return [::Boolean] + # Identifies whether the user has requested cancellation + # of the operation. Operations that have successfully been cancelled + # have + # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} + # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, + # corresponding to `Code.CANCELLED`. + # @!attribute [rw] api_version + # @return [::String] + # API version used to start the operation. + # @!attribute [rw] request_resource + # @return [::Google::Protobuf::Any] + # The original request that started the operation. + # @!attribute [rw] stages + # @return [::Array<::Google::Cloud::Functions::V2::Stage>] + # Mechanism for reporting in-progress stages + # @!attribute [rw] source_token + # @return [::String] + # An identifier for Firebase function sources. Disclaimer: This field is only + # supported for Firebase function deployments. + # @!attribute [rw] build_name + # @return [::String] + # The build name of the function for create and update operations. + # @!attribute [rw] operation_type + # @return [::Google::Cloud::Functions::V2::OperationType] + # The operation type. + class OperationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Extra GCF specific location information. + # @!attribute [rw] environments + # @return [::Array<::Google::Cloud::Functions::V2::Environment>] + # The Cloud Function environments this location supports. + class LocationMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Each Stage of the deployment process + # @!attribute [rw] name + # @return [::Google::Cloud::Functions::V2::Stage::Name] + # Name of the Stage. This will be unique for each Stage. + # @!attribute [rw] message + # @return [::String] + # Message describing the Stage + # @!attribute [rw] state + # @return [::Google::Cloud::Functions::V2::Stage::State] + # Current state of the Stage + # @!attribute [rw] resource + # @return [::String] + # Resource of the Stage + # @!attribute [rw] resource_uri + # @return [::String] + # Link to the current Stage resource + # @!attribute [rw] state_messages + # @return [::Array<::Google::Cloud::Functions::V2::StateMessage>] + # State messages from the current Stage. + class Stage + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible names for a Stage + module Name + # Not specified. Invalid name. + NAME_UNSPECIFIED = 0 + + # Artifact Registry Stage + ARTIFACT_REGISTRY = 1 + + # Build Stage + BUILD = 2 + + # Service Stage + SERVICE = 3 + + # Trigger Stage + TRIGGER = 4 + + # Service Rollback Stage + SERVICE_ROLLBACK = 5 + + # Trigger Rollback Stage + TRIGGER_ROLLBACK = 6 + end + + # Possible states for a Stage + module State + # Not specified. Invalid state. + STATE_UNSPECIFIED = 0 + + # Stage has not started. + NOT_STARTED = 1 + + # Stage is in progress. + IN_PROGRESS = 2 + + # Stage has completed. + COMPLETE = 3 + end + end + + # The type of the long running operation. + module OperationType + # Unspecified + OPERATIONTYPE_UNSPECIFIED = 0 + + # CreateFunction + CREATE_FUNCTION = 1 + + # UpdateFunction + UPDATE_FUNCTION = 2 + + # DeleteFunction + DELETE_FUNCTION = 3 + end + + # The environment the function is hosted on. + module Environment + # Unspecified + ENVIRONMENT_UNSPECIFIED = 0 + + # Gen 1 + GEN_1 = 1 + + # Gen 2 + GEN_2 = 2 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..1d0a9780457f --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/type/date.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! + + +module Google + module Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-functions-v2/snippets/Gemfile new file mode 100644 index 000000000000..c3b60f34cf1c --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/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-functions-v2", path: "../" +else + gem "google-cloud-functions-v2" +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-functions-v2/snippets/function_service/create_function.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/create_function.rb new file mode 100644 index 000000000000..0b659131ef3c --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/create_function.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 cloudfunctions_v2_generated_FunctionService_CreateFunction_sync] +require "google/cloud/functions/v2" + +## +# Snippet for the create_function call in the FunctionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V2::FunctionService::Client#create_function. +# +def create_function + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V2::FunctionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V2::CreateFunctionRequest.new + + # Call the create_function method. + result = client.create_function request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 cloudfunctions_v2_generated_FunctionService_CreateFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/delete_function.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/delete_function.rb new file mode 100644 index 000000000000..dee9f5f5a274 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/delete_function.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 cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync] +require "google/cloud/functions/v2" + +## +# Snippet for the delete_function call in the FunctionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V2::FunctionService::Client#delete_function. +# +def delete_function + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V2::FunctionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V2::DeleteFunctionRequest.new + + # Call the delete_function method. + result = client.delete_function request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_download_url.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_download_url.rb new file mode 100644 index 000000000000..54466b888938 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_download_url.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 cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync] +require "google/cloud/functions/v2" + +## +# Snippet for the generate_download_url call in the FunctionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V2::FunctionService::Client#generate_download_url. +# +def generate_download_url + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V2::FunctionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.new + + # Call the generate_download_url method. + result = client.generate_download_url request + + # The returned object is of type Google::Cloud::Functions::V2::GenerateDownloadUrlResponse. + p result +end +# [END cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_upload_url.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_upload_url.rb new file mode 100644 index 000000000000..fa4a85c218d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_upload_url.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 cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync] +require "google/cloud/functions/v2" + +## +# Snippet for the generate_upload_url call in the FunctionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V2::FunctionService::Client#generate_upload_url. +# +def generate_upload_url + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V2::FunctionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new + + # Call the generate_upload_url method. + result = client.generate_upload_url request + + # The returned object is of type Google::Cloud::Functions::V2::GenerateUploadUrlResponse. + p result +end +# [END cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/get_function.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/get_function.rb new file mode 100644 index 000000000000..6a4197de8942 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/get_function.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 cloudfunctions_v2_generated_FunctionService_GetFunction_sync] +require "google/cloud/functions/v2" + +## +# Snippet for the get_function call in the FunctionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V2::FunctionService::Client#get_function. +# +def get_function + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V2::FunctionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V2::GetFunctionRequest.new + + # Call the get_function method. + result = client.get_function request + + # The returned object is of type Google::Cloud::Functions::V2::Function. + p result +end +# [END cloudfunctions_v2_generated_FunctionService_GetFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_functions.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_functions.rb new file mode 100644 index 000000000000..7b1887fbfe3b --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_functions.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 cloudfunctions_v2_generated_FunctionService_ListFunctions_sync] +require "google/cloud/functions/v2" + +## +# Snippet for the list_functions call in the FunctionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V2::FunctionService::Client#list_functions. +# +def list_functions + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V2::FunctionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V2::ListFunctionsRequest.new + + # Call the list_functions method. + result = client.list_functions request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::Functions::V2::Function. + p item + end +end +# [END cloudfunctions_v2_generated_FunctionService_ListFunctions_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_runtimes.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_runtimes.rb new file mode 100644 index 000000000000..1248a80fe944 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_runtimes.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 cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync] +require "google/cloud/functions/v2" + +## +# Snippet for the list_runtimes call in the FunctionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V2::FunctionService::Client#list_runtimes. +# +def list_runtimes + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V2::FunctionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V2::ListRuntimesRequest.new + + # Call the list_runtimes method. + result = client.list_runtimes request + + # The returned object is of type Google::Cloud::Functions::V2::ListRuntimesResponse. + p result +end +# [END cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/update_function.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/update_function.rb new file mode 100644 index 000000000000..7f4c66738c0b --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/update_function.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 cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync] +require "google/cloud/functions/v2" + +## +# Snippet for the update_function call in the FunctionService service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::Functions::V2::FunctionService::Client#update_function. +# +def update_function + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::Functions::V2::FunctionService::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::Functions::V2::UpdateFunctionRequest.new + + # Call the update_function method. + result = client.update_function request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/snippet_metadata_google.cloud.functions.v2.json b/owl-bot-staging/google-cloud-functions-v2/snippets/snippet_metadata_google.cloud.functions.v2.json new file mode 100644 index 000000000000..2ca8085df932 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/snippets/snippet_metadata_google.cloud.functions.v2.json @@ -0,0 +1,335 @@ +{ + "client_library": { + "name": "google-cloud-functions-v2", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.functions.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "region_tag": "cloudfunctions_v2_generated_FunctionService_GetFunction_sync", + "title": "Snippet for the get_function call in the FunctionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#get_function.", + "file": "function_service/get_function.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_function", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#get_function", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V2::GetFunctionRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Functions::V2::Function", + "client": { + "short_name": "FunctionService::Client", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" + }, + "method": { + "short_name": "GetFunction", + "full_name": "google.cloud.functions.v2.FunctionService.GetFunction", + "service": { + "short_name": "FunctionService", + "full_name": "google.cloud.functions.v2.FunctionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v2_generated_FunctionService_ListFunctions_sync", + "title": "Snippet for the list_functions call in the FunctionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#list_functions.", + "file": "function_service/list_functions.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_functions", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#list_functions", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V2::ListFunctionsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Functions::V2::ListFunctionsResponse", + "client": { + "short_name": "FunctionService::Client", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" + }, + "method": { + "short_name": "ListFunctions", + "full_name": "google.cloud.functions.v2.FunctionService.ListFunctions", + "service": { + "short_name": "FunctionService", + "full_name": "google.cloud.functions.v2.FunctionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v2_generated_FunctionService_CreateFunction_sync", + "title": "Snippet for the create_function call in the FunctionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#create_function.", + "file": "function_service/create_function.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_function", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#create_function", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V2::CreateFunctionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FunctionService::Client", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" + }, + "method": { + "short_name": "CreateFunction", + "full_name": "google.cloud.functions.v2.FunctionService.CreateFunction", + "service": { + "short_name": "FunctionService", + "full_name": "google.cloud.functions.v2.FunctionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync", + "title": "Snippet for the update_function call in the FunctionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#update_function.", + "file": "function_service/update_function.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_function", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#update_function", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V2::UpdateFunctionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FunctionService::Client", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" + }, + "method": { + "short_name": "UpdateFunction", + "full_name": "google.cloud.functions.v2.FunctionService.UpdateFunction", + "service": { + "short_name": "FunctionService", + "full_name": "google.cloud.functions.v2.FunctionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync", + "title": "Snippet for the delete_function call in the FunctionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#delete_function.", + "file": "function_service/delete_function.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_function", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#delete_function", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V2::DeleteFunctionRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "FunctionService::Client", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" + }, + "method": { + "short_name": "DeleteFunction", + "full_name": "google.cloud.functions.v2.FunctionService.DeleteFunction", + "service": { + "short_name": "FunctionService", + "full_name": "google.cloud.functions.v2.FunctionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync", + "title": "Snippet for the generate_upload_url call in the FunctionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#generate_upload_url.", + "file": "function_service/generate_upload_url.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_upload_url", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#generate_upload_url", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V2::GenerateUploadUrlRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Functions::V2::GenerateUploadUrlResponse", + "client": { + "short_name": "FunctionService::Client", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" + }, + "method": { + "short_name": "GenerateUploadUrl", + "full_name": "google.cloud.functions.v2.FunctionService.GenerateUploadUrl", + "service": { + "short_name": "FunctionService", + "full_name": "google.cloud.functions.v2.FunctionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync", + "title": "Snippet for the generate_download_url call in the FunctionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#generate_download_url.", + "file": "function_service/generate_download_url.rb", + "language": "RUBY", + "client_method": { + "short_name": "generate_download_url", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#generate_download_url", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse", + "client": { + "short_name": "FunctionService::Client", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" + }, + "method": { + "short_name": "GenerateDownloadUrl", + "full_name": "google.cloud.functions.v2.FunctionService.GenerateDownloadUrl", + "service": { + "short_name": "FunctionService", + "full_name": "google.cloud.functions.v2.FunctionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync", + "title": "Snippet for the list_runtimes call in the FunctionService service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#list_runtimes.", + "file": "function_service/list_runtimes.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_runtimes", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#list_runtimes", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::Functions::V2::ListRuntimesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::Functions::V2::ListRuntimesResponse", + "client": { + "short_name": "FunctionService::Client", + "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" + }, + "method": { + "short_name": "ListRuntimes", + "full_name": "google.cloud.functions.v2.FunctionService.ListRuntimes", + "service": { + "short_name": "FunctionService", + "full_name": "google.cloud.functions.v2.FunctionService" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_operations_test.rb b/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_operations_test.rb new file mode 100644 index 000000000000..8744af29c25d --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_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/functions/v2/functions_pb" +require "google/cloud/functions/v2/functions_services_pb" +require "google/cloud/functions/v2/function_service" + +class ::Google::Cloud::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_paths_test.rb b/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_paths_test.rb new file mode 100644 index 000000000000..fa8d32402832 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_paths_test.rb @@ -0,0 +1,175 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions/v2/function_service" + +class ::Google::Cloud::Functions::V2::FunctionService::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_build_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.build_path project: "value0", location: "value1", build: "value2" + assert_equal "projects/value0/locations/value1/builds/value2", path + end + end + + def test_channel_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.channel_path project: "value0", location: "value1", channel: "value2" + assert_equal "projects/value0/locations/value1/channels/value2", path + end + end + + def test_connector_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.connector_path project: "value0", location: "value1", connector: "value2" + assert_equal "projects/value0/locations/value1/connectors/value2", path + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path + end + end + + def test_function_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.function_path project: "value0", location: "value1", function: "value2" + assert_equal "projects/value0/locations/value1/functions/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::Functions::V2::FunctionService::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_repository_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.repository_path project: "value0", location: "value1", repository: "value2" + assert_equal "projects/value0/locations/value1/repositories/value2", path + end + end + + def test_service_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.service_path project: "value0", location: "value1", service: "value2" + assert_equal "projects/value0/locations/value1/services/value2", path + end + end + + def test_topic_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.topic_path project: "value0", topic: "value1" + assert_equal "projects/value0/topics/value1", path + end + end + + def test_trigger_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.trigger_path project: "value0", location: "value1", trigger: "value2" + assert_equal "projects/value0/locations/value1/triggers/value2", path + end + end + + def test_worker_pool_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.worker_pool_path project: "value0", location: "value1", worker_pool: "value2" + assert_equal "projects/value0/locations/value1/workerPools/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_rest_test.rb b/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_rest_test.rb new file mode 100644 index 000000000000..1306f6057a18 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_rest_test.rb @@ -0,0 +1,542 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions/v2/functions_pb" +require "google/cloud/functions/v2/function_service/rest" + + +class ::Google::Cloud::Functions::V2::FunctionService::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_get_function + # Create test objects. + client_result = ::Google::Cloud::Functions::V2::Function.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + revision = "hello world" + + get_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_get_function_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_function({ name: name, revision: revision }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_function name: name, revision: revision do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_function ::Google::Cloud::Functions::V2::GetFunctionRequest.new(name: name, revision: revision) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_function({ name: name, revision: revision }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_function(::Google::Cloud::Functions::V2::GetFunctionRequest.new(name: name, revision: revision), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_function_client_stub.call_count + end + end + end + + def test_list_functions + # Create test objects. + client_result = ::Google::Cloud::Functions::V2::ListFunctionsResponse.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_functions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_list_functions_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_functions_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_functions({ parent: parent, page_size: 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_functions parent: parent, page_size: 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_functions ::Google::Cloud::Functions::V2::ListFunctionsRequest.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_functions({ 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_functions(::Google::Cloud::Functions::V2::ListFunctionsRequest.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_functions_client_stub.call_count + end + end + end + + def test_create_function + # 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" + function = {} + function_id = "hello world" + + create_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_create_function_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_function({ parent: parent, function: function, function_id: function_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_function parent: parent, function: function, function_id: function_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_function ::Google::Cloud::Functions::V2::CreateFunctionRequest.new(parent: parent, function: function, function_id: function_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_function({ parent: parent, function: function, function_id: function_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_function(::Google::Cloud::Functions::V2::CreateFunctionRequest.new(parent: parent, function: function, function_id: function_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_function_client_stub.call_count + end + end + end + + def test_update_function + # 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. + function = {} + update_mask = {} + + update_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_update_function_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_function({ function: function, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_function function: function, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_function ::Google::Cloud::Functions::V2::UpdateFunctionRequest.new(function: function, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_function({ function: function, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_function(::Google::Cloud::Functions::V2::UpdateFunctionRequest.new(function: function, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_function_client_stub.call_count + end + end + end + + def test_delete_function + # 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_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_delete_function_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_function({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_function name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_function ::Google::Cloud::Functions::V2::DeleteFunctionRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_function({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_function(::Google::Cloud::Functions::V2::DeleteFunctionRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_function_client_stub.call_count + end + end + end + + def test_generate_upload_url + # Create test objects. + client_result = ::Google::Cloud::Functions::V2::GenerateUploadUrlResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + kms_key_name = "hello world" + environment = :ENVIRONMENT_UNSPECIFIED + + generate_upload_url_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_generate_upload_url_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_upload_url_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name, environment: environment }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_upload_url parent: parent, kms_key_name: kms_key_name, environment: environment do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_upload_url ::Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name, environment: environment) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name, environment: environment }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_upload_url(::Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name, environment: environment), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_upload_url_client_stub.call_count + end + end + end + + def test_generate_download_url + # Create test objects. + client_result = ::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + generate_download_url_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_generate_download_url_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, generate_download_url_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.generate_download_url({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.generate_download_url name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.generate_download_url ::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.generate_download_url({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.generate_download_url(::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, generate_download_url_client_stub.call_count + end + end + end + + def test_list_runtimes + # Create test objects. + client_result = ::Google::Cloud::Functions::V2::ListRuntimesResponse.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" + + list_runtimes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_list_runtimes_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_runtimes_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_runtimes({ parent: parent, filter: filter }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_runtimes parent: parent, filter: filter do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_runtimes ::Google::Cloud::Functions::V2::ListRuntimesRequest.new(parent: parent, filter: filter) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_runtimes({ parent: parent, filter: filter }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_runtimes(::Google::Cloud::Functions::V2::ListRuntimesRequest.new(parent: parent, filter: filter), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_runtimes_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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_test.rb b/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_test.rb new file mode 100644 index 000000000000..35d3779d84f7 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_test.rb @@ -0,0 +1,624 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions/v2/functions_pb" +require "google/cloud/functions/v2/function_service" + +class ::Google::Cloud::Functions::V2::FunctionService::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_get_function + # Create GRPC objects. + grpc_response = ::Google::Cloud::Functions::V2::Function.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + revision = "hello world" + + get_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_function, name + assert_kind_of ::Google::Cloud::Functions::V2::GetFunctionRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["revision"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_function({ name: name, revision: revision }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_function name: name, revision: revision do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_function ::Google::Cloud::Functions::V2::GetFunctionRequest.new(name: name, revision: revision) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_function({ name: name, revision: revision }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_function(::Google::Cloud::Functions::V2::GetFunctionRequest.new(name: name, revision: revision), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_function_client_stub.call_rpc_count + end + end + + def test_list_functions + # Create GRPC objects. + grpc_response = ::Google::Cloud::Functions::V2::ListFunctionsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_functions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_functions, name + assert_kind_of ::Google::Cloud::Functions::V2::ListFunctionsRequest, 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_functions_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_functions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_functions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_functions ::Google::Cloud::Functions::V2::ListFunctionsRequest.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_functions({ 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_functions(::Google::Cloud::Functions::V2::ListFunctionsRequest.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_functions_client_stub.call_rpc_count + end + end + + def test_create_function + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + function = {} + function_id = "hello world" + + create_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_function, name + assert_kind_of ::Google::Cloud::Functions::V2::CreateFunctionRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Functions::V2::Function), request["function"] + assert_equal "hello world", request["function_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_function({ parent: parent, function: function, function_id: function_id }) do |response, 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_function parent: parent, function: function, function_id: function_id do |response, 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_function ::Google::Cloud::Functions::V2::CreateFunctionRequest.new(parent: parent, function: function, function_id: function_id) do |response, operation| + assert_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_function({ parent: parent, function: function, function_id: function_id }, grpc_options) do |response, operation| + assert_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_function(::Google::Cloud::Functions::V2::CreateFunctionRequest.new(parent: parent, function: function, function_id: function_id), grpc_options) do |response, operation| + assert_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_function_client_stub.call_rpc_count + end + end + + def test_update_function + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + function = {} + update_mask = {} + + update_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_function, name + assert_kind_of ::Google::Cloud::Functions::V2::UpdateFunctionRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Functions::V2::Function), request["function"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_function({ function: function, 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_function function: function, 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_function ::Google::Cloud::Functions::V2::UpdateFunctionRequest.new(function: function, 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_function({ function: function, 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_function(::Google::Cloud::Functions::V2::UpdateFunctionRequest.new(function: function, 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_function_client_stub.call_rpc_count + end + end + + def test_delete_function + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_function, name + assert_kind_of ::Google::Cloud::Functions::V2::DeleteFunctionRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_function_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_function({ 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_function 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_function ::Google::Cloud::Functions::V2::DeleteFunctionRequest.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_function({ 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_function(::Google::Cloud::Functions::V2::DeleteFunctionRequest.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_function_client_stub.call_rpc_count + end + end + + def test_generate_upload_url + # Create GRPC objects. + grpc_response = ::Google::Cloud::Functions::V2::GenerateUploadUrlResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + kms_key_name = "hello world" + environment = :ENVIRONMENT_UNSPECIFIED + + generate_upload_url_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_upload_url, name + assert_kind_of ::Google::Cloud::Functions::V2::GenerateUploadUrlRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["kms_key_name"] + assert_equal :ENVIRONMENT_UNSPECIFIED, request["environment"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_upload_url_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name, environment: environment }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_upload_url parent: parent, kms_key_name: kms_key_name, environment: environment do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_upload_url ::Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name, environment: environment) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name, environment: environment }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.generate_upload_url(::Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name, environment: environment), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, generate_upload_url_client_stub.call_rpc_count + end + end + + def test_generate_download_url + # Create GRPC objects. + grpc_response = ::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_download_url_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :generate_download_url, name + assert_kind_of ::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, generate_download_url_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.generate_download_url({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.generate_download_url name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.generate_download_url ::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.generate_download_url({ 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_download_url(::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.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_download_url_client_stub.call_rpc_count + end + end + + def test_list_runtimes + # Create GRPC objects. + grpc_response = ::Google::Cloud::Functions::V2::ListRuntimesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + + list_runtimes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_runtimes, name + assert_kind_of ::Google::Cloud::Functions::V2::ListRuntimesRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["filter"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_runtimes_client_stub do + # Create client + client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_runtimes({ parent: parent, filter: filter }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.list_runtimes parent: parent, filter: filter do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.list_runtimes ::Google::Cloud::Functions::V2::ListRuntimesRequest.new(parent: parent, filter: filter) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.list_runtimes({ parent: parent, filter: filter }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.list_runtimes(::Google::Cloud::Functions::V2::ListRuntimesRequest.new(parent: parent, filter: filter), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, list_runtimes_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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::Functions::V2::FunctionService::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::Functions::V2::FunctionService::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::Functions::V2::FunctionService::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-functions-v2/test/helper.rb b/owl-bot-staging/google-cloud-functions-v2/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions-v2/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-functions/.gitignore b/owl-bot-staging/google-cloud-functions/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/.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-functions/.repo-metadata.json b/owl-bot-staging/google-cloud-functions/.repo-metadata.json new file mode 100644 index 000000000000..f7844168eea8 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "cloudfunctions.googleapis.com", + "api_shortname": "cloudfunctions", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-functions/latest", + "distribution_name": "google-cloud-functions", + "is_cloud": true, + "language": "ruby", + "name": "cloudfunctions", + "name_pretty": "Cloud Functions API", + "product_documentation": "https://cloud.google.com/functions", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "The Cloud Functions API manages lightweight user-provided functions executed in response to events.", + "ruby-cloud-env-prefix": "FUNCTIONS", + "ruby-cloud-product-url": "https://cloud.google.com/functions", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-functions/.rubocop.yml b/owl-bot-staging/google-cloud-functions/.rubocop.yml new file mode 100644 index 000000000000..55e51b65f5ec --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-functions.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-functions.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-functions/.toys.rb b/owl-bot-staging/google-cloud-functions/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/.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-functions/.yardopts b/owl-bot-staging/google-cloud-functions/.yardopts new file mode 100644 index 000000000000..d0ffab7c0e49 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Cloud Functions API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-functions/AUTHENTICATION.md b/owl-bot-staging/google-cloud-functions/AUTHENTICATION.md new file mode 100644 index 000000000000..d50ab8b4ab4f --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-functions 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-functions 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/functions" + +client = Google::Cloud::Functions.function_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/functions" + +Google::Cloud::Functions.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::Functions.function_service +``` + +### 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-functions +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/functions" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::Functions.function_service +``` + +### 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-functions/CHANGELOG.md b/owl-bot-staging/google-cloud-functions/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-functions/Gemfile b/owl-bot-staging/google-cloud-functions/Gemfile new file mode 100644 index 000000000000..1ded85dfcf9b --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-functions-v2"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-functions.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-functions/LICENSE.md b/owl-bot-staging/google-cloud-functions/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/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-functions/README.md b/owl-bot-staging/google-cloud-functions/README.md new file mode 100644 index 000000000000..2395caf08576 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Cloud Functions API + +API Client library for the Cloud Functions API + +The Cloud Functions API manages lightweight user-provided functions executed in response to events. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-functions-v*`. +The gem `google-cloud-functions` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-functions/latest) +for this library, google-cloud-functions, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-functions-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v2/latest). + +See also the [Product Documentation](https://cloud.google.com/functions) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-functions +``` + +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/cloudfunctions.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/functions" + +client = Google::Cloud::Functions.function_service +request = ::Google::Cloud::Functions::V2::GetFunctionRequest.new # (request fields as keyword arguments...) +response = client.get_function request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-functions-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v2/latest). + +## 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-functions`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-functions-v2`. +_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-functions`. +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-functions-v2`. + +### 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-functions/Rakefile b/owl-bot-staging/google-cloud-functions/Rakefile new file mode 100644 index 000000000000..c25ffc04b080 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/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 = true +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-functions acceptance tests." +task :acceptance, :project, :keyfile do |t, args| + project = args[:project] + project ||= + ENV["FUNCTIONS_TEST_PROJECT"] || + ENV["GCLOUD_TEST_PROJECT"] + keyfile = args[:keyfile] + keyfile ||= + ENV["FUNCTIONS_TEST_KEYFILE"] || + ENV["GCLOUD_TEST_KEYFILE"] + if keyfile + keyfile = File.read keyfile + else + keyfile ||= + ENV["FUNCTIONS_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 FUNCTIONS_TEST_PROJECT=test123 FUNCTIONS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" + end + require "google/cloud/functions/v2/function_service/credentials" + ::Google::Cloud::Functions::V2::FunctionService::Credentials.env_vars.each do |path| + ENV[path] = nil + end + ENV["FUNCTIONS_PROJECT"] = project + ENV["FUNCTIONS_TEST_PROJECT"] = project + ENV["FUNCTIONS_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-functions 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-functions 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-functions 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-functions gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-functions" + header "google-cloud-functions rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-functions yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-functions 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-functions 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-functions 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-functions/google-cloud-functions.gemspec b/owl-bot-staging/google-cloud-functions/google-cloud-functions.gemspec new file mode 100644 index 000000000000..afc01799cd52 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/google-cloud-functions.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/functions/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-functions" + gem.version = Google::Cloud::Functions::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "The Cloud Functions API manages lightweight user-provided functions executed in response to events." + gem.summary = "API Client library for the Cloud Functions API" + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-functions-v2", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-functions/lib/google-cloud-functions.rb b/owl-bot-staging/google-cloud-functions/lib/google-cloud-functions.rb new file mode 100644 index 000000000000..776197e8d3f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/lib/google-cloud-functions.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/functions" unless defined? Google::Cloud::Functions::VERSION diff --git a/owl-bot-staging/google-cloud-functions/lib/google/cloud/functions.rb b/owl-bot-staging/google-cloud-functions/lib/google/cloud/functions.rb new file mode 100644 index 000000000000..c0c0823a130d --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/lib/google/cloud/functions.rb @@ -0,0 +1,161 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/functions/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :functions do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module Functions + ## + # Create a new client object for FunctionService. + # + # By default, this returns an instance of + # [Google::Cloud::Functions::V2::FunctionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v2/latest/Google-Cloud-Functions-V2-FunctionService-Client) + # for a gRPC client for version V2 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the FunctionService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the FunctionService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::Functions.function_service_available?}. + # + # ## About FunctionService + # + # Google Cloud Functions is used to deploy functions that are executed by + # Google in response to various events. Data connected with that event is + # passed to a function as the input data. + # + # A **function** is a resource which describes a function that should be + # executed and how it is triggered. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.function_service version: :v2, transport: :grpc, &block + require "google/cloud/functions/#{version.to_s.downcase}" + + package_name = Google::Cloud::Functions + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::Functions.const_get(package_name).const_get(:FunctionService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the FunctionService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::Functions.function_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the FunctionService service, + # or if the versioned client gem needs an update to support the FunctionService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v2`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.function_service_available? version: :v2, transport: :grpc + require "google/cloud/functions/#{version.to_s.downcase}" + package_name = Google::Cloud::Functions + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::Functions.const_get package_name + return false unless service_module.const_defined? :FunctionService + service_module = service_module.const_get :FunctionService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-functions library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # 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 [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.functions if block_given? + + ::Google::Cloud.configure.functions + end + end + end +end + +helper_path = ::File.join __dir__, "functions", "helpers.rb" +require "google/cloud/functions/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions/lib/google/cloud/functions/version.rb b/owl-bot-staging/google-cloud-functions/lib/google/cloud/functions/version.rb new file mode 100644 index 000000000000..79200a8142c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/lib/google/cloud/functions/version.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! + + +module Google + module Cloud + module Functions + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-functions/test/google/cloud/functions/client_test.rb b/owl-bot-staging/google-cloud-functions/test/google/cloud/functions/client_test.rb new file mode 100644 index 000000000000..ba0bb7a83579 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/test/google/cloud/functions/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 "google/cloud/functions" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::Functions::ClientConstructionMinitest < 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_function_service_grpc + skip unless Google::Cloud::Functions.function_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::Functions.function_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::Functions::V2::FunctionService::Client, client + end + end + + def test_function_service_rest + skip unless Google::Cloud::Functions.function_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::Functions.function_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::Functions::V2::FunctionService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-functions/test/google/cloud/functions/version_test.rb b/owl-bot-staging/google-cloud-functions/test/google/cloud/functions/version_test.rb new file mode 100644 index 000000000000..22fb0bae6a98 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/test/google/cloud/functions/version_test.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 "helper" +require "google/cloud/functions/version" + +class Google::Cloud::Functions::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::Functions::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-functions/test/helper.rb b/owl-bot-staging/google-cloud-functions/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-functions/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.gitignore b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.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-gdc_hardware_management-v1alpha/.repo-metadata.json b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.repo-metadata.json new file mode 100644 index 000000000000..d9135f143ae9 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "gdchardwaremanagement.googleapis.com", + "api_shortname": "gdchardwaremanagement", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management-v1alpha/latest", + "distribution_name": "google-cloud-gdc_hardware_management-v1alpha", + "is_cloud": true, + "language": "ruby", + "name": "gdchardwaremanagement", + "name_pretty": "GDC Hardware Management V1ALPHA API", + "product_documentation": "https://cloud.google.com/distributed-cloud/edge/latest/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-gdc_hardware_management-v1alpha is the official client library for the GDC Hardware Management V1ALPHA API. Note that google-cloud-gdc_hardware_management-v1alpha is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gdc_hardware_management instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/distributed-cloud/edge/latest/docs", + "ruby-cloud-service-override": "GdcHardwareManagement=GDCHardwareManagement", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.rubocop.yml b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.rubocop.yml new file mode 100644 index 000000000000..7c5bd6fa2fa0 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-gdc_hardware_management-v1alpha.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-gdc_hardware_management-v1alpha.rb" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.toys.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.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-gdc_hardware_management-v1alpha/.yardopts b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.yardopts new file mode 100644 index 000000000000..eda2091db73f --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="GDC Hardware Management V1ALPHA 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-gdc_hardware_management-v1alpha/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/AUTHENTICATION.md new file mode 100644 index 000000000000..870900569f1a --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha 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/gdc_hardware_management/v1alpha" + +client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/gdc_hardware_management/v1alpha" + +::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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-gdc_hardware_management-v1alpha +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/gdc_hardware_management/v1alpha" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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-gdc_hardware_management-v1alpha/CHANGELOG.md b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/Gemfile b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/LICENSE.md b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/README.md b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/README.md new file mode 100644 index 000000000000..ef5d1772230c --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the GDC Hardware Management V1ALPHA API + +API Client library for the GDC Hardware Management V1ALPHA API + +google-cloud-gdc_hardware_management-v1alpha is the official client library for the GDC Hardware Management V1ALPHA API. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the GDC Hardware Management V1ALPHA API. Most users should consider using +the main client gem, +[google-cloud-gdc_hardware_management](https://rubygems.org/gems/google-cloud-gdc_hardware_management). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-gdc_hardware_management-v1alpha +``` + +## 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/gdchardwaremanagement.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/gdc_hardware_management/v1alpha" + +client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new +request = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.new # (request fields as keyword arguments...) +response = client.list_orders request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management-v1alpha/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/distributed-cloud/edge/latest/docs) +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/gdc_hardware_management/v1alpha" +require "logger" + +client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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-gdc_hardware_management`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-gdc_hardware_management-v1alpha`. +_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-gdc_hardware_management`. +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-gdc_hardware_management-v1alpha`. + +### 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-gdc_hardware_management-v1alpha/Rakefile b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/Rakefile new file mode 100644 index 000000000000..dd6a7f239d3d --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha 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/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials" + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-gdc_hardware_management-v1alpha" + header "google-cloud-gdc_hardware_management-v1alpha rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-gdc_hardware_management-v1alpha yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha/gapic_metadata.json b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/gapic_metadata.json new file mode 100644 index 000000000000..87a29abf2b0e --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/gapic_metadata.json @@ -0,0 +1,203 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.gdchardwaremanagement.v1alpha", + "libraryPackage": "::Google::Cloud::GDCHardwareManagement::V1alpha", + "services": { + "GDCHardwareManagement": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client", + "rpcs": { + "ListOrders": { + "methods": [ + "list_orders" + ] + }, + "GetOrder": { + "methods": [ + "get_order" + ] + }, + "CreateOrder": { + "methods": [ + "create_order" + ] + }, + "UpdateOrder": { + "methods": [ + "update_order" + ] + }, + "DeleteOrder": { + "methods": [ + "delete_order" + ] + }, + "SubmitOrder": { + "methods": [ + "submit_order" + ] + }, + "CancelOrder": { + "methods": [ + "cancel_order" + ] + }, + "ListSites": { + "methods": [ + "list_sites" + ] + }, + "GetSite": { + "methods": [ + "get_site" + ] + }, + "CreateSite": { + "methods": [ + "create_site" + ] + }, + "UpdateSite": { + "methods": [ + "update_site" + ] + }, + "DeleteSite": { + "methods": [ + "delete_site" + ] + }, + "ListHardwareGroups": { + "methods": [ + "list_hardware_groups" + ] + }, + "GetHardwareGroup": { + "methods": [ + "get_hardware_group" + ] + }, + "CreateHardwareGroup": { + "methods": [ + "create_hardware_group" + ] + }, + "UpdateHardwareGroup": { + "methods": [ + "update_hardware_group" + ] + }, + "DeleteHardwareGroup": { + "methods": [ + "delete_hardware_group" + ] + }, + "ListHardware": { + "methods": [ + "list_hardware" + ] + }, + "GetHardware": { + "methods": [ + "get_hardware" + ] + }, + "CreateHardware": { + "methods": [ + "create_hardware" + ] + }, + "UpdateHardware": { + "methods": [ + "update_hardware" + ] + }, + "DeleteHardware": { + "methods": [ + "delete_hardware" + ] + }, + "ListComments": { + "methods": [ + "list_comments" + ] + }, + "GetComment": { + "methods": [ + "get_comment" + ] + }, + "CreateComment": { + "methods": [ + "create_comment" + ] + }, + "RecordActionOnComment": { + "methods": [ + "record_action_on_comment" + ] + }, + "ListChangeLogEntries": { + "methods": [ + "list_change_log_entries" + ] + }, + "GetChangeLogEntry": { + "methods": [ + "get_change_log_entry" + ] + }, + "ListSkus": { + "methods": [ + "list_skus" + ] + }, + "GetSku": { + "methods": [ + "get_sku" + ] + }, + "ListZones": { + "methods": [ + "list_zones" + ] + }, + "GetZone": { + "methods": [ + "get_zone" + ] + }, + "CreateZone": { + "methods": [ + "create_zone" + ] + }, + "UpdateZone": { + "methods": [ + "update_zone" + ] + }, + "DeleteZone": { + "methods": [ + "delete_zone" + ] + }, + "SignalZoneState": { + "methods": [ + "signal_zone_state" + ] + }, + "RequestOrderDateChange": { + "methods": [ + "request_order_date_change" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/google-cloud-gdc_hardware_management-v1alpha.gemspec b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/google-cloud-gdc_hardware_management-v1alpha.gemspec new file mode 100644 index 000000000000..fa8f96ea06dc --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/google-cloud-gdc_hardware_management-v1alpha.gemspec @@ -0,0 +1,29 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/gdc_hardware_management/v1alpha/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-gdc_hardware_management-v1alpha" + gem.version = Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-gdc_hardware_management-v1alpha is the official client library for the GDC Hardware Management V1ALPHA API. Note that google-cloud-gdc_hardware_management-v1alpha is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gdc_hardware_management instead. See the readme for more details." + gem.summary = "API Client library for the GDC Hardware Management V1ALPHA API" + 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.1" + + gem.add_dependency "gapic-common", "~> 1.2" + gem.add_dependency "google-cloud-errors", "~> 1.0" + gem.add_dependency "google-cloud-location", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google-cloud-gdc_hardware_management-v1alpha.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google-cloud-gdc_hardware_management-v1alpha.rb new file mode 100644 index 000000000000..d40020ca9852 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google-cloud-gdc_hardware_management-v1alpha.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/gdc_hardware_management/v1alpha" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha.rb new file mode 100644 index 000000000000..6db51170738a --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha.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/gdc_hardware_management/v1alpha/gdc_hardware_management" +require "google/cloud/gdc_hardware_management/v1alpha/version" + +module Google + module Cloud + module GDCHardwareManagement + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/gdc_hardware_management/v1alpha" + # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/gdc_hardware_management/v1alpha" + # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + module V1alpha + end + end + end +end + +helper_path = ::File.join __dir__, "v1alpha", "_helpers.rb" +require "google/cloud/gdc_hardware_management/v1alpha/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/bindings_override.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/bindings_override.rb new file mode 100644 index 000000000000..d13989b04895 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/bindings_override.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! + +require "gapic/rest" + +module Google + module Cloud + module GDCHardwareManagement + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/gdc_hardware_management/v1alpha/rest" + # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + module V1alpha + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "GDCHardwareManagement"] + 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: "/v1alpha/{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: "/v1alpha/{name}/locations", + matches: [ + ["name", %r{^projects/[^/]+/?$}, false] + ], + body: nil + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management.rb new file mode 100644 index 000000000000..954c647498da --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management.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/gdc_hardware_management/v1alpha/version" + +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials" +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/paths" +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/operations" +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client" +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest" + +module Google + module Cloud + module GDCHardwareManagement + module V1alpha + ## + # The GDC Hardware Management service. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management" + # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest" + # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + module GDCHardwareManagement + end + end + end + end +end + +helper_path = ::File.join __dir__, "gdc_hardware_management", "helpers.rb" +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb new file mode 100644 index 000000000000..aa86199e8d7b --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb @@ -0,0 +1,4499 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gdchardwaremanagement/v1alpha/service_pb" +require "google/cloud/location" + +module Google + module Cloud + module GDCHardwareManagement + module V1alpha + module GDCHardwareManagement + ## + # Client for the GDCHardwareManagement service. + # + # The GDC Hardware Management service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "gdchardwaremanagement.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :gdc_hardware_management_stub + + ## + # Configure the GDCHardwareManagement Client class. + # + # See {::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GDCHardwareManagement clients + # ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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", "GDCHardwareManagement", "V1alpha"] + 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.list_orders.timeout = 60.0 + default_config.rpcs.list_orders.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_order.timeout = 60.0 + default_config.rpcs.get_order.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_order.timeout = 60.0 + + default_config.rpcs.update_order.timeout = 60.0 + default_config.rpcs.update_order.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_order.timeout = 60.0 + default_config.rpcs.delete_order.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.submit_order.timeout = 60.0 + default_config.rpcs.submit_order.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.cancel_order.timeout = 60.0 + default_config.rpcs.cancel_order.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_sites.timeout = 60.0 + default_config.rpcs.list_sites.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_site.timeout = 60.0 + default_config.rpcs.get_site.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_site.timeout = 60.0 + + default_config.rpcs.update_site.timeout = 60.0 + default_config.rpcs.update_site.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_site.timeout = 60.0 + default_config.rpcs.delete_site.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_hardware_groups.timeout = 60.0 + default_config.rpcs.list_hardware_groups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_hardware_group.timeout = 60.0 + default_config.rpcs.get_hardware_group.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_hardware_group.timeout = 60.0 + + default_config.rpcs.update_hardware_group.timeout = 60.0 + default_config.rpcs.update_hardware_group.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_hardware_group.timeout = 60.0 + default_config.rpcs.delete_hardware_group.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_hardware.timeout = 60.0 + default_config.rpcs.list_hardware.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_hardware.timeout = 60.0 + default_config.rpcs.get_hardware.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_hardware.timeout = 60.0 + + default_config.rpcs.update_hardware.timeout = 60.0 + default_config.rpcs.update_hardware.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_hardware.timeout = 60.0 + default_config.rpcs.delete_hardware.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_comments.timeout = 60.0 + default_config.rpcs.list_comments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_comment.timeout = 60.0 + default_config.rpcs.get_comment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_comment.timeout = 60.0 + + default_config.rpcs.list_change_log_entries.timeout = 60.0 + default_config.rpcs.list_change_log_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_change_log_entry.timeout = 60.0 + default_config.rpcs.get_change_log_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_skus.timeout = 60.0 + default_config.rpcs.list_skus.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_sku.timeout = 60.0 + default_config.rpcs.get_sku.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + 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.create_zone.timeout = 60.0 + + default_config.rpcs.update_zone.timeout = 60.0 + default_config.rpcs.update_zone.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_zone.timeout = 60.0 + default_config.rpcs.delete_zone.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 GDCHardwareManagement 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 + @gdc_hardware_management_stub.universe_domain + end + + ## + # Create a new GDCHardwareManagement client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GDCHardwareManagement 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/gdchardwaremanagement/v1alpha/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 + + @gdc_hardware_management_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 + ) + + @gdc_hardware_management_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 = @gdc_hardware_management_stub.endpoint + config.universe_domain = @gdc_hardware_management_stub.universe_domain + config.logger = @gdc_hardware_management_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @gdc_hardware_management_stub.logger + end + + # Service calls + + ## + # Lists orders in a given project and location. + # + # @overload list_orders(request, options = nil) + # Pass arguments to `list_orders` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_orders(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_orders` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to list orders in. + # Format: `projects/{project}/locations/{location}` + # + # To list orders across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.new + # + # # Call the list_orders method. + # result = client.list_orders request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Order. + # p item + # end + # + def list_orders request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest + + # Converts hash and nil to 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_orders.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_orders.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_orders.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :list_orders, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_orders, 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 details of an order. + # + # @overload get_order(request, options = nil) + # Pass arguments to `get_order` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_order(name: nil) + # Pass arguments to `get_order` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new + # + # # Call the get_order method. + # result = client.get_order request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Order. + # p result + # + def get_order request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest + + # Converts hash and nil to 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_order.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_order.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_order.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :get_order, 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 new order in a given project and location. + # + # @overload create_order(request, options = nil) + # Pass arguments to `create_order` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_order(parent: nil, order_id: nil, order: nil, request_id: nil) + # Pass arguments to `create_order` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to create the order in. + # Format: `projects/{project}/locations/{location}` + # @param order_id [::String] + # Optional. ID used to uniquely identify the Order within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The order.name field in the request will be ignored. + # @param order [::Google::Cloud::GDCHardwareManagement::V1alpha::Order, ::Hash] + # Required. The order to create. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new + # + # # Call the create_order method. + # result = client.create_order request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_order request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest + + # Converts hash and nil to 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_order.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_order.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_order.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :create_order, 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 the parameters of an order. + # + # @overload update_order(request, options = nil) + # Pass arguments to `update_order` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_order(update_mask: nil, order: nil, request_id: nil) + # Pass arguments to `update_order` via keyword arguments. Note that at + # least one keyword argument is 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. A mask to specify the fields in the Order to overwrite with this + # update. The fields specified in the update_mask are relative to the order, + # not the full request. A field will be overwritten if it is in the mask. If + # you don't provide a mask then all fields will be overwritten. + # @param order [::Google::Cloud::GDCHardwareManagement::V1alpha::Order, ::Hash] + # Required. The order to update. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new + # + # # Call the update_order method. + # result = client.update_order request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_order request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest + + # Converts hash and nil to 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_order.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.order&.name + header_params["order.name"] = request.order.name + end + + request_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_order.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_order.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :update_order, 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 order. + # + # @overload delete_order(request, options = nil) + # Pass arguments to `delete_order` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_order(name: nil, request_id: nil, force: nil) + # Pass arguments to `delete_order` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 order. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @param force [::Boolean] + # Optional. An option to delete any nested resources in the Order, such as a + # HardwareGroup. If true, any nested resources for this Order will also be + # deleted. Otherwise, the request will only succeed if the Order has no + # nested 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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new + # + # # Call the delete_order method. + # result = client.delete_order request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_order request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest + + # Converts hash and nil to 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_order.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_order.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_order.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :delete_order, 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 + + ## + # Submits an order. + # + # @overload submit_order(request, options = nil) + # Pass arguments to `submit_order` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload submit_order(name: nil, request_id: nil, type: nil) + # Pass arguments to `submit_order` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 order. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @param type [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest::Type] + # Optional. Type of this request. If unset, the request type is assumed to be + # `INFO_PENDING`. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new + # + # # Call the submit_order method. + # result = client.submit_order request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def submit_order request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.submit_order.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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.submit_order.timeout, + metadata: metadata, + retry_policy: @config.rpcs.submit_order.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :submit_order, 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 + + ## + # Cancels an order. + # + # @overload cancel_order(request, options = nil) + # Pass arguments to `cancel_order` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_order(name: nil, request_id: nil) + # Pass arguments to `cancel_order` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 order. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new + # + # # Call the cancel_order method. + # result = client.cancel_order request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def cancel_order request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest + + # Converts hash and nil to 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_order.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_order.timeout, + metadata: metadata, + retry_policy: @config.rpcs.cancel_order.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :cancel_order, 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 sites in a given project and location. + # + # @overload list_sites(request, options = nil) + # Pass arguments to `list_sites` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_sites(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_sites` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to list sites in. + # Format: `projects/{project}/locations/{location}` + # + # To list sites across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.new + # + # # Call the list_sites method. + # result = client.list_sites request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Site. + # p item + # end + # + def list_sites request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest + + # Converts hash and nil to 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_sites.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_sites.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_sites.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :list_sites, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_sites, 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 details of a site. + # + # @overload get_site(request, options = nil) + # Pass arguments to `get_site` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_site(name: nil) + # Pass arguments to `get_site` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 site. + # Format: `projects/{project}/locations/{location}/sites/{site}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new + # + # # Call the get_site method. + # result = client.get_site request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Site. + # p result + # + def get_site request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest + + # Converts hash and nil to 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_site.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_site.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_site.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :get_site, 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 new site in a given project and location. + # + # @overload create_site(request, options = nil) + # Pass arguments to `create_site` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_site(parent: nil, site_id: nil, site: nil, request_id: nil) + # Pass arguments to `create_site` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to create the site in. + # Format: `projects/{project}/locations/{location}` + # @param site_id [::String] + # Optional. ID used to uniquely identify the Site within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The site.name field in the request will be ignored. + # @param site [::Google::Cloud::GDCHardwareManagement::V1alpha::Site, ::Hash] + # Required. The site to create. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new + # + # # Call the create_site method. + # result = client.create_site request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_site request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest + + # Converts hash and nil to 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_site.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_site.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_site.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :create_site, 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 the parameters of a site. + # + # @overload update_site(request, options = nil) + # Pass arguments to `update_site` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_site(update_mask: nil, site: nil, request_id: nil) + # Pass arguments to `update_site` via keyword arguments. Note that at + # least one keyword argument is 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. A mask to specify the fields in the Site to overwrite with this + # update. The fields specified in the update_mask are relative to the site, + # not the full request. A field will be overwritten if it is in the mask. If + # you don't provide a mask then all fields will be overwritten. + # @param site [::Google::Cloud::GDCHardwareManagement::V1alpha::Site, ::Hash] + # Required. The site to update. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new + # + # # Call the update_site method. + # result = client.update_site request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_site request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest + + # Converts hash and nil to 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_site.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.site&.name + header_params["site.name"] = request.site.name + end + + request_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_site.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_site.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :update_site, 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 site. + # + # @overload delete_site(request, options = nil) + # Pass arguments to `delete_site` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_site(name: nil, request_id: nil) + # Pass arguments to `delete_site` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 site. + # Format: `projects/{project}/locations/{location}/sites/{site}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new + # + # # Call the delete_site method. + # result = client.delete_site request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_site request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest + + # Converts hash and nil to 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_site.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_site.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_site.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :delete_site, 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 hardware groups in a given order. + # + # @overload list_hardware_groups(request, options = nil) + # Pass arguments to `list_hardware_groups` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_hardware_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_hardware_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 order to list hardware groups in. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.new + # + # # Call the list_hardware_groups method. + # result = client.list_hardware_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::GDCHardwareManagement::V1alpha::HardwareGroup. + # p item + # end + # + def list_hardware_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest + + # Converts hash and nil to 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_hardware_groups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_hardware_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :list_hardware_groups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware_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 details of a hardware group. + # + # @overload get_hardware_group(request, options = nil) + # Pass arguments to `get_hardware_group` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_hardware_group(name: nil) + # Pass arguments to `get_hardware_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 name of the hardware group. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new + # + # # Call the get_hardware_group method. + # result = client.get_hardware_group request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup. + # p result + # + def get_hardware_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest + + # Converts hash and nil to 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_hardware_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_hardware_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :get_hardware_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 a new hardware group in a given order. + # + # @overload create_hardware_group(request, options = nil) + # Pass arguments to `create_hardware_group` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_hardware_group(parent: nil, hardware_group_id: nil, hardware_group: nil, request_id: nil) + # Pass arguments to `create_hardware_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 order to create the hardware group in. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param hardware_group_id [::String] + # Optional. ID used to uniquely identify the HardwareGroup within its parent + # scope. This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The hardware_group.name field in the request will be ignored. + # @param hardware_group [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup, ::Hash] + # Required. The hardware group to create. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new + # + # # Call the create_hardware_group method. + # result = client.create_hardware_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_hardware_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest + + # Converts hash and nil to 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_hardware_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_hardware_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :create_hardware_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 the parameters of a hardware group. + # + # @overload update_hardware_group(request, options = nil) + # Pass arguments to `update_hardware_group` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_hardware_group(update_mask: nil, hardware_group: nil, request_id: nil) + # Pass arguments to `update_hardware_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A mask to specify the fields in the HardwareGroup to overwrite + # with this update. The fields specified in the update_mask are relative to + # the hardware group, not the full request. A field will be overwritten if it + # is in the mask. If you don't provide a mask then all fields will be + # overwritten. + # @param hardware_group [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup, ::Hash] + # Required. The hardware group to update. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new + # + # # Call the update_hardware_group method. + # result = client.update_hardware_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_hardware_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest + + # Converts hash and nil to 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.hardware_group&.name + header_params["hardware_group.name"] = request.hardware_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_hardware_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_hardware_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :update_hardware_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 a hardware group. + # + # @overload delete_hardware_group(request, options = nil) + # Pass arguments to `delete_hardware_group` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_hardware_group(name: nil, request_id: nil) + # Pass arguments to `delete_hardware_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 name of the hardware group. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new + # + # # Call the delete_hardware_group method. + # result = client.delete_hardware_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_hardware_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest + + # Converts hash and nil to 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_hardware_group.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_hardware_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :delete_hardware_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 hardware in a given project and location. + # + # @overload list_hardware(request, options = nil) + # Pass arguments to `list_hardware` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_hardware(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_hardware` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to list hardware in. + # Format: `projects/{project}/locations/{location}` + # + # To list hardware across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.new + # + # # Call the list_hardware method. + # result = client.list_hardware request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware. + # p item + # end + # + def list_hardware request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest + + # Converts hash and nil to 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_hardware.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_hardware.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_hardware.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :list_hardware, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware, 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 hardware details. + # + # @overload get_hardware(request, options = nil) + # Pass arguments to `get_hardware` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_hardware(name: nil) + # Pass arguments to `get_hardware` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 hardware. + # Format: `projects/{project}/locations/{location}/hardware/{hardware}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new + # + # # Call the get_hardware method. + # result = client.get_hardware request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Hardware. + # p result + # + def get_hardware request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest + + # Converts hash and nil to 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_hardware.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_hardware.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_hardware.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :get_hardware, 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 new hardware in a given project and location. + # + # @overload create_hardware(request, options = nil) + # Pass arguments to `create_hardware` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_hardware(parent: nil, hardware_id: nil, hardware: nil) + # Pass arguments to `create_hardware` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to create hardware in. + # Format: `projects/{project}/locations/{location}` + # @param hardware_id [::String] + # Optional. ID used to uniquely identify the Hardware within its parent + # scope. This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The hardware.name field in the request will be ignored. + # @param hardware [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware, ::Hash] + # Required. The resource 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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new + # + # # Call the create_hardware method. + # result = client.create_hardware request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_hardware request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest + + # Converts hash and nil to 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_hardware.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_hardware.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_hardware.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :create_hardware, 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 hardware parameters. + # + # @overload update_hardware(request, options = nil) + # Pass arguments to `update_hardware` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_hardware(update_mask: nil, hardware: nil, request_id: nil) + # Pass arguments to `update_hardware` via keyword arguments. Note that at + # least one keyword argument is 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. A mask to specify the fields in the Hardware to overwrite with + # this update. The fields specified in the update_mask are relative to the + # hardware, not the full request. A field will be overwritten if it is in the + # mask. If you don't provide a mask then all fields will be overwritten. + # @param hardware [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware, ::Hash] + # Required. The hardware to update. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new + # + # # Call the update_hardware method. + # result = client.update_hardware request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_hardware request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest + + # Converts hash and nil to 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_hardware.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.hardware&.name + header_params["hardware.name"] = request.hardware.name + end + + request_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_hardware.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_hardware.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :update_hardware, 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 hardware. + # + # @overload delete_hardware(request, options = nil) + # Pass arguments to `delete_hardware` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_hardware(name: nil, request_id: nil) + # Pass arguments to `delete_hardware` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 hardware. + # Format: `projects/{project}/locations/{location}/hardware/{hardware}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new + # + # # Call the delete_hardware method. + # result = client.delete_hardware request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_hardware request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest + + # Converts hash and nil to 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_hardware.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_hardware.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_hardware.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :delete_hardware, 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 the comments on an order. + # + # @overload list_comments(request, options = nil) + # Pass arguments to `list_comments` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_comments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_comments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The order to list comments on. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.new + # + # # Call the list_comments method. + # result = client.list_comments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment. + # p item + # end + # + def list_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest + + # Converts hash and nil to 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_comments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_comments.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :list_comments, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_comments, request, response, operation, options + yield response, operation if block_given? + throw :response, response + end + rescue ::GRPC::BadStatus => e + raise ::Google::Cloud::Error.from_error(e) + end + + ## + # Gets the content of a comment. + # + # @overload get_comment(request, options = nil) + # Pass arguments to `get_comment` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_comment(name: nil) + # Pass arguments to `get_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 comment. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new + # + # # Call the get_comment method. + # result = client.get_comment request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment. + # p result + # + def get_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest + + # Converts hash and nil to 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_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :get_comment, 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 new comment on an order. + # + # @overload create_comment(request, options = nil) + # Pass arguments to `create_comment` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_comment(parent: nil, comment_id: nil, comment: nil, request_id: nil) + # Pass arguments to `create_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The order to create the comment on. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param comment_id [::String] + # Optional. ID used to uniquely identify the Comment within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The comment.name field in the request will be ignored. + # @param comment [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment, ::Hash] + # Required. The comment to create. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new + # + # # Call the create_comment method. + # result = client.create_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest + + # Converts hash and nil to 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_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :create_comment, 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 + + ## + # Record Action on a Comment. If the Action specified in the request is READ, + # the viewed time in the comment is set to the time the request was received. + # If the comment is already marked as read, subsequent calls will be ignored. + # If the Action is UNREAD, the viewed time is cleared from the comment. + # + # @overload record_action_on_comment(request, options = nil) + # Pass arguments to `record_action_on_comment` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload record_action_on_comment(name: nil, action_type: nil) + # Pass arguments to `record_action_on_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 comment. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` + # @param action_type [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest::ActionType] + # Required. The action type of the recorded action. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new + # + # # Call the record_action_on_comment method. + # result = client.record_action_on_comment request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment. + # p result + # + def record_action_on_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.record_action_on_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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.record_action_on_comment.timeout, + metadata: metadata, + retry_policy: @config.rpcs.record_action_on_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :record_action_on_comment, 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 the changes made to an order. + # + # @overload list_change_log_entries(request, options = nil) + # Pass arguments to `list_change_log_entries` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_change_log_entries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_change_log_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 order to list change log entries for. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.new + # + # # Call the list_change_log_entries method. + # result = client.list_change_log_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::GDCHardwareManagement::V1alpha::ChangeLogEntry. + # p item + # end + # + def list_change_log_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest + + # Converts hash and nil to 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_change_log_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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_change_log_entries.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_change_log_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :list_change_log_entries, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_change_log_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 details of a change to an order. + # + # @overload get_change_log_entry(request, options = nil) + # Pass arguments to `get_change_log_entry` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_change_log_entry(name: nil) + # Pass arguments to `get_change_log_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 name of the change log entry. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new + # + # # Call the get_change_log_entry method. + # result = client.get_change_log_entry request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry. + # p result + # + def get_change_log_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest + + # Converts hash and nil to 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_change_log_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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_change_log_entry.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_change_log_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :get_change_log_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 SKUs for a given project and location. + # + # @overload list_skus(request, options = nil) + # Pass arguments to `list_skus` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_skus(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to list SKUs in. + # Format: `projects/{project}/locations/{location}` + # + # To list SKUs across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.new + # + # # Call the list_skus method. + # result = client.list_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku. + # p item + # end + # + def list_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest + + # Converts hash and nil to 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_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_skus.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :list_skus, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_skus, 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 details of an SKU. + # + # @overload get_sku(request, options = nil) + # Pass arguments to `get_sku` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_sku(name: nil) + # Pass arguments to `get_sku` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 SKU. + # Format: `projects/{project}/locations/{location}/skus/{sku}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new + # + # # Call the get_sku method. + # result = client.get_sku request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Sku. + # p result + # + def get_sku request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest + + # Converts hash and nil to 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_sku.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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_sku.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_sku.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :get_sku, 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 zones in a given project and location. + # + # @overload list_zones(request, options = nil) + # Pass arguments to `list_zones` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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 project and location to list zones in. + # Format: `projects/{project}/locations/{location}` + # + # To list zones across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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 + + @gdc_hardware_management_stub.call_rpc :list_zones, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_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 + + ## + # Gets details of a zone. + # + # @overload get_zone(request, options = nil) + # Pass arguments to `get_zone` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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 name of the zone. + # Format: `projects/{project}/locations/{location}/zones/{zone}` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest.new + # + # # Call the get_zone method. + # result = client.get_zone request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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 + + @gdc_hardware_management_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 + + ## + # Creates a new zone in a given project and location. + # + # @overload create_zone(request, options = nil) + # Pass arguments to `create_zone` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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, request_id: 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 project and location to create the zone in. + # Format: `projects/{project}/locations/{location}` + # @param zone_id [::String] + # Optional. ID used to uniquely identify the Zone within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The zone.name field in the request will be ignored. + # @param zone [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone, ::Hash] + # Required. The zone to create. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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 + + @gdc_hardware_management_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 the parameters of a zone. + # + # @overload update_zone(request, options = nil) + # Pass arguments to `update_zone` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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, request_id: 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. A mask to specify the fields in the Zone to overwrite with this + # update. The fields specified in the update_mask are relative to the zone, + # not the full request. A field will be overwritten if it is in the mask. If + # you don't provide a mask then all fields will be overwritten. + # @param zone [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone, ::Hash] + # Required. The zone to update. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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 + + @gdc_hardware_management_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. + # + # @overload delete_zone(request, options = nil) + # Pass arguments to `delete_zone` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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, request_id: 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 name of the zone. + # Format: `projects/{project}/locations/{location}/zones/{zone}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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 + + @gdc_hardware_management_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 + + ## + # Signals the state of a zone. + # + # @overload signal_zone_state(request, options = nil) + # Pass arguments to `signal_zone_state` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload signal_zone_state(name: nil, request_id: nil, state_signal: nil, provisioning_state_signal: nil, step: nil, details: nil) + # Pass arguments to `signal_zone_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 zone. + # Format: `projects/{project}/locations/{location}/zones/{zone}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @param state_signal [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest::StateSignal] + # Optional. The state signal to send for this zone. Either state_signal or + # provisioning_state_signal must be set, but not both. + # @param provisioning_state_signal [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest::ProvisioningStateSignal] + # Optional. The provisioning state signal to send for this zone. Either + # state_signal or provisioning_state_signal must be set, but not both. + # @param step [::String] + # Optional. The step being executed. Provides a finer grained status when the + # state_signal is FACTORY_TURNUP_CHECKS_STARTED or + # FACTORY_TURNUP_CHECKS_FAILED. + # @param details [::String] + # Optional. Additional details, such as an error message when state_signal is + # FACTORY_TURNUP_CHECKS_FAILED. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new + # + # # Call the signal_zone_state method. + # result = client.signal_zone_state request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def signal_zone_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.signal_zone_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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.signal_zone_state.timeout, + metadata: metadata, + retry_policy: @config.rpcs.signal_zone_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :signal_zone_state, 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 the requested date change of a single Order. + # + # @overload request_order_date_change(request, options = nil) + # Pass arguments to `request_order_date_change` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload request_order_date_change(name: nil, requested_date: nil) + # Pass arguments to `request_order_date_change` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 order to update. + # Format: projects/\\{project}/locations/\\{location}/orders/\\{order} + # @param requested_date [::Google::Type::Date, ::Hash] + # Required. The date to which the customer or Google wants to set the + # scheduled installation date. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new + # + # # Call the request_order_date_change method. + # result = client.request_order_date_change request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def request_order_date_change request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + metadata = @config.rpcs.request_order_date_change.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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.request_order_date_change.timeout, + metadata: metadata, + retry_policy: @config.rpcs.request_order_date_change.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.call_rpc :request_order_date_change, 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 GDCHardwareManagement API. + # + # This class represents the configuration for GDCHardwareManagement, + # 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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_orders to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_orders.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_orders.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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 = "gdchardwaremanagement.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 GDCHardwareManagement 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_orders` + # @return [::Gapic::Config::Method] + # + attr_reader :list_orders + ## + # RPC-specific configuration for `get_order` + # @return [::Gapic::Config::Method] + # + attr_reader :get_order + ## + # RPC-specific configuration for `create_order` + # @return [::Gapic::Config::Method] + # + attr_reader :create_order + ## + # RPC-specific configuration for `update_order` + # @return [::Gapic::Config::Method] + # + attr_reader :update_order + ## + # RPC-specific configuration for `delete_order` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_order + ## + # RPC-specific configuration for `submit_order` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_order + ## + # RPC-specific configuration for `cancel_order` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_order + ## + # RPC-specific configuration for `list_sites` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sites + ## + # RPC-specific configuration for `get_site` + # @return [::Gapic::Config::Method] + # + attr_reader :get_site + ## + # RPC-specific configuration for `create_site` + # @return [::Gapic::Config::Method] + # + attr_reader :create_site + ## + # RPC-specific configuration for `update_site` + # @return [::Gapic::Config::Method] + # + attr_reader :update_site + ## + # RPC-specific configuration for `delete_site` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_site + ## + # RPC-specific configuration for `list_hardware_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_hardware_groups + ## + # RPC-specific configuration for `get_hardware_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_hardware_group + ## + # RPC-specific configuration for `create_hardware_group` + # @return [::Gapic::Config::Method] + # + attr_reader :create_hardware_group + ## + # RPC-specific configuration for `update_hardware_group` + # @return [::Gapic::Config::Method] + # + attr_reader :update_hardware_group + ## + # RPC-specific configuration for `delete_hardware_group` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_hardware_group + ## + # RPC-specific configuration for `list_hardware` + # @return [::Gapic::Config::Method] + # + attr_reader :list_hardware + ## + # RPC-specific configuration for `get_hardware` + # @return [::Gapic::Config::Method] + # + attr_reader :get_hardware + ## + # RPC-specific configuration for `create_hardware` + # @return [::Gapic::Config::Method] + # + attr_reader :create_hardware + ## + # RPC-specific configuration for `update_hardware` + # @return [::Gapic::Config::Method] + # + attr_reader :update_hardware + ## + # RPC-specific configuration for `delete_hardware` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_hardware + ## + # RPC-specific configuration for `list_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_comments + ## + # RPC-specific configuration for `get_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_comment + ## + # RPC-specific configuration for `create_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_comment + ## + # RPC-specific configuration for `record_action_on_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :record_action_on_comment + ## + # RPC-specific configuration for `list_change_log_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_change_log_entries + ## + # RPC-specific configuration for `get_change_log_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_change_log_entry + ## + # RPC-specific configuration for `list_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_skus + ## + # RPC-specific configuration for `get_sku` + # @return [::Gapic::Config::Method] + # + attr_reader :get_sku + ## + # 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 `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 `signal_zone_state` + # @return [::Gapic::Config::Method] + # + attr_reader :signal_zone_state + ## + # RPC-specific configuration for `request_order_date_change` + # @return [::Gapic::Config::Method] + # + attr_reader :request_order_date_change + + # @private + def initialize parent_rpcs = nil + list_orders_config = parent_rpcs.list_orders if parent_rpcs.respond_to? :list_orders + @list_orders = ::Gapic::Config::Method.new list_orders_config + get_order_config = parent_rpcs.get_order if parent_rpcs.respond_to? :get_order + @get_order = ::Gapic::Config::Method.new get_order_config + create_order_config = parent_rpcs.create_order if parent_rpcs.respond_to? :create_order + @create_order = ::Gapic::Config::Method.new create_order_config + update_order_config = parent_rpcs.update_order if parent_rpcs.respond_to? :update_order + @update_order = ::Gapic::Config::Method.new update_order_config + delete_order_config = parent_rpcs.delete_order if parent_rpcs.respond_to? :delete_order + @delete_order = ::Gapic::Config::Method.new delete_order_config + submit_order_config = parent_rpcs.submit_order if parent_rpcs.respond_to? :submit_order + @submit_order = ::Gapic::Config::Method.new submit_order_config + cancel_order_config = parent_rpcs.cancel_order if parent_rpcs.respond_to? :cancel_order + @cancel_order = ::Gapic::Config::Method.new cancel_order_config + list_sites_config = parent_rpcs.list_sites if parent_rpcs.respond_to? :list_sites + @list_sites = ::Gapic::Config::Method.new list_sites_config + get_site_config = parent_rpcs.get_site if parent_rpcs.respond_to? :get_site + @get_site = ::Gapic::Config::Method.new get_site_config + create_site_config = parent_rpcs.create_site if parent_rpcs.respond_to? :create_site + @create_site = ::Gapic::Config::Method.new create_site_config + update_site_config = parent_rpcs.update_site if parent_rpcs.respond_to? :update_site + @update_site = ::Gapic::Config::Method.new update_site_config + delete_site_config = parent_rpcs.delete_site if parent_rpcs.respond_to? :delete_site + @delete_site = ::Gapic::Config::Method.new delete_site_config + list_hardware_groups_config = parent_rpcs.list_hardware_groups if parent_rpcs.respond_to? :list_hardware_groups + @list_hardware_groups = ::Gapic::Config::Method.new list_hardware_groups_config + get_hardware_group_config = parent_rpcs.get_hardware_group if parent_rpcs.respond_to? :get_hardware_group + @get_hardware_group = ::Gapic::Config::Method.new get_hardware_group_config + create_hardware_group_config = parent_rpcs.create_hardware_group if parent_rpcs.respond_to? :create_hardware_group + @create_hardware_group = ::Gapic::Config::Method.new create_hardware_group_config + update_hardware_group_config = parent_rpcs.update_hardware_group if parent_rpcs.respond_to? :update_hardware_group + @update_hardware_group = ::Gapic::Config::Method.new update_hardware_group_config + delete_hardware_group_config = parent_rpcs.delete_hardware_group if parent_rpcs.respond_to? :delete_hardware_group + @delete_hardware_group = ::Gapic::Config::Method.new delete_hardware_group_config + list_hardware_config = parent_rpcs.list_hardware if parent_rpcs.respond_to? :list_hardware + @list_hardware = ::Gapic::Config::Method.new list_hardware_config + get_hardware_config = parent_rpcs.get_hardware if parent_rpcs.respond_to? :get_hardware + @get_hardware = ::Gapic::Config::Method.new get_hardware_config + create_hardware_config = parent_rpcs.create_hardware if parent_rpcs.respond_to? :create_hardware + @create_hardware = ::Gapic::Config::Method.new create_hardware_config + update_hardware_config = parent_rpcs.update_hardware if parent_rpcs.respond_to? :update_hardware + @update_hardware = ::Gapic::Config::Method.new update_hardware_config + delete_hardware_config = parent_rpcs.delete_hardware if parent_rpcs.respond_to? :delete_hardware + @delete_hardware = ::Gapic::Config::Method.new delete_hardware_config + list_comments_config = parent_rpcs.list_comments if parent_rpcs.respond_to? :list_comments + @list_comments = ::Gapic::Config::Method.new list_comments_config + get_comment_config = parent_rpcs.get_comment if parent_rpcs.respond_to? :get_comment + @get_comment = ::Gapic::Config::Method.new get_comment_config + create_comment_config = parent_rpcs.create_comment if parent_rpcs.respond_to? :create_comment + @create_comment = ::Gapic::Config::Method.new create_comment_config + record_action_on_comment_config = parent_rpcs.record_action_on_comment if parent_rpcs.respond_to? :record_action_on_comment + @record_action_on_comment = ::Gapic::Config::Method.new record_action_on_comment_config + list_change_log_entries_config = parent_rpcs.list_change_log_entries if parent_rpcs.respond_to? :list_change_log_entries + @list_change_log_entries = ::Gapic::Config::Method.new list_change_log_entries_config + get_change_log_entry_config = parent_rpcs.get_change_log_entry if parent_rpcs.respond_to? :get_change_log_entry + @get_change_log_entry = ::Gapic::Config::Method.new get_change_log_entry_config + list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus + @list_skus = ::Gapic::Config::Method.new list_skus_config + get_sku_config = parent_rpcs.get_sku if parent_rpcs.respond_to? :get_sku + @get_sku = ::Gapic::Config::Method.new get_sku_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 + 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 + signal_zone_state_config = parent_rpcs.signal_zone_state if parent_rpcs.respond_to? :signal_zone_state + @signal_zone_state = ::Gapic::Config::Method.new signal_zone_state_config + request_order_date_change_config = parent_rpcs.request_order_date_change if parent_rpcs.respond_to? :request_order_date_change + @request_order_date_change = ::Gapic::Config::Method.new request_order_date_change_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials.rb new file mode 100644 index 000000000000..f71ab8bc016f --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/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 GDCHardwareManagement + module V1alpha + module GDCHardwareManagement + # Credentials for the GDCHardwareManagement 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-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/operations.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/operations.rb new file mode 100644 index 000000000000..284b8f8b9f8c --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/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 GDCHardwareManagement + module V1alpha + module GDCHardwareManagement + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "gdchardwaremanagement.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the GDCHardwareManagement 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 GDCHardwareManagement 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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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::GDCHardwareManagement::V1alpha::VERSION + metadata[:"x-goog-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::GDCHardwareManagement::V1alpha::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 = "gdchardwaremanagement.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-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/paths.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/paths.rb new file mode 100644 index 000000000000..37a35977c460 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/paths.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GDCHardwareManagement + module V1alpha + module GDCHardwareManagement + # Path helper methods for the GDCHardwareManagement API. + module Paths + ## + # Create a fully-qualified ChangeLogEntry resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` + # + # @param project [String] + # @param location [String] + # @param order [String] + # @param change_log_entry [String] + # + # @return [::String] + def change_log_entry_path project:, location:, order:, change_log_entry: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "order cannot contain /" if order.to_s.include? "/" + + "projects/#{project}/locations/#{location}/orders/#{order}/changeLogEntries/#{change_log_entry}" + end + + ## + # Create a fully-qualified Comment resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` + # + # @param project [String] + # @param location [String] + # @param order [String] + # @param comment [String] + # + # @return [::String] + def comment_path project:, location:, order:, comment: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "order cannot contain /" if order.to_s.include? "/" + + "projects/#{project}/locations/#{location}/orders/#{order}/comments/#{comment}" + end + + ## + # Create a fully-qualified Hardware resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/hardware/{hardware}` + # + # @param project [String] + # @param location [String] + # @param hardware [String] + # + # @return [::String] + def hardware_path project:, location:, hardware: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/hardware/#{hardware}" + end + + ## + # Create a fully-qualified HardwareGroup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + # + # @param project [String] + # @param location [String] + # @param order [String] + # @param hardware_group [String] + # + # @return [::String] + def hardware_group_path project:, location:, order:, hardware_group: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "order cannot contain /" if order.to_s.include? "/" + + "projects/#{project}/locations/#{location}/orders/#{order}/hardwareGroups/#{hardware_group}" + 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 Order resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/orders/{order}` + # + # @param project [String] + # @param location [String] + # @param order [String] + # + # @return [::String] + def order_path project:, location:, order: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/orders/#{order}" + end + + ## + # Create a fully-qualified Site resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/sites/{site}` + # + # @param project [String] + # @param location [String] + # @param site [String] + # + # @return [::String] + def site_path project:, location:, site: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/sites/#{site}" + end + + ## + # Create a fully-qualified Sku resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/skus/{sku}` + # + # @param project [String] + # @param location [String] + # @param sku [String] + # + # @return [::String] + def sku_path project:, location:, sku: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/skus/#{sku}" + end + + ## + # Create a fully-qualified Zone resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/zones/{zone}` + # + # @param project [String] + # @param location [String] + # @param zone [String] + # + # @return [::String] + def zone_path project:, location:, zone: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/zones/#{zone}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest.rb new file mode 100644 index 000000000000..a6427b850375 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/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/gdc_hardware_management/v1alpha/version" +require "google/cloud/gdc_hardware_management/v1alpha/bindings_override" + +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials" +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/paths" +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/operations" +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/client" + +module Google + module Cloud + module GDCHardwareManagement + module V1alpha + ## + # The GDC Hardware Management service. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest" + # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + module GDCHardwareManagement + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/client.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/client.rb new file mode 100644 index 000000000000..a682f54057ca --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/client.rb @@ -0,0 +1,4205 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gdchardwaremanagement/v1alpha/service_pb" +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/service_stub" +require "google/cloud/location/rest" + +module Google + module Cloud + module GDCHardwareManagement + module V1alpha + module GDCHardwareManagement + module Rest + ## + # REST client for the GDCHardwareManagement service. + # + # The GDC Hardware Management service. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "gdchardwaremanagement.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :gdc_hardware_management_stub + + ## + # Configure the GDCHardwareManagement Client class. + # + # See {::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all GDCHardwareManagement clients + # ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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", "GDCHardwareManagement", "V1alpha"] + 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.list_orders.timeout = 60.0 + default_config.rpcs.list_orders.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_order.timeout = 60.0 + default_config.rpcs.get_order.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_order.timeout = 60.0 + + default_config.rpcs.update_order.timeout = 60.0 + default_config.rpcs.update_order.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_order.timeout = 60.0 + default_config.rpcs.delete_order.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.submit_order.timeout = 60.0 + default_config.rpcs.submit_order.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.cancel_order.timeout = 60.0 + default_config.rpcs.cancel_order.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_sites.timeout = 60.0 + default_config.rpcs.list_sites.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_site.timeout = 60.0 + default_config.rpcs.get_site.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_site.timeout = 60.0 + + default_config.rpcs.update_site.timeout = 60.0 + default_config.rpcs.update_site.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_site.timeout = 60.0 + default_config.rpcs.delete_site.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_hardware_groups.timeout = 60.0 + default_config.rpcs.list_hardware_groups.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_hardware_group.timeout = 60.0 + default_config.rpcs.get_hardware_group.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_hardware_group.timeout = 60.0 + + default_config.rpcs.update_hardware_group.timeout = 60.0 + default_config.rpcs.update_hardware_group.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_hardware_group.timeout = 60.0 + default_config.rpcs.delete_hardware_group.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_hardware.timeout = 60.0 + default_config.rpcs.list_hardware.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_hardware.timeout = 60.0 + default_config.rpcs.get_hardware.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_hardware.timeout = 60.0 + + default_config.rpcs.update_hardware.timeout = 60.0 + default_config.rpcs.update_hardware.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_hardware.timeout = 60.0 + default_config.rpcs.delete_hardware.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_comments.timeout = 60.0 + default_config.rpcs.list_comments.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_comment.timeout = 60.0 + default_config.rpcs.get_comment.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_comment.timeout = 60.0 + + default_config.rpcs.list_change_log_entries.timeout = 60.0 + default_config.rpcs.list_change_log_entries.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_change_log_entry.timeout = 60.0 + default_config.rpcs.get_change_log_entry.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.list_skus.timeout = 60.0 + default_config.rpcs.list_skus.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_sku.timeout = 60.0 + default_config.rpcs.get_sku.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + 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.create_zone.timeout = 60.0 + + default_config.rpcs.update_zone.timeout = 60.0 + default_config.rpcs.update_zone.retry_policy = { + initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.delete_zone.timeout = 60.0 + default_config.rpcs.delete_zone.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 GDCHardwareManagement 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 + @gdc_hardware_management_stub.universe_domain + end + + ## + # Create a new GDCHardwareManagement REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the GDCHardwareManagement 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 + + @gdc_hardware_management_stub = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @gdc_hardware_management_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 = @gdc_hardware_management_stub.endpoint + config.universe_domain = @gdc_hardware_management_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @gdc_hardware_management_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 + + ## + # The logger used for request/response debug logging. + # + # @return [Logger] + # + def logger + @gdc_hardware_management_stub.logger + end + + # Service calls + + ## + # Lists orders in a given project and location. + # + # @overload list_orders(request, options = nil) + # Pass arguments to `list_orders` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_orders(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_orders` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to list orders in. + # Format: `projects/{project}/locations/{location}` + # + # To list orders across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.new + # + # # Call the list_orders method. + # result = client.list_orders request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Order. + # p item + # end + # + def list_orders request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest + + # Converts hash and nil to an 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_orders.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_orders.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_orders.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.list_orders request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_orders, "orders", 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 details of an order. + # + # @overload get_order(request, options = nil) + # Pass arguments to `get_order` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_order(name: nil) + # Pass arguments to `get_order` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the resource + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new + # + # # Call the get_order method. + # result = client.get_order request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Order. + # p result + # + def get_order request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest + + # Converts hash and nil to an 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_order.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_order.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_order.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.get_order 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 new order in a given project and location. + # + # @overload create_order(request, options = nil) + # Pass arguments to `create_order` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_order(parent: nil, order_id: nil, order: nil, request_id: nil) + # Pass arguments to `create_order` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to create the order in. + # Format: `projects/{project}/locations/{location}` + # @param order_id [::String] + # Optional. ID used to uniquely identify the Order within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The order.name field in the request will be ignored. + # @param order [::Google::Cloud::GDCHardwareManagement::V1alpha::Order, ::Hash] + # Required. The order to create. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new + # + # # Call the create_order method. + # result = client.create_order request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_order request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest + + # Converts hash and nil to an 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_order.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_order.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_order.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.create_order 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 the parameters of an order. + # + # @overload update_order(request, options = nil) + # Pass arguments to `update_order` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_order(update_mask: nil, order: nil, request_id: nil) + # Pass arguments to `update_order` via keyword arguments. Note that at + # least one keyword argument is 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. A mask to specify the fields in the Order to overwrite with this + # update. The fields specified in the update_mask are relative to the order, + # not the full request. A field will be overwritten if it is in the mask. If + # you don't provide a mask then all fields will be overwritten. + # @param order [::Google::Cloud::GDCHardwareManagement::V1alpha::Order, ::Hash] + # Required. The order to update. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new + # + # # Call the update_order method. + # result = client.update_order request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_order request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest + + # Converts hash and nil to an 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_order.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_order.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_order.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.update_order 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 order. + # + # @overload delete_order(request, options = nil) + # Pass arguments to `delete_order` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_order(name: nil, request_id: nil, force: nil) + # Pass arguments to `delete_order` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 order. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @param force [::Boolean] + # Optional. An option to delete any nested resources in the Order, such as a + # HardwareGroup. If true, any nested resources for this Order will also be + # deleted. Otherwise, the request will only succeed if the Order has no + # nested 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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new + # + # # Call the delete_order method. + # result = client.delete_order request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_order request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest + + # Converts hash and nil to an 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_order.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_order.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_order.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.delete_order 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 + + ## + # Submits an order. + # + # @overload submit_order(request, options = nil) + # Pass arguments to `submit_order` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload submit_order(name: nil, request_id: nil, type: nil) + # Pass arguments to `submit_order` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 order. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @param type [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest::Type] + # Optional. Type of this request. If unset, the request type is assumed to be + # `INFO_PENDING`. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new + # + # # Call the submit_order method. + # result = client.submit_order request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def submit_order request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.submit_order.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.submit_order.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.submit_order.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.submit_order 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 + + ## + # Cancels an order. + # + # @overload cancel_order(request, options = nil) + # Pass arguments to `cancel_order` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_order(name: nil, request_id: nil) + # Pass arguments to `cancel_order` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 order. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new + # + # # Call the cancel_order method. + # result = client.cancel_order request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def cancel_order request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest + + # Converts hash and nil to an 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_order.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_order.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.cancel_order.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.cancel_order 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 sites in a given project and location. + # + # @overload list_sites(request, options = nil) + # Pass arguments to `list_sites` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_sites(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_sites` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to list sites in. + # Format: `projects/{project}/locations/{location}` + # + # To list sites across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.new + # + # # Call the list_sites method. + # result = client.list_sites request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Site. + # p item + # end + # + def list_sites request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest + + # Converts hash and nil to an 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_sites.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_sites.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_sites.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.list_sites request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_sites, "sites", 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 details of a site. + # + # @overload get_site(request, options = nil) + # Pass arguments to `get_site` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_site(name: nil) + # Pass arguments to `get_site` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 site. + # Format: `projects/{project}/locations/{location}/sites/{site}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new + # + # # Call the get_site method. + # result = client.get_site request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Site. + # p result + # + def get_site request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest + + # Converts hash and nil to an 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_site.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_site.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_site.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.get_site 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 new site in a given project and location. + # + # @overload create_site(request, options = nil) + # Pass arguments to `create_site` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_site(parent: nil, site_id: nil, site: nil, request_id: nil) + # Pass arguments to `create_site` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to create the site in. + # Format: `projects/{project}/locations/{location}` + # @param site_id [::String] + # Optional. ID used to uniquely identify the Site within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The site.name field in the request will be ignored. + # @param site [::Google::Cloud::GDCHardwareManagement::V1alpha::Site, ::Hash] + # Required. The site to create. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new + # + # # Call the create_site method. + # result = client.create_site request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_site request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest + + # Converts hash and nil to an 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_site.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_site.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_site.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.create_site 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 the parameters of a site. + # + # @overload update_site(request, options = nil) + # Pass arguments to `update_site` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_site(update_mask: nil, site: nil, request_id: nil) + # Pass arguments to `update_site` via keyword arguments. Note that at + # least one keyword argument is 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. A mask to specify the fields in the Site to overwrite with this + # update. The fields specified in the update_mask are relative to the site, + # not the full request. A field will be overwritten if it is in the mask. If + # you don't provide a mask then all fields will be overwritten. + # @param site [::Google::Cloud::GDCHardwareManagement::V1alpha::Site, ::Hash] + # Required. The site to update. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new + # + # # Call the update_site method. + # result = client.update_site request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_site request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest + + # Converts hash and nil to an 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_site.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_site.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_site.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.update_site 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 site. + # + # @overload delete_site(request, options = nil) + # Pass arguments to `delete_site` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_site(name: nil, request_id: nil) + # Pass arguments to `delete_site` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 site. + # Format: `projects/{project}/locations/{location}/sites/{site}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new + # + # # Call the delete_site method. + # result = client.delete_site request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_site request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest + + # Converts hash and nil to an 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_site.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_site.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_site.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.delete_site 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 hardware groups in a given order. + # + # @overload list_hardware_groups(request, options = nil) + # Pass arguments to `list_hardware_groups` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_hardware_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_hardware_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 order to list hardware groups in. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.new + # + # # Call the list_hardware_groups method. + # result = client.list_hardware_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::GDCHardwareManagement::V1alpha::HardwareGroup. + # p item + # end + # + def list_hardware_groups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest + + # Converts hash and nil to an 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hardware_groups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_hardware_groups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.list_hardware_groups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware_groups, "hardware_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 details of a hardware group. + # + # @overload get_hardware_group(request, options = nil) + # Pass arguments to `get_hardware_group` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_hardware_group(name: nil) + # Pass arguments to `get_hardware_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 name of the hardware group. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new + # + # # Call the get_hardware_group method. + # result = client.get_hardware_group request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup. + # p result + # + def get_hardware_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest + + # Converts hash and nil to an 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hardware_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_hardware_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.get_hardware_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 a new hardware group in a given order. + # + # @overload create_hardware_group(request, options = nil) + # Pass arguments to `create_hardware_group` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_hardware_group(parent: nil, hardware_group_id: nil, hardware_group: nil, request_id: nil) + # Pass arguments to `create_hardware_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 order to create the hardware group in. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param hardware_group_id [::String] + # Optional. ID used to uniquely identify the HardwareGroup within its parent + # scope. This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The hardware_group.name field in the request will be ignored. + # @param hardware_group [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup, ::Hash] + # Required. The hardware group to create. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new + # + # # Call the create_hardware_group method. + # result = client.create_hardware_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_hardware_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest + + # Converts hash and nil to an 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hardware_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_hardware_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.create_hardware_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 the parameters of a hardware group. + # + # @overload update_hardware_group(request, options = nil) + # Pass arguments to `update_hardware_group` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_hardware_group(update_mask: nil, hardware_group: nil, request_id: nil) + # Pass arguments to `update_hardware_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Required. A mask to specify the fields in the HardwareGroup to overwrite + # with this update. The fields specified in the update_mask are relative to + # the hardware group, not the full request. A field will be overwritten if it + # is in the mask. If you don't provide a mask then all fields will be + # overwritten. + # @param hardware_group [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup, ::Hash] + # Required. The hardware group to update. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new + # + # # Call the update_hardware_group method. + # result = client.update_hardware_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_hardware_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest + + # Converts hash and nil to an 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hardware_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_hardware_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.update_hardware_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 a hardware group. + # + # @overload delete_hardware_group(request, options = nil) + # Pass arguments to `delete_hardware_group` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_hardware_group(name: nil, request_id: nil) + # Pass arguments to `delete_hardware_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 name of the hardware group. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new + # + # # Call the delete_hardware_group method. + # result = client.delete_hardware_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_hardware_group request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest + + # Converts hash and nil to an 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hardware_group.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_hardware_group.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.delete_hardware_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 hardware in a given project and location. + # + # @overload list_hardware(request, options = nil) + # Pass arguments to `list_hardware` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_hardware(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_hardware` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to list hardware in. + # Format: `projects/{project}/locations/{location}` + # + # To list hardware across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.new + # + # # Call the list_hardware method. + # result = client.list_hardware request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware. + # p item + # end + # + def list_hardware request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest + + # Converts hash and nil to an 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_hardware.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hardware.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_hardware.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.list_hardware request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware, "hardware", 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 hardware details. + # + # @overload get_hardware(request, options = nil) + # Pass arguments to `get_hardware` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_hardware(name: nil) + # Pass arguments to `get_hardware` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 hardware. + # Format: `projects/{project}/locations/{location}/hardware/{hardware}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new + # + # # Call the get_hardware method. + # result = client.get_hardware request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Hardware. + # p result + # + def get_hardware request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest + + # Converts hash and nil to an 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_hardware.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hardware.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_hardware.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.get_hardware 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 new hardware in a given project and location. + # + # @overload create_hardware(request, options = nil) + # Pass arguments to `create_hardware` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_hardware(parent: nil, hardware_id: nil, hardware: nil) + # Pass arguments to `create_hardware` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to create hardware in. + # Format: `projects/{project}/locations/{location}` + # @param hardware_id [::String] + # Optional. ID used to uniquely identify the Hardware within its parent + # scope. This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The hardware.name field in the request will be ignored. + # @param hardware [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware, ::Hash] + # Required. The resource 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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new + # + # # Call the create_hardware method. + # result = client.create_hardware request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_hardware request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest + + # Converts hash and nil to an 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_hardware.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hardware.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_hardware.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.create_hardware 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 hardware parameters. + # + # @overload update_hardware(request, options = nil) + # Pass arguments to `update_hardware` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_hardware(update_mask: nil, hardware: nil, request_id: nil) + # Pass arguments to `update_hardware` via keyword arguments. Note that at + # least one keyword argument is 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. A mask to specify the fields in the Hardware to overwrite with + # this update. The fields specified in the update_mask are relative to the + # hardware, not the full request. A field will be overwritten if it is in the + # mask. If you don't provide a mask then all fields will be overwritten. + # @param hardware [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware, ::Hash] + # Required. The hardware to update. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new + # + # # Call the update_hardware method. + # result = client.update_hardware request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_hardware request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest + + # Converts hash and nil to an 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_hardware.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hardware.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_hardware.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.update_hardware 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 hardware. + # + # @overload delete_hardware(request, options = nil) + # Pass arguments to `delete_hardware` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_hardware(name: nil, request_id: nil) + # Pass arguments to `delete_hardware` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 hardware. + # Format: `projects/{project}/locations/{location}/hardware/{hardware}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new + # + # # Call the delete_hardware method. + # result = client.delete_hardware request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_hardware request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest + + # Converts hash and nil to an 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_hardware.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_hardware.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_hardware.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.delete_hardware 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 the comments on an order. + # + # @overload list_comments(request, options = nil) + # Pass arguments to `list_comments` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_comments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_comments` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The order to list comments on. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.new + # + # # Call the list_comments method. + # result = client.list_comments request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment. + # p item + # end + # + def list_comments request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest + + # Converts hash and nil to an 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_comments.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_comments.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_comments.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.list_comments request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_comments, "comments", 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 content of a comment. + # + # @overload get_comment(request, options = nil) + # Pass arguments to `get_comment` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_comment(name: nil) + # Pass arguments to `get_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 comment. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new + # + # # Call the get_comment method. + # result = client.get_comment request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment. + # p result + # + def get_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest + + # Converts hash and nil to an 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_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.get_comment 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 new comment on an order. + # + # @overload create_comment(request, options = nil) + # Pass arguments to `create_comment` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_comment(parent: nil, comment_id: nil, comment: nil, request_id: nil) + # Pass arguments to `create_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The order to create the comment on. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param comment_id [::String] + # Optional. ID used to uniquely identify the Comment within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The comment.name field in the request will be ignored. + # @param comment [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment, ::Hash] + # Required. The comment to create. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new + # + # # Call the create_comment method. + # result = client.create_comment request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest + + # Converts hash and nil to an 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_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.create_comment 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 + + ## + # Record Action on a Comment. If the Action specified in the request is READ, + # the viewed time in the comment is set to the time the request was received. + # If the comment is already marked as read, subsequent calls will be ignored. + # If the Action is UNREAD, the viewed time is cleared from the comment. + # + # @overload record_action_on_comment(request, options = nil) + # Pass arguments to `record_action_on_comment` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload record_action_on_comment(name: nil, action_type: nil) + # Pass arguments to `record_action_on_comment` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 comment. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` + # @param action_type [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest::ActionType] + # Required. The action type of the recorded action. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new + # + # # Call the record_action_on_comment method. + # result = client.record_action_on_comment request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment. + # p result + # + def record_action_on_comment request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.record_action_on_comment.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.record_action_on_comment.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.record_action_on_comment.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.record_action_on_comment 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 the changes made to an order. + # + # @overload list_change_log_entries(request, options = nil) + # Pass arguments to `list_change_log_entries` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_change_log_entries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_change_log_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 order to list change log entries for. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.new + # + # # Call the list_change_log_entries method. + # result = client.list_change_log_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::GDCHardwareManagement::V1alpha::ChangeLogEntry. + # p item + # end + # + def list_change_log_entries request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest + + # Converts hash and nil to an 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_change_log_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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_change_log_entries.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_change_log_entries.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.list_change_log_entries request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_change_log_entries, "change_log_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 details of a change to an order. + # + # @overload get_change_log_entry(request, options = nil) + # Pass arguments to `get_change_log_entry` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_change_log_entry(name: nil) + # Pass arguments to `get_change_log_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 name of the change log entry. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new + # + # # Call the get_change_log_entry method. + # result = client.get_change_log_entry request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry. + # p result + # + def get_change_log_entry request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest + + # Converts hash and nil to an 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_change_log_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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_change_log_entry.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_change_log_entry.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.get_change_log_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 SKUs for a given project and location. + # + # @overload list_skus(request, options = nil) + # Pass arguments to `list_skus` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_skus(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_skus` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The project and location to list SKUs in. + # Format: `projects/{project}/locations/{location}` + # + # To list SKUs across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.new + # + # # Call the list_skus method. + # result = client.list_skus request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku. + # p item + # end + # + def list_skus request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest + + # Converts hash and nil to an 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_skus.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_skus.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_skus.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.list_skus request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_skus, "skus", 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 details of an SKU. + # + # @overload get_sku(request, options = nil) + # Pass arguments to `get_sku` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_sku(name: nil) + # Pass arguments to `get_sku` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 SKU. + # Format: `projects/{project}/locations/{location}/skus/{sku}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new + # + # # Call the get_sku method. + # result = client.get_sku request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Sku. + # p result + # + def get_sku request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest + + # Converts hash and nil to an 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_sku.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_sku.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_sku.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.get_sku 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 zones in a given project and location. + # + # @overload list_zones(request, options = nil) + # Pass arguments to `list_zones` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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 project and location to list zones in. + # Format: `projects/{project}/locations/{location}` + # + # To list zones across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @param page_size [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @param page_token [::String] + # Optional. A token identifying a page of results the server should return. + # @param filter [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @param order_by [::String] + # Optional. Hint for how to order the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @gdc_hardware_management_stub.list_zones request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_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 + + ## + # Gets details of a zone. + # + # @overload get_zone(request, options = nil) + # Pass arguments to `get_zone` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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 name of the zone. + # Format: `projects/{project}/locations/{location}/zones/{zone}` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest.new + # + # # Call the get_zone method. + # result = client.get_zone request + # + # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @gdc_hardware_management_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 + + ## + # Creates a new zone in a given project and location. + # + # @overload create_zone(request, options = nil) + # Pass arguments to `create_zone` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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, request_id: 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 project and location to create the zone in. + # Format: `projects/{project}/locations/{location}` + # @param zone_id [::String] + # Optional. ID used to uniquely identify the Zone within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The zone.name field in the request will be ignored. + # @param zone [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone, ::Hash] + # Required. The zone to create. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @gdc_hardware_management_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 the parameters of a zone. + # + # @overload update_zone(request, options = nil) + # Pass arguments to `update_zone` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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, request_id: 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. A mask to specify the fields in the Zone to overwrite with this + # update. The fields specified in the update_mask are relative to the zone, + # not the full request. A field will be overwritten if it is in the mask. If + # you don't provide a mask then all fields will be overwritten. + # @param zone [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone, ::Hash] + # Required. The zone to update. + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @gdc_hardware_management_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. + # + # @overload delete_zone(request, options = nil) + # Pass arguments to `delete_zone` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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, request_id: 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 name of the zone. + # Format: `projects/{project}/locations/{location}/zones/{zone}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 + + @gdc_hardware_management_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 + + ## + # Signals the state of a zone. + # + # @overload signal_zone_state(request, options = nil) + # Pass arguments to `signal_zone_state` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload signal_zone_state(name: nil, request_id: nil, state_signal: nil, provisioning_state_signal: nil, step: nil, details: nil) + # Pass arguments to `signal_zone_state` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 zone. + # Format: `projects/{project}/locations/{location}/zones/{zone}` + # @param request_id [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @param state_signal [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest::StateSignal] + # Optional. The state signal to send for this zone. Either state_signal or + # provisioning_state_signal must be set, but not both. + # @param provisioning_state_signal [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest::ProvisioningStateSignal] + # Optional. The provisioning state signal to send for this zone. Either + # state_signal or provisioning_state_signal must be set, but not both. + # @param step [::String] + # Optional. The step being executed. Provides a finer grained status when the + # state_signal is FACTORY_TURNUP_CHECKS_STARTED or + # FACTORY_TURNUP_CHECKS_FAILED. + # @param details [::String] + # Optional. Additional details, such as an error message when state_signal is + # FACTORY_TURNUP_CHECKS_FAILED. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new + # + # # Call the signal_zone_state method. + # result = client.signal_zone_state request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def signal_zone_state request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.signal_zone_state.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.signal_zone_state.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.signal_zone_state.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.signal_zone_state 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 the requested date change of a single Order. + # + # @overload request_order_date_change(request, options = nil) + # Pass arguments to `request_order_date_change` via a request object, either of type + # {::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload request_order_date_change(name: nil, requested_date: nil) + # Pass arguments to `request_order_date_change` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 order to update. + # Format: projects/\\{project}/locations/\\{location}/orders/\\{order} + # @param requested_date [::Google::Type::Date, ::Hash] + # Required. The date to which the customer or Google wants to set the + # scheduled installation date. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new + # + # # Call the request_order_date_change method. + # result = client.request_order_date_change request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how to wait for a response. + # result.wait_until_done! timeout: 60 + # if result.response? + # p result.response + # else + # puts "No response received." + # end + # + def request_order_date_change request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest + + # Converts hash and nil to an options object + options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h + + # Customize the options with defaults + call_metadata = @config.rpcs.request_order_date_change.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + options.apply_defaults timeout: @config.rpcs.request_order_date_change.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.request_order_date_change.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @gdc_hardware_management_stub.request_order_date_change 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 GDCHardwareManagement REST API. + # + # This class represents the configuration for GDCHardwareManagement 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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_orders to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.list_orders.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.list_orders.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 = "gdchardwaremanagement.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 GDCHardwareManagement 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_orders` + # @return [::Gapic::Config::Method] + # + attr_reader :list_orders + ## + # RPC-specific configuration for `get_order` + # @return [::Gapic::Config::Method] + # + attr_reader :get_order + ## + # RPC-specific configuration for `create_order` + # @return [::Gapic::Config::Method] + # + attr_reader :create_order + ## + # RPC-specific configuration for `update_order` + # @return [::Gapic::Config::Method] + # + attr_reader :update_order + ## + # RPC-specific configuration for `delete_order` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_order + ## + # RPC-specific configuration for `submit_order` + # @return [::Gapic::Config::Method] + # + attr_reader :submit_order + ## + # RPC-specific configuration for `cancel_order` + # @return [::Gapic::Config::Method] + # + attr_reader :cancel_order + ## + # RPC-specific configuration for `list_sites` + # @return [::Gapic::Config::Method] + # + attr_reader :list_sites + ## + # RPC-specific configuration for `get_site` + # @return [::Gapic::Config::Method] + # + attr_reader :get_site + ## + # RPC-specific configuration for `create_site` + # @return [::Gapic::Config::Method] + # + attr_reader :create_site + ## + # RPC-specific configuration for `update_site` + # @return [::Gapic::Config::Method] + # + attr_reader :update_site + ## + # RPC-specific configuration for `delete_site` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_site + ## + # RPC-specific configuration for `list_hardware_groups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_hardware_groups + ## + # RPC-specific configuration for `get_hardware_group` + # @return [::Gapic::Config::Method] + # + attr_reader :get_hardware_group + ## + # RPC-specific configuration for `create_hardware_group` + # @return [::Gapic::Config::Method] + # + attr_reader :create_hardware_group + ## + # RPC-specific configuration for `update_hardware_group` + # @return [::Gapic::Config::Method] + # + attr_reader :update_hardware_group + ## + # RPC-specific configuration for `delete_hardware_group` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_hardware_group + ## + # RPC-specific configuration for `list_hardware` + # @return [::Gapic::Config::Method] + # + attr_reader :list_hardware + ## + # RPC-specific configuration for `get_hardware` + # @return [::Gapic::Config::Method] + # + attr_reader :get_hardware + ## + # RPC-specific configuration for `create_hardware` + # @return [::Gapic::Config::Method] + # + attr_reader :create_hardware + ## + # RPC-specific configuration for `update_hardware` + # @return [::Gapic::Config::Method] + # + attr_reader :update_hardware + ## + # RPC-specific configuration for `delete_hardware` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_hardware + ## + # RPC-specific configuration for `list_comments` + # @return [::Gapic::Config::Method] + # + attr_reader :list_comments + ## + # RPC-specific configuration for `get_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :get_comment + ## + # RPC-specific configuration for `create_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :create_comment + ## + # RPC-specific configuration for `record_action_on_comment` + # @return [::Gapic::Config::Method] + # + attr_reader :record_action_on_comment + ## + # RPC-specific configuration for `list_change_log_entries` + # @return [::Gapic::Config::Method] + # + attr_reader :list_change_log_entries + ## + # RPC-specific configuration for `get_change_log_entry` + # @return [::Gapic::Config::Method] + # + attr_reader :get_change_log_entry + ## + # RPC-specific configuration for `list_skus` + # @return [::Gapic::Config::Method] + # + attr_reader :list_skus + ## + # RPC-specific configuration for `get_sku` + # @return [::Gapic::Config::Method] + # + attr_reader :get_sku + ## + # 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 `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 `signal_zone_state` + # @return [::Gapic::Config::Method] + # + attr_reader :signal_zone_state + ## + # RPC-specific configuration for `request_order_date_change` + # @return [::Gapic::Config::Method] + # + attr_reader :request_order_date_change + + # @private + def initialize parent_rpcs = nil + list_orders_config = parent_rpcs.list_orders if parent_rpcs.respond_to? :list_orders + @list_orders = ::Gapic::Config::Method.new list_orders_config + get_order_config = parent_rpcs.get_order if parent_rpcs.respond_to? :get_order + @get_order = ::Gapic::Config::Method.new get_order_config + create_order_config = parent_rpcs.create_order if parent_rpcs.respond_to? :create_order + @create_order = ::Gapic::Config::Method.new create_order_config + update_order_config = parent_rpcs.update_order if parent_rpcs.respond_to? :update_order + @update_order = ::Gapic::Config::Method.new update_order_config + delete_order_config = parent_rpcs.delete_order if parent_rpcs.respond_to? :delete_order + @delete_order = ::Gapic::Config::Method.new delete_order_config + submit_order_config = parent_rpcs.submit_order if parent_rpcs.respond_to? :submit_order + @submit_order = ::Gapic::Config::Method.new submit_order_config + cancel_order_config = parent_rpcs.cancel_order if parent_rpcs.respond_to? :cancel_order + @cancel_order = ::Gapic::Config::Method.new cancel_order_config + list_sites_config = parent_rpcs.list_sites if parent_rpcs.respond_to? :list_sites + @list_sites = ::Gapic::Config::Method.new list_sites_config + get_site_config = parent_rpcs.get_site if parent_rpcs.respond_to? :get_site + @get_site = ::Gapic::Config::Method.new get_site_config + create_site_config = parent_rpcs.create_site if parent_rpcs.respond_to? :create_site + @create_site = ::Gapic::Config::Method.new create_site_config + update_site_config = parent_rpcs.update_site if parent_rpcs.respond_to? :update_site + @update_site = ::Gapic::Config::Method.new update_site_config + delete_site_config = parent_rpcs.delete_site if parent_rpcs.respond_to? :delete_site + @delete_site = ::Gapic::Config::Method.new delete_site_config + list_hardware_groups_config = parent_rpcs.list_hardware_groups if parent_rpcs.respond_to? :list_hardware_groups + @list_hardware_groups = ::Gapic::Config::Method.new list_hardware_groups_config + get_hardware_group_config = parent_rpcs.get_hardware_group if parent_rpcs.respond_to? :get_hardware_group + @get_hardware_group = ::Gapic::Config::Method.new get_hardware_group_config + create_hardware_group_config = parent_rpcs.create_hardware_group if parent_rpcs.respond_to? :create_hardware_group + @create_hardware_group = ::Gapic::Config::Method.new create_hardware_group_config + update_hardware_group_config = parent_rpcs.update_hardware_group if parent_rpcs.respond_to? :update_hardware_group + @update_hardware_group = ::Gapic::Config::Method.new update_hardware_group_config + delete_hardware_group_config = parent_rpcs.delete_hardware_group if parent_rpcs.respond_to? :delete_hardware_group + @delete_hardware_group = ::Gapic::Config::Method.new delete_hardware_group_config + list_hardware_config = parent_rpcs.list_hardware if parent_rpcs.respond_to? :list_hardware + @list_hardware = ::Gapic::Config::Method.new list_hardware_config + get_hardware_config = parent_rpcs.get_hardware if parent_rpcs.respond_to? :get_hardware + @get_hardware = ::Gapic::Config::Method.new get_hardware_config + create_hardware_config = parent_rpcs.create_hardware if parent_rpcs.respond_to? :create_hardware + @create_hardware = ::Gapic::Config::Method.new create_hardware_config + update_hardware_config = parent_rpcs.update_hardware if parent_rpcs.respond_to? :update_hardware + @update_hardware = ::Gapic::Config::Method.new update_hardware_config + delete_hardware_config = parent_rpcs.delete_hardware if parent_rpcs.respond_to? :delete_hardware + @delete_hardware = ::Gapic::Config::Method.new delete_hardware_config + list_comments_config = parent_rpcs.list_comments if parent_rpcs.respond_to? :list_comments + @list_comments = ::Gapic::Config::Method.new list_comments_config + get_comment_config = parent_rpcs.get_comment if parent_rpcs.respond_to? :get_comment + @get_comment = ::Gapic::Config::Method.new get_comment_config + create_comment_config = parent_rpcs.create_comment if parent_rpcs.respond_to? :create_comment + @create_comment = ::Gapic::Config::Method.new create_comment_config + record_action_on_comment_config = parent_rpcs.record_action_on_comment if parent_rpcs.respond_to? :record_action_on_comment + @record_action_on_comment = ::Gapic::Config::Method.new record_action_on_comment_config + list_change_log_entries_config = parent_rpcs.list_change_log_entries if parent_rpcs.respond_to? :list_change_log_entries + @list_change_log_entries = ::Gapic::Config::Method.new list_change_log_entries_config + get_change_log_entry_config = parent_rpcs.get_change_log_entry if parent_rpcs.respond_to? :get_change_log_entry + @get_change_log_entry = ::Gapic::Config::Method.new get_change_log_entry_config + list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus + @list_skus = ::Gapic::Config::Method.new list_skus_config + get_sku_config = parent_rpcs.get_sku if parent_rpcs.respond_to? :get_sku + @get_sku = ::Gapic::Config::Method.new get_sku_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 + 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 + signal_zone_state_config = parent_rpcs.signal_zone_state if parent_rpcs.respond_to? :signal_zone_state + @signal_zone_state = ::Gapic::Config::Method.new signal_zone_state_config + request_order_date_change_config = parent_rpcs.request_order_date_change if parent_rpcs.respond_to? :request_order_date_change + @request_order_date_change = ::Gapic::Config::Method.new request_order_date_change_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/operations.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/operations.rb new file mode 100644 index 000000000000..0fd6460e36ea --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 GDCHardwareManagement + module V1alpha + module GDCHardwareManagement + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "gdchardwaremanagement.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the GDCHardwareManagement 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 GDCHardwareManagement 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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::GDCHardwareManagement::V1alpha::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "gdchardwaremanagement.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: "/v1alpha/{name}/operations", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1alpha/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/service_stub.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/service_stub.rb new file mode 100644 index 000000000000..0f1cf309a507 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/service_stub.rb @@ -0,0 +1,2354 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gdchardwaremanagement/v1alpha/service_pb" + +module Google + module Cloud + module GDCHardwareManagement + module V1alpha + module GDCHardwareManagement + module Rest + ## + # REST service stub for the GDCHardwareManagement 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 list_orders REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse] + # A result object deserialized from the server's reply + def list_orders request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_orders_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_orders", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse.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_order REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] + # A result object deserialized from the server's reply + def get_order request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_order_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_order", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Order.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_order REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_order request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_order_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_order", + 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_order REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_order request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_order_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_order", + 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_order REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_order request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_order_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_order", + 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 submit_order REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def submit_order request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_submit_order_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "submit_order", + 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 cancel_order REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def cancel_order request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_cancel_order_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_order", + 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_sites REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse] + # A result object deserialized from the server's reply + def list_sites request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_sites_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_sites", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse.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_site REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] + # A result object deserialized from the server's reply + def get_site request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_site_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_site", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Site.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_site REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_site request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_site_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_site", + 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_site REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_site request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_site_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_site", + 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_site REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_site request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_site_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_site", + 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_hardware_groups REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse] + # A result object deserialized from the server's reply + def list_hardware_groups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_hardware_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_hardware_groups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse.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_hardware_group REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] + # A result object deserialized from the server's reply + def get_hardware_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_hardware_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_hardware_group", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup.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_hardware_group REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_hardware_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_hardware_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_hardware_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_hardware_group REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_hardware_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_hardware_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_hardware_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_hardware_group REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_hardware_group request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_hardware_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_hardware_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_hardware REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse] + # A result object deserialized from the server's reply + def list_hardware request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_hardware_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_hardware", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse.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_hardware REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] + # A result object deserialized from the server's reply + def get_hardware request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_hardware_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_hardware", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware.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_hardware REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_hardware request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_hardware_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_hardware", + 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_hardware REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_hardware request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_hardware_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_hardware", + 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_hardware REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_hardware request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_hardware_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_hardware", + 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_comments REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse] + # A result object deserialized from the server's reply + def list_comments request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_comments_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_comments", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse.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_comment REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] + # A result object deserialized from the server's reply + def get_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_comment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.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_comment REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_comment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_comment", + 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 record_action_on_comment REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] + # A result object deserialized from the server's reply + def record_action_on_comment request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_record_action_on_comment_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "record_action_on_comment", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.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_change_log_entries REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse] + # A result object deserialized from the server's reply + def list_change_log_entries request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_change_log_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_change_log_entries", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse.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_change_log_entry REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry] + # A result object deserialized from the server's reply + def get_change_log_entry request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_change_log_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_change_log_entry", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry.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_skus REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse] + # A result object deserialized from the server's reply + def list_skus request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_skus_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_skus", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse.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_sku REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku] + # A result object deserialized from the server's reply + def get_sku request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_sku_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_sku", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku.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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::ListZonesResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::Zone] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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 create_zone REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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 signal_zone_state REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def signal_zone_state request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_signal_zone_state_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "signal_zone_state", + 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 request_order_date_change REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Longrunning::Operation] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Longrunning::Operation] + # A result object deserialized from the server's reply + def request_order_date_change request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_request_order_date_change_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_h { |p| p.split "=", 2 } + else + {} + end + + response = @client_stub.make_http_request( + verb, + uri: uri, + body: body || "", + params: query_string_params, + method_name: "request_order_date_change", + 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 list_orders REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest] + # 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_orders_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{parent}/orders", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_order REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest] + # 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_order_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_order REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest] + # 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_order_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1alpha/{parent}/orders", + body: "order", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_order REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest] + # 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_order_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1alpha/{order.name}", + body: "order", + matches: [ + ["order.name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_order REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest] + # 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_order_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the submit_order REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_submit_order_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1alpha/{name}:submit", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_order REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest] + # 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_order_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1alpha/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_sites REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest] + # 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_sites_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{parent}/sites", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_site REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest] + # 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_site_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/sites/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_site REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest] + # 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_site_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1alpha/{parent}/sites", + body: "site", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_site REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest] + # 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_site_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1alpha/{site.name}", + body: "site", + matches: [ + ["site.name", %r{^projects/[^/]+/locations/[^/]+/sites/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_site REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest] + # 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_site_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/sites/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_hardware_groups REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest] + # 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_hardware_groups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{parent}/hardwareGroups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_hardware_group REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest] + # 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_hardware_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/hardwareGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_hardware_group REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest] + # 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_hardware_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1alpha/{parent}/hardwareGroups", + body: "hardware_group", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_hardware_group REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest] + # 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_hardware_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1alpha/{hardware_group.name}", + body: "hardware_group", + matches: [ + ["hardware_group.name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/hardwareGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_hardware_group REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest] + # 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_hardware_group_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/hardwareGroups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_hardware REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest] + # 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_hardware_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{parent}/hardware", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_hardware REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest] + # 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_hardware_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/hardware/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_hardware REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest] + # 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_hardware_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1alpha/{parent}/hardware", + body: "hardware", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_hardware REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest] + # 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_hardware_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1alpha/{hardware.name}", + body: "hardware", + matches: [ + ["hardware.name", %r{^projects/[^/]+/locations/[^/]+/hardware/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_hardware REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest] + # 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_hardware_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/hardware/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_comments REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest] + # 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_comments_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{parent}/comments", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_comment REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest] + # 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_comment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/comments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_comment REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest] + # 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_comment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1alpha/{parent}/comments", + body: "comment", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the record_action_on_comment REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_record_action_on_comment_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1alpha/{name}:recordAction", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/comments/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_change_log_entries REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest] + # 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_change_log_entries_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{parent}/changeLogEntries", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_change_log_entry REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest] + # 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_change_log_entry_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/changeLogEntries/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_skus REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest] + # 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_skus_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{parent}/skus", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_sku REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest] + # 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_sku_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/skus/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_zones REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::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: "/v1alpha/{parent}/zones", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_zone REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::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: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_zone REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::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: "/v1alpha/{parent}/zones", + body: "zone", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_zone REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::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: "/v1alpha/{zone.name}", + body: "zone", + matches: [ + ["zone.name", %r{^projects/[^/]+/locations/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_zone REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::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: "/v1alpha/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the signal_zone_state REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_signal_zone_state_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1alpha/{name}:signal", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/zones/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the request_order_date_change REST call + # + # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_request_order_date_change_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1alpha/{name}:requestDateChange", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/rest.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/rest.rb new file mode 100644 index 000000000000..30ef342103a5 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gdc_hardware_management/v1alpha/gdc_hardware_management/rest" +require "google/cloud/gdc_hardware_management/v1alpha/bindings_override" +require "google/cloud/gdc_hardware_management/v1alpha/version" + +module Google + module Cloud + module GDCHardwareManagement + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/gdc_hardware_management/v1alpha/rest" + # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new + # + module V1alpha + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/version.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/version.rb new file mode 100644 index 000000000000..b560b3e7f8df --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/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 GDCHardwareManagement + module V1alpha + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/resources_pb.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/resources_pb.rb new file mode 100644 index 000000000000..8513739dcc2d --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/resources_pb.rb @@ -0,0 +1,99 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/date_pb' +require 'google/type/datetime_pb' +require 'google/type/dayofweek_pb' +require 'google/type/postal_address_pb' +require 'google/type/timeofday_pb' + + +descriptor_data = "\n:google/cloud/gdchardwaremanagement/v1alpha/resources.proto\x12*google.cloud.gdchardwaremanagement.v1alpha\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x1agoogle/type/datetime.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a google/type/postal_address.proto\x1a\x1bgoogle/type/timeofday.proto\"\xf6\x0f\n\x05Order\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12R\n\x06labels\x18\x04 \x03(\x0b\x32=.google.cloud.gdchardwaremanagement.v1alpha.Order.LabelsEntryB\x03\xe0\x41\x01\x12K\n\x05state\x18\x05 \x01(\x0e\x32\x37.google.cloud.gdchardwaremanagement.v1alpha.Order.StateB\x03\xe0\x41\x03\x12\x62\n\x14organization_contact\x18\x06 \x01(\x0b\x32?.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactB\x03\xe0\x41\x02\x12\x1d\n\x10target_workloads\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12 \n\x13\x63ustomer_motivation\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12;\n\x10\x66ulfillment_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x01\x12\x44\n$customer_requested_installation_date\x18\x15 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01\x12\x18\n\x0bregion_code\x18\n \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0eorder_form_uri\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12I\n\x04type\x18\x0c \x01(\x0e\x32\x36.google.cloud.gdchardwaremanagement.v1alpha.Order.TypeB\x03\xe0\x41\x03\x12\x34\n\x0bsubmit_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\nbilling_id\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\\\n\x11\x65xisting_hardware\x18\x10 \x03(\x0b\x32<.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocationB\x03\xe0\x41\x01\x12^\n\x0f\x64\x65ployment_type\x18\x12 \x01(\x0e\x32@.google.cloud.gdchardwaremanagement.v1alpha.Order.DeploymentTypeB\x03\xe0\x41\x03\x12\x38\n\x18\x61\x63tual_installation_date\x18\x13 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x12;\n\x1b\x65stimated_installation_date\x18\x14 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x12\x37\n\x17\x65stimated_delivery_date\x18\x16 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x12\x16\n\tmigration\x18\x17 \x01(\x08\x42\x03\xe0\x41\x01\x12\x36\n\raccepted_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x15requested_date_change\x18\x19 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x12\x19\n\x0cvendor_notes\x18\x1a \x01(\tB\x03\xe0\x41\x03\x12\\\n\x0evendor_contact\x18\x1b \x01(\x0b\x32?.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactB\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\"\xe4\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\r\n\tSUBMITTED\x10\x02\x12\x11\n\rINFO_COMPLETE\x10\x0c\x12\x0c\n\x08\x41\x43\x43\x45PTED\x10\x03\x12\x1a\n\x16\x41\x44\x44ITIONAL_INFO_NEEDED\x10\x04\x12\x0c\n\x08\x42UILDING\x10\x05\x12\x0c\n\x08SHIPPING\x10\x06\x12\x0e\n\nINSTALLING\x10\x07\x12\n\n\x06\x46\x41ILED\x10\x08\x12\x17\n\x13PARTIALLY_COMPLETED\x10\t\x12\r\n\tCOMPLETED\x10\n\x12\r\n\tCANCELLED\x10\x0b\"?\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04PAID\x10\x01\x12\x07\n\x03POC\x10\x02\x12\n\n\x06UNPAID\x10\x02\x1a\x02\x10\x01\"|\n\x0e\x44\x65ploymentType\x12\x1f\n\x1b\x44\x45PLOYMENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x46ULL_PRODUCTION\x10\x01\x12\x14\n\x10PROOF_OF_CONCEPT\x10\x02\x12\x0c\n\x08INTERNAL\x10\x03\x12\x10\n\x0c\x43USTOMER_LAB\x10\x04:v\xea\x41s\n*gdchardwaremanagement.googleapis.com/Order\x12\x36projects/{project}/locations/{location}/orders/{order}*\x06orders2\x05order\"\xbb\x05\n\x04Site\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x18 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x19 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.gdchardwaremanagement.v1alpha.Site.LabelsEntryB\x03\xe0\x41\x01\x12\x62\n\x14organization_contact\x18\x05 \x01(\x0b\x32?.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactB\x03\xe0\x41\x02\x12 \n\x13google_maps_pin_uri\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12Q\n\x0c\x61\x63\x63\x65ss_times\x18\x1a \x03(\x0b\x32\x36.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodB\x03\xe0\x41\x01\x12\x12\n\x05notes\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x63ustomer_site_id\x18\x1c \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:q\xea\x41n\n)gdchardwaremanagement.googleapis.com/Site\x12\x34projects/{project}/locations/{location}/sites/{site}*\x05sites2\x04site\"\xec\x07\n\rHardwareGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Z\n\x06labels\x18\x04 \x03(\x0b\x32\x45.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.LabelsEntryB\x03\xe0\x41\x01\x12\x1b\n\x0ehardware_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12O\n\x06\x63onfig\x18\x06 \x01(\x0b\x32:.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigB\x03\xe0\x41\x02\x12?\n\x04site\x18\x07 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Site\x12S\n\x05state\x18\x08 \x01(\x0e\x32?.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.StateB\x03\xe0\x41\x03\x12?\n\x04zone\x18\t \x01(\tB1\xe0\x41\x01\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Zone\x12=\n\x1brequested_installation_date\x18\n \x01(\x0b\x32\x11.google.type.DateB\x05\x18\x01\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\"\x9a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x41\x44\x44ITIONAL_INFO_NEEDED\x10\x01\x12\x0c\n\x08\x42UILDING\x10\x02\x12\x0c\n\x08SHIPPING\x10\x03\x12\x0e\n\nINSTALLING\x10\x04\x12\x17\n\x13PARTIALLY_INSTALLED\x10\x05\x12\r\n\tINSTALLED\x10\x06\x12\n\n\x06\x46\x41ILED\x10\x07:\xaf\x01\xea\x41\xab\x01\n2gdchardwaremanagement.googleapis.com/HardwareGroup\x12Vprojects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}*\x0ehardwareGroups2\rhardwareGroup\"\x99\x11\n\x08Hardware\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\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\x12U\n\x06labels\x18\x05 \x03(\x0b\x32@.google.cloud.gdchardwaremanagement.v1alpha.Hardware.LabelsEntryB\x03\xe0\x41\x01\x12\x41\n\x05order\x18\x06 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gdchardwaremanagement.googleapis.com/Order\x12R\n\x0ehardware_group\x18\x07 \x01(\tB:\xe0\x41\x03\xfa\x41\x34\n2gdchardwaremanagement.googleapis.com/HardwareGroup\x12?\n\x04site\x18\x08 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Site\x12N\n\x05state\x18\t \x01(\x0e\x32:.google.cloud.gdchardwaremanagement.v1alpha.Hardware.StateB\x03\xe0\x41\x03\x12\x14\n\x07\x63iq_uri\x18\n \x01(\tB\x03\xe0\x41\x03\x12O\n\x06\x63onfig\x18\x0b \x01(\x0b\x32:.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigB\x03\xe0\x41\x02\x12;\n\x1b\x65stimated_installation_date\x18\x0c \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x12\\\n\rphysical_info\x18\r \x01(\x0b\x32@.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfoB\x03\xe0\x41\x01\x12\x64\n\x11installation_info\x18\x0e \x01(\x0b\x32\x44.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfoB\x03\xe0\x41\x01\x12?\n\x04zone\x18\x0f \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Zone\x12;\n\x1brequested_installation_date\x18\x10 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01\x12\x38\n\x18\x61\x63tual_installation_date\x18\x11 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x12\\\n\rmachine_infos\x18\x14 \x03(\x0b\x32@.google.cloud.gdchardwaremanagement.v1alpha.Hardware.MachineInfoB\x03\xe0\x41\x03\x12\x37\n\x17\x65stimated_delivery_date\x18\x15 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x1a\xf1\x01\n\nMacAddress\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12^\n\x04type\x18\x02 \x01(\x0e\x32K.google.cloud.gdchardwaremanagement.v1alpha.Hardware.MacAddress.AddressTypeB\x03\xe0\x41\x03\x12!\n\x0cipv4_address\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\"J\n\x0b\x41\x64\x64ressType\x12\x1c\n\x18\x41\x44\x44RESS_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03NIC\x10\x01\x12\x07\n\x03\x42MC\x10\x02\x12\x0b\n\x07VIRTUAL\x10\x03\x1a\x9c\x01\n\x08\x44iskInfo\x12\x19\n\x0cmanufacturer\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04slot\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1a\n\rserial_number\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04psid\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bpart_number\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cmodel_number\x18\x06 \x01(\tB\x03\xe0\x41\x03\x1a\xef\x01\n\x0bMachineInfo\x12\x18\n\x0bservice_tag\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12[\n\rmac_addresses\x18\x02 \x03(\x0b\x32?.google.cloud.gdchardwaremanagement.v1alpha.Hardware.MacAddressB\x03\xe0\x41\x03\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12V\n\ndisk_infos\x18\x04 \x03(\x0b\x32=.google.cloud.gdchardwaremanagement.v1alpha.Hardware.DiskInfoB\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\"\x81\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x41\x44\x44ITIONAL_INFO_NEEDED\x10\x01\x12\x0c\n\x08\x42UILDING\x10\x02\x12\x0c\n\x08SHIPPING\x10\x03\x12\x0e\n\nINSTALLING\x10\x04\x12\r\n\tINSTALLED\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06:\x84\x01\xea\x41\x80\x01\n-gdchardwaremanagement.googleapis.com/Hardware\x12;projects/{project}/locations/{location}/hardware/{hardware}*\x08hardware2\x08hardware\"\xa1\x04\n\x07\x43omment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x06labels\x18\x03 \x03(\x0b\x32?.google.cloud.gdchardwaremanagement.v1alpha.Comment.LabelsEntryB\x03\xe0\x41\x01\x12\x13\n\x06\x61uthor\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04text\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12=\n\x14\x63ustomer_viewed_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12N\n\rauthor_entity\x18\x07 \x01(\x0e\x32\x32.google.cloud.gdchardwaremanagement.v1alpha.EntityB\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:\x90\x01\xea\x41\x8c\x01\n,gdchardwaremanagement.googleapis.com/Comment\x12Iprojects/{project}/locations/{location}/orders/{order}/comments/{comment}*\x08\x63omments2\x07\x63omment\"\xb1\x03\n\x0e\x43hangeLogEntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x06labels\x18\x03 \x03(\x0b\x32\x46.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.LabelsEntryB\x03\xe0\x41\x01\x12\x10\n\x03log\x18\x04 \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:\xb7\x01\xea\x41\xb3\x01\n3gdchardwaremanagement.googleapis.com/ChangeLogEntry\x12Zprojects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}*\x10\x63hangeLogEntries2\x0e\x63hangeLogEntry\"\x8a\x06\n\x03Sku\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\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\x12J\n\x06\x63onfig\x18\x06 \x01(\x0b\x32\x35.google.cloud.gdchardwaremanagement.v1alpha.SkuConfigB\x03\xe0\x41\x03\x12O\n\tinstances\x18\x07 \x03(\x0b\x32\x37.google.cloud.gdchardwaremanagement.v1alpha.SkuInstanceB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tis_active\x18\n \x01(\x08\x42\x03\xe0\x41\x03\x12G\n\x04type\x18\x0b \x01(\x0e\x32\x34.google.cloud.gdchardwaremanagement.v1alpha.Sku.TypeB\x03\xe0\x41\x03\x12\x17\n\nvcpu_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x03\x12Y\n\x15hardware_count_ranges\x18\r \x03(\x0b\x32\x35.google.cloud.gdchardwaremanagement.v1alpha.Sku.RangeB\x03\xe0\x41\x03\x1a!\n\x05Range\x12\x0b\n\x03min\x18\x01 \x01(\x05\x12\x0b\n\x03max\x18\x02 \x01(\x05\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04RACK\x10\x01\x12\n\n\x06SERVER\x10\x02:l\xea\x41i\n(gdchardwaremanagement.googleapis.com/Sku\x12\x32projects/{project}/locations/{location}/skus/{sku}*\x04skus2\x03sku\"\x91\x0b\n\x04Zone\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.gdchardwaremanagement.v1alpha.Zone.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12J\n\x05state\x18\x08 \x01(\x0e\x32\x36.google.cloud.gdchardwaremanagement.v1alpha.Zone.StateB\x03\xe0\x41\x03\x12J\n\x08\x63ontacts\x18\t \x03(\x0b\x32\x33.google.cloud.gdchardwaremanagement.v1alpha.ContactB\x03\xe0\x41\x02\x12\x14\n\x07\x63iq_uri\x18\n \x01(\tB\x03\xe0\x41\x03\x12Z\n\x0enetwork_config\x18\x0b \x01(\x0b\x32=.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfigB\x03\xe0\x41\x01\x12\x1f\n\x12globally_unique_id\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x61\n\x14subscription_configs\x18\r \x03(\x0b\x32>.google.cloud.gdchardwaremanagement.v1alpha.SubscriptionConfigB\x03\xe0\x41\x03\x12\x63\n\x12provisioning_state\x18\x0e \x01(\x0e\x32\x42.google.cloud.gdchardwaremanagement.v1alpha.Zone.ProvisioningStateB\x03\xe0\x41\x03\x12&\n\x19skip_cluster_provisioning\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12$\n\x17\x63luster_intent_required\x18\x11 \x01(\x08\x42\x03\xe0\x41\x03\x12$\n\x17\x63luster_intent_verified\x18\x12 \x01(\x08\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\"\x84\x02\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x41\x44\x44ITIONAL_INFO_NEEDED\x10\x01\x12\r\n\tPREPARING\x10\x02\x12,\n(READY_FOR_CUSTOMER_FACTORY_TURNUP_CHECKS\x10\x05\x12*\n&CUSTOMER_FACTORY_TURNUP_CHECKS_STARTED\x10\x08\x12\x19\n\x15READY_FOR_SITE_TURNUP\x10\x06\x12)\n%CUSTOMER_FACTORY_TURNUP_CHECKS_FAILED\x10\x07\x12\n\n\x06\x41\x43TIVE\x10\x03\x12\r\n\tCANCELLED\x10\x04\"\x8b\x01\n\x11ProvisioningState\x12\"\n\x1ePROVISIONING_STATE_UNSPECIFIED\x10\x00\x12\x19\n\x15PROVISIONING_REQUIRED\x10\x01\x12\x1c\n\x18PROVISIONING_IN_PROGRESS\x10\x02\x12\x19\n\x15PROVISIONING_COMPLETE\x10\x03:q\xea\x41n\n)gdchardwaremanagement.googleapis.com/Zone\x12\x34projects/{project}/locations/{location}/zones/{zone}*\x05zones2\x04zone\"\xbb\x01\n\x13OrganizationContact\x12\x30\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05phone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12J\n\x08\x63ontacts\x18\x04 \x03(\x0b\x32\x33.google.cloud.gdchardwaremanagement.v1alpha.ContactB\x03\xe0\x41\x02\"\xe9\x01\n\x07\x43ontact\x12\x17\n\ngiven_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x66\x61mily_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05phone\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12-\n\ttime_zone\x18\x05 \x01(\x0b\x32\x15.google.type.TimeZoneB\x03\xe0\x41\x01\x12T\n\x0freachable_times\x18\x06 \x03(\x0b\x32\x36.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodB\x03\xe0\x41\x01\"\xce\x01\n\x0eHardwareConfig\x12=\n\x03sku\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(gdchardwaremanagement.googleapis.com/Sku\x12R\n\x0cpower_supply\x18\x02 \x01(\x0e\x32\x37.google.cloud.gdchardwaremanagement.v1alpha.PowerSupplyB\x03\xe0\x41\x02\x12)\n\x1csubscription_duration_months\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"C\n\tSkuConfig\x12\x0b\n\x03\x63pu\x18\x01 \x01(\t\x12\x0b\n\x03gpu\x18\x02 \x01(\t\x12\x0b\n\x03ram\x18\x03 \x01(\t\x12\x0f\n\x07storage\x18\x04 \x01(\t\"\xca\x01\n\x0bSkuInstance\x12\x13\n\x0bregion_code\x18\x01 \x01(\t\x12M\n\x0cpower_supply\x18\x02 \x01(\x0e\x32\x37.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply\x12\x13\n\x0b\x62illing_sku\x18\x03 \x01(\t\x12\x1c\n\x14\x62illing_sku_per_vcpu\x18\x04 \x01(\t\x12$\n\x1csubscription_duration_months\x18\x05 \x01(\x05\"\xa1\x06\n\x14HardwarePhysicalInfo\x12s\n\x10power_receptacle\x18\x01 \x01(\x0e\x32T.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleTypeB\x03\xe0\x41\x02\x12o\n\x0enetwork_uplink\x18\x02 \x01(\x0e\x32R.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkTypeB\x03\xe0\x41\x02\x12^\n\x07voltage\x18\x03 \x01(\x0e\x32H.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.VoltageB\x03\xe0\x41\x02\x12^\n\x07\x61mperes\x18\x04 \x01(\x0e\x32H.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.AmperesB\x03\xe0\x41\x02\"\xa3\x01\n\x13PowerReceptacleType\x12%\n!POWER_RECEPTACLE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNEMA_5_15\x10\x01\x12\x08\n\x04\x43_13\x10\x02\x12\x13\n\x0bSTANDARD_EU\x10\x03\x1a\x02\x08\x01\x12\x11\n\rTYPE_G_BS1363\x10\x04\x12\x0b\n\x07\x43\x45\x45_7_3\x10\x05\x12\x0b\n\x07\x43\x45\x45_7_5\x10\x06\x12\n\n\x06TYPE_F\x10\x07\"C\n\x11NetworkUplinkType\x12#\n\x1fNETWORK_UPLINK_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05RJ_45\x10\x01\"D\n\x07Voltage\x12\x17\n\x13VOLTAGE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bVOLTAGE_110\x10\x01\x12\x0f\n\x0bVOLTAGE_220\x10\x03\"2\n\x07\x41mperes\x12\x17\n\x13\x41MPERES_UNSPECIFIED\x10\x00\x12\x0e\n\nAMPERES_15\x10\x01\"\xd5\x03\n\x18HardwareInstallationInfo\x12\x1a\n\rrack_location\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15power_distance_meters\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12#\n\x16switch_distance_meters\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12Y\n\x14rack_unit_dimensions\x18\x04 \x01(\x0b\x32\x36.google.cloud.gdchardwaremanagement.v1alpha.DimensionsB\x03\xe0\x41\x02\x12N\n\nrack_space\x18\x05 \x01(\x0b\x32\x35.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceB\x03\xe0\x41\x02\x12\x65\n\track_type\x18\x06 \x01(\x0e\x32M.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackTypeB\x03\xe0\x41\x02\"B\n\x08RackType\x12\x19\n\x15RACK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08TWO_POST\x10\x01\x12\r\n\tFOUR_POST\x10\x02\"\xb0\x03\n\x11ZoneNetworkConfig\x12,\n\x17machine_mgmt_ipv4_range\x18\x01 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12/\n\x1akubernetes_node_ipv4_range\x18\x02 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x38\n#kubernetes_control_plane_ipv4_range\x18\x03 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12W\n\x16management_ipv4_subnet\x18\x04 \x01(\x0b\x32\x32.google.cloud.gdchardwaremanagement.v1alpha.SubnetB\x03\xe0\x41\x02\x12W\n\x16kubernetes_ipv4_subnet\x18\x05 \x01(\x0b\x32\x32.google.cloud.gdchardwaremanagement.v1alpha.SubnetB\x03\xe0\x41\x01\x12\'\n\x12\x64ns_ipv4_addresses\x18\x06 \x03(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\'\n\x1akubernetes_primary_vlan_id\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\"]\n\x06Subnet\x12\"\n\raddress_range\x18\x01 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12/\n\x1a\x64\x65\x66\x61ult_gateway_ip_address\x18\x02 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x02\"\x97\x01\n\nTimePeriod\x12/\n\nstart_time\x18\x01 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x02\x12-\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x02\x12)\n\x04\x64\x61ys\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x02\"^\n\nDimensions\x12\x19\n\x0cwidth_inches\x18\x01 \x01(\x02\x42\x03\xe0\x41\x02\x12\x1a\n\rheight_inches\x18\x02 \x01(\x02\x42\x03\xe0\x41\x02\x12\x19\n\x0c\x64\x65pth_inches\x18\x03 \x01(\x02\x42\x03\xe0\x41\x02\"E\n\tRackSpace\x12\x1c\n\x0fstart_rack_unit\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1a\n\rend_rack_unit\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\xbf\x01\n\x10HardwareLocation\x12?\n\x04site\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Site\x12\x1a\n\rrack_location\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12N\n\nrack_space\x18\x03 \x03(\x0b\x32\x35.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceB\x03\xe0\x41\x01\"\xb7\x02\n\x12SubscriptionConfig\x12\x1c\n\x0fsubscription_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nbilling_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x64\n\x05state\x18\x03 \x01(\x0e\x32P.google.cloud.gdchardwaremanagement.v1alpha.SubscriptionConfig.SubscriptionStateB\x03\xe0\x41\x03\"\x83\x01\n\x11SubscriptionState\x12\"\n\x1eSUBSCRIPTION_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x16\n\x12\x46\x41ILED_TO_RETRIEVE\x10\x04\x12\r\n\tCOMPLETED\x10\x05*U\n\x0bPowerSupply\x12\x1c\n\x18POWER_SUPPLY_UNSPECIFIED\x10\x00\x12\x13\n\x0fPOWER_SUPPLY_AC\x10\x01\x12\x13\n\x0fPOWER_SUPPLY_DC\x10\x02*F\n\x06\x45ntity\x12\x16\n\x12\x45NTITY_UNSPECIFIED\x10\x00\x12\n\n\x06GOOGLE\x10\x01\x12\x0c\n\x08\x43USTOMER\x10\x02\x12\n\n\x06VENDOR\x10\x03\x42\xb2\x02\n.com.google.cloud.gdchardwaremanagement.v1alphaB\x0eResourcesProtoP\x01Zdcloud.google.com/go/gdchardwaremanagement/apiv1alpha/gdchardwaremanagementpb;gdchardwaremanagementpb\xaa\x02*Google.Cloud.GdcHardwareManagement.V1Alpha\xca\x02*Google\\Cloud\\GdcHardwareManagement\\V1alpha\xea\x02-Google::Cloud::GDCHardwareManagement::V1alphab\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.type.Date", "google/type/date.proto"], + ["google.type.PostalAddress", "google/type/postal_address.proto"], + ["google.type.TimeZone", "google/type/datetime.proto"], + ["google.type.TimeOfDay", "google/type/timeofday.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GDCHardwareManagement + module V1alpha + Order = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Order").msgclass + Order::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Order.State").enummodule + Order::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Order.Type").enummodule + Order::DeploymentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Order.DeploymentType").enummodule + Site = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Site").msgclass + HardwareGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup").msgclass + HardwareGroup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State").enummodule + Hardware = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Hardware").msgclass + Hardware::MacAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Hardware.MacAddress").msgclass + Hardware::MacAddress::AddressType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Hardware.MacAddress.AddressType").enummodule + Hardware::DiskInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Hardware.DiskInfo").msgclass + Hardware::MachineInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Hardware.MachineInfo").msgclass + Hardware::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Hardware.State").enummodule + Comment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Comment").msgclass + ChangeLogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry").msgclass + Sku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Sku").msgclass + Sku::Range = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Sku.Range").msgclass + Sku::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Sku.Type").enummodule + Zone = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Zone").msgclass + Zone::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Zone.State").enummodule + Zone::ProvisioningState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Zone.ProvisioningState").enummodule + OrganizationContact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact").msgclass + Contact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Contact").msgclass + HardwareConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig").msgclass + SkuConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SkuConfig").msgclass + SkuInstance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SkuInstance").msgclass + HardwarePhysicalInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo").msgclass + HardwarePhysicalInfo::PowerReceptacleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType").enummodule + HardwarePhysicalInfo::NetworkUplinkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType").enummodule + HardwarePhysicalInfo::Voltage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage").enummodule + HardwarePhysicalInfo::Amperes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes").enummodule + HardwareInstallationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo").msgclass + HardwareInstallationInfo::RackType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType").enummodule + ZoneNetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig").msgclass + Subnet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Subnet").msgclass + TimePeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.TimePeriod").msgclass + Dimensions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Dimensions").msgclass + RackSpace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.RackSpace").msgclass + HardwareLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation").msgclass + SubscriptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SubscriptionConfig").msgclass + SubscriptionConfig::SubscriptionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SubscriptionConfig.SubscriptionState").enummodule + PowerSupply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.PowerSupply").enummodule + Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Entity").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_pb.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_pb.rb new file mode 100644 index 000000000000..644c021c1880 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_pb.rb @@ -0,0 +1,107 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gdchardwaremanagement/v1alpha/service.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/gdchardwaremanagement/v1alpha/resources_pb' +require 'google/longrunning/operations_pb' +require 'google/protobuf/empty_pb' +require 'google/protobuf/field_mask_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/date_pb' + + +descriptor_data = "\n8google/cloud/gdchardwaremanagement/v1alpha/service.proto\x12*google.cloud.gdchardwaremanagement.v1alpha\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/gdchardwaremanagement/v1alpha/resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\"\xb4\x01\n\x11ListOrdersRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*gdchardwaremanagement.googleapis.com/Order\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\"\x85\x01\n\x12ListOrdersResponse\x12\x41\n\x06orders\x18\x01 \x03(\x0b\x32\x31.google.cloud.gdchardwaremanagement.v1alpha.Order\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x0fGetOrderRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gdchardwaremanagement.googleapis.com/Order\"\xcf\x01\n\x12\x43reateOrderRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*gdchardwaremanagement.googleapis.com/Order\x12\x15\n\x08order_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x05order\x18\x03 \x01(\x0b\x32\x31.google.cloud.gdchardwaremanagement.v1alpha.OrderB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n\x12UpdateOrderRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x45\n\x05order\x18\x02 \x01(\x0b\x32\x31.google.cloud.gdchardwaremanagement.v1alpha.OrderB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x12\x44\x65leteOrderRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gdchardwaremanagement.googleapis.com/Order\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x02\n\x12SubmitOrderRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gdchardwaremanagement.googleapis.com/Order\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12V\n\x04type\x18\x03 \x01(\x0e\x32\x43.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest.TypeB\x03\xe0\x41\x01\"A\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINFO_PENDING\x10\x01\x12\x11\n\rINFO_COMPLETE\x10\x02\"w\n\x12\x43\x61ncelOrderRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gdchardwaremanagement.googleapis.com/Order\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb2\x01\n\x10ListSitesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)gdchardwaremanagement.googleapis.com/Site\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\"\x82\x01\n\x11ListSitesResponse\x12?\n\x05sites\x18\x01 \x03(\x0b\x32\x30.google.cloud.gdchardwaremanagement.v1alpha.Site\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x0eGetSiteRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Site\"\xca\x01\n\x11\x43reateSiteRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)gdchardwaremanagement.googleapis.com/Site\x12\x14\n\x07site_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x04site\x18\x03 \x01(\x0b\x32\x30.google.cloud.gdchardwaremanagement.v1alpha.SiteB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa7\x01\n\x11UpdateSiteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x43\n\x04site\x18\x02 \x01(\x0b\x32\x30.google.cloud.gdchardwaremanagement.v1alpha.SiteB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"u\n\x11\x44\x65leteSiteRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Site\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc4\x01\n\x19ListHardwareGroupsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32gdchardwaremanagement.googleapis.com/HardwareGroup\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\"\x9e\x01\n\x1aListHardwareGroupsResponse\x12R\n\x0fhardware_groups\x18\x01 \x03(\x0b\x32\x39.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"c\n\x17GetHardwareGroupRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2gdchardwaremanagement.googleapis.com/HardwareGroup\"\xf9\x01\n\x1a\x43reateHardwareGroupRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32gdchardwaremanagement.googleapis.com/HardwareGroup\x12\x1e\n\x11hardware_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12V\n\x0ehardware_group\x18\x03 \x01(\x0b\x32\x39.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc3\x01\n\x1aUpdateHardwareGroupRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12V\n\x0ehardware_group\x18\x02 \x01(\x0b\x32\x39.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x1a\x44\x65leteHardwareGroupRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2gdchardwaremanagement.googleapis.com/HardwareGroup\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb9\x01\n\x13ListHardwareRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-gdchardwaremanagement.googleapis.com/Hardware\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\"\x8c\x01\n\x14ListHardwareResponse\x12\x46\n\x08hardware\x18\x01 \x03(\x0b\x32\x34.google.cloud.gdchardwaremanagement.v1alpha.Hardware\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Y\n\x12GetHardwareRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-gdchardwaremanagement.googleapis.com/Hardware\"\xc5\x01\n\x15\x43reateHardwareRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-gdchardwaremanagement.googleapis.com/Hardware\x12\x18\n\x0bhardware_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12K\n\x08hardware\x18\x03 \x01(\x0b\x32\x34.google.cloud.gdchardwaremanagement.v1alpha.HardwareB\x03\xe0\x41\x02\"\xb3\x01\n\x15UpdateHardwareRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12K\n\x08hardware\x18\x02 \x01(\x0b\x32\x34.google.cloud.gdchardwaremanagement.v1alpha.HardwareB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"}\n\x15\x44\x65leteHardwareRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-gdchardwaremanagement.googleapis.com/Hardware\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb8\x01\n\x13ListCommentsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,gdchardwaremanagement.googleapis.com/Comment\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\"\x8b\x01\n\x14ListCommentsResponse\x12\x45\n\x08\x63omments\x18\x01 \x03(\x0b\x32\x33.google.cloud.gdchardwaremanagement.v1alpha.Comment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"W\n\x11GetCommentRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,gdchardwaremanagement.googleapis.com/Comment\"\xd9\x01\n\x14\x43reateCommentRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,gdchardwaremanagement.googleapis.com/Comment\x12\x17\n\ncomment_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12I\n\x07\x63omment\x18\x03 \x01(\x0b\x32\x33.google.cloud.gdchardwaremanagement.v1alpha.CommentB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x92\x02\n\x1cRecordActionOnCommentRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,gdchardwaremanagement.googleapis.com/Comment\x12m\n\x0b\x61\x63tion_type\x18\x02 \x01(\x0e\x32S.google.cloud.gdchardwaremanagement.v1alpha.RecordActionOnCommentRequest.ActionTypeB\x03\xe0\x41\x02\"?\n\nActionType\x12\x1b\n\x17\x41\x43TION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\n\n\x06UNREAD\x10\x02\"\xc7\x01\n\x1bListChangeLogEntriesRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33gdchardwaremanagement.googleapis.com/ChangeLogEntry\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\"\xa4\x01\n\x1cListChangeLogEntriesResponse\x12V\n\x12\x63hange_log_entries\x18\x01 \x03(\x0b\x32:.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"e\n\x18GetChangeLogEntryRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3gdchardwaremanagement.googleapis.com/ChangeLogEntry\"\xb0\x01\n\x0fListSkusRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(gdchardwaremanagement.googleapis.com/Sku\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\"\x7f\n\x10ListSkusResponse\x12=\n\x04skus\x18\x01 \x03(\x0b\x32/.google.cloud.gdchardwaremanagement.v1alpha.Sku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"O\n\rGetSkuRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(gdchardwaremanagement.googleapis.com/Sku\"\xb2\x01\n\x10ListZonesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)gdchardwaremanagement.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\"\x82\x01\n\x11ListZonesResponse\x12?\n\x05zones\x18\x01 \x03(\x0b\x32\x30.google.cloud.gdchardwaremanagement.v1alpha.Zone\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x0eGetZoneRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Zone\"\xd2\x01\n\x11\x43reateZoneRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)gdchardwaremanagement.googleapis.com/Zone\x12\x14\n\x07zone_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x04zone\x18\x03 \x01(\x0b\x32\x30.google.cloud.gdchardwaremanagement.v1alpha.ZoneB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xaf\x01\n\x11UpdateZoneRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x43\n\x04zone\x18\x02 \x01(\x0b\x32\x30.google.cloud.gdchardwaremanagement.v1alpha.ZoneB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"u\n\x11\x44\x65leteZoneRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Zone\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xee\x05\n\x16SignalZoneStateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Zone\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12i\n\x0cstate_signal\x18\x03 \x01(\x0e\x32N.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignalB\x03\xe0\x41\x01\x12\x82\x01\n\x19provisioning_state_signal\x18\x04 \x01(\x0e\x32Z.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.ProvisioningStateSignalB\x03\xe0\x41\x01\x12\x11\n\x04step\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x64\x65tails\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xd9\x01\n\x0bStateSignal\x12\x1c\n\x18STATE_SIGNAL_UNSPECIFIED\x10\x00\x12!\n\x1d\x46\x41\x43TORY_TURNUP_CHECKS_STARTED\x10\x03\x12 \n\x1c\x46\x41\x43TORY_TURNUP_CHECKS_PASSED\x10\x01\x12\x1d\n\x15READY_FOR_SITE_TURNUP\x10\x01\x1a\x02\x08\x01\x12 \n\x1c\x46\x41\x43TORY_TURNUP_CHECKS_FAILED\x10\x02\x12\"\n\x1eVERIFY_CLUSTER_INTENT_PRESENCE\x10\x04\x1a\x02\x10\x01\"}\n\x17ProvisioningStateSignal\x12)\n%PROVISIONING_STATE_SIGNAL_UNSPECIFIED\x10\x00\x12\x1c\n\x18PROVISIONING_IN_PROGRESS\x10\x01\x12\x19\n\x15PROVISIONING_COMPLETE\x10\x02\"\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\"\x91\x01\n\x1dRequestOrderDateChangeRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gdchardwaremanagement.googleapis.com/Order\x12.\n\x0erequested_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x32\xaf\x42\n\x15GDCHardwareManagement\x12\xcd\x01\n\nListOrders\x12=.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest\x1a>.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{parent=projects/*/locations/*}/orders\x12\xba\x01\n\x08GetOrder\x12;.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest\x1a\x31.google.cloud.gdchardwaremanagement.v1alpha.Order\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{name=projects/*/locations/*/orders/*}\x12\xe1\x01\n\x0b\x43reateOrder\x12>.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x1a\n\x05Order\x12\x11OperationMetadata\xda\x41\x15parent,order,order_id\x82\xd3\xe4\x93\x02\x38\"//v1alpha/{parent=projects/*/locations/*}/orders:\x05order\x12\xe3\x01\n\x0bUpdateOrder\x12>.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1a\n\x05Order\x12\x11OperationMetadata\xda\x41\x11order,update_mask\x82\xd3\xe4\x93\x02>25/v1alpha/{order.name=projects/*/locations/*/orders/*}:\x05order\x12\xd9\x01\n\x0b\x44\x65leteOrder\x12>.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1alpha/{name=projects/*/locations/*/orders/*}\x12\xd3\x01\n\x0bSubmitOrder\x12>.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41\x1a\n\x05Order\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1alpha/{name=projects/*/locations/*/orders/*}:submit:\x01*\x12\xd3\x01\n\x0b\x43\x61ncelOrder\x12>.google.cloud.gdchardwaremanagement.v1alpha.CancelOrderRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41\x1a\n\x05Order\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1alpha/{name=projects/*/locations/*/orders/*}:cancel:\x01*\x12\xc9\x01\n\tListSites\x12<.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest\x1a=.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1alpha/{parent=projects/*/locations/*}/sites\x12\xb6\x01\n\x07GetSite\x12:.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest\x1a\x30.google.cloud.gdchardwaremanagement.v1alpha.Site\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1alpha/{name=projects/*/locations/*/sites/*}\x12\xda\x01\n\nCreateSite\x12=.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41\x19\n\x04Site\x12\x11OperationMetadata\xda\x41\x13parent,site,site_id\x82\xd3\xe4\x93\x02\x36\"./v1alpha/{parent=projects/*/locations/*}/sites:\x04site\x12\xdc\x01\n\nUpdateSite\x12=.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x19\n\x04Site\x12\x11OperationMetadata\xda\x41\x10site,update_mask\x82\xd3\xe4\x93\x02;23/v1alpha/{site.name=projects/*/locations/*/sites/*}:\x04site\x12\xd6\x01\n\nDeleteSite\x12=.google.cloud.gdchardwaremanagement.v1alpha.DeleteSiteRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1alpha/{name=projects/*/locations/*/sites/*}\x12\xf6\x01\n\x12ListHardwareGroups\x12\x45.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest\x1a\x46.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1alpha/{parent=projects/*/locations/*/orders/*}/hardwareGroups\x12\xe3\x01\n\x10GetHardwareGroup\x12\x43.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest\x1a\x39.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1alpha/{name=projects/*/locations/*/orders/*/hardwareGroups/*}\x12\xa6\x02\n\x13\x43reateHardwareGroup\x12\x46.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41\"\n\rHardwareGroup\x12\x11OperationMetadata\xda\x41\'parent,hardware_group,hardware_group_id\x82\xd3\xe4\x93\x02R\"@/v1alpha/{parent=projects/*/locations/*/orders/*}/hardwareGroups:\x0ehardware_group\x12\xa8\x02\n\x13UpdateHardwareGroup\x12\x46.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest\x1a\x1d.google.longrunning.Operation\"\xa9\x01\xca\x41\"\n\rHardwareGroup\x12\x11OperationMetadata\xda\x41\x1ahardware_group,update_mask\x82\xd3\xe4\x93\x02\x61\x32O/v1alpha/{hardware_group.name=projects/*/locations/*/orders/*/hardwareGroups/*}:\x0ehardware_group\x12\xfa\x01\n\x13\x44\x65leteHardwareGroup\x12\x46.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest\x1a\x1d.google.longrunning.Operation\"|\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1alpha/{name=projects/*/locations/*/orders/*/hardwareGroups/*}\x12\xd5\x01\n\x0cListHardware\x12?.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest\x1a@.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1alpha/{parent=projects/*/locations/*}/hardware\x12\xc5\x01\n\x0bGetHardware\x12>.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest\x1a\x34.google.cloud.gdchardwaremanagement.v1alpha.Hardware\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1alpha/{name=projects/*/locations/*/hardware/*}\x12\xf6\x01\n\x0e\x43reateHardware\x12\x41.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest\x1a\x1d.google.longrunning.Operation\"\x81\x01\xca\x41\x1d\n\x08Hardware\x12\x11OperationMetadata\xda\x41\x1bparent,hardware,hardware_id\x82\xd3\xe4\x93\x02=\"1/v1alpha/{parent=projects/*/locations/*}/hardware:\x08hardware\x12\xf8\x01\n\x0eUpdateHardware\x12\x41.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x1d\n\x08Hardware\x12\x11OperationMetadata\xda\x41\x14hardware,update_mask\x82\xd3\xe4\x93\x02\x46\x32:/v1alpha/{hardware.name=projects/*/locations/*/hardware/*}:\x08hardware\x12\xe1\x01\n\x0e\x44\x65leteHardware\x12\x41.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1alpha/{name=projects/*/locations/*/hardware/*}\x12\xde\x01\n\x0cListComments\x12?.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest\x1a@.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1alpha/{parent=projects/*/locations/*/orders/*}/comments\x12\xcb\x01\n\nGetComment\x12=.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest\x1a\x33.google.cloud.gdchardwaremanagement.v1alpha.Comment\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1alpha/{name=projects/*/locations/*/orders/*/comments/*}\x12\xf9\x01\n\rCreateComment\x12@.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41\x1c\n\x07\x43omment\x12\x11OperationMetadata\xda\x41\x19parent,comment,comment_id\x82\xd3\xe4\x93\x02\x45\":/v1alpha/{parent=projects/*/locations/*/orders/*}/comments:\x07\x63omment\x12\xfd\x01\n\x15RecordActionOnComment\x12H.google.cloud.gdchardwaremanagement.v1alpha.RecordActionOnCommentRequest\x1a\x33.google.cloud.gdchardwaremanagement.v1alpha.Comment\"e\xda\x41\x10name,action_type\x82\xd3\xe4\x93\x02L\"G/v1alpha/{name=projects/*/locations/*/orders/*/comments/*}:recordAction:\x01*\x12\xfe\x01\n\x14ListChangeLogEntries\x12G.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest\x1aH.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1alpha/{parent=projects/*/locations/*/orders/*}/changeLogEntries\x12\xe8\x01\n\x11GetChangeLogEntry\x12\x44.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest\x1a:.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1alpha/{name=projects/*/locations/*/orders/*/changeLogEntries/*}\x12\xc5\x01\n\x08ListSkus\x12;.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest\x1a<.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1alpha/{parent=projects/*/locations/*}/skus\x12\xb2\x01\n\x06GetSku\x12\x39.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest\x1a/.google.cloud.gdchardwaremanagement.v1alpha.Sku\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1alpha/{name=projects/*/locations/*/skus/*}\x12\xc9\x01\n\tListZones\x12<.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest\x1a=.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1alpha/{parent=projects/*/locations/*}/zones\x12\xb6\x01\n\x07GetZone\x12:.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest\x1a\x30.google.cloud.gdchardwaremanagement.v1alpha.Zone\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1alpha/{name=projects/*/locations/*/zones/*}\x12\xda\x01\n\nCreateZone\x12=.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x13parent,zone,zone_id\x82\xd3\xe4\x93\x02\x36\"./v1alpha/{parent=projects/*/locations/*}/zones:\x04zone\x12\xdc\x01\n\nUpdateZone\x12=.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x10zone,update_mask\x82\xd3\xe4\x93\x02;23/v1alpha/{zone.name=projects/*/locations/*/zones/*}:\x04zone\x12\xd6\x01\n\nDeleteZone\x12=.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1alpha/{name=projects/*/locations/*/zones/*}\x12\xe6\x01\n\x0fSignalZoneState\x12\x42.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x11name,state_signal\x82\xd3\xe4\x93\x02:\"5/v1alpha/{name=projects/*/locations/*/zones/*}:signal:\x01*\x12\x83\x02\n\x16RequestOrderDateChange\x12I.google.cloud.gdchardwaremanagement.v1alpha.RequestOrderDateChangeRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1a\n\x05Order\x12\x11OperationMetadata\xda\x41\x13name,requested_date\x82\xd3\xe4\x93\x02\x46\"A/v1alpha/{name=projects/*/locations/*/orders/*}:requestDateChange:\x01*\x1aX\xca\x41$gdchardwaremanagement.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb0\x02\n.com.google.cloud.gdchardwaremanagement.v1alphaB\x0cServiceProtoP\x01Zdcloud.google.com/go/gdchardwaremanagement/apiv1alpha/gdchardwaremanagementpb;gdchardwaremanagementpb\xaa\x02*Google.Cloud.GdcHardwareManagement.V1Alpha\xca\x02*Google\\Cloud\\GdcHardwareManagement\\V1alpha\xea\x02-Google::Cloud::GDCHardwareManagement::V1alphab\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.gdchardwaremanagement.v1alpha.Order", "google/cloud/gdchardwaremanagement/v1alpha/resources.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.type.Date", "google/type/date.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GDCHardwareManagement + module V1alpha + ListOrdersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest").msgclass + ListOrdersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse").msgclass + GetOrderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest").msgclass + CreateOrderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest").msgclass + UpdateOrderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest").msgclass + DeleteOrderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest").msgclass + SubmitOrderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest").msgclass + SubmitOrderRequest::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest.Type").enummodule + CancelOrderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CancelOrderRequest").msgclass + ListSitesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest").msgclass + ListSitesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse").msgclass + GetSiteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest").msgclass + CreateSiteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest").msgclass + UpdateSiteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest").msgclass + DeleteSiteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.DeleteSiteRequest").msgclass + ListHardwareGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest").msgclass + ListHardwareGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse").msgclass + GetHardwareGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest").msgclass + CreateHardwareGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest").msgclass + UpdateHardwareGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest").msgclass + DeleteHardwareGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest").msgclass + ListHardwareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest").msgclass + ListHardwareResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse").msgclass + GetHardwareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest").msgclass + CreateHardwareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest").msgclass + UpdateHardwareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest").msgclass + DeleteHardwareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest").msgclass + ListCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest").msgclass + ListCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse").msgclass + GetCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest").msgclass + CreateCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest").msgclass + RecordActionOnCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.RecordActionOnCommentRequest").msgclass + RecordActionOnCommentRequest::ActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.RecordActionOnCommentRequest.ActionType").enummodule + ListChangeLogEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest").msgclass + ListChangeLogEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse").msgclass + GetChangeLogEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest").msgclass + ListSkusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest").msgclass + ListSkusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse").msgclass + GetSkuRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest").msgclass + ListZonesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest").msgclass + ListZonesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse").msgclass + GetZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest").msgclass + CreateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest").msgclass + UpdateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest").msgclass + DeleteZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest").msgclass + SignalZoneStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest").msgclass + SignalZoneStateRequest::StateSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal").enummodule + SignalZoneStateRequest::ProvisioningStateSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.ProvisioningStateSignal").enummodule + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata").msgclass + RequestOrderDateChangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.RequestOrderDateChangeRequest").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_services_pb.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_services_pb.rb new file mode 100644 index 000000000000..b7d920dba588 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_services_pb.rb @@ -0,0 +1,120 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/gdchardwaremanagement/v1alpha/service.proto for package 'Google.Cloud.GDCHardwareManagement.V1alpha' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/gdchardwaremanagement/v1alpha/service_pb' + +module Google + module Cloud + module GDCHardwareManagement + module V1alpha + module GDCHardwareManagement + # The GDC Hardware Management service. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement' + + # Lists orders in a given project and location. + rpc :ListOrders, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse + # Gets details of an order. + rpc :GetOrder, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Order + # Creates a new order in a given project and location. + rpc :CreateOrder, ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest, ::Google::Longrunning::Operation + # Updates the parameters of an order. + rpc :UpdateOrder, ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest, ::Google::Longrunning::Operation + # Deletes an order. + rpc :DeleteOrder, ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest, ::Google::Longrunning::Operation + # Submits an order. + rpc :SubmitOrder, ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest, ::Google::Longrunning::Operation + # Cancels an order. + rpc :CancelOrder, ::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest, ::Google::Longrunning::Operation + # Lists sites in a given project and location. + rpc :ListSites, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse + # Gets details of a site. + rpc :GetSite, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Site + # Creates a new site in a given project and location. + rpc :CreateSite, ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest, ::Google::Longrunning::Operation + # Updates the parameters of a site. + rpc :UpdateSite, ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest, ::Google::Longrunning::Operation + # Deletes a site. + rpc :DeleteSite, ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest, ::Google::Longrunning::Operation + # Lists hardware groups in a given order. + rpc :ListHardwareGroups, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse + # Gets details of a hardware group. + rpc :GetHardwareGroup, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup + # Creates a new hardware group in a given order. + rpc :CreateHardwareGroup, ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest, ::Google::Longrunning::Operation + # Updates the parameters of a hardware group. + rpc :UpdateHardwareGroup, ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest, ::Google::Longrunning::Operation + # Deletes a hardware group. + rpc :DeleteHardwareGroup, ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest, ::Google::Longrunning::Operation + # Lists hardware in a given project and location. + rpc :ListHardware, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse + # Gets hardware details. + rpc :GetHardware, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware + # Creates new hardware in a given project and location. + rpc :CreateHardware, ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest, ::Google::Longrunning::Operation + # Updates hardware parameters. + rpc :UpdateHardware, ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest, ::Google::Longrunning::Operation + # Deletes hardware. + rpc :DeleteHardware, ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest, ::Google::Longrunning::Operation + # Lists the comments on an order. + rpc :ListComments, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse + # Gets the content of a comment. + rpc :GetComment, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment + # Creates a new comment on an order. + rpc :CreateComment, ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest, ::Google::Longrunning::Operation + # Record Action on a Comment. If the Action specified in the request is READ, + # the viewed time in the comment is set to the time the request was received. + # If the comment is already marked as read, subsequent calls will be ignored. + # If the Action is UNREAD, the viewed time is cleared from the comment. + rpc :RecordActionOnComment, ::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment + # Lists the changes made to an order. + rpc :ListChangeLogEntries, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse + # Gets details of a change to an order. + rpc :GetChangeLogEntry, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry + # Lists SKUs for a given project and location. + rpc :ListSkus, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse + # Gets details of an SKU. + rpc :GetSku, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku + # Lists zones in a given project and location. + rpc :ListZones, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesResponse + # Gets details of a zone. + rpc :GetZone, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Zone + # Creates a new zone in a given project and location. + rpc :CreateZone, ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest, ::Google::Longrunning::Operation + # Updates the parameters of a zone. + rpc :UpdateZone, ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest, ::Google::Longrunning::Operation + # Deletes a zone. + rpc :DeleteZone, ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest, ::Google::Longrunning::Operation + # Signals the state of a zone. + rpc :SignalZoneState, ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest, ::Google::Longrunning::Operation + # Updates the requested date change of a single Order. + rpc :RequestOrderDateChange, ::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest, ::Google::Longrunning::Operation + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/README.md b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/README.md new file mode 100644 index 000000000000..7e80aeaac20b --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/README.md @@ -0,0 +1,4 @@ +# GDC Hardware Management V1ALPHA 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-gdc_hardware_management-v1alpha/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/resources.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/resources.rb new file mode 100644 index 000000000000..da6b670c171e --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/resources.rb @@ -0,0 +1,1206 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GDCHardwareManagement + module V1alpha + # An order for GDC hardware. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of this order. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @!attribute [rw] display_name + # @return [::String] + # Optional. Display name of this order. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this order was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this order was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels associated with this order as key value pairs. + # For more information about labels, see [Create and manage + # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + # @!attribute [r] state + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order::State] + # Output only. State of this order. On order creation, state will be set to + # DRAFT. + # @!attribute [rw] organization_contact + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::OrganizationContact] + # Required. Customer contact information. + # @!attribute [rw] target_workloads + # @return [::Array<::String>] + # Optional. Customer specified workloads of interest targeted by this order. + # This must contain <= 20 elements and the length of each element must be <= + # 50 characters. + # @!attribute [rw] customer_motivation + # @return [::String] + # Required. Information about the customer's motivation for this order. The + # length of this field must be <= 1000 characters. + # @!attribute [rw] fulfillment_time + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Protobuf::Timestamp] + # Deprecated: Please use customer_requested_installation_date instead. + # @!attribute [rw] customer_requested_installation_date + # @return [::Google::Type::Date] + # Optional. Customer requested installation date for this order. + # @!attribute [rw] region_code + # @return [::String] + # Required. [Unicode CLDR](http://cldr.unicode.org/) region code where this + # order will be deployed. For a list of valid CLDR region codes, see the + # [Language Subtag + # Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry). + # @!attribute [r] order_form_uri + # @return [::String] + # Output only. Link to the order form. + # @!attribute [r] type + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order::Type] + # Output only. Type of this Order. + # @!attribute [r] submit_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when the order was submitted. Is auto-populated to the + # current time when an order is submitted. + # @!attribute [r] billing_id + # @return [::String] + # Output only. The Google Cloud Billing ID to be charged for this order. + # @!attribute [rw] existing_hardware + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareLocation>] + # Optional. Existing hardware to be removed as part of this order. + # Note: any hardware removed will be recycled unless otherwise agreed. + # @!attribute [r] deployment_type + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order::DeploymentType] + # Output only. The deployment type of this order. + # @!attribute [r] actual_installation_date + # @return [::Google::Type::Date] + # Output only. Actual installation date for this order. + # @!attribute [r] estimated_installation_date + # @return [::Google::Type::Date] + # Output only. Estimated installation date for this order. + # @!attribute [r] estimated_delivery_date + # @return [::Google::Type::Date] + # Output only. Estimated delivery date for this order. + # @!attribute [rw] migration + # @return [::Boolean] + # Optional. Whether this order is a migration from customer's existing + # infrastructure. + # @!attribute [r] accepted_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time when the order was moved to ACCEPTED state. + # @!attribute [r] requested_date_change + # @return [::Google::Type::Date] + # Output only. The date to which the customer or Google wants to set the + # scheduled installation date. + # @!attribute [r] vendor_notes + # @return [::String] + # Output only. Notes for this order, provided by the vendor. + # @!attribute [r] vendor_contact + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::OrganizationContact] + # Output only. Contact information of the SI assigned to this order. + class Order + 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 + + # Valid states of an order. + module State + # State of the order is unspecified. + STATE_UNSPECIFIED = 0 + + # Order is being drafted by the customer and has not been submitted yet. + DRAFT = 1 + + # Order has been submitted to Google. + SUBMITTED = 2 + + # All information required from the customer for fulfillment of the order + # is complete. + INFO_COMPLETE = 12 + + # Order has been accepted by Google. + ACCEPTED = 3 + + # Order needs more information from the customer. + ADDITIONAL_INFO_NEEDED = 4 + + # Google has initiated building hardware for the order. + BUILDING = 5 + + # The hardware has been built and is being shipped. + SHIPPING = 6 + + # The hardware is being installed. + INSTALLING = 7 + + # An error occurred in processing the order and customer intervention is + # required. + FAILED = 8 + + # Order has been partially completed i.e., some hardware have been + # delivered and installed. + PARTIALLY_COMPLETED = 9 + + # Order has been completed. + COMPLETED = 10 + + # Order has been cancelled. + CANCELLED = 11 + end + + # Valid types of an Order. + module Type + # Type of the order is unspecified. + TYPE_UNSPECIFIED = 0 + + # Paid by the customer. + PAID = 1 + + # Proof of concept for the customer. + POC = 2 + + # Not billed. + UNPAID = 2 + end + + # Valid types of a deployment. + module DeploymentType + # Deployment type is unspecified. + DEPLOYMENT_TYPE_UNSPECIFIED = 0 + + # Prod deployment with SLOs. + FULL_PRODUCTION = 1 + + # Deployment with best-effort support and no SLOs. + PROOF_OF_CONCEPT = 2 + + # Internal deployment with best-effort support and no SLOs. + INTERNAL = 3 + + # Customer lab deployment that we support as though it's prod. + CUSTOMER_LAB = 4 + end + end + + # A physical site where hardware will be installed. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of the site. + # Format: `projects/{project}/locations/{location}/sites/{site}` + # @!attribute [rw] display_name + # @return [::String] + # Optional. Display name of this Site. + # @!attribute [rw] description + # @return [::String] + # Optional. Description of this Site. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this site was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this site was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels associated with this site as key value pairs. + # For more information about labels, see [Create and manage + # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + # @!attribute [rw] organization_contact + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::OrganizationContact] + # Required. Contact information for this site. + # @!attribute [rw] google_maps_pin_uri + # @return [::String] + # Optional. A URL to the Google Maps address location of the site. + # An example value is `https://goo.gl/maps/xxxxxxxxx`. + # @!attribute [rw] access_times + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::TimePeriod>] + # Optional. The time periods when the site is accessible. + # If this field is empty, the site is accessible at all times. + # + # This field is used by Google to schedule the initial installation as well + # as any later hardware maintenance. You may update this at any time. For + # example, if the initial installation is requested during off-hours but + # maintenance should be performed during regular business hours, you should + # update the access times after initial installation is complete. + # @!attribute [rw] notes + # @return [::String] + # Optional. Any additional notes for this Site. Please include information + # about: + # - security or access restrictions + # - any regulations affecting the technicians visiting the site + # - any special process or approval required to move the equipment + # - whether a representative will be available during site visits + # @!attribute [rw] customer_site_id + # @return [::String] + # Optional. Customer defined identifier for this Site. This can be used to + # identify the site in the customer's own systems. + class Site + 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 group of hardware that is part of the same order, has the same SKU, and is + # delivered to the same site. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of this hardware group. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this hardware group was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this hardware group was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels associated with this hardware group as key value pairs. + # For more information about labels, see [Create and manage + # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + # @!attribute [rw] hardware_count + # @return [::Integer] + # Required. Number of hardware in this HardwareGroup. + # @!attribute [rw] config + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareConfig] + # Required. Configuration for hardware in this HardwareGroup. + # @!attribute [rw] site + # @return [::String] + # Required. Name of the site where the hardware in this HardwareGroup will be + # delivered. + # Format: `projects/{project}/locations/{location}/sites/{site}` + # @!attribute [r] state + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup::State] + # Output only. Current state of this HardwareGroup. + # @!attribute [rw] zone + # @return [::String] + # Optional. Name of the zone that the hardware in this HardwareGroup belongs + # to. Format: `projects/{project}/locations/{location}/zones/{zone}` + # @!attribute [rw] requested_installation_date + # @deprecated This field is deprecated and may be removed in the next major version update. + # @return [::Google::Type::Date] + # Deprecated: This value is not used. Use the requested_installation_date + # field in the Order resource instead. + class HardwareGroup + 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 + + # Valid states of a HardwareGroup. + module State + # State of the HardwareGroup is unspecified. + STATE_UNSPECIFIED = 0 + + # More information is required from the customer to make progress. + ADDITIONAL_INFO_NEEDED = 1 + + # Google has initiated building hardware for this HardwareGroup. + BUILDING = 2 + + # The hardware has been built and is being shipped. + SHIPPING = 3 + + # The hardware is being installed. + INSTALLING = 4 + + # Some hardware in the HardwareGroup have been installed. + PARTIALLY_INSTALLED = 5 + + # All hardware in the HardwareGroup have been installed. + INSTALLED = 6 + + # An error occurred and customer intervention is required. + FAILED = 7 + end + end + + # An instance of hardware installed at a site. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of this hardware. + # Format: `projects/{project}/locations/{location}/hardware/{hardware}` + # @!attribute [rw] display_name + # @return [::String] + # Optional. Display name for this hardware. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this hardware was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this hardware was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels associated with this hardware as key value pairs. + # For more information about labels, see [Create and manage + # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + # @!attribute [rw] order + # @return [::String] + # Required. Name of the order that this hardware belongs to. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @!attribute [r] hardware_group + # @return [::String] + # Output only. Name for the hardware group that this hardware belongs to. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + # @!attribute [rw] site + # @return [::String] + # Required. Name for the site that this hardware belongs to. + # Format: `projects/{project}/locations/{location}/sites/{site}` + # @!attribute [r] state + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware::State] + # Output only. Current state for this hardware. + # @!attribute [r] ciq_uri + # @return [::String] + # Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this + # Hardware. + # @!attribute [rw] config + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareConfig] + # Required. Configuration for this hardware. + # @!attribute [r] estimated_installation_date + # @return [::Google::Type::Date] + # Output only. Estimated installation date for this hardware. + # @!attribute [rw] physical_info + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwarePhysicalInfo] + # Optional. Physical properties of this hardware. + # @!attribute [rw] installation_info + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareInstallationInfo] + # Optional. Information for installation of this hardware. + # @!attribute [rw] zone + # @return [::String] + # Required. Name for the zone that this hardware belongs to. + # Format: `projects/{project}/locations/{location}/zones/{zone}` + # @!attribute [rw] requested_installation_date + # @return [::Google::Type::Date] + # Optional. Requested installation date for this hardware. If not specified, + # this is auto-populated from the order's fulfillment_time upon submission or + # from the HardwareGroup's requested_installation_date upon order acceptance. + # @!attribute [r] actual_installation_date + # @return [::Google::Type::Date] + # Output only. Actual installation date for this hardware. Filled in by + # Google. + # @!attribute [r] machine_infos + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware::MachineInfo>] + # Output only. Per machine asset information needed for turnup. + # @!attribute [r] estimated_delivery_date + # @return [::Google::Type::Date] + # Output only. The estimated delivery date of the hardware. + class Hardware + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Message to describe the MAC address of a machine. + # @!attribute [r] address + # @return [::String] + # Output only. Address string. + # @!attribute [r] type + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware::MacAddress::AddressType] + # Output only. Address type for this MAC address. + # @!attribute [r] ipv4_address + # @return [::String] + # Output only. Static IP address (if used) that is associated with the MAC + # address. Only applicable for VIRTUAL MAC address type. + class MacAddress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum for the different types of MAC address. + module AddressType + # Unspecified address type. + ADDRESS_TYPE_UNSPECIFIED = 0 + + # Address of a network interface card. + NIC = 1 + + # Address of a baseboard management controller. + BMC = 2 + + # Address of a virtual interface. + VIRTUAL = 3 + end + end + + # Information about individual disks on a machine. + # @!attribute [r] manufacturer + # @return [::String] + # Output only. Disk manufacturer. + # @!attribute [r] slot + # @return [::Integer] + # Output only. Disk slot number. + # @!attribute [r] serial_number + # @return [::String] + # Output only. Disk serial number. + # @!attribute [r] psid + # @return [::String] + # Output only. Disk PSID. + # @!attribute [r] part_number + # @return [::String] + # Output only. Disk part number. + # @!attribute [r] model_number + # @return [::String] + # Output only. Disk model number. + class DiskInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Information about individual machines vendors will provide during turnup. + # @!attribute [r] service_tag + # @return [::String] + # Output only. Machine service tag. + # @!attribute [r] mac_addresses + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware::MacAddress>] + # Output only. Each associated MAC address. + # @!attribute [r] name + # @return [::String] + # Output only. Machine name. + # @!attribute [r] disk_infos + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware::DiskInfo>] + # Output only. Information for each disk installed. + class MachineInfo + 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 + + # Valid states for hardware. + module State + # State of the Hardware is unspecified. + STATE_UNSPECIFIED = 0 + + # More information is required from the customer to make progress. + ADDITIONAL_INFO_NEEDED = 1 + + # Google has initiated building hardware for this Hardware. + BUILDING = 2 + + # The hardware has been built and is being shipped. + SHIPPING = 3 + + # The hardware is being installed. + INSTALLING = 4 + + # The hardware has been installed. + INSTALLED = 5 + + # An error occurred and customer intervention is required. + FAILED = 6 + end + end + + # A comment on an order. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of this comment. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this comment was created. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels associated with this comment as key value pairs. + # For more information about labels, see [Create and manage + # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + # @!attribute [r] author + # @return [::String] + # Output only. Username of the author of this comment. This is auto-populated + # from the credentials used during creation of the comment. + # @!attribute [rw] text + # @return [::String] + # Required. Text of this comment. The length of text must be <= 1000 + # characters. + # @!attribute [r] customer_viewed_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of the first time this comment was viewed by the + # customer. If the comment wasn't viewed then this timestamp will be unset. + # @!attribute [r] author_entity + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Entity] + # Output only. The entity the author belongs to. + class Comment + 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 log entry of a change made to an order. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of this change log entry. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this change log entry was created. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels associated with this change log entry as key value pairs. + # For more information about labels, see [Create and manage + # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + # @!attribute [r] log + # @return [::String] + # Output only. Content of this log entry. + class ChangeLogEntry + 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 stock keeping unit (SKU) of GDC hardware. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of this SKU. + # Format: `projects/{project}/locations/{location}/skus/{sku}` + # @!attribute [r] display_name + # @return [::String] + # Output only. Display name of this SKU. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this SKU was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this SKU was last updated. + # @!attribute [r] config + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::SkuConfig] + # Output only. Configuration for this SKU. + # @!attribute [r] instances + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::SkuInstance>] + # Output only. Available instances of this SKU. This field should be used for + # checking availability of a SKU. + # @!attribute [r] description + # @return [::String] + # Output only. Description of this SKU. + # @!attribute [r] revision_id + # @return [::String] + # Output only. The SKU revision ID. + # A new revision is created whenever `config` is updated. The format is an + # 8-character hexadecimal string. + # @!attribute [r] is_active + # @return [::Boolean] + # Output only. Flag to indicate whether or not this revision is active. Only + # an active revision can be used in a new Order. + # @!attribute [r] type + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku::Type] + # Output only. Type of this SKU. + # @!attribute [r] vcpu_count + # @return [::Integer] + # Output only. The vCPU count associated with this SKU. + # @!attribute [r] hardware_count_ranges + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku::Range>] + # Output only. The inclusive ranges of hardware counts that are allowed in a + # zone using this SKU. + class Sku + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Inclusive range. + # @!attribute [rw] min + # @return [::Integer] + # The minimum value of the range. + # @!attribute [rw] max + # @return [::Integer] + # The maximum value of the range. + class Range + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Valid types of a SKU. + module Type + # Type of the SKU is unspecified. This is not an allowed value. + TYPE_UNSPECIFIED = 0 + + # Rack SKU. + RACK = 1 + + # Server SKU. + SERVER = 2 + end + end + + # A zone holding a set of hardware. + # @!attribute [rw] name + # @return [::String] + # Identifier. Name of this zone. + # Format: `projects/{project}/locations/{location}/zones/{zone}` + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this zone was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Time when this zone was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Labels associated with this zone as key value pairs. + # For more information about labels, see [Create and manage + # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). + # @!attribute [rw] display_name + # @return [::String] + # Optional. Human friendly display name of this zone. + # @!attribute [r] state + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone::State] + # Output only. Current state for this zone. + # @!attribute [rw] contacts + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Contact>] + # Required. The points of contact. + # @!attribute [r] ciq_uri + # @return [::String] + # Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this + # zone. + # @!attribute [rw] network_config + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ZoneNetworkConfig] + # Optional. Networking configuration for this zone. + # @!attribute [r] globally_unique_id + # @return [::String] + # Output only. Globally unique identifier generated for this Edge Zone. + # @!attribute [r] subscription_configs + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::SubscriptionConfig>] + # Output only. Subscription configurations for this zone. + # @!attribute [r] provisioning_state + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone::ProvisioningState] + # Output only. Provisioning state for configurations like MAC addresses. + # @!attribute [rw] skip_cluster_provisioning + # @return [::Boolean] + # Optional. Whether to skip the cluster provisioning step during factory + # turnup. If true, indicates that the Kubernetes cluster will be created + # after the zone's hardware is installed at the customer site. + # @!attribute [r] cluster_intent_required + # @return [::Boolean] + # Output only. Indicates whether a valid cluster intent must be provided by + # the customer before accepting the order. If true, the order cannot be + # accepted until cluster intent is present. This is used to enforce early + # validation and prevent delays caused by missing configuration. + # @!attribute [r] cluster_intent_verified + # @return [::Boolean] + # Output only. Indicates whether the provided cluster intent has been + # successfully verified. This flag ensures cluster intent exists before order + # can be accepted. + class Zone + 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 + + # Valid states for a zone. + module State + # State of the Zone is unspecified. + STATE_UNSPECIFIED = 0 + + # More information is required from the customer to make progress. + ADDITIONAL_INFO_NEEDED = 1 + + # Google is preparing the Zone. + PREPARING = 2 + + # Factory turnup has succeeded. + READY_FOR_CUSTOMER_FACTORY_TURNUP_CHECKS = 5 + + # The Zone is running factory turnup checks. + CUSTOMER_FACTORY_TURNUP_CHECKS_STARTED = 8 + + # The Zone is ready for site turnup. + READY_FOR_SITE_TURNUP = 6 + + # The Zone failed in factory turnup checks. + CUSTOMER_FACTORY_TURNUP_CHECKS_FAILED = 7 + + # The Zone is available to use. + ACTIVE = 3 + + # The Zone has been cancelled. + CANCELLED = 4 + end + + # Valid provisioning states for configurations like MAC addresses. + module ProvisioningState + # Provisioning state is unspecified. + PROVISIONING_STATE_UNSPECIFIED = 0 + + # Provisioning is required. Set by Google. + PROVISIONING_REQUIRED = 1 + + # Provisioning is in progress. Set by customer. + PROVISIONING_IN_PROGRESS = 2 + + # Provisioning is complete. Set by customer. + PROVISIONING_COMPLETE = 3 + end + end + + # Contact information of the customer organization. + # @!attribute [rw] address + # @return [::Google::Type::PostalAddress] + # Required. The organization's address. + # @!attribute [rw] email + # @return [::String] + # Optional. The organization's email. + # @!attribute [rw] phone + # @return [::String] + # Optional. The organization's phone number. + # @!attribute [rw] contacts + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Contact>] + # Required. The individual points of contact in the organization at this + # location. + class OrganizationContact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Contact details of a point of contact. + # @!attribute [rw] given_name + # @return [::String] + # Required. Given name of the contact. + # @!attribute [rw] family_name + # @return [::String] + # Optional. Family name of the contact. + # @!attribute [rw] email + # @return [::String] + # Required. Email of the contact. + # @!attribute [rw] phone + # @return [::String] + # Required. Phone number of the contact. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Optional. Time zone of the contact. + # @!attribute [rw] reachable_times + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::TimePeriod>] + # Optional. The time periods when the contact is reachable. + # If this field is empty, the contact is reachable at all times. + class Contact + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for GDC hardware. + # @!attribute [rw] sku + # @return [::String] + # Required. Reference to the SKU for this hardware. This can point to a + # specific SKU revision in the form of `resource_name@revision_id` as defined + # in [AIP-162](https://google.aip.dev/162). If no revision_id is specified, + # it refers to the latest revision. + # @!attribute [rw] power_supply + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::PowerSupply] + # Required. Power supply type for this hardware. + # @!attribute [rw] subscription_duration_months + # @return [::Integer] + # Optional. Subscription duration for the hardware in months. + class HardwareConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Configuration for a SKU. + # @!attribute [rw] cpu + # @return [::String] + # Information about CPU configuration. + # @!attribute [rw] gpu + # @return [::String] + # Information about GPU configuration. + # @!attribute [rw] ram + # @return [::String] + # Information about RAM configuration. + # @!attribute [rw] storage + # @return [::String] + # Information about storage configuration. + class SkuConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A specific instance of the SKU. + # @!attribute [rw] region_code + # @return [::String] + # The [Unicode CLDR](https://cldr.unicode.org) region code where this + # instance is available. + # @!attribute [rw] power_supply + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::PowerSupply] + # Power supply type for this instance. + # @!attribute [rw] billing_sku + # @return [::String] + # Reference to the corresponding SKU in the Cloud Billing API. + # The estimated price information can be retrieved using that API. + # Format: `services/{service}/skus/{sku}` + # @!attribute [rw] billing_sku_per_vcpu + # @return [::String] + # Reference to the corresponding SKU per vCPU in the Cloud Billing API. + # The estimated price information can be retrieved using that API. + # Format: `services/{service}/skus/{sku}` + # @!attribute [rw] subscription_duration_months + # @return [::Integer] + # Subscription duration for the hardware in months. + class SkuInstance + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Physical properties of a hardware. + # @!attribute [rw] power_receptacle + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwarePhysicalInfo::PowerReceptacleType] + # Required. The power receptacle type. + # @!attribute [rw] network_uplink + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwarePhysicalInfo::NetworkUplinkType] + # Required. Type of the uplink network connection. + # @!attribute [rw] voltage + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwarePhysicalInfo::Voltage] + # Required. Voltage of the power supply. + # @!attribute [rw] amperes + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwarePhysicalInfo::Amperes] + # Required. Amperes of the power supply. + class HardwarePhysicalInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Valid power receptacle types. + module PowerReceptacleType + # Facility plug type is unspecified. + POWER_RECEPTACLE_TYPE_UNSPECIFIED = 0 + + # NEMA 5-15. + NEMA_5_15 = 1 + + # C13. + C_13 = 2 + + # Deprecated: Please use TYPE_G_BS1363, CEE_7_3, CEE_7_5 or TYPE_F + # instead. + STANDARD_EU = 3 + + # Type G / BS1363. + TYPE_G_BS1363 = 4 + + # C 7/3. + CEE_7_3 = 5 + + # C 7/5. + CEE_7_5 = 6 + + # Type F. + TYPE_F = 7 + end + + # Valid network uplink types. + module NetworkUplinkType + # Network uplink type is unspecified. + NETWORK_UPLINK_TYPE_UNSPECIFIED = 0 + + # RJ-45. + RJ_45 = 1 + end + + # Valid voltage values. + module Voltage + # Voltage is unspecified. + VOLTAGE_UNSPECIFIED = 0 + + # 120V. + VOLTAGE_110 = 1 + + # 220V. + VOLTAGE_220 = 3 + end + + # Valid amperes values. + module Amperes + # Amperes is unspecified. + AMPERES_UNSPECIFIED = 0 + + # 15A. + AMPERES_15 = 1 + end + end + + # Information for installation of a Hardware. + # @!attribute [rw] rack_location + # @return [::String] + # Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7, + # Rack 3. + # @!attribute [rw] power_distance_meters + # @return [::Integer] + # Required. Distance from the power outlet in meters. + # @!attribute [rw] switch_distance_meters + # @return [::Integer] + # Required. Distance from the network switch in meters. + # @!attribute [rw] rack_unit_dimensions + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Dimensions] + # Required. Dimensions of the rack unit. + # @!attribute [rw] rack_space + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::RackSpace] + # Required. Rack space allocated for the hardware. + # @!attribute [rw] rack_type + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareInstallationInfo::RackType] + # Required. Type of the rack. + class HardwareInstallationInfo + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Valid rack types. + module RackType + # Rack type is unspecified. + RACK_TYPE_UNSPECIFIED = 0 + + # Two post rack. + TWO_POST = 1 + + # Four post rack. + FOUR_POST = 2 + end + end + + # Networking configuration for a zone. + # @!attribute [rw] machine_mgmt_ipv4_range + # @return [::String] + # Required. An IPv4 address block for machine management. + # Should be a private RFC1918 or public CIDR block large enough to allocate + # at least one address per machine in the Zone. + # Should be in `management_ipv4_subnet`, and disjoint with other address + # ranges. + # @!attribute [rw] kubernetes_node_ipv4_range + # @return [::String] + # Required. An IPv4 address block for kubernetes nodes. + # Should be a private RFC1918 or public CIDR block large enough to allocate + # at least one address per machine in the Zone. + # Should be in `kubernetes_ipv4_subnet`, and disjoint with other address + # ranges. + # @!attribute [rw] kubernetes_control_plane_ipv4_range + # @return [::String] + # Required. An IPv4 address block for kubernetes control plane. + # Should be a private RFC1918 or public CIDR block large enough to allocate + # at least one address per cluster in the Zone. + # Should be in `kubernetes_ipv4_subnet`, and disjoint with other address + # ranges. + # @!attribute [rw] management_ipv4_subnet + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Subnet] + # Required. An IPv4 subnet for the management network. + # @!attribute [rw] kubernetes_ipv4_subnet + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Subnet] + # Optional. An IPv4 subnet for the kubernetes network. + # If unspecified, the kubernetes subnet will be the same as the management + # subnet. + # @!attribute [rw] dns_ipv4_addresses + # @return [::Array<::String>] + # Optional. DNS nameservers. + # The GDC Infrastructure will resolve DNS queries via these IPs. + # If unspecified, Google DNS is used. + # @!attribute [rw] kubernetes_primary_vlan_id + # @return [::Integer] + # Optional. Kubernetes VLAN ID. + # By default, the kubernetes node, including the primary kubernetes network, + # are in the same VLAN as the machine management network. + # For network segmentation purposes, these can optionally be separated. + class ZoneNetworkConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a subnet. + # @!attribute [rw] address_range + # @return [::String] + # Required. Address range for this subnet in CIDR notation. + # @!attribute [rw] default_gateway_ip_address + # @return [::String] + # Required. Default gateway for this subnet. + class Subnet + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a time period in a week. + # @!attribute [rw] start_time + # @return [::Google::Type::TimeOfDay] + # Required. The start of the time period. + # @!attribute [rw] end_time + # @return [::Google::Type::TimeOfDay] + # Required. The end of the time period. + # @!attribute [rw] days + # @return [::Array<::Google::Type::DayOfWeek>] + # Required. The days of the week that the time period is active. + class TimePeriod + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the dimensions of an object. + # @!attribute [rw] width_inches + # @return [::Float] + # Required. Width in inches. + # @!attribute [rw] height_inches + # @return [::Float] + # Required. Height in inches. + # @!attribute [rw] depth_inches + # @return [::Float] + # Required. Depth in inches. + class Dimensions + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents contiguous space in a rack. + # @!attribute [rw] start_rack_unit + # @return [::Integer] + # Required. First rack unit of the rack space (inclusive). + # @!attribute [rw] end_rack_unit + # @return [::Integer] + # Required. Last rack unit of the rack space (inclusive). + class RackSpace + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents the location of one or many hardware. + # @!attribute [rw] site + # @return [::String] + # Required. Name of the site where the hardware are present. + # Format: `projects/{project}/locations/{location}/sites/{site}` + # @!attribute [rw] rack_location + # @return [::String] + # Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7, + # Rack 3. + # @!attribute [rw] rack_space + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::RackSpace>] + # Optional. Spaces occupied by the hardware in the rack. + # If unset, this location is assumed to be the entire rack. + class HardwareLocation + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A message to store a subscription configuration. + # @!attribute [r] subscription_id + # @return [::String] + # Output only. The unique identifier of the subscription. + # @!attribute [r] billing_id + # @return [::String] + # Output only. The Google Cloud Billing ID that the subscription is created + # under. + # @!attribute [r] state + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::SubscriptionConfig::SubscriptionState] + # Output only. The current state of the subscription. + class SubscriptionConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Enum to represent the state of the subscription. + module SubscriptionState + # State is unspecified. + SUBSCRIPTION_STATE_UNSPECIFIED = 0 + + # Active state means that the subscription has been created successfully + # and billing is happening. + ACTIVE = 1 + + # Inactive means that the subscription has been created successfully, but + # billing has not started yet. + INACTIVE = 2 + + # The subscription is in an erroneous state. + ERROR = 3 + + # The subscription state failed to be retrieved. This may be a transient + # issue. The user should retry the request. + FAILED_TO_RETRIEVE = 4 + + # The subscription has been completed, because it has reached the end date. + COMPLETED = 5 + end + end + + # The power supply options. + module PowerSupply + # Power supply is unspecified. + POWER_SUPPLY_UNSPECIFIED = 0 + + # AC power supply. + POWER_SUPPLY_AC = 1 + + # DC power supply. + POWER_SUPPLY_DC = 2 + end + + # Entity is used to denote an organization or party. + module Entity + # Entity is unspecified. + ENTITY_UNSPECIFIED = 0 + + # Google. + GOOGLE = 1 + + # Customer. + CUSTOMER = 2 + + # Vendor. + VENDOR = 3 + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/service.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/service.rb new file mode 100644 index 000000000000..cf335ddab76c --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/service.rb @@ -0,0 +1,959 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GDCHardwareManagement + module V1alpha + # A request to list orders. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location to list orders in. + # Format: `projects/{project}/locations/{location}` + # + # To list orders across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListOrdersRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of orders. + # @!attribute [rw] orders + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>] + # The list of orders. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. Only used for queries to the wildcard + # location `-`. If non-empty, it indicates that the results are incomplete. + class ListOrdersResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get an order. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the resource + class GetOrderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create an order. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location to create the order in. + # Format: `projects/{project}/locations/{location}` + # @!attribute [rw] order_id + # @return [::String] + # Optional. ID used to uniquely identify the Order within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The order.name field in the request will be ignored. + # @!attribute [rw] order + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] + # Required. The order to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class CreateOrderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update an order. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A mask to specify the fields in the Order to overwrite with this + # update. The fields specified in the update_mask are relative to the order, + # not the full request. A field will be overwritten if it is in the mask. If + # you don't provide a mask then all fields will be overwritten. + # @!attribute [rw] order + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] + # Required. The order to update. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class UpdateOrderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete an order. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the order. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @!attribute [rw] force + # @return [::Boolean] + # Optional. An option to delete any nested resources in the Order, such as a + # HardwareGroup. If true, any nested resources for this Order will also be + # deleted. Otherwise, the request will only succeed if the Order has no + # nested resources. + class DeleteOrderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to submit an order. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the order. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @!attribute [rw] type + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest::Type] + # Optional. Type of this request. If unset, the request type is assumed to be + # `INFO_PENDING`. + class SubmitOrderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Valid types of submit order request. + module Type + # Request type is unspecified. This should not be used. + TYPE_UNSPECIFIED = 0 + + # Use this request type to submit your order and initiate conversation with + # Google. After this submission, you will not be able to modify the number + # or SKU of your ordered hardware. Please note that this order will not be + # ready for fulfillment yet until you provide more information, such as + # zone network configuration, hardware physical and installation + # information, etc. + # If you are submitting an order for a SKU type of RACK, please use this + # request type, as additional information will be required outside of the + # API. + INFO_PENDING = 1 + + # Use this request type if and when you are ready to submit your order for + # fulfillment. In addition to the information required for `INFO_PENDING`, + # the order must contain all required information, such as zone network + # configuration, hardware physical and installation information, etc. + # Further changes to any order information will no longer be allowed. + INFO_COMPLETE = 2 + end + end + + # A request to cancel an order. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the order. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class CancelOrderRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list sites. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location to list sites in. + # Format: `projects/{project}/locations/{location}` + # + # To list sites across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListSitesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of sites. + # @!attribute [rw] sites + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>] + # The list of sites. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. Only used for queries to the wildcard + # location `-`. If non-empty, it indicates that the results are incomplete. + class ListSitesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a site. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the site. + # Format: `projects/{project}/locations/{location}/sites/{site}` + class GetSiteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create a site. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location to create the site in. + # Format: `projects/{project}/locations/{location}` + # @!attribute [rw] site_id + # @return [::String] + # Optional. ID used to uniquely identify the Site within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The site.name field in the request will be ignored. + # @!attribute [rw] site + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] + # Required. The site to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class CreateSiteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update a site. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A mask to specify the fields in the Site to overwrite with this + # update. The fields specified in the update_mask are relative to the site, + # not the full request. A field will be overwritten if it is in the mask. If + # you don't provide a mask then all fields will be overwritten. + # @!attribute [rw] site + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] + # Required. The site to update. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class UpdateSiteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete a site. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the site. + # Format: `projects/{project}/locations/{location}/sites/{site}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class DeleteSiteRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list hardware groups. + # @!attribute [rw] parent + # @return [::String] + # Required. The order to list hardware groups in. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListHardwareGroupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of hardware groups. + # @!attribute [rw] hardware_groups + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup>] + # The list of hardware groups. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListHardwareGroupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a hardware group. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the hardware group. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + class GetHardwareGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create a hardware group. + # @!attribute [rw] parent + # @return [::String] + # Required. The order to create the hardware group in. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @!attribute [rw] hardware_group_id + # @return [::String] + # Optional. ID used to uniquely identify the HardwareGroup within its parent + # scope. This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The hardware_group.name field in the request will be ignored. + # @!attribute [rw] hardware_group + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] + # Required. The hardware group to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class CreateHardwareGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update a hardware group. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A mask to specify the fields in the HardwareGroup to overwrite + # with this update. The fields specified in the update_mask are relative to + # the hardware group, not the full request. A field will be overwritten if it + # is in the mask. If you don't provide a mask then all fields will be + # overwritten. + # @!attribute [rw] hardware_group + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] + # Required. The hardware group to update. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class UpdateHardwareGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete a hardware group. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the hardware group. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class DeleteHardwareGroupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list hardware. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location to list hardware in. + # Format: `projects/{project}/locations/{location}` + # + # To list hardware across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListHardwareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of hardware. + # @!attribute [rw] hardware + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware>] + # The list of hardware. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. Only used for queries to the wildcard + # location `-`. If non-empty, it indicates that the results are incomplete. + class ListHardwareResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get hardware. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the hardware. + # Format: `projects/{project}/locations/{location}/hardware/{hardware}` + class GetHardwareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create hardware. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location to create hardware in. + # Format: `projects/{project}/locations/{location}` + # @!attribute [rw] hardware_id + # @return [::String] + # Optional. ID used to uniquely identify the Hardware within its parent + # scope. This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The hardware.name field in the request will be ignored. + # @!attribute [rw] hardware + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] + # Required. The resource to create. + class CreateHardwareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update hardware. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A mask to specify the fields in the Hardware to overwrite with + # this update. The fields specified in the update_mask are relative to the + # hardware, not the full request. A field will be overwritten if it is in the + # mask. If you don't provide a mask then all fields will be overwritten. + # @!attribute [rw] hardware + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] + # Required. The hardware to update. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class UpdateHardwareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete hardware. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the hardware. + # Format: `projects/{project}/locations/{location}/hardware/{hardware}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class DeleteHardwareRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list comments. + # @!attribute [rw] parent + # @return [::String] + # Required. The order to list comments on. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListCommentsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list comments. + # @!attribute [rw] comments + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment>] + # The list of comments. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListCommentsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a comment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the comment. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` + class GetCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create a comment. + # @!attribute [rw] parent + # @return [::String] + # Required. The order to create the comment on. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @!attribute [rw] comment_id + # @return [::String] + # Optional. ID used to uniquely identify the Comment within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The comment.name field in the request will be ignored. + # @!attribute [rw] comment + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] + # Required. The comment to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class CreateCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to record an action on a comment. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the comment. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` + # @!attribute [rw] action_type + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest::ActionType] + # Required. The action type of the recorded action. + class RecordActionOnCommentRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Valid action types of Comment. + module ActionType + # Action is unspecified. + ACTION_TYPE_UNSPECIFIED = 0 + + # Mark comment as read. + READ = 1 + + # Mark comment as unread. + UNREAD = 2 + end + end + + # A request to list change log entries. + # @!attribute [rw] parent + # @return [::String] + # Required. The order to list change log entries for. + # Format: `projects/{project}/locations/{location}/orders/{order}` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListChangeLogEntriesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of change log entries. + # @!attribute [rw] change_log_entries + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry>] + # The list of change log entries. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListChangeLogEntriesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a change log entry. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the change log entry. + # Format: + # `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` + class GetChangeLogEntryRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list SKUs. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location to list SKUs in. + # Format: `projects/{project}/locations/{location}` + # + # To list SKUs across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListSkusRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of SKUs. + # @!attribute [rw] skus + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>] + # The list of SKUs. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. Only used for queries to the wildcard + # location `-`. If non-empty, it indicates that the results are incomplete. + class ListSkusResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get an SKU. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the SKU. + # Format: `projects/{project}/locations/{location}/skus/{sku}` + class GetSkuRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to list zones. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location to list zones in. + # Format: `projects/{project}/locations/{location}` + # + # To list zones across all locations, substitute `-` (the hyphen or + # dash character) for the location and check the unreachable field in + # the response message. + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. Requested page size. Server may return fewer items than + # requested. If unspecified, server will pick an appropriate default. + # @!attribute [rw] page_token + # @return [::String] + # Optional. A token identifying a page of results the server should return. + # @!attribute [rw] filter + # @return [::String] + # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). + # @!attribute [rw] order_by + # @return [::String] + # Optional. Hint for how to order the results. + class ListZonesRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of zones. + # @!attribute [rw] zones + # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>] + # The list of zones. + # @!attribute [rw] next_page_token + # @return [::String] + # A token identifying a page of results the server should return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. Only used for queries to the wildcard + # location `-`. If non-empty, it indicates that the results are incomplete. + class ListZonesResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to get a zone. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the zone. + # Format: `projects/{project}/locations/{location}/zones/{zone}` + class GetZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to create a zone. + # @!attribute [rw] parent + # @return [::String] + # Required. The project and location to create the zone in. + # Format: `projects/{project}/locations/{location}` + # @!attribute [rw] zone_id + # @return [::String] + # Optional. ID used to uniquely identify the Zone within its parent scope. + # This field should contain at most 63 characters and must start with + # lowercase characters. + # Only lowercase characters, numbers and `-` are accepted. + # The `-` character cannot be the first or the last one. + # A system generated ID will be used if the field is not set. + # + # The zone.name field in the request will be ignored. + # @!attribute [rw] zone + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone] + # Required. The zone to create. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class CreateZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to update a zone. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Required. A mask to specify the fields in the Zone to overwrite with this + # update. The fields specified in the update_mask are relative to the zone, + # not the full request. A field will be overwritten if it is in the mask. If + # you don't provide a mask then all fields will be overwritten. + # @!attribute [rw] zone + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone] + # Required. The zone to update. + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class UpdateZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to delete a zone. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the zone. + # Format: `projects/{project}/locations/{location}/zones/{zone}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + class DeleteZoneRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A request to signal the state of a zone. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the zone. + # Format: `projects/{project}/locations/{location}/zones/{zone}` + # @!attribute [rw] request_id + # @return [::String] + # Optional. An optional unique identifier for this request. See + # [AIP-155](https://google.aip.dev/155). + # @!attribute [rw] state_signal + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest::StateSignal] + # Optional. The state signal to send for this zone. Either state_signal or + # provisioning_state_signal must be set, but not both. + # @!attribute [rw] provisioning_state_signal + # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest::ProvisioningStateSignal] + # Optional. The provisioning state signal to send for this zone. Either + # state_signal or provisioning_state_signal must be set, but not both. + # @!attribute [rw] step + # @return [::String] + # Optional. The step being executed. Provides a finer grained status when the + # state_signal is FACTORY_TURNUP_CHECKS_STARTED or + # FACTORY_TURNUP_CHECKS_FAILED. + # @!attribute [rw] details + # @return [::String] + # Optional. Additional details, such as an error message when state_signal is + # FACTORY_TURNUP_CHECKS_FAILED. + class SignalZoneStateRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Valid state signals for a zone. + module StateSignal + # State signal of the zone is unspecified. + STATE_SIGNAL_UNSPECIFIED = 0 + + # Factory turnup checks have started. + FACTORY_TURNUP_CHECKS_STARTED = 3 + + # The Zone is ready for site turnup. + FACTORY_TURNUP_CHECKS_PASSED = 1 + + # The Zone is ready for site turnup. Deprecated, but not deleted. + READY_FOR_SITE_TURNUP = 1 + + # The Zone failed in factory turnup checks. + FACTORY_TURNUP_CHECKS_FAILED = 2 + + # Verify that a valid cluster intent is present. + VERIFY_CLUSTER_INTENT_PRESENCE = 4 + end + + # Valid provisioning state signals for a zone. + module ProvisioningStateSignal + # Provisioning state signal is unspecified. + PROVISIONING_STATE_SIGNAL_UNSPECIFIED = 0 + + # Provisioning is in progress. + PROVISIONING_IN_PROGRESS = 1 + + # Provisioning is complete. + PROVISIONING_COMPLETE = 2 + end + 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. 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 been cancelled successfully + # 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 + + # A request to change the requested date of an order. + # @!attribute [rw] name + # @return [::String] + # Required. The name of the order to update. + # Format: projects/\\{project}/locations/\\{location}/orders/\\{order} + # @!attribute [rw] requested_date + # @return [::Google::Type::Date] + # Required. The date to which the customer or Google wants to set the + # scheduled installation date. + class RequestOrderDateChangeRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..14ec426522d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/date.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! + + +module Google + module Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are {::Google::Type::TimeOfDay google.type.TimeOfDay} and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/datetime.rb new file mode 100644 index 000000000000..d15ba7af54e4 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/datetime.rb @@ -0,0 +1,103 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 civil time (or occasionally physical time). + # + # This type can represent a civil time in one of a few possible ways: + # + # * When utc_offset is set and time_zone is unset: a civil time on a calendar + # day with a particular offset from UTC. + # * When time_zone is set and utc_offset is unset: a civil time on a calendar + # day in a particular time zone. + # * When neither time_zone nor utc_offset is set: a civil time on a calendar + # day in local time. + # + # The date is relative to the Proleptic Gregorian Calendar. + # + # If year is 0, the DateTime is considered not to have a specific year. month + # and day must have valid, non-zero values. + # + # This type may also be used to represent a physical time if all the date and + # time fields are set and either case of the `time_offset` oneof is set. + # Consider using `Timestamp` message for physical time instead. If your use + # case also would like to store the user's timezone, that can be done in + # another field. + # + # This type is more flexible than some applications may want. Make sure to + # document and validate your application's limitations. + # @!attribute [rw] year + # @return [::Integer] + # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a + # datetime without a year. + # @!attribute [rw] month + # @return [::Integer] + # Required. Month of year. Must be from 1 to 12. + # @!attribute [rw] day + # @return [::Integer] + # Required. Day of month. Must be from 1 to 31 and valid for the year and + # month. + # @!attribute [rw] hours + # @return [::Integer] + # Required. Hours of day in 24 hour format. Should be from 0 to 23. An API + # may choose to allow the value "24:00:00" for scenarios like business + # closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Required. Minutes of hour of day. Must be from 0 to 59. + # @!attribute [rw] seconds + # @return [::Integer] + # Required. Seconds of minutes of the time. Must normally be from 0 to 59. An + # API may allow the value 60 if it allows leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Required. Fractions of seconds in nanoseconds. Must be from 0 to + # 999,999,999. + # @!attribute [rw] utc_offset + # @return [::Google::Protobuf::Duration] + # UTC offset. Must be whole seconds, between -18 hours and +18 hours. + # For example, a UTC offset of -4:00 would be represented as + # { seconds: -14400 }. + # + # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] time_zone + # @return [::Google::Type::TimeZone] + # Time zone. + # + # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class DateTime + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Represents a time zone from the + # [IANA Time Zone Database](https://www.iana.org/time-zones). + # @!attribute [rw] id + # @return [::String] + # IANA Time Zone Database time zone, e.g. "America/New_York". + # @!attribute [rw] version + # @return [::String] + # Optional. IANA Time Zone Database version number, e.g. "2019a". + class TimeZone + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/dayofweek.rb new file mode 100644 index 000000000000..973211b9ffe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/dayofweek.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! + + +module Google + module Type + # Represents a day of the week. + module DayOfWeek + # The day of the week is unspecified. + DAY_OF_WEEK_UNSPECIFIED = 0 + + # Monday + MONDAY = 1 + + # Tuesday + TUESDAY = 2 + + # Wednesday + WEDNESDAY = 3 + + # Thursday + THURSDAY = 4 + + # Friday + FRIDAY = 5 + + # Saturday + SATURDAY = 6 + + # Sunday + SUNDAY = 7 + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/postal_address.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/postal_address.rb new file mode 100644 index 000000000000..9cd0c16495dd --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/postal_address.rb @@ -0,0 +1,135 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 postal address, e.g. for postal delivery or payments addresses. + # Given a postal address, a postal service can deliver items to a premise, P.O. + # Box or similar. + # It is not intended to model geographical locations (roads, towns, + # mountains). + # + # In typical usage an address would be created via user input or from importing + # existing data, depending on the type of process. + # + # Advice on address input / editing: + # - Use an i18n-ready address widget such as + # https://github.com/google/libaddressinput) + # - Users should not be presented with UI elements for input or editing of + # fields outside countries where that field is used. + # + # For more guidance on how to use this schema, please see: + # https://support.google.com/business/answer/6397478 + # @!attribute [rw] revision + # @return [::Integer] + # The schema revision of the `PostalAddress`. This must be set to 0, which is + # the latest revision. + # + # All new revisions **must** be backward compatible with old revisions. + # @!attribute [rw] region_code + # @return [::String] + # Required. CLDR region code of the country/region of the address. This + # is never inferred and it is up to the user to ensure the value is + # correct. See http://cldr.unicode.org/ and + # http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html + # for details. Example: "CH" for Switzerland. + # @!attribute [rw] language_code + # @return [::String] + # Optional. BCP-47 language code of the contents of this address (if + # known). This is often the UI language of the input form or is expected + # to match one of the languages used in the address' country/region, or their + # transliterated equivalents. + # This can affect formatting in certain countries, but is not critical + # to the correctness of the data and will never affect any validation or + # other non-formatting related operations. + # + # If this value is not known, it should be omitted (rather than specifying a + # possibly incorrect default). + # + # Examples: "zh-Hant", "ja", "ja-Latn", "en". + # @!attribute [rw] postal_code + # @return [::String] + # Optional. Postal code of the address. Not all countries use or require + # postal codes to be present, but where they are used, they may trigger + # additional validation with other parts of the address (e.g. state/zip + # validation in the U.S.A.). + # @!attribute [rw] sorting_code + # @return [::String] + # Optional. Additional, country-specific, sorting code. This is not used + # in most regions. Where it is used, the value is either a string like + # "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number + # alone, representing the "sector code" (Jamaica), "delivery area indicator" + # (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). + # @!attribute [rw] administrative_area + # @return [::String] + # Optional. Highest administrative subdivision which is used for postal + # addresses of a country or region. + # For example, this can be a state, a province, an oblast, or a prefecture. + # Specifically, for Spain this is the province and not the autonomous + # community (e.g. "Barcelona" and not "Catalonia"). + # Many countries don't use an administrative area in postal addresses. E.g. + # in Switzerland this should be left unpopulated. + # @!attribute [rw] locality + # @return [::String] + # Optional. Generally refers to the city/town portion of the address. + # Examples: US city, IT comune, UK post town. + # In regions of the world where localities are not well defined or do not fit + # into this structure well, leave locality empty and use address_lines. + # @!attribute [rw] sublocality + # @return [::String] + # Optional. Sublocality of the address. + # For example, this can be neighborhoods, boroughs, districts. + # @!attribute [rw] address_lines + # @return [::Array<::String>] + # Unstructured address lines describing the lower levels of an address. + # + # Because values in address_lines do not have type information and may + # sometimes contain multiple values in a single field (e.g. + # "Austin, TX"), it is important that the line order is clear. The order of + # address lines should be "envelope order" for the country/region of the + # address. In places where this can vary (e.g. Japan), address_language is + # used to make it explicit (e.g. "ja" for large-to-small ordering and + # "ja-Latn" or "en" for small-to-large). This way, the most specific line of + # an address can be selected based on the language. + # + # The minimum permitted structural representation of an address consists + # of a region_code with all remaining information placed in the + # address_lines. It would be possible to format such an address very + # approximately without geocoding, but no semantic reasoning could be + # made about any of the address components until it was at least + # partially resolved. + # + # Creating an address only containing a region_code and address_lines, and + # then geocoding is the recommended way to handle completely unstructured + # addresses (as opposed to guessing which parts of the address should be + # localities or administrative areas). + # @!attribute [rw] recipients + # @return [::Array<::String>] + # Optional. The recipient at the address. + # This field may, under certain circumstances, contain multiline information. + # For example, it might contain "care of" information. + # @!attribute [rw] organization + # @return [::String] + # Optional. The name of the organization at the address. + class PostalAddress + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/timeofday.rb new file mode 100644 index 000000000000..b0c888c8c14a --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/timeofday.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! + + +module Google + module Type + # Represents a time of day. The date and time zone are either not significant + # or are specified elsewhere. An API may choose to allow leap seconds. Related + # types are {::Google::Type::Date google.type.Date} and + # `google.protobuf.Timestamp`. + # @!attribute [rw] hours + # @return [::Integer] + # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose + # to allow the value "24:00:00" for scenarios like business closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Minutes of hour of day. Must be from 0 to 59. + # @!attribute [rw] seconds + # @return [::Integer] + # Seconds of minutes of the time. Must normally be from 0 to 59. An API may + # allow the value 60 if it allows leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + class TimeOfDay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/Gemfile b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/Gemfile new file mode 100644 index 000000000000..bc4dfa6ce8bb --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha", path: "../" +else + gem "google-cloud-gdc_hardware_management-v1alpha" +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-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/cancel_order.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/cancel_order.rb new file mode 100644 index 000000000000..e5bd5c423c3b --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/cancel_order.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CancelOrder_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the cancel_order call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#cancel_order. +# +def cancel_order + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new + + # Call the cancel_order method. + result = client.cancel_order request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CancelOrder_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_comment.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_comment.rb new file mode 100644 index 000000000000..062eb7e3ef99 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_comment.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the create_comment call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_comment. +# +def create_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new + + # Call the create_comment method. + result = client.create_comment request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware.rb new file mode 100644 index 000000000000..c32bad4e6a94 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the create_hardware call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_hardware. +# +def create_hardware + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new + + # Call the create_hardware method. + result = client.create_hardware request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware_group.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware_group.rb new file mode 100644 index 000000000000..50d51125fa19 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the create_hardware_group call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_hardware_group. +# +def create_hardware_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new + + # Call the create_hardware_group method. + result = client.create_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_order.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_order.rb new file mode 100644 index 000000000000..8c945f8aa66e --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_order.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the create_order call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_order. +# +def create_order + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new + + # Call the create_order method. + result = client.create_order request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_site.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_site.rb new file mode 100644 index 000000000000..7e1b922105b5 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_site.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the create_site call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_site. +# +def create_site + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new + + # Call the create_site method. + result = client.create_site request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_zone.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_zone.rb new file mode 100644 index 000000000000..4651805796c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the create_zone call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_zone. +# +def create_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware.rb new file mode 100644 index 000000000000..e26abc148d39 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the delete_hardware call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_hardware. +# +def delete_hardware + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new + + # Call the delete_hardware method. + result = client.delete_hardware request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware_group.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware_group.rb new file mode 100644 index 000000000000..57375279b7b7 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the delete_hardware_group call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_hardware_group. +# +def delete_hardware_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new + + # Call the delete_hardware_group method. + result = client.delete_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_order.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_order.rb new file mode 100644 index 000000000000..2e6a508f59c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_order.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the delete_order call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_order. +# +def delete_order + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new + + # Call the delete_order method. + result = client.delete_order request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_site.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_site.rb new file mode 100644 index 000000000000..1f66ee279ec0 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_site.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteSite_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the delete_site call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_site. +# +def delete_site + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new + + # Call the delete_site method. + result = client.delete_site request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteSite_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_zone.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_zone.rb new file mode 100644 index 000000000000..6928b1a8ce3f --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the delete_zone call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_zone. +# +def delete_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_change_log_entry.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_change_log_entry.rb new file mode 100644 index 000000000000..79c9468fa048 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_change_log_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the get_change_log_entry call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_change_log_entry. +# +def get_change_log_entry + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new + + # Call the get_change_log_entry method. + result = client.get_change_log_entry request + + # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry. + p result +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_comment.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_comment.rb new file mode 100644 index 000000000000..daf60605d6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_comment.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the get_comment call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_comment. +# +def get_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new + + # Call the get_comment method. + result = client.get_comment request + + # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment. + p result +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware.rb new file mode 100644 index 000000000000..6a4cdf59e3dc --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the get_hardware call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_hardware. +# +def get_hardware + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new + + # Call the get_hardware method. + result = client.get_hardware request + + # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Hardware. + p result +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware_group.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware_group.rb new file mode 100644 index 000000000000..029aa4e5843f --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the get_hardware_group call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_hardware_group. +# +def get_hardware_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new + + # Call the get_hardware_group method. + result = client.get_hardware_group request + + # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup. + p result +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_order.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_order.rb new file mode 100644 index 000000000000..57af00353628 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_order.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the get_order call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_order. +# +def get_order + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new + + # Call the get_order method. + result = client.get_order request + + # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Order. + p result +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_site.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_site.rb new file mode 100644 index 000000000000..26c42c9b8c06 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_site.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the get_site call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_site. +# +def get_site + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new + + # Call the get_site method. + result = client.get_site request + + # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Site. + p result +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_sku.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_sku.rb new file mode 100644 index 000000000000..cbf346bbb908 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_sku.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the get_sku call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_sku. +# +def get_sku + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new + + # Call the get_sku method. + result = client.get_sku request + + # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Sku. + p result +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_zone.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_zone.rb new file mode 100644 index 000000000000..7f966c999986 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the get_zone call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_zone. +# +def get_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest.new + + # Call the get_zone method. + result = client.get_zone request + + # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Zone. + p result +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_change_log_entries.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_change_log_entries.rb new file mode 100644 index 000000000000..233c809f62cb --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_change_log_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the list_change_log_entries call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_change_log_entries. +# +def list_change_log_entries + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.new + + # Call the list_change_log_entries method. + result = client.list_change_log_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::GDCHardwareManagement::V1alpha::ChangeLogEntry. + p item + end +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_comments.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_comments.rb new file mode 100644 index 000000000000..d262606f7295 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_comments.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the list_comments call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_comments. +# +def list_comments + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.new + + # Call the list_comments method. + result = client.list_comments request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment. + p item + end +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware.rb new file mode 100644 index 000000000000..43d212bbdabf --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the list_hardware call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_hardware. +# +def list_hardware + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.new + + # Call the list_hardware method. + result = client.list_hardware request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware. + p item + end +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware_groups.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware_groups.rb new file mode 100644 index 000000000000..ff05fedcd54c --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the list_hardware_groups call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_hardware_groups. +# +def list_hardware_groups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.new + + # Call the list_hardware_groups method. + result = client.list_hardware_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::GDCHardwareManagement::V1alpha::HardwareGroup. + p item + end +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_orders.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_orders.rb new file mode 100644 index 000000000000..93864a8f35f2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_orders.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the list_orders call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_orders. +# +def list_orders + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.new + + # Call the list_orders method. + result = client.list_orders request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Order. + p item + end +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_sites.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_sites.rb new file mode 100644 index 000000000000..b60a042059fb --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_sites.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the list_sites call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_sites. +# +def list_sites + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.new + + # Call the list_sites method. + result = client.list_sites request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Site. + p item + end +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_skus.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_skus.rb new file mode 100644 index 000000000000..909dbe2038eb --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_skus.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the list_skus call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_skus. +# +def list_skus + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.new + + # Call the list_skus method. + result = client.list_skus request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku. + p item + end +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_zones.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_zones.rb new file mode 100644 index 000000000000..bea66ba9bc2f --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the list_zones call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_zones. +# +def list_zones + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::Zone. + p item + end +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/record_action_on_comment.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/record_action_on_comment.rb new file mode 100644 index 000000000000..5a00e3446e6a --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/record_action_on_comment.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_RecordActionOnComment_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the record_action_on_comment call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#record_action_on_comment. +# +def record_action_on_comment + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new + + # Call the record_action_on_comment method. + result = client.record_action_on_comment request + + # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment. + p result +end +# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_RecordActionOnComment_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/request_order_date_change.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/request_order_date_change.rb new file mode 100644 index 000000000000..723bf8387b20 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/request_order_date_change.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_RequestOrderDateChange_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the request_order_date_change call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#request_order_date_change. +# +def request_order_date_change + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new + + # Call the request_order_date_change method. + result = client.request_order_date_change request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_RequestOrderDateChange_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/signal_zone_state.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/signal_zone_state.rb new file mode 100644 index 000000000000..70f0d340ff17 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/signal_zone_state.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the signal_zone_state call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#signal_zone_state. +# +def signal_zone_state + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new + + # Call the signal_zone_state method. + result = client.signal_zone_state request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/submit_order.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/submit_order.rb new file mode 100644 index 000000000000..93d353c3f9bd --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/submit_order.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the submit_order call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#submit_order. +# +def submit_order + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new + + # Call the submit_order method. + result = client.submit_order request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware.rb new file mode 100644 index 000000000000..c40036ffab3c --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the update_hardware call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_hardware. +# +def update_hardware + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new + + # Call the update_hardware method. + result = client.update_hardware request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware_group.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware_group.rb new file mode 100644 index 000000000000..2b813dfc0196 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the update_hardware_group call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_hardware_group. +# +def update_hardware_group + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new + + # Call the update_hardware_group method. + result = client.update_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_order.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_order.rb new file mode 100644 index 000000000000..75de15ad44ff --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_order.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the update_order call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_order. +# +def update_order + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new + + # Call the update_order method. + result = client.update_order request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_site.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_site.rb new file mode 100644 index 000000000000..afa54b028217 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_site.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the update_site call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_site. +# +def update_site + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new + + # Call the update_site method. + result = client.update_site request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_zone.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_zone.rb new file mode 100644 index 000000000000..fd3682f19c7c --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_sync] +require "google/cloud/gdc_hardware_management/v1alpha" + +## +# Snippet for the update_zone call in the GDCHardwareManagement service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_zone. +# +def update_zone + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GDCHardwareManagement::V1alpha::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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/snippet_metadata_google.cloud.gdchardwaremanagement.v1alpha.json b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/snippet_metadata_google.cloud.gdchardwaremanagement.v1alpha.json new file mode 100644 index 000000000000..bec0bf6c87e3 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/snippet_metadata_google.cloud.gdchardwaremanagement.v1alpha.json @@ -0,0 +1,1495 @@ +{ + "client_library": { + "name": "google-cloud-gdc_hardware_management-v1alpha", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.gdchardwaremanagement.v1alpha", + "version": "v1alpha" + } + ] + }, + "snippets": [ + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_sync", + "title": "Snippet for the list_orders call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_orders.", + "file": "gdc_hardware_management/list_orders.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_orders", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_orders", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "ListOrders", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListOrders", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_sync", + "title": "Snippet for the get_order call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_order.", + "file": "gdc_hardware_management/get_order.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_order", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_order", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Order", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "GetOrder", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetOrder", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_sync", + "title": "Snippet for the create_order call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_order.", + "file": "gdc_hardware_management/create_order.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_order", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_order", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "CreateOrder", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CreateOrder", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_sync", + "title": "Snippet for the update_order call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_order.", + "file": "gdc_hardware_management/update_order.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_order", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_order", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "UpdateOrder", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.UpdateOrder", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_sync", + "title": "Snippet for the delete_order call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_order.", + "file": "gdc_hardware_management/delete_order.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_order", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_order", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "DeleteOrder", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.DeleteOrder", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_sync", + "title": "Snippet for the submit_order call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#submit_order.", + "file": "gdc_hardware_management/submit_order.rb", + "language": "RUBY", + "client_method": { + "short_name": "submit_order", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#submit_order", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "SubmitOrder", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.SubmitOrder", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CancelOrder_sync", + "title": "Snippet for the cancel_order call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#cancel_order.", + "file": "gdc_hardware_management/cancel_order.rb", + "language": "RUBY", + "client_method": { + "short_name": "cancel_order", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#cancel_order", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "CancelOrder", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CancelOrder", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_sync", + "title": "Snippet for the list_sites call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_sites.", + "file": "gdc_hardware_management/list_sites.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_sites", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_sites", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "ListSites", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListSites", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_sync", + "title": "Snippet for the get_site call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_site.", + "file": "gdc_hardware_management/get_site.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_site", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_site", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Site", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "GetSite", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetSite", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_sync", + "title": "Snippet for the create_site call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_site.", + "file": "gdc_hardware_management/create_site.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_site", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_site", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "CreateSite", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CreateSite", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_sync", + "title": "Snippet for the update_site call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_site.", + "file": "gdc_hardware_management/update_site.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_site", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_site", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "UpdateSite", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.UpdateSite", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteSite_sync", + "title": "Snippet for the delete_site call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_site.", + "file": "gdc_hardware_management/delete_site.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_site", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_site", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "DeleteSite", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.DeleteSite", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_sync", + "title": "Snippet for the list_hardware_groups call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_hardware_groups.", + "file": "gdc_hardware_management/list_hardware_groups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_hardware_groups", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_hardware_groups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "ListHardwareGroups", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListHardwareGroups", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_sync", + "title": "Snippet for the get_hardware_group call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_hardware_group.", + "file": "gdc_hardware_management/get_hardware_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_hardware_group", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_hardware_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "GetHardwareGroup", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetHardwareGroup", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_sync", + "title": "Snippet for the create_hardware_group call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_hardware_group.", + "file": "gdc_hardware_management/create_hardware_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_hardware_group", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_hardware_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "CreateHardwareGroup", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CreateHardwareGroup", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_sync", + "title": "Snippet for the update_hardware_group call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_hardware_group.", + "file": "gdc_hardware_management/update_hardware_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_hardware_group", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_hardware_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "UpdateHardwareGroup", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.UpdateHardwareGroup", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_sync", + "title": "Snippet for the delete_hardware_group call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_hardware_group.", + "file": "gdc_hardware_management/delete_hardware_group.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_hardware_group", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_hardware_group", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "DeleteHardwareGroup", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.DeleteHardwareGroup", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_sync", + "title": "Snippet for the list_hardware call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_hardware.", + "file": "gdc_hardware_management/list_hardware.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_hardware", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_hardware", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "ListHardware", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListHardware", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_sync", + "title": "Snippet for the get_hardware call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_hardware.", + "file": "gdc_hardware_management/get_hardware.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_hardware", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_hardware", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "GetHardware", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetHardware", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_sync", + "title": "Snippet for the create_hardware call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_hardware.", + "file": "gdc_hardware_management/create_hardware.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_hardware", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_hardware", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "CreateHardware", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CreateHardware", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_sync", + "title": "Snippet for the update_hardware call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_hardware.", + "file": "gdc_hardware_management/update_hardware.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_hardware", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_hardware", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "UpdateHardware", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.UpdateHardware", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_sync", + "title": "Snippet for the delete_hardware call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_hardware.", + "file": "gdc_hardware_management/delete_hardware.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_hardware", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_hardware", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "DeleteHardware", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.DeleteHardware", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_sync", + "title": "Snippet for the list_comments call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_comments.", + "file": "gdc_hardware_management/list_comments.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_comments", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_comments", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "ListComments", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListComments", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_sync", + "title": "Snippet for the get_comment call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_comment.", + "file": "gdc_hardware_management/get_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_comment", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Comment", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "GetComment", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetComment", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_sync", + "title": "Snippet for the create_comment call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_comment.", + "file": "gdc_hardware_management/create_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_comment", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "CreateComment", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CreateComment", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_RecordActionOnComment_sync", + "title": "Snippet for the record_action_on_comment call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#record_action_on_comment.", + "file": "gdc_hardware_management/record_action_on_comment.rb", + "language": "RUBY", + "client_method": { + "short_name": "record_action_on_comment", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#record_action_on_comment", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Comment", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "RecordActionOnComment", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.RecordActionOnComment", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_sync", + "title": "Snippet for the list_change_log_entries call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_change_log_entries.", + "file": "gdc_hardware_management/list_change_log_entries.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_change_log_entries", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_change_log_entries", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "ListChangeLogEntries", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListChangeLogEntries", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_sync", + "title": "Snippet for the get_change_log_entry call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_change_log_entry.", + "file": "gdc_hardware_management/get_change_log_entry.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_change_log_entry", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_change_log_entry", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "GetChangeLogEntry", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetChangeLogEntry", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_sync", + "title": "Snippet for the list_skus call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_skus.", + "file": "gdc_hardware_management/list_skus.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_skus", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_skus", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "ListSkus", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListSkus", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_sync", + "title": "Snippet for the get_sku call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_sku.", + "file": "gdc_hardware_management/get_sku.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_sku", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_sku", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Sku", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "GetSku", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetSku", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_sync", + "title": "Snippet for the list_zones call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_zones.", + "file": "gdc_hardware_management/list_zones.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_zones", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_zones", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesResponse", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "ListZones", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListZones", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_sync", + "title": "Snippet for the get_zone call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_zone.", + "file": "gdc_hardware_management/get_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_zone", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Zone", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "GetZone", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetZone", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_sync", + "title": "Snippet for the create_zone call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_zone.", + "file": "gdc_hardware_management/create_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_zone", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "CreateZone", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CreateZone", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_sync", + "title": "Snippet for the update_zone call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_zone.", + "file": "gdc_hardware_management/update_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_zone", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "UpdateZone", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.UpdateZone", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_sync", + "title": "Snippet for the delete_zone call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_zone.", + "file": "gdc_hardware_management/delete_zone.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_zone", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_zone", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "DeleteZone", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.DeleteZone", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_sync", + "title": "Snippet for the signal_zone_state call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#signal_zone_state.", + "file": "gdc_hardware_management/signal_zone_state.rb", + "language": "RUBY", + "client_method": { + "short_name": "signal_zone_state", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#signal_zone_state", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "SignalZoneState", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.SignalZoneState", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_RequestOrderDateChange_sync", + "title": "Snippet for the request_order_date_change call in the GDCHardwareManagement service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#request_order_date_change.", + "file": "gdc_hardware_management/request_order_date_change.rb", + "language": "RUBY", + "client_method": { + "short_name": "request_order_date_change", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#request_order_date_change", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "GDCHardwareManagement::Client", + "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" + }, + "method": { + "short_name": "RequestOrderDateChange", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.RequestOrderDateChange", + "service": { + "short_name": "GDCHardwareManagement", + "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_operations_test.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_operations_test.rb new file mode 100644 index 000000000000..84f131151d1f --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_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/gdchardwaremanagement/v1alpha/service_pb" +require "google/cloud/gdchardwaremanagement/v1alpha/service_services_pb" +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management" + +class ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_paths_test.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_paths_test.rb new file mode 100644 index 000000000000..b4561b9b4999 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_paths_test.rb @@ -0,0 +1,151 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gdc_hardware_management/v1alpha/gdc_hardware_management" + +class ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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_change_log_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.change_log_entry_path project: "value0", location: "value1", order: "value2", change_log_entry: "value3" + assert_equal "projects/value0/locations/value1/orders/value2/changeLogEntries/value3", path + end + end + + def test_comment_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.comment_path project: "value0", location: "value1", order: "value2", comment: "value3" + assert_equal "projects/value0/locations/value1/orders/value2/comments/value3", path + end + end + + def test_hardware_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.hardware_path project: "value0", location: "value1", hardware: "value2" + assert_equal "projects/value0/locations/value1/hardware/value2", path + end + end + + def test_hardware_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.hardware_group_path project: "value0", location: "value1", order: "value2", hardware_group: "value3" + assert_equal "projects/value0/locations/value1/orders/value2/hardwareGroups/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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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_order_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.order_path project: "value0", location: "value1", order: "value2" + assert_equal "projects/value0/locations/value1/orders/value2", path + end + end + + def test_site_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.site_path project: "value0", location: "value1", site: "value2" + assert_equal "projects/value0/locations/value1/sites/value2", path + end + end + + def test_sku_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.sku_path project: "value0", location: "value1", sku: "value2" + assert_equal "projects/value0/locations/value1/skus/value2", 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.zone_path project: "value0", location: "value1", zone: "value2" + assert_equal "projects/value0/locations/value1/zones/value2", path + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_rest_test.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_rest_test.rb new file mode 100644 index 000000000000..2af55a6e9488 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_rest_test.rb @@ -0,0 +1,2172 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gdchardwaremanagement/v1alpha/service_pb" +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest" + + +class ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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_list_orders + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse.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_orders_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_orders_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_orders_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_orders({ parent: parent, page_size: 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_orders parent: parent, page_size: 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_orders ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.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_orders({ 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_orders(::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.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_orders_client_stub.call_count + end + end + end + + def test_get_order + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Order.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_order_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_order_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_order_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_order({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_order name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_order ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_order({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_order(::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_order_client_stub.call_count + end + end + end + + def test_create_order + # 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" + order_id = "hello world" + order = {} + request_id = "hello world" + + create_order_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_create_order_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_order_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_order({ parent: parent, order_id: order_id, order: order, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_order parent: parent, order_id: order_id, order: order, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_order ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new(parent: parent, order_id: order_id, order: order, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_order({ parent: parent, order_id: order_id, order: order, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_order(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new(parent: parent, order_id: order_id, order: order, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_order_client_stub.call_count + end + end + end + + def test_update_order + # 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 = {} + order = {} + request_id = "hello world" + + update_order_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_update_order_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_order_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_order({ update_mask: update_mask, order: order, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_order update_mask: update_mask, order: order, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_order ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new(update_mask: update_mask, order: order, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_order({ update_mask: update_mask, order: order, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_order(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new(update_mask: update_mask, order: order, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_order_client_stub.call_count + end + end + end + + def test_delete_order + # 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" + request_id = "hello world" + force = true + + delete_order_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_delete_order_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_order_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_order({ name: name, request_id: request_id, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_order name: name, request_id: request_id, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_order ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new(name: name, request_id: request_id, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_order({ name: name, request_id: request_id, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_order(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new(name: name, request_id: request_id, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_order_client_stub.call_count + end + end + end + + def test_submit_order + # 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" + request_id = "hello world" + type = :TYPE_UNSPECIFIED + + submit_order_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_submit_order_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, submit_order_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.submit_order({ name: name, request_id: request_id, type: type }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.submit_order name: name, request_id: request_id, type: type do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.submit_order ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new(name: name, request_id: request_id, type: type) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.submit_order({ name: name, request_id: request_id, type: type }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.submit_order(::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new(name: name, request_id: request_id, type: type), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, submit_order_client_stub.call_count + end + end + end + + def test_cancel_order + # 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" + request_id = "hello world" + + cancel_order_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_cancel_order_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, cancel_order_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.cancel_order({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.cancel_order name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.cancel_order ::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.cancel_order({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.cancel_order(::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, cancel_order_client_stub.call_count + end + end + end + + def test_list_sites + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse.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_sites_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_sites_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_sites_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_sites({ parent: parent, page_size: 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_sites parent: parent, page_size: 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_sites ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.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_sites({ 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_sites(::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.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_sites_client_stub.call_count + end + end + end + + def test_get_site + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Site.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_site_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_site_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_site_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_site({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_site name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_site ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_site({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_site(::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_site_client_stub.call_count + end + end + end + + def test_create_site + # 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" + site_id = "hello world" + site = {} + request_id = "hello world" + + create_site_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_create_site_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_site_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_site({ parent: parent, site_id: site_id, site: site, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_site parent: parent, site_id: site_id, site: site, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_site ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new(parent: parent, site_id: site_id, site: site, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_site({ parent: parent, site_id: site_id, site: site, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_site(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new(parent: parent, site_id: site_id, site: site, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_site_client_stub.call_count + end + end + end + + def test_update_site + # 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 = {} + site = {} + request_id = "hello world" + + update_site_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_update_site_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_site_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_site({ update_mask: update_mask, site: site, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_site update_mask: update_mask, site: site, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_site ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new(update_mask: update_mask, site: site, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_site({ update_mask: update_mask, site: site, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_site(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new(update_mask: update_mask, site: site, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_site_client_stub.call_count + end + end + end + + def test_delete_site + # 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" + request_id = "hello world" + + delete_site_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_delete_site_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_site_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_site({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_site name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_site ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_site({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_site(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_site_client_stub.call_count + end + end + end + + def test_list_hardware_groups + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse.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_hardware_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_hardware_groups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_hardware_groups_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_hardware_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_hardware_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_hardware_groups ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.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_hardware_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_hardware_groups(::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.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_hardware_groups_client_stub.call_count + end + end + end + + def test_get_hardware_group + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_hardware_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_hardware_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_hardware_group_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_hardware_group({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_hardware_group name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_hardware_group({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_hardware_group_client_stub.call_count + end + end + end + + def test_create_hardware_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" + hardware_group_id = "hello world" + hardware_group = {} + request_id = "hello world" + + create_hardware_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_create_hardware_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_hardware_group_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_hardware_group({ parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_hardware_group parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new(parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_hardware_group({ parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new(parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_hardware_group_client_stub.call_count + end + end + end + + def test_update_hardware_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. + update_mask = {} + hardware_group = {} + request_id = "hello world" + + update_hardware_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_update_hardware_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_hardware_group_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_hardware_group({ update_mask: update_mask, hardware_group: hardware_group, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_hardware_group update_mask: update_mask, hardware_group: hardware_group, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new(update_mask: update_mask, hardware_group: hardware_group, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_hardware_group({ update_mask: update_mask, hardware_group: hardware_group, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new(update_mask: update_mask, hardware_group: hardware_group, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_hardware_group_client_stub.call_count + end + end + end + + def test_delete_hardware_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" + request_id = "hello world" + + delete_hardware_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_delete_hardware_group_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_hardware_group_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_hardware_group({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_hardware_group name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_hardware_group({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_hardware_group_client_stub.call_count + end + end + end + + def test_list_hardware + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse.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_hardware_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_hardware_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_hardware_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_hardware({ parent: parent, page_size: 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_hardware parent: parent, page_size: 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_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.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_hardware({ 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_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.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_hardware_client_stub.call_count + end + end + end + + def test_get_hardware + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_hardware_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_hardware_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_hardware_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_hardware({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_hardware name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_hardware({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_hardware_client_stub.call_count + end + end + end + + def test_create_hardware + # 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" + hardware_id = "hello world" + hardware = {} + + create_hardware_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_create_hardware_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_hardware_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_hardware({ parent: parent, hardware_id: hardware_id, hardware: hardware }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_hardware parent: parent, hardware_id: hardware_id, hardware: hardware do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new(parent: parent, hardware_id: hardware_id, hardware: hardware) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_hardware({ parent: parent, hardware_id: hardware_id, hardware: hardware }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new(parent: parent, hardware_id: hardware_id, hardware: hardware), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_hardware_client_stub.call_count + end + end + end + + def test_update_hardware + # 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 = {} + hardware = {} + request_id = "hello world" + + update_hardware_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_update_hardware_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_hardware_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_hardware({ update_mask: update_mask, hardware: hardware, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_hardware update_mask: update_mask, hardware: hardware, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new(update_mask: update_mask, hardware: hardware, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_hardware({ update_mask: update_mask, hardware: hardware, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new(update_mask: update_mask, hardware: hardware, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_hardware_client_stub.call_count + end + end + end + + def test_delete_hardware + # 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" + request_id = "hello world" + + delete_hardware_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_delete_hardware_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_hardware_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_hardware({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_hardware name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_hardware({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new(name: name, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_hardware_client_stub.call_count + end + end + end + + def test_list_comments + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse.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_comments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_comments_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_comments_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_comments({ parent: parent, page_size: 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_comments parent: parent, page_size: 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_comments ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.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_comments({ 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_comments(::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.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_comments_client_stub.call_count + end + end + end + + def test_get_comment + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_comment_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_comment({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_comment name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_comment ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_comment({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_comment(::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_comment_client_stub.call_count + end + end + end + + def test_create_comment + # 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" + comment_id = "hello world" + comment = {} + request_id = "hello world" + + create_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_create_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_comment_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_comment({ parent: parent, comment_id: comment_id, comment: comment, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_comment parent: parent, comment_id: comment_id, comment: comment, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_comment ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new(parent: parent, comment_id: comment_id, comment: comment, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_comment({ parent: parent, comment_id: comment_id, comment: comment, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_comment(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new(parent: parent, comment_id: comment_id, comment: comment, request_id: request_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_comment_client_stub.call_count + end + end + end + + def test_record_action_on_comment + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + action_type = :ACTION_TYPE_UNSPECIFIED + + record_action_on_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_record_action_on_comment_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, record_action_on_comment_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.record_action_on_comment({ name: name, action_type: action_type }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.record_action_on_comment name: name, action_type: action_type do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.record_action_on_comment ::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new(name: name, action_type: action_type) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.record_action_on_comment({ name: name, action_type: action_type }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.record_action_on_comment(::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new(name: name, action_type: action_type), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, record_action_on_comment_client_stub.call_count + end + end + end + + def test_list_change_log_entries + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse.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_change_log_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_change_log_entries_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_change_log_entries_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_change_log_entries({ parent: parent, page_size: 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_change_log_entries parent: parent, page_size: 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_change_log_entries ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.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_change_log_entries({ 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_change_log_entries(::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.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_change_log_entries_client_stub.call_count + end + end + end + + def test_get_change_log_entry + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_change_log_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_change_log_entry_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_change_log_entry_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_change_log_entry({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_change_log_entry name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_change_log_entry ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_change_log_entry({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_change_log_entry(::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_change_log_entry_client_stub.call_count + end + end + end + + def test_list_skus + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse.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_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_skus_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_skus_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_skus({ parent: parent, page_size: 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_skus parent: parent, page_size: 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_skus ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.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_skus({ 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_skus(::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.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_skus_client_stub.call_count + end + end + end + + def test_get_sku + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_sku_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_sku_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_sku_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_sku({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_sku name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_sku ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_sku({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_sku(::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_sku_client_stub.call_count + end + end + end + + def test_list_zones + # Create test objects. + client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_zones_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_zones_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_zone_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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_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 = {} + request_id = "hello world" + + 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_create_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_zone_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, request_id: request_id }) 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, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_zone ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, request_id: request_id) 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, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_zone(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, request_id: request_id), 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 = {} + request_id = "hello world" + + 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_update_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_zone_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_zone({ update_mask: update_mask, zone: zone, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_zone update_mask: update_mask, zone: zone, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_zone ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, request_id: request_id) 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, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_zone(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, request_id: request_id), 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" + request_id = "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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_delete_zone_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_zone_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_zone({ name: name, request_id: request_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_zone name: name, request_id: request_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_zone ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest.new(name: name, request_id: request_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_zone({ name: name, request_id: request_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_zone(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest.new(name: name, request_id: request_id), 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_signal_zone_state + # 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" + request_id = "hello world" + state_signal = :STATE_SIGNAL_UNSPECIFIED + provisioning_state_signal = :PROVISIONING_STATE_SIGNAL_UNSPECIFIED + step = "hello world" + details = "hello world" + + signal_zone_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_signal_zone_state_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, signal_zone_state_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.signal_zone_state({ name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.signal_zone_state name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.signal_zone_state ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new(name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.signal_zone_state({ name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.signal_zone_state(::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new(name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, signal_zone_state_client_stub.call_count + end + end + end + + def test_request_order_date_change + # 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" + requested_date = {} + + request_order_date_change_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_request_order_date_change_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, request_order_date_change_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.request_order_date_change({ name: name, requested_date: requested_date }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.request_order_date_change name: name, requested_date: requested_date do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.request_order_date_change ::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new(name: name, requested_date: requested_date) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.request_order_date_change({ name: name, requested_date: requested_date }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.request_order_date_change(::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new(name: name, requested_date: requested_date), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, request_order_date_change_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_test.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_test.rb new file mode 100644 index 000000000000..112185b2e09a --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_test.rb @@ -0,0 +1,2554 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gdchardwaremanagement/v1alpha/service_pb" +require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management" + +class ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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_list_orders + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_orders_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_orders, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest, 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_orders_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_orders({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_orders parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_orders ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.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_orders({ 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_orders(::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.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_orders_client_stub.call_rpc_count + end + end + + def test_get_order + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::Order.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_order_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_order, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_order_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_order({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_order name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_order ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_order({ 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_order(::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.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_order_client_stub.call_rpc_count + end + end + + def test_create_order + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + order_id = "hello world" + order = {} + request_id = "hello world" + + create_order_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_order, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["order_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Order), request["order"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_order_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_order({ parent: parent, order_id: order_id, order: order, request_id: request_id }) do |response, 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_order parent: parent, order_id: order_id, order: order, request_id: request_id do |response, 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_order ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new(parent: parent, order_id: order_id, order: order, request_id: request_id) do |response, operation| + assert_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_order({ parent: parent, order_id: order_id, order: order, request_id: request_id }, grpc_options) do |response, operation| + assert_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_order(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new(parent: parent, order_id: order_id, order: order, request_id: request_id), grpc_options) do |response, operation| + assert_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_order_client_stub.call_rpc_count + end + end + + def test_update_order + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + order = {} + request_id = "hello world" + + update_order_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_order, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Order), request["order"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_order_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_order({ update_mask: update_mask, order: order, request_id: request_id }) do |response, 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_order update_mask: update_mask, order: order, request_id: request_id do |response, 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_order ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new(update_mask: update_mask, order: order, request_id: request_id) do |response, operation| + assert_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_order({ update_mask: update_mask, order: order, request_id: request_id }, grpc_options) do |response, operation| + assert_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_order(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new(update_mask: update_mask, order: order, request_id: request_id), grpc_options) do |response, operation| + assert_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_order_client_stub.call_rpc_count + end + end + + def test_delete_order + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + force = true + + delete_order_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_order, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_order_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_order({ name: name, request_id: request_id, 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_order name: name, request_id: request_id, 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_order ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new(name: name, request_id: request_id, 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_order({ name: name, request_id: request_id, 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_order(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new(name: name, request_id: request_id, 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_order_client_stub.call_rpc_count + end + end + + def test_submit_order + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + type = :TYPE_UNSPECIFIED + + submit_order_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :submit_order, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal :TYPE_UNSPECIFIED, request["type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, submit_order_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.submit_order({ name: name, request_id: request_id, type: type }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.submit_order name: name, request_id: request_id, type: type do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.submit_order ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new(name: name, request_id: request_id, type: type) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.submit_order({ name: name, request_id: request_id, type: type }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.submit_order(::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new(name: name, request_id: request_id, type: type), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, submit_order_client_stub.call_rpc_count + end + end + + def test_cancel_order + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + cancel_order_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :cancel_order, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, cancel_order_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.cancel_order({ name: name, request_id: request_id }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.cancel_order name: name, request_id: request_id do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.cancel_order ::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new(name: name, request_id: request_id) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.cancel_order({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.cancel_order(::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, cancel_order_client_stub.call_rpc_count + end + end + + def test_list_sites + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_sites_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_sites, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest, 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_sites_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_sites({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_sites parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_sites ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.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_sites({ 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_sites(::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.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_sites_client_stub.call_rpc_count + end + end + + def test_get_site + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::Site.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_site_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_site, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_site_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_site({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_site name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_site ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_site({ 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_site(::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.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_site_client_stub.call_rpc_count + end + end + + def test_create_site + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + site_id = "hello world" + site = {} + request_id = "hello world" + + create_site_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_site, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["site_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Site), request["site"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_site_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_site({ parent: parent, site_id: site_id, site: site, request_id: request_id }) do |response, 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_site parent: parent, site_id: site_id, site: site, request_id: request_id do |response, 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_site ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new(parent: parent, site_id: site_id, site: site, request_id: request_id) do |response, operation| + assert_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_site({ parent: parent, site_id: site_id, site: site, request_id: request_id }, grpc_options) do |response, operation| + assert_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_site(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new(parent: parent, site_id: site_id, site: site, request_id: request_id), grpc_options) do |response, operation| + assert_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_site_client_stub.call_rpc_count + end + end + + def test_update_site + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + site = {} + request_id = "hello world" + + update_site_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_site, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Site), request["site"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_site_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_site({ update_mask: update_mask, site: site, request_id: request_id }) do |response, 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_site update_mask: update_mask, site: site, request_id: request_id do |response, 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_site ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new(update_mask: update_mask, site: site, request_id: request_id) do |response, operation| + assert_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_site({ update_mask: update_mask, site: site, request_id: request_id }, grpc_options) do |response, operation| + assert_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_site(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new(update_mask: update_mask, site: site, request_id: request_id), grpc_options) do |response, operation| + assert_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_site_client_stub.call_rpc_count + end + end + + def test_delete_site + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_site_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_site, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_site_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_site({ name: name, request_id: request_id }) do |response, 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_site name: name, request_id: request_id do |response, 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_site ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new(name: name, request_id: request_id) do |response, operation| + assert_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_site({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_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_site(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_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_site_client_stub.call_rpc_count + end + end + + def test_list_hardware_groups + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_hardware_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_hardware_groups, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest, 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_hardware_groups_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_hardware_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_hardware_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_hardware_groups ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.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_hardware_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_hardware_groups(::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.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_hardware_groups_client_stub.call_rpc_count + end + end + + def test_get_hardware_group + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_hardware_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_hardware_group, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_hardware_group_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_hardware_group({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_hardware_group name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_hardware_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_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.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_hardware_group_client_stub.call_rpc_count + end + end + + def test_create_hardware_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" + hardware_group_id = "hello world" + hardware_group = {} + request_id = "hello world" + + create_hardware_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_hardware_group, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["hardware_group_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup), request["hardware_group"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_hardware_group_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_hardware_group({ parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id }) do |response, 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_hardware_group parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id do |response, 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_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new(parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id) do |response, operation| + assert_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_hardware_group({ parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id }, grpc_options) do |response, operation| + assert_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_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new(parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id), grpc_options) do |response, operation| + assert_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_hardware_group_client_stub.call_rpc_count + end + end + + def test_update_hardware_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. + update_mask = {} + hardware_group = {} + request_id = "hello world" + + update_hardware_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_hardware_group, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup), request["hardware_group"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_hardware_group_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_hardware_group({ update_mask: update_mask, hardware_group: hardware_group, request_id: request_id }) do |response, 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_hardware_group update_mask: update_mask, hardware_group: hardware_group, request_id: request_id do |response, 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_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new(update_mask: update_mask, hardware_group: hardware_group, request_id: request_id) do |response, operation| + assert_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_hardware_group({ update_mask: update_mask, hardware_group: hardware_group, request_id: request_id }, grpc_options) do |response, operation| + assert_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_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new(update_mask: update_mask, hardware_group: hardware_group, request_id: request_id), grpc_options) do |response, operation| + assert_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_hardware_group_client_stub.call_rpc_count + end + end + + def test_delete_hardware_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" + request_id = "hello world" + + delete_hardware_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_hardware_group, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_hardware_group_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_hardware_group({ name: name, request_id: request_id }) do |response, 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_hardware_group name: name, request_id: request_id do |response, 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_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new(name: name, request_id: request_id) do |response, operation| + assert_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_hardware_group({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_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_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_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_hardware_group_client_stub.call_rpc_count + end + end + + def test_list_hardware + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_hardware_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_hardware, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest, 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_hardware_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_hardware({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_hardware parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.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_hardware({ 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_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.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_hardware_client_stub.call_rpc_count + end + end + + def test_get_hardware + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_hardware_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_hardware, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_hardware_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_hardware({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_hardware name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_hardware({ 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_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.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_hardware_client_stub.call_rpc_count + end + end + + def test_create_hardware + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + hardware_id = "hello world" + hardware = {} + + create_hardware_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_hardware, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["hardware_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware), request["hardware"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_hardware_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_hardware({ parent: parent, hardware_id: hardware_id, hardware: hardware }) do |response, 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_hardware parent: parent, hardware_id: hardware_id, hardware: hardware do |response, 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_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new(parent: parent, hardware_id: hardware_id, hardware: hardware) do |response, operation| + assert_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_hardware({ parent: parent, hardware_id: hardware_id, hardware: hardware }, grpc_options) do |response, operation| + assert_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_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new(parent: parent, hardware_id: hardware_id, hardware: hardware), grpc_options) do |response, operation| + assert_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_hardware_client_stub.call_rpc_count + end + end + + def test_update_hardware + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.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 = {} + hardware = {} + request_id = "hello world" + + update_hardware_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_hardware, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware), request["hardware"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_hardware_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_hardware({ update_mask: update_mask, hardware: hardware, request_id: request_id }) do |response, 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_hardware update_mask: update_mask, hardware: hardware, request_id: request_id do |response, 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_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new(update_mask: update_mask, hardware: hardware, request_id: request_id) do |response, operation| + assert_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_hardware({ update_mask: update_mask, hardware: hardware, request_id: request_id }, grpc_options) do |response, operation| + assert_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_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new(update_mask: update_mask, hardware: hardware, request_id: request_id), grpc_options) do |response, operation| + assert_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_hardware_client_stub.call_rpc_count + end + end + + def test_delete_hardware + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + + delete_hardware_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_hardware, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_hardware_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_hardware({ name: name, request_id: request_id }) do |response, 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_hardware name: name, request_id: request_id do |response, 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_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new(name: name, request_id: request_id) do |response, operation| + assert_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_hardware({ name: name, request_id: request_id }, grpc_options) do |response, operation| + assert_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_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_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_hardware_client_stub.call_rpc_count + end + end + + def test_list_comments + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_comments, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest, 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_comments_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_comments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_comments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_comments ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.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_comments({ 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_comments(::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.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_comments_client_stub.call_rpc_count + end + end + + def test_get_comment + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_comment, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_comment_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_comment({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_comment name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_comment ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_comment({ 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_comment(::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.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_comment_client_stub.call_rpc_count + end + end + + def test_create_comment + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + comment_id = "hello world" + comment = {} + request_id = "hello world" + + create_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_comment, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["comment_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment), request["comment"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_comment_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_comment({ parent: parent, comment_id: comment_id, comment: comment, request_id: request_id }) do |response, 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_comment parent: parent, comment_id: comment_id, comment: comment, request_id: request_id do |response, 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_comment ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new(parent: parent, comment_id: comment_id, comment: comment, request_id: request_id) do |response, operation| + assert_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_comment({ parent: parent, comment_id: comment_id, comment: comment, request_id: request_id }, grpc_options) do |response, operation| + assert_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_comment(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new(parent: parent, comment_id: comment_id, comment: comment, request_id: request_id), grpc_options) do |response, operation| + assert_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_comment_client_stub.call_rpc_count + end + end + + def test_record_action_on_comment + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + action_type = :ACTION_TYPE_UNSPECIFIED + + record_action_on_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :record_action_on_comment, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest, request + assert_equal "hello world", request["name"] + assert_equal :ACTION_TYPE_UNSPECIFIED, request["action_type"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, record_action_on_comment_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.record_action_on_comment({ name: name, action_type: action_type }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.record_action_on_comment name: name, action_type: action_type do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.record_action_on_comment ::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new(name: name, action_type: action_type) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.record_action_on_comment({ name: name, action_type: action_type }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.record_action_on_comment(::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new(name: name, action_type: action_type), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, record_action_on_comment_client_stub.call_rpc_count + end + end + + def test_list_change_log_entries + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_change_log_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_change_log_entries, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest, 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_change_log_entries_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_change_log_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_change_log_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_change_log_entries ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.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_change_log_entries({ 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_change_log_entries(::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.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_change_log_entries_client_stub.call_rpc_count + end + end + + def test_get_change_log_entry + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_change_log_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_change_log_entry, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_change_log_entry_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_change_log_entry({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_change_log_entry name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_change_log_entry ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_change_log_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.get_change_log_entry(::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.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_change_log_entry_client_stub.call_rpc_count + end + end + + def test_list_skus + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_skus, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest, 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_skus_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_skus({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_skus parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_skus ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.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_skus({ 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_skus(::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.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_skus_client_stub.call_rpc_count + end + end + + def test_get_sku + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_sku_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_sku, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_sku_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_sku({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_sku name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_sku ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_sku({ 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_sku(::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.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_sku_client_stub.call_rpc_count + end + end + + def test_list_zones + # Create GRPC objects. + grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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_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 = {} + request_id = "hello world" + + create_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_zone, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest, request + assert_equal "hello world", request["parent"] + assert_equal "hello world", request["zone_id"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Zone), request["zone"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_zone_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, request_id: request_id }) do |response, 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, request_id: request_id do |response, 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::GDCHardwareManagement::V1alpha::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, request_id: request_id) do |response, operation| + assert_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, request_id: request_id }, grpc_options) do |response, operation| + assert_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::GDCHardwareManagement::V1alpha::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, request_id: request_id), grpc_options) do |response, operation| + assert_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 = {} + request_id = "hello world" + + update_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_zone, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Zone), request["zone"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_zone_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_zone({ update_mask: update_mask, zone: zone, request_id: request_id }) do |response, 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, request_id: request_id do |response, 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::GDCHardwareManagement::V1alpha::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, request_id: request_id) do |response, operation| + assert_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, request_id: request_id }, grpc_options) do |response, operation| + assert_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::GDCHardwareManagement::V1alpha::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, request_id: request_id), grpc_options) do |response, operation| + assert_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" + request_id = "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::GDCHardwareManagement::V1alpha::DeleteZoneRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_zone_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_zone({ name: name, request_id: request_id }) do |response, 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, request_id: request_id do |response, 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::GDCHardwareManagement::V1alpha::DeleteZoneRequest.new(name: name, request_id: request_id) do |response, operation| + assert_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, request_id: request_id }, grpc_options) do |response, operation| + assert_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::GDCHardwareManagement::V1alpha::DeleteZoneRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| + assert_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_signal_zone_state + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + request_id = "hello world" + state_signal = :STATE_SIGNAL_UNSPECIFIED + provisioning_state_signal = :PROVISIONING_STATE_SIGNAL_UNSPECIFIED + step = "hello world" + details = "hello world" + + signal_zone_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :signal_zone_state, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["request_id"] + assert_equal :STATE_SIGNAL_UNSPECIFIED, request["state_signal"] + assert_equal :PROVISIONING_STATE_SIGNAL_UNSPECIFIED, request["provisioning_state_signal"] + assert_equal "hello world", request["step"] + assert_equal "hello world", request["details"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, signal_zone_state_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.signal_zone_state({ name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.signal_zone_state name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.signal_zone_state ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new(name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.signal_zone_state({ name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.signal_zone_state(::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new(name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, signal_zone_state_client_stub.call_rpc_count + end + end + + def test_request_order_date_change + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + name = "hello world" + requested_date = {} + + request_order_date_change_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :request_order_date_change, name + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest, request + assert_equal "hello world", request["name"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["requested_date"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, request_order_date_change_client_stub do + # Create client + client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.request_order_date_change({ name: name, requested_date: requested_date }) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use named arguments + client.request_order_date_change name: name, requested_date: requested_date do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.request_order_date_change ::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new(name: name, requested_date: requested_date) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.request_order_date_change({ name: name, requested_date: requested_date }, grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.request_order_date_change(::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new(name: name, requested_date: requested_date), grpc_options) do |response, operation| + assert_kind_of Gapic::Operation, response + assert_equal grpc_response, response.grpc_op + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, request_order_date_change_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/helper.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/.gitignore b/owl-bot-staging/google-cloud-gdc_hardware_management/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/.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-gdc_hardware_management/.repo-metadata.json b/owl-bot-staging/google-cloud-gdc_hardware_management/.repo-metadata.json new file mode 100644 index 000000000000..58f603c68772 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/.repo-metadata.json @@ -0,0 +1,18 @@ +{ + "api_id": "gdchardwaremanagement.googleapis.com", + "api_shortname": "gdchardwaremanagement", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management/latest", + "distribution_name": "google-cloud-gdc_hardware_management", + "is_cloud": true, + "language": "ruby", + "name": "gdchardwaremanagement", + "name_pretty": "GDC Hardware Management API", + "product_documentation": "https://cloud.google.com/distributed-cloud/edge/latest/docs", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-gdc_hardware_management is the official client library for the GDC Hardware Management API.", + "ruby-cloud-product-url": "https://cloud.google.com/distributed-cloud/edge/latest/docs", + "ruby-cloud-service-override": "GdcHardwareManagement=GDCHardwareManagement", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/.rubocop.yml b/owl-bot-staging/google-cloud-gdc_hardware_management/.rubocop.yml new file mode 100644 index 000000000000..cd246d63e504 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-gdc_hardware_management.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-gdc_hardware_management.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/.toys.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/.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-gdc_hardware_management/.yardopts b/owl-bot-staging/google-cloud-gdc_hardware_management/.yardopts new file mode 100644 index 000000000000..0f53bd9cb248 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="GDC Hardware Management API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gdc_hardware_management/AUTHENTICATION.md new file mode 100644 index 000000000000..e5b6738b28f4 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-gdc_hardware_management 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-gdc_hardware_management 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/gdc_hardware_management" + +client = Google::Cloud::GDCHardwareManagement.gdc_hardware_management do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/gdc_hardware_management" + +Google::Cloud::GDCHardwareManagement.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::GDCHardwareManagement.gdc_hardware_management +``` + +### 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-gdc_hardware_management +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/gdc_hardware_management" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::GDCHardwareManagement.gdc_hardware_management +``` + +### 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-gdc_hardware_management/CHANGELOG.md b/owl-bot-staging/google-cloud-gdc_hardware_management/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/Gemfile b/owl-bot-staging/google-cloud-gdc_hardware_management/Gemfile new file mode 100644 index 000000000000..729754f8e5ea --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-gdc_hardware_management-v1alpha"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-gdc_hardware_management.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/LICENSE.md b/owl-bot-staging/google-cloud-gdc_hardware_management/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/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-gdc_hardware_management/README.md b/owl-bot-staging/google-cloud-gdc_hardware_management/README.md new file mode 100644 index 000000000000..6fe26aecdb9d --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the GDC Hardware Management API + +API Client library for the GDC Hardware Management API + +google-cloud-gdc_hardware_management is the official client library for the GDC Hardware Management API. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-gdc_hardware_management-v*`. +The gem `google-cloud-gdc_hardware_management` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management/latest) +for this library, google-cloud-gdc_hardware_management, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-gdc_hardware_management-v1alpha](https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management-v1alpha/latest). + +See also the [Product Documentation](https://cloud.google.com/distributed-cloud/edge/latest/docs) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-gdc_hardware_management +``` + +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/gdchardwaremanagement.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/gdc_hardware_management" + +client = Google::Cloud::GDCHardwareManagement.gdc_hardware_management +request = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.new # (request fields as keyword arguments...) +response = client.list_orders request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-gdc_hardware_management-v1alpha](https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management-v1alpha/latest). + +## 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-gdc_hardware_management`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-gdc_hardware_management-v1alpha`. +_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-gdc_hardware_management`. +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-gdc_hardware_management-v1alpha`. + +### 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-gdc_hardware_management/Rakefile b/owl-bot-staging/google-cloud-gdc_hardware_management/Rakefile new file mode 100644 index 000000000000..4592da7cd041 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/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 = true +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-gdc_hardware_management 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/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials" + ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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-gdc_hardware_management 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-gdc_hardware_management 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-gdc_hardware_management 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-gdc_hardware_management gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-gdc_hardware_management" + header "google-cloud-gdc_hardware_management rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-gdc_hardware_management yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-gdc_hardware_management 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-gdc_hardware_management 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-gdc_hardware_management 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-gdc_hardware_management/google-cloud-gdc_hardware_management.gemspec b/owl-bot-staging/google-cloud-gdc_hardware_management/google-cloud-gdc_hardware_management.gemspec new file mode 100644 index 000000000000..7b3c0c3a7e9b --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/google-cloud-gdc_hardware_management.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/gdc_hardware_management/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-gdc_hardware_management" + gem.version = Google::Cloud::GDCHardwareManagement::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-gdc_hardware_management is the official client library for the GDC Hardware Management API." + gem.summary = "API Client library for the GDC Hardware Management API" + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-gdc_hardware_management-v1alpha", ">= 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google-cloud-gdc_hardware_management.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google-cloud-gdc_hardware_management.rb new file mode 100644 index 000000000000..854e8fd3b75d --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google-cloud-gdc_hardware_management.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gdc_hardware_management" unless defined? Google::Cloud::GDCHardwareManagement::VERSION diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management.rb new file mode 100644 index 000000000000..5c4f9ec8f21a --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management.rb @@ -0,0 +1,156 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/gdc_hardware_management/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :gdc_hardware_management do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module GDCHardwareManagement + ## + # Create a new client object for GDCHardwareManagement. + # + # By default, this returns an instance of + # [Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management-v1alpha/latest/Google-Cloud-GDCHardwareManagement-V1alpha-GDCHardwareManagement-Client) + # for a gRPC client for version V1alpha of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the GDCHardwareManagement service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the GDCHardwareManagement service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::GDCHardwareManagement.gdc_hardware_management_available?}. + # + # ## About GDCHardwareManagement + # + # The GDC Hardware Management service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1alpha`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.gdc_hardware_management version: :v1alpha, transport: :grpc, &block + require "google/cloud/gdc_hardware_management/#{version.to_s.downcase}" + + package_name = Google::Cloud::GDCHardwareManagement + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::GDCHardwareManagement.const_get(package_name).const_get(:GDCHardwareManagement) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the GDCHardwareManagement service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::GDCHardwareManagement.gdc_hardware_management}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the GDCHardwareManagement service, + # or if the versioned client gem needs an update to support the GDCHardwareManagement service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1alpha`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.gdc_hardware_management_available? version: :v1alpha, transport: :grpc + require "google/cloud/gdc_hardware_management/#{version.to_s.downcase}" + package_name = Google::Cloud::GDCHardwareManagement + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::GDCHardwareManagement.const_get package_name + return false unless service_module.const_defined? :GDCHardwareManagement + service_module = service_module.const_get :GDCHardwareManagement + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-gdc_hardware_management library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # 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 [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.gdc_hardware_management if block_given? + + ::Google::Cloud.configure.gdc_hardware_management + end + end + end +end + +helper_path = ::File.join __dir__, "gdc_hardware_management", "helpers.rb" +require "google/cloud/gdc_hardware_management/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management/version.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management/version.rb new file mode 100644 index 000000000000..0b5a1d30736c --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management/version.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! + + +module Google + module Cloud + module GDCHardwareManagement + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/client_test.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/client_test.rb new file mode 100644 index 000000000000..05a3538b6acc --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 "google/cloud/gdc_hardware_management" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::GDCHardwareManagement::ClientConstructionMinitest < 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_gdc_hardware_management_grpc + skip unless Google::Cloud::GDCHardwareManagement.gdc_hardware_management_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::GDCHardwareManagement.gdc_hardware_management transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client, client + end + end + + def test_gdc_hardware_management_rest + skip unless Google::Cloud::GDCHardwareManagement.gdc_hardware_management_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::GDCHardwareManagement.gdc_hardware_management transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/version_test.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/version_test.rb new file mode 100644 index 000000000000..443e46b92916 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/version_test.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 "helper" +require "google/cloud/gdc_hardware_management/version" + +class Google::Cloud::GDCHardwareManagement::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::GDCHardwareManagement::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/test/helper.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gdc_hardware_management/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/.gitignore b/owl-bot-staging/google-cloud-gemini_data_analytics/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/.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-gemini_data_analytics/.repo-metadata.json b/owl-bot-staging/google-cloud-gemini_data_analytics/.repo-metadata.json new file mode 100644 index 000000000000..4c8c7a0be67b --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "geminidataanalytics.googleapis.com", + "api_shortname": "geminidataanalytics", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics/latest", + "distribution_name": "google-cloud-gemini_data_analytics", + "is_cloud": true, + "language": "ruby", + "name": "geminidataanalytics", + "name_pretty": "Data Analytics API with Gemini API", + "product_documentation": "https://cloud.google.com/gemini/docs/conversational-analytics-api/overview", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "google-cloud-gemini_data_analytics is the official client library for the Data Analytics API with Gemini API.", + "ruby-cloud-product-url": "https://cloud.google.com/gemini/docs/conversational-analytics-api/overview", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/.rubocop.yml b/owl-bot-staging/google-cloud-gemini_data_analytics/.rubocop.yml new file mode 100644 index 000000000000..8ca99ad7aeac --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-gemini_data_analytics.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-gemini_data_analytics.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/.toys.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/.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-gemini_data_analytics/.yardopts b/owl-bot-staging/google-cloud-gemini_data_analytics/.yardopts new file mode 100644 index 000000000000..54879d43e83a --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Data Analytics API with Gemini API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gemini_data_analytics/AUTHENTICATION.md new file mode 100644 index 000000000000..31b252334589 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-gemini_data_analytics 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-gemini_data_analytics 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/gemini_data_analytics" + +client = Google::Cloud::GeminiDataAnalytics.data_agent_service do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/gemini_data_analytics" + +Google::Cloud::GeminiDataAnalytics.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::GeminiDataAnalytics.data_agent_service +``` + +### 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-gemini_data_analytics +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/gemini_data_analytics" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::GeminiDataAnalytics.data_agent_service +``` + +### 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-gemini_data_analytics/CHANGELOG.md b/owl-bot-staging/google-cloud-gemini_data_analytics/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/Gemfile b/owl-bot-staging/google-cloud-gemini_data_analytics/Gemfile new file mode 100644 index 000000000000..25cff00273b3 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-gemini_data_analytics-v1beta"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-gemini_data_analytics.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/LICENSE.md b/owl-bot-staging/google-cloud-gemini_data_analytics/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/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-gemini_data_analytics/README.md b/owl-bot-staging/google-cloud-gemini_data_analytics/README.md new file mode 100644 index 000000000000..b1a04f66a6d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Data Analytics API with Gemini API + +API Client library for the Data Analytics API with Gemini API + +google-cloud-gemini_data_analytics is the official client library for the Data Analytics API with Gemini API. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-gemini_data_analytics-v*`. +The gem `google-cloud-gemini_data_analytics` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics/latest) +for this library, google-cloud-gemini_data_analytics, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-gemini_data_analytics-v1beta](https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1beta/latest). + +See also the [Product Documentation](https://cloud.google.com/gemini/docs/conversational-analytics-api/overview) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-gemini_data_analytics +``` + +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/geminidataanalytics.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/gemini_data_analytics" + +client = Google::Cloud::GeminiDataAnalytics.data_agent_service +request = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new # (request fields as keyword arguments...) +response = client.list_data_agents request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-gemini_data_analytics-v1beta](https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1beta/latest). + +## 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-gemini_data_analytics`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-gemini_data_analytics-v1beta`. +_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-gemini_data_analytics`. +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-gemini_data_analytics-v1beta`. + +### 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-gemini_data_analytics/Rakefile b/owl-bot-staging/google-cloud-gemini_data_analytics/Rakefile new file mode 100644 index 000000000000..6dd374104478 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/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 = true +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-gemini_data_analytics 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/gemini_data_analytics/v1beta/data_agent_service/credentials" + ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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-gemini_data_analytics 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-gemini_data_analytics 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-gemini_data_analytics 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-gemini_data_analytics gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-gemini_data_analytics" + header "google-cloud-gemini_data_analytics rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-gemini_data_analytics yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-gemini_data_analytics 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-gemini_data_analytics 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-gemini_data_analytics 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-gemini_data_analytics/google-cloud-gemini_data_analytics.gemspec b/owl-bot-staging/google-cloud-gemini_data_analytics/google-cloud-gemini_data_analytics.gemspec new file mode 100644 index 000000000000..627aa670acc1 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/google-cloud-gemini_data_analytics.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/gemini_data_analytics/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-gemini_data_analytics" + gem.version = Google::Cloud::GeminiDataAnalytics::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "google-cloud-gemini_data_analytics is the official client library for the Data Analytics API with Gemini API." + gem.summary = "API Client library for the Data Analytics API with Gemini API" + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-gemini_data_analytics-v1beta", ">= 0.0", "< 2.a" +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google-cloud-gemini_data_analytics.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google-cloud-gemini_data_analytics.rb new file mode 100644 index 000000000000..6f0cf3b63371 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google-cloud-gemini_data_analytics.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gemini_data_analytics" unless defined? Google::Cloud::GeminiDataAnalytics::VERSION diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics.rb new file mode 100644 index 000000000000..f6a692ea15f0 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics.rb @@ -0,0 +1,228 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/gemini_data_analytics/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :gemini_data_analytics do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module GeminiDataAnalytics + ## + # Create a new client object for DataAgentService. + # + # By default, this returns an instance of + # [Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1beta/latest/Google-Cloud-GeminiDataAnalytics-V1beta-DataAgentService-Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the DataAgentService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the DataAgentService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::GeminiDataAnalytics.data_agent_service_available?}. + # + # ## About DataAgentService + # + # Service describing handlers for resources. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.data_agent_service version: :v1beta, transport: :grpc, &block + require "google/cloud/gemini_data_analytics/#{version.to_s.downcase}" + + package_name = Google::Cloud::GeminiDataAnalytics + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::GeminiDataAnalytics.const_get(package_name).const_get(:DataAgentService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the DataAgentService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::GeminiDataAnalytics.data_agent_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the DataAgentService service, + # or if the versioned client gem needs an update to support the DataAgentService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.data_agent_service_available? version: :v1beta, transport: :grpc + require "google/cloud/gemini_data_analytics/#{version.to_s.downcase}" + package_name = Google::Cloud::GeminiDataAnalytics + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::GeminiDataAnalytics.const_get package_name + return false unless service_module.const_defined? :DataAgentService + service_module = service_module.const_get :DataAgentService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Create a new client object for DataChatService. + # + # By default, this returns an instance of + # [Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1beta/latest/Google-Cloud-GeminiDataAnalytics-V1beta-DataChatService-Client) + # for a gRPC client for version V1beta of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the DataChatService service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the DataChatService service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::GeminiDataAnalytics.data_chat_service_available?}. + # + # ## About DataChatService + # + # Service to ask a natural language question on top of BigQuery + # and Looker Studio datasources to get back streamed responses of various kinds + # to help provide a rich conversational answer. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.data_chat_service version: :v1beta, transport: :grpc, &block + require "google/cloud/gemini_data_analytics/#{version.to_s.downcase}" + + package_name = Google::Cloud::GeminiDataAnalytics + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::GeminiDataAnalytics.const_get(package_name).const_get(:DataChatService) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the DataChatService service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::GeminiDataAnalytics.data_chat_service}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the DataChatService service, + # or if the versioned client gem needs an update to support the DataChatService service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1beta`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.data_chat_service_available? version: :v1beta, transport: :grpc + require "google/cloud/gemini_data_analytics/#{version.to_s.downcase}" + package_name = Google::Cloud::GeminiDataAnalytics + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::GeminiDataAnalytics.const_get package_name + return false unless service_module.const_defined? :DataChatService + service_module = service_module.const_get :DataChatService + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-gemini_data_analytics library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # 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 [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.gemini_data_analytics if block_given? + + ::Google::Cloud.configure.gemini_data_analytics + end + end + end +end + +helper_path = ::File.join __dir__, "gemini_data_analytics", "helpers.rb" +require "google/cloud/gemini_data_analytics/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics/version.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics/version.rb new file mode 100644 index 000000000000..df5e5d498354 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics/version.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! + + +module Google + module Cloud + module GeminiDataAnalytics + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/client_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/client_test.rb new file mode 100644 index 000000000000..9a6ea222ad44 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/client_test.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! + +require "helper" +require "google/cloud/gemini_data_analytics" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::GeminiDataAnalytics::ClientConstructionMinitest < 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_agent_service_grpc + skip unless Google::Cloud::GeminiDataAnalytics.data_agent_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::GeminiDataAnalytics.data_agent_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client, client + end + end + + def test_data_agent_service_rest + skip unless Google::Cloud::GeminiDataAnalytics.data_agent_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::GeminiDataAnalytics.data_agent_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client, client + end + end + + def test_data_chat_service_grpc + skip unless Google::Cloud::GeminiDataAnalytics.data_chat_service_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::GeminiDataAnalytics.data_chat_service transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client, client + end + end + + def test_data_chat_service_rest + skip unless Google::Cloud::GeminiDataAnalytics.data_chat_service_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::GeminiDataAnalytics.data_chat_service transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/version_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/version_test.rb new file mode 100644 index 000000000000..3473549d65d2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/version_test.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 "helper" +require "google/cloud/gemini_data_analytics/version" + +class Google::Cloud::GeminiDataAnalytics::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::GeminiDataAnalytics::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/test/helper.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gemini_data_analytics/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/.gitignore b/owl-bot-staging/google-cloud-gke_backup-v1/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-gke_backup-v1/.repo-metadata.json new file mode 100644 index 000000000000..0eda48010934 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "gkebackup.googleapis.com", + "api_shortname": "gkebackup", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest", + "distribution_name": "google-cloud-gke_backup-v1", + "is_cloud": true, + "language": "ruby", + "name": "gkebackup", + "name_pretty": "Backup for GKE V1 API", + "product_documentation": "https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Backup for GKE lets you protect, manage, and restore your containerized applications and data for stateful workloads running on Google Kubernetes Engine clusters. Note that google-cloud-gke_backup-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gke_backup instead. See the readme for more details.", + "ruby-cloud-product-url": "https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/.rubocop.yml b/owl-bot-staging/google-cloud-gke_backup-v1/.rubocop.yml new file mode 100644 index 000000000000..bdd7d3ac54fd --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/.rubocop.yml @@ -0,0 +1,33 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-gke_backup-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-gke_backup-v1.rb" diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/.toys.rb b/owl-bot-staging/google-cloud-gke_backup-v1/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/.yardopts b/owl-bot-staging/google-cloud-gke_backup-v1/.yardopts new file mode 100644 index 000000000000..391c905bb074 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/.yardopts @@ -0,0 +1,12 @@ +--no-private +--title="Backup for GKE 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-gke_backup-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gke_backup-v1/AUTHENTICATION.md new file mode 100644 index 000000000000..665050fca1c0 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-gke_backup-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-gke_backup-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/gke_backup/v1" + +client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/gke_backup/v1" + +::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::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-gke_backup-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/gke_backup/v1" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::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-gke_backup-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-gke_backup-v1/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/Gemfile b/owl-bot-staging/google-cloud-gke_backup-v1/Gemfile new file mode 100644 index 000000000000..6442df18fa2f --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/Gemfile @@ -0,0 +1,11 @@ +source "https://rubygems.org" + +gemspec + +gem "google-style", "~> 1.31.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/LICENSE.md b/owl-bot-staging/google-cloud-gke_backup-v1/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/README.md b/owl-bot-staging/google-cloud-gke_backup-v1/README.md new file mode 100644 index 000000000000..ff40bfe72de1 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/README.md @@ -0,0 +1,154 @@ +# Ruby Client for the Backup for GKE V1 API + +Backup for GKE is a managed Kubernetes workload backup and restore service for GKE clusters. + +Backup for GKE lets you protect, manage, and restore your containerized applications and data for stateful workloads running on Google Kubernetes Engine clusters. + +https://github.com/googleapis/google-cloud-ruby + +This gem is a _versioned_ client. It provides basic client classes for a +specific version of the Backup for GKE V1 API. Most users should consider using +the main client gem, +[google-cloud-gke_backup](https://rubygems.org/gems/google-cloud-gke_backup). +See the section below titled *Which client should I use?* for more information. + +## Installation + +``` +$ gem install google-cloud-gke_backup-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/gkebackup.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +## Quick Start + +```ruby +require "google/cloud/gke_backup/v1" + +client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new +request = ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new # (request fields as keyword arguments...) +response = client.create_backup_plan request +``` + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest) +for class and method documentation. + +See also the [Product Documentation](https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/) +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/gke_backup/v1" +require "logger" + +client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::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-gke_backup`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-gke_backup-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-gke_backup`. +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-gke_backup-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-gke_backup-v1/Rakefile b/owl-bot-staging/google-cloud-gke_backup-v1/Rakefile new file mode 100644 index 000000000000..2a4f5cd5f3cc --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-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/gke_backup/v1/backup_for_gke/credentials" + ::Google::Cloud::GkeBackup::V1::BackupForGKE::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-gke_backup-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-gke_backup-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-gke_backup-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-gke_backup-v1 gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-gke_backup-v1" + header "google-cloud-gke_backup-v1 rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-gke_backup-v1 yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-gke_backup-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-gke_backup-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-gke_backup-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-gke_backup-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-gke_backup-v1/gapic_metadata.json new file mode 100644 index 000000000000..1ac2e53f7f86 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/gapic_metadata.json @@ -0,0 +1,213 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "ruby", + "protoPackage": "google.cloud.gkebackup.v1", + "libraryPackage": "::Google::Cloud::GkeBackup::V1", + "services": { + "BackupForGKE": { + "clients": { + "grpc": { + "libraryClient": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client", + "rpcs": { + "CreateBackupPlan": { + "methods": [ + "create_backup_plan" + ] + }, + "ListBackupPlans": { + "methods": [ + "list_backup_plans" + ] + }, + "GetBackupPlan": { + "methods": [ + "get_backup_plan" + ] + }, + "UpdateBackupPlan": { + "methods": [ + "update_backup_plan" + ] + }, + "DeleteBackupPlan": { + "methods": [ + "delete_backup_plan" + ] + }, + "CreateBackupChannel": { + "methods": [ + "create_backup_channel" + ] + }, + "ListBackupChannels": { + "methods": [ + "list_backup_channels" + ] + }, + "GetBackupChannel": { + "methods": [ + "get_backup_channel" + ] + }, + "UpdateBackupChannel": { + "methods": [ + "update_backup_channel" + ] + }, + "DeleteBackupChannel": { + "methods": [ + "delete_backup_channel" + ] + }, + "ListBackupPlanBindings": { + "methods": [ + "list_backup_plan_bindings" + ] + }, + "GetBackupPlanBinding": { + "methods": [ + "get_backup_plan_binding" + ] + }, + "CreateBackup": { + "methods": [ + "create_backup" + ] + }, + "ListBackups": { + "methods": [ + "list_backups" + ] + }, + "GetBackup": { + "methods": [ + "get_backup" + ] + }, + "UpdateBackup": { + "methods": [ + "update_backup" + ] + }, + "DeleteBackup": { + "methods": [ + "delete_backup" + ] + }, + "ListVolumeBackups": { + "methods": [ + "list_volume_backups" + ] + }, + "GetVolumeBackup": { + "methods": [ + "get_volume_backup" + ] + }, + "CreateRestorePlan": { + "methods": [ + "create_restore_plan" + ] + }, + "ListRestorePlans": { + "methods": [ + "list_restore_plans" + ] + }, + "GetRestorePlan": { + "methods": [ + "get_restore_plan" + ] + }, + "UpdateRestorePlan": { + "methods": [ + "update_restore_plan" + ] + }, + "DeleteRestorePlan": { + "methods": [ + "delete_restore_plan" + ] + }, + "CreateRestoreChannel": { + "methods": [ + "create_restore_channel" + ] + }, + "ListRestoreChannels": { + "methods": [ + "list_restore_channels" + ] + }, + "GetRestoreChannel": { + "methods": [ + "get_restore_channel" + ] + }, + "UpdateRestoreChannel": { + "methods": [ + "update_restore_channel" + ] + }, + "DeleteRestoreChannel": { + "methods": [ + "delete_restore_channel" + ] + }, + "ListRestorePlanBindings": { + "methods": [ + "list_restore_plan_bindings" + ] + }, + "GetRestorePlanBinding": { + "methods": [ + "get_restore_plan_binding" + ] + }, + "CreateRestore": { + "methods": [ + "create_restore" + ] + }, + "ListRestores": { + "methods": [ + "list_restores" + ] + }, + "GetRestore": { + "methods": [ + "get_restore" + ] + }, + "UpdateRestore": { + "methods": [ + "update_restore" + ] + }, + "DeleteRestore": { + "methods": [ + "delete_restore" + ] + }, + "ListVolumeRestores": { + "methods": [ + "list_volume_restores" + ] + }, + "GetVolumeRestore": { + "methods": [ + "get_volume_restore" + ] + }, + "GetBackupIndexDownloadUrl": { + "methods": [ + "get_backup_index_download_url" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/google-cloud-gke_backup-v1.gemspec b/owl-bot-staging/google-cloud-gke_backup-v1/google-cloud-gke_backup-v1.gemspec new file mode 100644 index 000000000000..60f453624325 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/google-cloud-gke_backup-v1.gemspec @@ -0,0 +1,30 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/gke_backup/v1/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-gke_backup-v1" + gem.version = Google::Cloud::GkeBackup::V1::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Backup for GKE lets you protect, manage, and restore your containerized applications and data for stateful workloads running on Google Kubernetes Engine clusters. Note that google-cloud-gke_backup-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gke_backup instead. See the readme for more details." + gem.summary = "Backup for GKE is a managed Kubernetes workload backup and restore service for GKE clusters." + 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.1" + + 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-gke_backup-v1/lib/google-cloud-gke_backup-v1.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google-cloud-gke_backup-v1.rb new file mode 100644 index 000000000000..87ed457ef266 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google-cloud-gke_backup-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/gke_backup/v1" diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1.rb new file mode 100644 index 000000000000..8c3bbcdef3fc --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1.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/gke_backup/v1/backup_for_gke" +require "google/cloud/gke_backup/v1/version" + +module Google + module Cloud + module GkeBackup + ## + # API client module. + # + # @example Load this package, including all its services, and instantiate a gRPC client + # + # require "google/cloud/gke_backup/v1" + # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # @example Load this package, including all its services, and instantiate a REST client + # + # require "google/cloud/gke_backup/v1" + # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + module V1 + end + end + end +end + +helper_path = ::File.join __dir__, "v1", "_helpers.rb" +require "google/cloud/gke_backup/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke.rb new file mode 100644 index 000000000000..8d22ff475e9e --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke.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/gke_backup/v1/version" + +require "google/cloud/gke_backup/v1/backup_for_gke/credentials" +require "google/cloud/gke_backup/v1/backup_for_gke/paths" +require "google/cloud/gke_backup/v1/backup_for_gke/operations" +require "google/cloud/gke_backup/v1/backup_for_gke/client" +require "google/cloud/gke_backup/v1/backup_for_gke/rest" + +module Google + module Cloud + module GkeBackup + module V1 + ## + # BackupForGKE allows Kubernetes administrators to configure, execute, and + # manage backup and restore operations for their GKE clusters. + # + # @example Load this service and instantiate a gRPC client + # + # require "google/cloud/gke_backup/v1/backup_for_gke" + # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # @example Load this service and instantiate a REST client + # + # require "google/cloud/gke_backup/v1/backup_for_gke/rest" + # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + module BackupForGKE + end + end + end + end +end + +helper_path = ::File.join __dir__, "backup_for_gke", "helpers.rb" +require "google/cloud/gke_backup/v1/backup_for_gke/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb new file mode 100644 index 000000000000..6fe6a5aecaa8 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb @@ -0,0 +1,4776 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gkebackup/v1/gkebackup_pb" +require "google/cloud/location" +require "google/iam/v1" + +module Google + module Cloud + module GkeBackup + module V1 + module BackupForGKE + ## + # Client for the BackupForGKE service. + # + # BackupForGKE allows Kubernetes administrators to configure, execute, and + # manage backup and restore operations for their GKE clusters. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_for_gke_stub + + ## + # Configure the BackupForGKE Client class. + # + # See {::Google::Cloud::GkeBackup::V1::BackupForGKE::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupForGKE clients + # ::Google::Cloud::GkeBackup::V1::BackupForGKE::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", "GkeBackup", "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_backup_plan.timeout = 300.0 + + default_config.rpcs.list_backup_plans.timeout = 60.0 + default_config.rpcs.list_backup_plans.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_plan.timeout = 60.0 + default_config.rpcs.get_backup_plan.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup_plan.timeout = 60.0 + + default_config.rpcs.delete_backup_plan.timeout = 60.0 + + default_config.rpcs.create_backup_channel.timeout = 60.0 + + default_config.rpcs.list_backup_channels.timeout = 60.0 + default_config.rpcs.list_backup_channels.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_channel.timeout = 60.0 + default_config.rpcs.get_backup_channel.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup_channel.timeout = 60.0 + + default_config.rpcs.delete_backup_channel.timeout = 60.0 + + default_config.rpcs.list_backup_plan_bindings.timeout = 60.0 + default_config.rpcs.list_backup_plan_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_plan_binding.timeout = 60.0 + default_config.rpcs.get_backup_plan_binding.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_backup.timeout = 120.0 + + default_config.rpcs.list_backups.timeout = 60.0 + default_config.rpcs.list_backups.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup.timeout = 60.0 + default_config.rpcs.get_backup.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup.timeout = 60.0 + + default_config.rpcs.delete_backup.timeout = 300.0 + + default_config.rpcs.list_volume_backups.timeout = 60.0 + default_config.rpcs.list_volume_backups.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_volume_backup.timeout = 60.0 + default_config.rpcs.get_volume_backup.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_restore_plan.timeout = 120.0 + + default_config.rpcs.list_restore_plans.timeout = 60.0 + default_config.rpcs.list_restore_plans.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_restore_plan.timeout = 60.0 + default_config.rpcs.get_restore_plan.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_restore_plan.timeout = 60.0 + + default_config.rpcs.delete_restore_plan.timeout = 60.0 + + default_config.rpcs.create_restore_channel.timeout = 60.0 + + default_config.rpcs.list_restore_channels.timeout = 60.0 + default_config.rpcs.list_restore_channels.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_restore_channel.timeout = 60.0 + default_config.rpcs.get_restore_channel.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_restore_channel.timeout = 60.0 + + default_config.rpcs.delete_restore_channel.timeout = 60.0 + + default_config.rpcs.list_restore_plan_bindings.timeout = 60.0 + default_config.rpcs.list_restore_plan_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_restore_plan_binding.timeout = 60.0 + default_config.rpcs.get_restore_plan_binding.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_restore.timeout = 120.0 + + default_config.rpcs.list_restores.timeout = 60.0 + default_config.rpcs.list_restores.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_restore.timeout = 60.0 + default_config.rpcs.get_restore.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_restore.timeout = 60.0 + + default_config.rpcs.delete_restore.timeout = 60.0 + + default_config.rpcs.list_volume_restores.timeout = 60.0 + default_config.rpcs.list_volume_restores.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_volume_restore.timeout = 60.0 + default_config.rpcs.get_volume_restore.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_index_download_url.timeout = 60.0 + default_config.rpcs.get_backup_index_download_url.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupForGKE 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::GkeBackup::V1::BackupForGKE::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 + @backup_for_gke_stub.universe_domain + end + + ## + # Create a new BackupForGKE client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupForGKE 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/gkebackup/v1/gkebackup_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 + + @backup_for_gke_stub = ::Gapic::ServiceStub.new( + ::Google::Cloud::GkeBackup::V1::BackupForGKE::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 + ) + + @backup_for_gke_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 = @backup_for_gke_stub.endpoint + config.universe_domain = @backup_for_gke_stub.universe_domain + config.logger = @backup_for_gke_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 = @backup_for_gke_stub.endpoint + config.universe_domain = @backup_for_gke_stub.universe_domain + config.logger = @backup_for_gke_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::GkeBackup::V1::BackupForGKE::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 + @backup_for_gke_stub.logger + end + + # Service calls + + ## + # Creates a new BackupPlan in a given location. + # + # @overload create_backup_plan(request, options = nil) + # Pass arguments to `create_backup_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_plan(parent: nil, backup_plan: nil, backup_plan_id: nil) + # Pass arguments to `create_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 within which to create the BackupPlan. + # Format: `projects/*/locations/*` + # @param backup_plan [::Google::Cloud::GkeBackup::V1::BackupPlan, ::Hash] + # Required. The BackupPlan resource object to create. + # @param backup_plan_id [::String] + # Required. The client-provided short name for the BackupPlan resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of BackupPlans in this location + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new + # + # # Call the create_backup_plan method. + # result = client.create_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest + + # Converts hash and nil to 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_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backup_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :create_backup_plan, 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 BackupPlans in a given location. + # + # @overload list_backup_plans(request, options = nil) + # Pass arguments to `list_backup_plans` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backup_plans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 that contains the BackupPlans to list. + # Format: `projects/*/locations/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.new + # + # # Call the list_backup_plans method. + # result = client.list_backup_plans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupPlan. + # p item + # end + # + def list_backup_plans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest + + # Converts hash and nil to 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_backup_plans.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backup_plans.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_plans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :list_backup_plans, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backup_plans, 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 + + ## + # Retrieve the details of a single BackupPlan. + # + # @overload get_backup_plan(request, options = nil) + # Pass arguments to `get_backup_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_plan(name: nil) + # Pass arguments to `get_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified BackupPlan name. + # Format: `projects/*/locations/*/backupPlans/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeBackup::V1::BackupPlan] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeBackup::V1::BackupPlan] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new + # + # # Call the get_backup_plan method. + # result = client.get_backup_plan request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlan. + # p result + # + def get_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest + + # Converts hash and nil to 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_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backup_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :get_backup_plan, 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 + + ## + # Update a BackupPlan. + # + # @overload update_backup_plan(request, options = nil) + # Pass arguments to `update_backup_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_plan(backup_plan: nil, update_mask: nil) + # Pass arguments to `update_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_plan [::Google::Cloud::GkeBackup::V1::BackupPlan, ::Hash] + # Required. A new version of the BackupPlan resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. This is used to specify the fields to be overwritten in the + # BackupPlan targeted for update. The values for each of these + # updated fields will be taken from the `backup_plan` provided + # with this request. Field names are relative to the root of the resource + # (e.g., `description`, `backup_config.include_volume_data`, etc.) + # If no `update_mask` is provided, all fields in `backup_plan` will be + # written to the target BackupPlan resource. + # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored + # and are not used to update the target BackupPlan. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new + # + # # Call the update_backup_plan method. + # result = client.update_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest + + # Converts hash and nil to 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_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup_plan&.name + header_params["backup_plan.name"] = request.backup_plan.name + end + + request_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_backup_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :update_backup_plan, 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 existing BackupPlan. + # + # @overload delete_backup_plan(request, options = nil) + # Pass arguments to `delete_backup_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup_plan(name: nil, etag: nil) + # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified BackupPlan name. + # Format: `projects/*/locations/*/backupPlans/*` + # @param etag [::String] + # Optional. If provided, this value must match the current value of the + # target BackupPlan's {::Google::Cloud::GkeBackup::V1::BackupPlan#etag etag} field + # or the request is rejected. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.new + # + # # Call the delete_backup_plan method. + # result = client.delete_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest + + # Converts hash and nil to 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_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backup_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :delete_backup_plan, 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 new BackupChannel in a given location. + # + # @overload create_backup_channel(request, options = nil) + # Pass arguments to `create_backup_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_channel(parent: nil, backup_channel: nil, backup_channel_id: nil) + # Pass arguments to `create_backup_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 within which to create the BackupChannel. + # Format: `projects/*/locations/*` + # @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash] + # Required. The BackupChannel resource object to create. + # @param backup_channel_id [::String] + # Optional. The client-provided short name for the BackupChannel resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of BackupChannels in this location + # If the user does not provide a name, a uuid will be used as the name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new + # + # # Call the create_backup_channel method. + # result = client.create_backup_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest + + # Converts hash and nil to 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_backup_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backup_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :create_backup_channel, 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 BackupChannels in a given location. + # + # @overload list_backup_channels(request, options = nil) + # Pass arguments to `list_backup_channels` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backup_channels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 that contains the BackupChannels to list. + # Format: `projects/*/locations/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token} + # received from a previous `ListBackupChannels` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupChannels` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.new + # + # # Call the list_backup_channels method. + # result = client.list_backup_channels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupChannel. + # p item + # end + # + def list_backup_channels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest + + # Converts hash and nil to 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_backup_channels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backup_channels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_channels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :list_backup_channels, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backup_channels, 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 + + ## + # Retrieve the details of a single BackupChannel. + # + # @overload get_backup_channel(request, options = nil) + # Pass arguments to `get_backup_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_channel(name: nil) + # Pass arguments to `get_backup_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified BackupChannel name. + # Format: `projects/*/locations/*/backupChannels/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeBackup::V1::BackupChannel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeBackup::V1::BackupChannel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new + # + # # Call the get_backup_channel method. + # result = client.get_backup_channel request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupChannel. + # p result + # + def get_backup_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest + + # Converts hash and nil to 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_backup_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backup_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :get_backup_channel, 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 + + ## + # Update a BackupChannel. + # + # @overload update_backup_channel(request, options = nil) + # Pass arguments to `update_backup_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_channel(backup_channel: nil, update_mask: nil) + # Pass arguments to `update_backup_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash] + # Required. A new version of the BackupChannel resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. This is used to specify the fields to be overwritten in the + # BackupChannel targeted for update. The values for each of these + # updated fields will be taken from the `backup_channel` provided + # with this request. Field names are relative to the root of the resource + # (e.g., `description`, `labels`, etc.) + # If no `update_mask` is provided, all fields in `backup_channel` will + # be written to the target BackupChannel resource. Note that + # OUTPUT_ONLY and IMMUTABLE fields in `backup_channel` are ignored and + # are not used to update the target BackupChannel. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new + # + # # Call the update_backup_channel method. + # result = client.update_backup_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest + + # Converts hash and nil to 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_backup_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup_channel&.name + header_params["backup_channel.name"] = request.backup_channel.name + end + + request_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_backup_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :update_backup_channel, 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 existing BackupChannel. + # + # @overload delete_backup_channel(request, options = nil) + # Pass arguments to `delete_backup_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup_channel(name: nil, etag: nil, force: nil) + # Pass arguments to `delete_backup_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified BackupChannel name. + # Format: `projects/*/locations/*/backupChannels/*` + # @param etag [::String] + # Optional. If provided, this value must match the current value of the + # target BackupChannel's {::Google::Cloud::GkeBackup::V1::BackupChannel#etag etag} + # field or the request is rejected. + # @param force [::Boolean] + # Optional. If set to true, any BackupPlanAssociations below this + # BackupChannel will also be deleted. Otherwise, the request will only + # succeed if the BackupChannel has no BackupPlanAssociations. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new + # + # # Call the delete_backup_channel method. + # result = client.delete_backup_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest + + # Converts hash and nil to 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_backup_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backup_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :delete_backup_channel, 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 BackupPlanBindings in a given location. + # + # @overload list_backup_plan_bindings(request, options = nil) + # Pass arguments to `list_backup_plan_bindings` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backup_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backup_plan_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 BackupChannel that contains the BackupPlanBindings to list. + # Format: `projects/*/locations/*/backupChannels/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlanBindings` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlanBindings` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.new + # + # # Call the list_backup_plan_bindings method. + # result = client.list_backup_plan_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::GkeBackup::V1::BackupPlanBinding. + # p item + # end + # + def list_backup_plan_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest + + # Converts hash and nil to 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_backup_plan_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::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backup_plan_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backup_plan_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :list_backup_plan_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backup_plan_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 + + ## + # Retrieve the details of a single BackupPlanBinding. + # + # @overload get_backup_plan_binding(request, options = nil) + # Pass arguments to `get_backup_plan_binding` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_plan_binding(name: nil) + # Pass arguments to `get_backup_plan_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. Fully qualified BackupPlanBinding name. + # Format: + # `projects/*/locations/*/backupChannels/*/backupPlanBindings/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeBackup::V1::BackupPlanBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new + # + # # Call the get_backup_plan_binding method. + # result = client.get_backup_plan_binding request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlanBinding. + # p result + # + def get_backup_plan_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest + + # Converts hash and nil to 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_backup_plan_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::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backup_plan_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_plan_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :get_backup_plan_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 + + ## + # Creates a Backup for the given BackupPlan. + # + # @overload create_backup(request, options = nil) + # Pass arguments to `create_backup` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::CreateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup(parent: nil, backup: nil, backup_id: nil) + # Pass arguments to `create_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The BackupPlan within which to create the Backup. + # Format: `projects/*/locations/*/backupPlans/*` + # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash] + # Optional. The Backup resource to create. + # @param backup_id [::String] + # Optional. The client-provided short name for the Backup resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of Backups in this BackupPlan + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::CreateBackupRequest.new + # + # # Call the create_backup method. + # result = client.create_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupRequest + + # Converts hash and nil to 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :create_backup, 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 the Backups for a given BackupPlan. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil) + # Pass arguments to `list_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The BackupPlan that contains the Backups to list. + # Format: `projects/*/locations/*/backupPlans/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token} + # received from a previous `ListBackups` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackups` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @param return_partial_success [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field will be populated. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListBackupsRequest.new + # + # # Call the list_backups method. + # result = client.list_backups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup. + # p item + # end + # + def list_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupsRequest + + # Converts hash and nil to 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_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :list_backups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backups, 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 + + ## + # Retrieve the details of a single Backup. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup(name: nil) + # Pass arguments to `get_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Full name of the Backup resource. + # Format: `projects/*/locations/*/backupPlans/*/backups/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeBackup::V1::Backup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeBackup::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::Backup. + # p result + # + def get_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupRequest + + # Converts hash and nil to 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :get_backup, 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 + + ## + # Update a Backup. + # + # @overload update_backup(request, options = nil) + # Pass arguments to `update_backup` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::UpdateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup(backup: nil, update_mask: nil) + # Pass arguments to `update_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash] + # Required. A new version of the Backup resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. This is used to specify the fields to be overwritten in the + # Backup targeted for update. The values for each of these + # updated fields will be taken from the `backup_plan` provided + # with this request. Field names are relative to the root of the resource. + # If no `update_mask` is provided, all fields in `backup` will be + # written to the target Backup resource. + # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored + # and are not used to update the target Backup. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new + # + # # Call the update_backup method. + # result = client.update_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest + + # Converts hash and nil to 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup&.name + header_params["backup.name"] = request.backup.name + end + + request_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_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :update_backup, 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 existing Backup. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_backup(name: nil, etag: nil, force: nil) + # Pass arguments to `delete_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the Backup resource. + # Format: `projects/*/locations/*/backupPlans/*/backups/*` + # @param etag [::String] + # Optional. If provided, this value must match the current value of the + # target Backup's {::Google::Cloud::GkeBackup::V1::Backup#etag etag} field or the + # request is rejected. + # @param force [::Boolean] + # Optional. If set to true, any VolumeBackups below this Backup will also be + # deleted. Otherwise, the request will only succeed if the Backup has no + # VolumeBackups. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest + + # Converts hash and nil to 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :delete_backup, 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 the VolumeBackups for a given Backup. + # + # @overload list_volume_backups(request, options = nil) + # Pass arguments to `list_volume_backups` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_volume_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_volume_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The Backup that contains the VolumeBackups to list. + # Format: `projects/*/locations/*/backupPlans/*/backups/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token} + # received from a previous `ListVolumeBackups` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListVolumeBackups` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.new + # + # # Call the list_volume_backups method. + # result = client.list_volume_backups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup. + # p item + # end + # + def list_volume_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest + + # Converts hash and nil to 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_volume_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_volume_backups.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_volume_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :list_volume_backups, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_volume_backups, 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 + + ## + # Retrieve the details of a single VolumeBackup. + # + # @overload get_volume_backup(request, options = nil) + # Pass arguments to `get_volume_backup` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_volume_backup(name: nil) + # Pass arguments to `get_volume_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Full name of the VolumeBackup resource. + # Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeBackup::V1::VolumeBackup] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new + # + # # Call the get_volume_backup method. + # result = client.get_volume_backup request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeBackup. + # p result + # + def get_volume_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest + + # Converts hash and nil to 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_volume_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_volume_backup.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_volume_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :get_volume_backup, 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 new RestorePlan in a given location. + # + # @overload create_restore_plan(request, options = nil) + # Pass arguments to `create_restore_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_restore_plan(parent: nil, restore_plan: nil, restore_plan_id: nil) + # Pass arguments to `create_restore_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 within which to create the RestorePlan. + # Format: `projects/*/locations/*` + # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash] + # Required. The RestorePlan resource object to create. + # @param restore_plan_id [::String] + # Required. The client-provided short name for the RestorePlan resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of RestorePlans in this location + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new + # + # # Call the create_restore_plan method. + # result = client.create_restore_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest + + # Converts hash and nil to 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_restore_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restore_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_restore_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :create_restore_plan, 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 RestorePlans in a given location. + # + # @overload list_restore_plans(request, options = nil) + # Pass arguments to `list_restore_plans` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_restore_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_restore_plans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 that contains the RestorePlans to list. + # Format: `projects/*/locations/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token} + # received from a previous `ListRestorePlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListRestorePlans` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.new + # + # # Call the list_restore_plans method. + # result = client.list_restore_plans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan. + # p item + # end + # + def list_restore_plans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest + + # Converts hash and nil to 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_restore_plans.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restore_plans.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_restore_plans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :list_restore_plans, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plans, 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 + + ## + # Retrieve the details of a single RestorePlan. + # + # @overload get_restore_plan(request, options = nil) + # Pass arguments to `get_restore_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_restore_plan(name: nil) + # Pass arguments to `get_restore_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified RestorePlan name. + # Format: `projects/*/locations/*/restorePlans/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeBackup::V1::RestorePlan] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeBackup::V1::RestorePlan] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new + # + # # Call the get_restore_plan method. + # result = client.get_restore_plan request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlan. + # p result + # + def get_restore_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest + + # Converts hash and nil to 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_restore_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restore_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_restore_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :get_restore_plan, 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 + + ## + # Update a RestorePlan. + # + # @overload update_restore_plan(request, options = nil) + # Pass arguments to `update_restore_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_restore_plan(restore_plan: nil, update_mask: nil) + # Pass arguments to `update_restore_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash] + # Required. A new version of the RestorePlan resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. This is used to specify the fields to be overwritten in the + # RestorePlan targeted for update. The values for each of these + # updated fields will be taken from the `restore_plan` provided + # with this request. Field names are relative to the root of the resource. + # If no `update_mask` is provided, all fields in `restore_plan` will be + # written to the target RestorePlan resource. + # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored + # and are not used to update the target RestorePlan. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new + # + # # Call the update_restore_plan method. + # result = client.update_restore_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest + + # Converts hash and nil to 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_restore_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.restore_plan&.name + header_params["restore_plan.name"] = request.restore_plan.name + end + + request_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_restore_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_restore_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :update_restore_plan, 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 existing RestorePlan. + # + # @overload delete_restore_plan(request, options = nil) + # Pass arguments to `delete_restore_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_restore_plan(name: nil, etag: nil, force: nil) + # Pass arguments to `delete_restore_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified RestorePlan name. + # Format: `projects/*/locations/*/restorePlans/*` + # @param etag [::String] + # Optional. If provided, this value must match the current value of the + # target RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#etag etag} + # field or the request is rejected. + # @param force [::Boolean] + # Optional. If set to true, any Restores below this RestorePlan will also be + # deleted. Otherwise, the request will only succeed if the RestorePlan has no + # Restores. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new + # + # # Call the delete_restore_plan method. + # result = client.delete_restore_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest + + # Converts hash and nil to 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_restore_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restore_plan.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_restore_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :delete_restore_plan, 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 new RestoreChannel in a given location. + # + # @overload create_restore_channel(request, options = nil) + # Pass arguments to `create_restore_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_restore_channel(parent: nil, restore_channel: nil, restore_channel_id: nil) + # Pass arguments to `create_restore_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 within which to create the RestoreChannel. + # Format: `projects/*/locations/*` + # @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash] + # Required. The RestoreChannel resource object to create. + # @param restore_channel_id [::String] + # Optional. The client-provided short name for the RestoreChannel resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of RestoreChannels in this location + # If the user does not provide a name, a uuid will be used as the name. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new + # + # # Call the create_restore_channel method. + # result = client.create_restore_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest + + # Converts hash and nil to 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_restore_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restore_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_restore_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :create_restore_channel, 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 RestoreChannels in a given location. + # + # @overload list_restore_channels(request, options = nil) + # Pass arguments to `list_restore_channels` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_restore_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_restore_channels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 that contains the RestoreChannels to list. + # Format: `projects/*/locations/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token} + # received from a previous `ListRestoreChannels` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListRestoreChannels` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.new + # + # # Call the list_restore_channels method. + # result = client.list_restore_channels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestoreChannel. + # p item + # end + # + def list_restore_channels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest + + # Converts hash and nil to 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_restore_channels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restore_channels.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_restore_channels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :list_restore_channels, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restore_channels, 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 + + ## + # Retrieve the details of a single RestoreChannel. + # + # @overload get_restore_channel(request, options = nil) + # Pass arguments to `get_restore_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_restore_channel(name: nil) + # Pass arguments to `get_restore_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified RestoreChannel name. + # Format: `projects/*/locations/*/restoreChannels/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeBackup::V1::RestoreChannel] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeBackup::V1::RestoreChannel] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new + # + # # Call the get_restore_channel method. + # result = client.get_restore_channel request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::RestoreChannel. + # p result + # + def get_restore_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest + + # Converts hash and nil to 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_restore_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restore_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_restore_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :get_restore_channel, 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 + + ## + # Update a RestoreChannel. + # + # @overload update_restore_channel(request, options = nil) + # Pass arguments to `update_restore_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_restore_channel(restore_channel: nil, update_mask: nil) + # Pass arguments to `update_restore_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash] + # Required. A new version of the RestoreChannel resource that contains + # updated fields. This may be sparsely populated if an `update_mask` is + # provided. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. This is used to specify the fields to be overwritten in the + # RestoreChannel targeted for update. The values for each of these + # updated fields will be taken from the `restore_channel` provided + # with this request. Field names are relative to the root of the resource + # (e.g., `description`, `destination_project_id`, etc.) + # If no `update_mask` is provided, all fields in `restore_channel` will + # be written to the target RestoreChannel resource. Note that + # OUTPUT_ONLY and IMMUTABLE fields in `restore_channel` are ignored and + # are not used to update the target RestoreChannel. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new + # + # # Call the update_restore_channel method. + # result = client.update_restore_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest + + # Converts hash and nil to 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_restore_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.restore_channel&.name + header_params["restore_channel.name"] = request.restore_channel.name + end + + request_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_restore_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_restore_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :update_restore_channel, 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 existing RestoreChannel. + # + # @overload delete_restore_channel(request, options = nil) + # Pass arguments to `delete_restore_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_restore_channel(name: nil, etag: nil) + # Pass arguments to `delete_restore_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified RestoreChannel name. + # Format: `projects/*/locations/*/restoreChannels/*` + # @param etag [::String] + # Optional. If provided, this value must match the current value of the + # target RestoreChannel's + # {::Google::Cloud::GkeBackup::V1::RestoreChannel#etag etag} field or the request + # is rejected. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.new + # + # # Call the delete_restore_channel method. + # result = client.delete_restore_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest + + # Converts hash and nil to 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_restore_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restore_channel.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_restore_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :delete_restore_channel, 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 RestorePlanBindings in a given location. + # + # @overload list_restore_plan_bindings(request, options = nil) + # Pass arguments to `list_restore_plan_bindings` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_restore_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_restore_plan_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 RestoreChannel that contains the ListRestorePlanBindings to + # list. Format: `projects/*/locations/*/restoreChannels/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token} + # received from a previous `ListRestorePlanBindings` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListRestorePlanBindings` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.new + # + # # Call the list_restore_plan_bindings method. + # result = client.list_restore_plan_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::GkeBackup::V1::RestorePlanBinding. + # p item + # end + # + def list_restore_plan_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest + + # Converts hash and nil to 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_restore_plan_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::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restore_plan_bindings.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_restore_plan_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :list_restore_plan_bindings, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plan_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 + + ## + # Retrieve the details of a single RestorePlanBinding. + # + # @overload get_restore_plan_binding(request, options = nil) + # Pass arguments to `get_restore_plan_binding` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_restore_plan_binding(name: nil) + # Pass arguments to `get_restore_plan_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. Fully qualified RestorePlanBinding name. + # Format: + # `projects/*/locations/*/restoreChannels/*/restorePlanBindings/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeBackup::V1::RestorePlanBinding] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeBackup::V1::RestorePlanBinding] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new + # + # # Call the get_restore_plan_binding method. + # result = client.get_restore_plan_binding request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlanBinding. + # p result + # + def get_restore_plan_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest + + # Converts hash and nil to 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_restore_plan_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::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restore_plan_binding.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_restore_plan_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :get_restore_plan_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 + + ## + # Creates a new Restore for the given RestorePlan. + # + # @overload create_restore(request, options = nil) + # Pass arguments to `create_restore` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::CreateRestoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::CreateRestoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_restore(parent: nil, restore: nil, restore_id: nil) + # Pass arguments to `create_restore` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The RestorePlan within which to create the Restore. + # Format: `projects/*/locations/*/restorePlans/*` + # @param restore [::Google::Cloud::GkeBackup::V1::Restore, ::Hash] + # Required. The restore resource to create. + # @param restore_id [::String] + # Required. The client-provided short name for the Restore resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of Restores in this RestorePlan. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new + # + # # Call the create_restore method. + # result = client.create_restore request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestoreRequest + + # Converts hash and nil to 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_restore.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restore.timeout, + metadata: metadata, + retry_policy: @config.rpcs.create_restore.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :create_restore, 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 the Restores for a given RestorePlan. + # + # @overload list_restores(request, options = nil) + # Pass arguments to `list_restores` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListRestoresRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListRestoresRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_restores` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The RestorePlan that contains the Restores to list. + # Format: `projects/*/locations/*/restorePlans/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token} + # received from a previous `ListRestores` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to `ListRestores` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListRestoresRequest.new + # + # # Call the list_restores method. + # result = client.list_restores request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::Restore. + # p item + # end + # + def list_restores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestoresRequest + + # Converts hash and nil to 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_restores.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restores.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_restores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :list_restores, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restores, 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 the details of a single Restore. + # + # @overload get_restore(request, options = nil) + # Pass arguments to `get_restore` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetRestoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetRestoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_restore(name: nil) + # Pass arguments to `get_restore` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the restore resource. + # Format: `projects/*/locations/*/restorePlans/*/restores/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeBackup::V1::Restore] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeBackup::V1::Restore] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetRestoreRequest.new + # + # # Call the get_restore method. + # result = client.get_restore request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::Restore. + # p result + # + def get_restore request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestoreRequest + + # Converts hash and nil to 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_restore.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restore.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_restore.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :get_restore, 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 + + ## + # Update a Restore. + # + # @overload update_restore(request, options = nil) + # Pass arguments to `update_restore` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_restore(restore: nil, update_mask: nil) + # Pass arguments to `update_restore` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param restore [::Google::Cloud::GkeBackup::V1::Restore, ::Hash] + # Required. A new version of the Restore resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. This is used to specify the fields to be overwritten in the + # Restore targeted for update. The values for each of these + # updated fields will be taken from the `restore` provided + # with this request. Field names are relative to the root of the resource. + # If no `update_mask` is provided, all fields in `restore` will be + # written to the target Restore resource. + # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored + # and are not used to update the target Restore. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new + # + # # Call the update_restore method. + # result = client.update_restore request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest + + # Converts hash and nil to 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_restore.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.restore&.name + header_params["restore.name"] = request.restore.name + end + + request_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_restore.timeout, + metadata: metadata, + retry_policy: @config.rpcs.update_restore.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :update_restore, 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 existing Restore. + # + # @overload delete_restore(request, options = nil) + # Pass arguments to `delete_restore` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload delete_restore(name: nil, etag: nil, force: nil) + # Pass arguments to `delete_restore` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Full name of the Restore + # Format: `projects/*/locations/*/restorePlans/*/restores/*` + # @param etag [::String] + # Optional. If provided, this value must match the current value of the + # target Restore's {::Google::Cloud::GkeBackup::V1::Restore#etag etag} field or + # the request is rejected. + # @param force [::Boolean] + # Optional. If set to true, any VolumeRestores below this restore will also + # be deleted. Otherwise, the request will only succeed if the restore has no + # VolumeRestores. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new + # + # # Call the delete_restore method. + # result = client.delete_restore request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest + + # Converts hash and nil to 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_restore.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_restore.timeout, + metadata: metadata, + retry_policy: @config.rpcs.delete_restore.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :delete_restore, 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 the VolumeRestores for a given Restore. + # + # @overload list_volume_restores(request, options = nil) + # Pass arguments to `list_volume_restores` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload list_volume_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_volume_restores` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The Restore that contains the VolumeRestores to list. + # Format: `projects/*/locations/*/restorePlans/*/restores/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token} + # received from a previous `ListVolumeRestores` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListVolumeRestores` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.new + # + # # Call the list_volume_restores method. + # result = client.list_volume_restores request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeRestore. + # p item + # end + # + def list_volume_restores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest + + # Converts hash and nil to 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_volume_restores.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_volume_restores.timeout, + metadata: metadata, + retry_policy: @config.rpcs.list_volume_restores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :list_volume_restores, request, options: options do |response, operation| + response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_volume_restores, 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 + + ## + # Retrieve the details of a single VolumeRestore. + # + # @overload get_volume_restore(request, options = nil) + # Pass arguments to `get_volume_restore` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_volume_restore(name: nil) + # Pass arguments to `get_volume_restore` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Full name of the VolumeRestore resource. + # Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeBackup::V1::VolumeRestore] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeBackup::V1::VolumeRestore] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new + # + # # Call the get_volume_restore method. + # result = client.get_volume_restore request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeRestore. + # p result + # + def get_volume_restore request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest + + # Converts hash and nil to 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_volume_restore.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-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_volume_restore.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_volume_restore.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :get_volume_restore, 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 the link to the backupIndex. + # + # @overload get_backup_index_download_url(request, options = nil) + # Pass arguments to `get_backup_index_download_url` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. + # + # @overload get_backup_index_download_url(backup: nil) + # Pass arguments to `get_backup_index_download_url` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup [::String] + # Required. Full name of Backup resource. + # Format: + # projects/\\{project}/locations/\\{location}/backupPlans/\\{backup_plan}/backups/\\{backup} + # + # @yield [response, operation] Access the result along with the RPC operation + # @yieldparam response [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse] + # @yieldparam operation [::GRPC::ActiveCall::Operation] + # + # @return [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse] + # + # @raise [::Google::Cloud::Error] if the RPC is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new + # + # # Call the get_backup_index_download_url method. + # result = client.get_backup_index_download_url request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse. + # p result + # + def get_backup_index_download_url request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest + + # Converts hash and nil to 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_backup_index_download_url.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION + metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? + metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id + + header_params = {} + if request.backup + header_params["backup"] = request.backup + end + + request_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_backup_index_download_url.timeout, + metadata: metadata, + retry_policy: @config.rpcs.get_backup_index_download_url.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.call_rpc :get_backup_index_download_url, 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 BackupForGKE API. + # + # This class represents the configuration for BackupForGKE, + # 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::GkeBackup::V1::BackupForGKE::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_backup_plan to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_backup_plan.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_backup_plan.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::GkeBackup::V1::BackupForGKE::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 = "gkebackup.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 BackupForGKE 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_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan + ## + # RPC-specific configuration for `list_backup_plans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plans + ## + # RPC-specific configuration for `get_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan + ## + # RPC-specific configuration for `update_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan + ## + # RPC-specific configuration for `delete_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan + ## + # RPC-specific configuration for `create_backup_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_channel + ## + # RPC-specific configuration for `list_backup_channels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_channels + ## + # RPC-specific configuration for `get_backup_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_channel + ## + # RPC-specific configuration for `update_backup_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_channel + ## + # RPC-specific configuration for `delete_backup_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_channel + ## + # RPC-specific configuration for `list_backup_plan_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_bindings + ## + # RPC-specific configuration for `get_backup_plan_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_binding + ## + # RPC-specific configuration for `create_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `get_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup + ## + # RPC-specific configuration for `update_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup + ## + # RPC-specific configuration for `delete_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup + ## + # RPC-specific configuration for `list_volume_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_volume_backups + ## + # RPC-specific configuration for `get_volume_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_volume_backup + ## + # RPC-specific configuration for `create_restore_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_restore_plan + ## + # RPC-specific configuration for `list_restore_plans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_restore_plans + ## + # RPC-specific configuration for `get_restore_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_restore_plan + ## + # RPC-specific configuration for `update_restore_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_restore_plan + ## + # RPC-specific configuration for `delete_restore_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_restore_plan + ## + # RPC-specific configuration for `create_restore_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :create_restore_channel + ## + # RPC-specific configuration for `list_restore_channels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_restore_channels + ## + # RPC-specific configuration for `get_restore_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :get_restore_channel + ## + # RPC-specific configuration for `update_restore_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :update_restore_channel + ## + # RPC-specific configuration for `delete_restore_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_restore_channel + ## + # RPC-specific configuration for `list_restore_plan_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_restore_plan_bindings + ## + # RPC-specific configuration for `get_restore_plan_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_restore_plan_binding + ## + # RPC-specific configuration for `create_restore` + # @return [::Gapic::Config::Method] + # + attr_reader :create_restore + ## + # RPC-specific configuration for `list_restores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_restores + ## + # RPC-specific configuration for `get_restore` + # @return [::Gapic::Config::Method] + # + attr_reader :get_restore + ## + # RPC-specific configuration for `update_restore` + # @return [::Gapic::Config::Method] + # + attr_reader :update_restore + ## + # RPC-specific configuration for `delete_restore` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_restore + ## + # RPC-specific configuration for `list_volume_restores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_volume_restores + ## + # RPC-specific configuration for `get_volume_restore` + # @return [::Gapic::Config::Method] + # + attr_reader :get_volume_restore + ## + # RPC-specific configuration for `get_backup_index_download_url` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_index_download_url + + # @private + def initialize parent_rpcs = nil + create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan + @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config + list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans + @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config + get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan + @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config + update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan + @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config + delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan + @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config + create_backup_channel_config = parent_rpcs.create_backup_channel if parent_rpcs.respond_to? :create_backup_channel + @create_backup_channel = ::Gapic::Config::Method.new create_backup_channel_config + list_backup_channels_config = parent_rpcs.list_backup_channels if parent_rpcs.respond_to? :list_backup_channels + @list_backup_channels = ::Gapic::Config::Method.new list_backup_channels_config + get_backup_channel_config = parent_rpcs.get_backup_channel if parent_rpcs.respond_to? :get_backup_channel + @get_backup_channel = ::Gapic::Config::Method.new get_backup_channel_config + update_backup_channel_config = parent_rpcs.update_backup_channel if parent_rpcs.respond_to? :update_backup_channel + @update_backup_channel = ::Gapic::Config::Method.new update_backup_channel_config + delete_backup_channel_config = parent_rpcs.delete_backup_channel if parent_rpcs.respond_to? :delete_backup_channel + @delete_backup_channel = ::Gapic::Config::Method.new delete_backup_channel_config + list_backup_plan_bindings_config = parent_rpcs.list_backup_plan_bindings if parent_rpcs.respond_to? :list_backup_plan_bindings + @list_backup_plan_bindings = ::Gapic::Config::Method.new list_backup_plan_bindings_config + get_backup_plan_binding_config = parent_rpcs.get_backup_plan_binding if parent_rpcs.respond_to? :get_backup_plan_binding + @get_backup_plan_binding = ::Gapic::Config::Method.new get_backup_plan_binding_config + create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup + @create_backup = ::Gapic::Config::Method.new create_backup_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup + @get_backup = ::Gapic::Config::Method.new get_backup_config + update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup + @update_backup = ::Gapic::Config::Method.new update_backup_config + delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup + @delete_backup = ::Gapic::Config::Method.new delete_backup_config + list_volume_backups_config = parent_rpcs.list_volume_backups if parent_rpcs.respond_to? :list_volume_backups + @list_volume_backups = ::Gapic::Config::Method.new list_volume_backups_config + get_volume_backup_config = parent_rpcs.get_volume_backup if parent_rpcs.respond_to? :get_volume_backup + @get_volume_backup = ::Gapic::Config::Method.new get_volume_backup_config + create_restore_plan_config = parent_rpcs.create_restore_plan if parent_rpcs.respond_to? :create_restore_plan + @create_restore_plan = ::Gapic::Config::Method.new create_restore_plan_config + list_restore_plans_config = parent_rpcs.list_restore_plans if parent_rpcs.respond_to? :list_restore_plans + @list_restore_plans = ::Gapic::Config::Method.new list_restore_plans_config + get_restore_plan_config = parent_rpcs.get_restore_plan if parent_rpcs.respond_to? :get_restore_plan + @get_restore_plan = ::Gapic::Config::Method.new get_restore_plan_config + update_restore_plan_config = parent_rpcs.update_restore_plan if parent_rpcs.respond_to? :update_restore_plan + @update_restore_plan = ::Gapic::Config::Method.new update_restore_plan_config + delete_restore_plan_config = parent_rpcs.delete_restore_plan if parent_rpcs.respond_to? :delete_restore_plan + @delete_restore_plan = ::Gapic::Config::Method.new delete_restore_plan_config + create_restore_channel_config = parent_rpcs.create_restore_channel if parent_rpcs.respond_to? :create_restore_channel + @create_restore_channel = ::Gapic::Config::Method.new create_restore_channel_config + list_restore_channels_config = parent_rpcs.list_restore_channels if parent_rpcs.respond_to? :list_restore_channels + @list_restore_channels = ::Gapic::Config::Method.new list_restore_channels_config + get_restore_channel_config = parent_rpcs.get_restore_channel if parent_rpcs.respond_to? :get_restore_channel + @get_restore_channel = ::Gapic::Config::Method.new get_restore_channel_config + update_restore_channel_config = parent_rpcs.update_restore_channel if parent_rpcs.respond_to? :update_restore_channel + @update_restore_channel = ::Gapic::Config::Method.new update_restore_channel_config + delete_restore_channel_config = parent_rpcs.delete_restore_channel if parent_rpcs.respond_to? :delete_restore_channel + @delete_restore_channel = ::Gapic::Config::Method.new delete_restore_channel_config + list_restore_plan_bindings_config = parent_rpcs.list_restore_plan_bindings if parent_rpcs.respond_to? :list_restore_plan_bindings + @list_restore_plan_bindings = ::Gapic::Config::Method.new list_restore_plan_bindings_config + get_restore_plan_binding_config = parent_rpcs.get_restore_plan_binding if parent_rpcs.respond_to? :get_restore_plan_binding + @get_restore_plan_binding = ::Gapic::Config::Method.new get_restore_plan_binding_config + create_restore_config = parent_rpcs.create_restore if parent_rpcs.respond_to? :create_restore + @create_restore = ::Gapic::Config::Method.new create_restore_config + list_restores_config = parent_rpcs.list_restores if parent_rpcs.respond_to? :list_restores + @list_restores = ::Gapic::Config::Method.new list_restores_config + get_restore_config = parent_rpcs.get_restore if parent_rpcs.respond_to? :get_restore + @get_restore = ::Gapic::Config::Method.new get_restore_config + update_restore_config = parent_rpcs.update_restore if parent_rpcs.respond_to? :update_restore + @update_restore = ::Gapic::Config::Method.new update_restore_config + delete_restore_config = parent_rpcs.delete_restore if parent_rpcs.respond_to? :delete_restore + @delete_restore = ::Gapic::Config::Method.new delete_restore_config + list_volume_restores_config = parent_rpcs.list_volume_restores if parent_rpcs.respond_to? :list_volume_restores + @list_volume_restores = ::Gapic::Config::Method.new list_volume_restores_config + get_volume_restore_config = parent_rpcs.get_volume_restore if parent_rpcs.respond_to? :get_volume_restore + @get_volume_restore = ::Gapic::Config::Method.new get_volume_restore_config + get_backup_index_download_url_config = parent_rpcs.get_backup_index_download_url if parent_rpcs.respond_to? :get_backup_index_download_url + @get_backup_index_download_url = ::Gapic::Config::Method.new get_backup_index_download_url_config + + yield self if block_given? + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/credentials.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/credentials.rb new file mode 100644 index 000000000000..8d81051aaedd --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/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 GkeBackup + module V1 + module BackupForGKE + # Credentials for the BackupForGKE 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-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb new file mode 100644 index 000000000000..86c04e445389 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/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 GkeBackup + module V1 + module BackupForGKE + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BackupForGKE 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 BackupForGKE 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::GkeBackup::V1::VERSION + metadata[:"x-goog-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::GkeBackup::V1::VERSION + metadata[:"x-goog-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::GkeBackup::V1::VERSION + metadata[:"x-goog-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::GkeBackup::V1::VERSION + metadata[:"x-goog-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::GkeBackup::V1::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 = "gkebackup.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-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/paths.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/paths.rb new file mode 100644 index 000000000000..59f417c3db20 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/paths.rb @@ -0,0 +1,296 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeBackup + module V1 + module BackupForGKE + # Path helper methods for the BackupForGKE API. + module Paths + ## + # Create a fully-qualified Backup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}` + # + # @param project [String] + # @param location [String] + # @param backup_plan [String] + # @param backup [String] + # + # @return [::String] + def backup_path project:, location:, backup_plan:, backup: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backup_plan cannot contain /" if backup_plan.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}/backups/#{backup}" + end + + ## + # Create a fully-qualified BackupChannel resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupChannels/{backup_channel}` + # + # @param project [String] + # @param location [String] + # @param backup_channel [String] + # + # @return [::String] + def backup_channel_path project:, location:, backup_channel: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupChannels/#{backup_channel}" + end + + ## + # Create a fully-qualified BackupPlan resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}` + # + # @param project [String] + # @param location [String] + # @param backup_plan [String] + # + # @return [::String] + def backup_plan_path project:, location:, backup_plan: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}" + end + + ## + # Create a fully-qualified BackupPlanBinding resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupChannels/{backup_channel}/backupPlanBindings/{backup_plan_binding}` + # + # @param project [String] + # @param location [String] + # @param backup_channel [String] + # @param backup_plan_binding [String] + # + # @return [::String] + def backup_plan_binding_path project:, location:, backup_channel:, backup_plan_binding: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backup_channel cannot contain /" if backup_channel.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupChannels/#{backup_channel}/backupPlanBindings/#{backup_plan_binding}" + end + + ## + # Create a fully-qualified Cluster resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/clusters/{cluster}` + # + # @param project [String] + # @param location [String] + # @param cluster [String] + # + # @return [::String] + def cluster_path project:, location:, cluster: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/clusters/#{cluster}" + end + + ## + # Create a fully-qualified CryptoKey resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` + # + # @param project [String] + # @param location [String] + # @param key_ring [String] + # @param crypto_key [String] + # + # @return [::String] + def crypto_key_path project:, location:, key_ring:, crypto_key: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" + + "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" + 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 Restore resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}` + # + # @param project [String] + # @param location [String] + # @param restore_plan [String] + # @param restore [String] + # + # @return [::String] + def restore_path project:, location:, restore_plan:, restore: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "restore_plan cannot contain /" if restore_plan.to_s.include? "/" + + "projects/#{project}/locations/#{location}/restorePlans/#{restore_plan}/restores/#{restore}" + end + + ## + # Create a fully-qualified RestoreChannel resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/restoreChannels/{restore_channel}` + # + # @param project [String] + # @param location [String] + # @param restore_channel [String] + # + # @return [::String] + def restore_channel_path project:, location:, restore_channel: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/restoreChannels/#{restore_channel}" + end + + ## + # Create a fully-qualified RestorePlan resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/restorePlans/{restore_plan}` + # + # @param project [String] + # @param location [String] + # @param restore_plan [String] + # + # @return [::String] + def restore_plan_path project:, location:, restore_plan: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + + "projects/#{project}/locations/#{location}/restorePlans/#{restore_plan}" + end + + ## + # Create a fully-qualified RestorePlanBinding resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/restoreChannels/{restore_channel}/restorePlanBindings/{restore_plan_binding}` + # + # @param project [String] + # @param location [String] + # @param restore_channel [String] + # @param restore_plan_binding [String] + # + # @return [::String] + def restore_plan_binding_path project:, location:, restore_channel:, restore_plan_binding: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "restore_channel cannot contain /" if restore_channel.to_s.include? "/" + + "projects/#{project}/locations/#{location}/restoreChannels/#{restore_channel}/restorePlanBindings/#{restore_plan_binding}" + end + + ## + # Create a fully-qualified VolumeBackup resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}/volumeBackups/{volume_backup}` + # + # @param project [String] + # @param location [String] + # @param backup_plan [String] + # @param backup [String] + # @param volume_backup [String] + # + # @return [::String] + def volume_backup_path project:, location:, backup_plan:, backup:, volume_backup: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "backup_plan cannot contain /" if backup_plan.to_s.include? "/" + raise ::ArgumentError, "backup cannot contain /" if backup.to_s.include? "/" + + "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}/backups/#{backup}/volumeBackups/#{volume_backup}" + end + + ## + # Create a fully-qualified VolumeRestore resource string. + # + # The resource will be in the following format: + # + # `projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}/volumeRestores/{volume_restore}` + # + # @param project [String] + # @param location [String] + # @param restore_plan [String] + # @param restore [String] + # @param volume_restore [String] + # + # @return [::String] + def volume_restore_path project:, location:, restore_plan:, restore:, volume_restore: + raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" + raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" + raise ::ArgumentError, "restore_plan cannot contain /" if restore_plan.to_s.include? "/" + raise ::ArgumentError, "restore cannot contain /" if restore.to_s.include? "/" + + "projects/#{project}/locations/#{location}/restorePlans/#{restore_plan}/restores/#{restore}/volumeRestores/#{volume_restore}" + end + + extend self + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest.rb new file mode 100644 index 000000000000..3c78a03c463a --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/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/gke_backup/v1/version" +require "google/cloud/gke_backup/v1/bindings_override" + +require "google/cloud/gke_backup/v1/backup_for_gke/credentials" +require "google/cloud/gke_backup/v1/backup_for_gke/paths" +require "google/cloud/gke_backup/v1/backup_for_gke/rest/operations" +require "google/cloud/gke_backup/v1/backup_for_gke/rest/client" + +module Google + module Cloud + module GkeBackup + module V1 + ## + # BackupForGKE allows Kubernetes administrators to configure, execute, and + # manage backup and restore operations for their GKE clusters. + # + # To load this service and instantiate a REST client: + # + # require "google/cloud/gke_backup/v1/backup_for_gke/rest" + # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + module BackupForGKE + # Client for the REST transport + module Rest + end + end + end + end + end +end + +helper_path = ::File.join __dir__, "rest", "helpers.rb" +require "google/cloud/gke_backup/v1/backup_for_gke/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb new file mode 100644 index 000000000000..a2a043342a49 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb @@ -0,0 +1,4469 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gkebackup/v1/gkebackup_pb" +require "google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub" +require "google/cloud/location/rest" +require "google/iam/v1/rest" + +module Google + module Cloud + module GkeBackup + module V1 + module BackupForGKE + module Rest + ## + # REST client for the BackupForGKE service. + # + # BackupForGKE allows Kubernetes administrators to configure, execute, and + # manage backup and restore operations for their GKE clusters. + # + class Client + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$" + + include Paths + + # @private + attr_reader :backup_for_gke_stub + + ## + # Configure the BackupForGKE Client class. + # + # See {::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client::Configuration} + # for a description of the configuration fields. + # + # @example + # + # # Modify the configuration for all BackupForGKE clients + # ::Google::Cloud::GkeBackup::V1::BackupForGKE::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", "GkeBackup", "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_backup_plan.timeout = 300.0 + + default_config.rpcs.list_backup_plans.timeout = 60.0 + default_config.rpcs.list_backup_plans.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_plan.timeout = 60.0 + default_config.rpcs.get_backup_plan.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup_plan.timeout = 60.0 + + default_config.rpcs.delete_backup_plan.timeout = 60.0 + + default_config.rpcs.create_backup_channel.timeout = 60.0 + + default_config.rpcs.list_backup_channels.timeout = 60.0 + default_config.rpcs.list_backup_channels.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_channel.timeout = 60.0 + default_config.rpcs.get_backup_channel.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup_channel.timeout = 60.0 + + default_config.rpcs.delete_backup_channel.timeout = 60.0 + + default_config.rpcs.list_backup_plan_bindings.timeout = 60.0 + default_config.rpcs.list_backup_plan_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_plan_binding.timeout = 60.0 + default_config.rpcs.get_backup_plan_binding.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_backup.timeout = 120.0 + + default_config.rpcs.list_backups.timeout = 60.0 + default_config.rpcs.list_backups.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup.timeout = 60.0 + default_config.rpcs.get_backup.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_backup.timeout = 60.0 + + default_config.rpcs.delete_backup.timeout = 300.0 + + default_config.rpcs.list_volume_backups.timeout = 60.0 + default_config.rpcs.list_volume_backups.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_volume_backup.timeout = 60.0 + default_config.rpcs.get_volume_backup.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_restore_plan.timeout = 120.0 + + default_config.rpcs.list_restore_plans.timeout = 60.0 + default_config.rpcs.list_restore_plans.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_restore_plan.timeout = 60.0 + default_config.rpcs.get_restore_plan.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_restore_plan.timeout = 60.0 + + default_config.rpcs.delete_restore_plan.timeout = 60.0 + + default_config.rpcs.create_restore_channel.timeout = 60.0 + + default_config.rpcs.list_restore_channels.timeout = 60.0 + default_config.rpcs.list_restore_channels.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_restore_channel.timeout = 60.0 + default_config.rpcs.get_restore_channel.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_restore_channel.timeout = 60.0 + + default_config.rpcs.delete_restore_channel.timeout = 60.0 + + default_config.rpcs.list_restore_plan_bindings.timeout = 60.0 + default_config.rpcs.list_restore_plan_bindings.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_restore_plan_binding.timeout = 60.0 + default_config.rpcs.get_restore_plan_binding.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.create_restore.timeout = 120.0 + + default_config.rpcs.list_restores.timeout = 60.0 + default_config.rpcs.list_restores.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_restore.timeout = 60.0 + default_config.rpcs.get_restore.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.update_restore.timeout = 60.0 + + default_config.rpcs.delete_restore.timeout = 60.0 + + default_config.rpcs.list_volume_restores.timeout = 60.0 + default_config.rpcs.list_volume_restores.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_volume_restore.timeout = 60.0 + default_config.rpcs.get_volume_restore.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config.rpcs.get_backup_index_download_url.timeout = 60.0 + default_config.rpcs.get_backup_index_download_url.retry_policy = { + initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] + } + + default_config + end + yield @configure if block_given? + @configure + end + + ## + # Configure the BackupForGKE 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::GkeBackup::V1::BackupForGKE::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 + @backup_for_gke_stub.universe_domain + end + + ## + # Create a new BackupForGKE REST client object. + # + # @example + # + # # Create a client using the default configuration + # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a client using a custom configuration + # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + # config.timeout = 10.0 + # end + # + # @yield [config] Configure the BackupForGKE 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::GkeBackup::V1::BackupForGKE::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 + + @backup_for_gke_stub = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.new( + endpoint: @config.endpoint, + endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, + universe_domain: @config.universe_domain, + credentials: credentials, + logger: @config.logger + ) + + @backup_for_gke_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 = @backup_for_gke_stub.endpoint + config.universe_domain = @backup_for_gke_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_for_gke_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 = @backup_for_gke_stub.endpoint + config.universe_domain = @backup_for_gke_stub.universe_domain + config.bindings_override = @config.bindings_override + config.logger = @backup_for_gke_stub.logger if config.respond_to? :logger= + end + end + + ## + # Get the associated client for long-running operations. + # + # @return [::Google::Cloud::GkeBackup::V1::BackupForGKE::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 + @backup_for_gke_stub.logger + end + + # Service calls + + ## + # Creates a new BackupPlan in a given location. + # + # @overload create_backup_plan(request, options = nil) + # Pass arguments to `create_backup_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_plan(parent: nil, backup_plan: nil, backup_plan_id: nil) + # Pass arguments to `create_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 within which to create the BackupPlan. + # Format: `projects/*/locations/*` + # @param backup_plan [::Google::Cloud::GkeBackup::V1::BackupPlan, ::Hash] + # Required. The BackupPlan resource object to create. + # @param backup_plan_id [::String] + # Required. The client-provided short name for the BackupPlan resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of BackupPlans in this location + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new + # + # # Call the create_backup_plan method. + # result = client.create_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest + + # Converts hash and nil to an 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_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.create_backup_plan 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 BackupPlans in a given location. + # + # @overload list_backup_plans(request, options = nil) + # Pass arguments to `list_backup_plans` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backup_plans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 that contains the BackupPlans to list. + # Format: `projects/*/locations/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.new + # + # # Call the list_backup_plans method. + # result = client.list_backup_plans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupPlan. + # p item + # end + # + def list_backup_plans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest + + # Converts hash and nil to an 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_backup_plans.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_plans.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_plans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.list_backup_plans request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backup_plans, "backup_plans", 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 + + ## + # Retrieve the details of a single BackupPlan. + # + # @overload get_backup_plan(request, options = nil) + # Pass arguments to `get_backup_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_plan(name: nil) + # Pass arguments to `get_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified BackupPlan name. + # Format: `projects/*/locations/*/backupPlans/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupPlan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::BackupPlan] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new + # + # # Call the get_backup_plan method. + # result = client.get_backup_plan request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlan. + # p result + # + def get_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest + + # Converts hash and nil to an 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_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.get_backup_plan 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 BackupPlan. + # + # @overload update_backup_plan(request, options = nil) + # Pass arguments to `update_backup_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_plan(backup_plan: nil, update_mask: nil) + # Pass arguments to `update_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_plan [::Google::Cloud::GkeBackup::V1::BackupPlan, ::Hash] + # Required. A new version of the BackupPlan resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. This is used to specify the fields to be overwritten in the + # BackupPlan targeted for update. The values for each of these + # updated fields will be taken from the `backup_plan` provided + # with this request. Field names are relative to the root of the resource + # (e.g., `description`, `backup_config.include_volume_data`, etc.) + # If no `update_mask` is provided, all fields in `backup_plan` will be + # written to the target BackupPlan resource. + # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored + # and are not used to update the target BackupPlan. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new + # + # # Call the update_backup_plan method. + # result = client.update_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest + + # Converts hash and nil to an 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_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.update_backup_plan 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 existing BackupPlan. + # + # @overload delete_backup_plan(request, options = nil) + # Pass arguments to `delete_backup_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup_plan(name: nil, etag: nil) + # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified BackupPlan name. + # Format: `projects/*/locations/*/backupPlans/*` + # @param etag [::String] + # Optional. If provided, this value must match the current value of the + # target BackupPlan's {::Google::Cloud::GkeBackup::V1::BackupPlan#etag etag} field + # or the request is rejected. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.new + # + # # Call the delete_backup_plan method. + # result = client.delete_backup_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest + + # Converts hash and nil to an 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_backup_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.delete_backup_plan 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 new BackupChannel in a given location. + # + # @overload create_backup_channel(request, options = nil) + # Pass arguments to `create_backup_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_channel(parent: nil, backup_channel: nil, backup_channel_id: nil) + # Pass arguments to `create_backup_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 within which to create the BackupChannel. + # Format: `projects/*/locations/*` + # @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash] + # Required. The BackupChannel resource object to create. + # @param backup_channel_id [::String] + # Optional. The client-provided short name for the BackupChannel resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of BackupChannels in this location + # If the user does not provide a name, a uuid will be used as the name. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new + # + # # Call the create_backup_channel method. + # result = client.create_backup_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest + + # Converts hash and nil to an 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_backup_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.create_backup_channel 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 BackupChannels in a given location. + # + # @overload list_backup_channels(request, options = nil) + # Pass arguments to `list_backup_channels` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backup_channels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 that contains the BackupChannels to list. + # Format: `projects/*/locations/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token} + # received from a previous `ListBackupChannels` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupChannels` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.new + # + # # Call the list_backup_channels method. + # result = client.list_backup_channels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupChannel. + # p item + # end + # + def list_backup_channels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest + + # Converts hash and nil to an 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_backup_channels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_channels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_channels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.list_backup_channels request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backup_channels, "backup_channels", 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 + + ## + # Retrieve the details of a single BackupChannel. + # + # @overload get_backup_channel(request, options = nil) + # Pass arguments to `get_backup_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_channel(name: nil) + # Pass arguments to `get_backup_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified BackupChannel name. + # Format: `projects/*/locations/*/backupChannels/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupChannel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::BackupChannel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new + # + # # Call the get_backup_channel method. + # result = client.get_backup_channel request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupChannel. + # p result + # + def get_backup_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest + + # Converts hash and nil to an 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_backup_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.get_backup_channel 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 BackupChannel. + # + # @overload update_backup_channel(request, options = nil) + # Pass arguments to `update_backup_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup_channel(backup_channel: nil, update_mask: nil) + # Pass arguments to `update_backup_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash] + # Required. A new version of the BackupChannel resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. This is used to specify the fields to be overwritten in the + # BackupChannel targeted for update. The values for each of these + # updated fields will be taken from the `backup_channel` provided + # with this request. Field names are relative to the root of the resource + # (e.g., `description`, `labels`, etc.) + # If no `update_mask` is provided, all fields in `backup_channel` will + # be written to the target BackupChannel resource. Note that + # OUTPUT_ONLY and IMMUTABLE fields in `backup_channel` are ignored and + # are not used to update the target BackupChannel. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new + # + # # Call the update_backup_channel method. + # result = client.update_backup_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest + + # Converts hash and nil to an 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_backup_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.update_backup_channel 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 existing BackupChannel. + # + # @overload delete_backup_channel(request, options = nil) + # Pass arguments to `delete_backup_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup_channel(name: nil, etag: nil, force: nil) + # Pass arguments to `delete_backup_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified BackupChannel name. + # Format: `projects/*/locations/*/backupChannels/*` + # @param etag [::String] + # Optional. If provided, this value must match the current value of the + # target BackupChannel's {::Google::Cloud::GkeBackup::V1::BackupChannel#etag etag} + # field or the request is rejected. + # @param force [::Boolean] + # Optional. If set to true, any BackupPlanAssociations below this + # BackupChannel will also be deleted. Otherwise, the request will only + # succeed if the BackupChannel has no BackupPlanAssociations. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new + # + # # Call the delete_backup_channel method. + # result = client.delete_backup_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest + + # Converts hash and nil to an 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_backup_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.delete_backup_channel 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 BackupPlanBindings in a given location. + # + # @overload list_backup_plan_bindings(request, options = nil) + # Pass arguments to `list_backup_plan_bindings` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backup_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_backup_plan_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 BackupChannel that contains the BackupPlanBindings to list. + # Format: `projects/*/locations/*/backupChannels/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlanBindings` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlanBindings` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.new + # + # # Call the list_backup_plan_bindings method. + # result = client.list_backup_plan_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::GkeBackup::V1::BackupPlanBinding. + # p item + # end + # + def list_backup_plan_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest + + # Converts hash and nil to an 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_backup_plan_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::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_plan_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backup_plan_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.list_backup_plan_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backup_plan_bindings, "backup_plan_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 + + ## + # Retrieve the details of a single BackupPlanBinding. + # + # @overload get_backup_plan_binding(request, options = nil) + # Pass arguments to `get_backup_plan_binding` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_plan_binding(name: nil) + # Pass arguments to `get_backup_plan_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. Fully qualified BackupPlanBinding name. + # Format: + # `projects/*/locations/*/backupChannels/*/backupPlanBindings/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupPlanBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new + # + # # Call the get_backup_plan_binding method. + # result = client.get_backup_plan_binding request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlanBinding. + # p result + # + def get_backup_plan_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest + + # Converts hash and nil to an 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_backup_plan_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::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_plan_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_plan_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.get_backup_plan_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 + + ## + # Creates a Backup for the given BackupPlan. + # + # @overload create_backup(request, options = nil) + # Pass arguments to `create_backup` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::CreateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup(parent: nil, backup: nil, backup_id: nil) + # Pass arguments to `create_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The BackupPlan within which to create the Backup. + # Format: `projects/*/locations/*/backupPlans/*` + # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash] + # Optional. The Backup resource to create. + # @param backup_id [::String] + # Optional. The client-provided short name for the Backup resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of Backups in this BackupPlan + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::CreateBackupRequest.new + # + # # Call the create_backup method. + # result = client.create_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupRequest + + # Converts hash and nil to an 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.create_backup 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 the Backups for a given BackupPlan. + # + # @overload list_backups(request, options = nil) + # Pass arguments to `list_backups` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil) + # Pass arguments to `list_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The BackupPlan that contains the Backups to list. + # Format: `projects/*/locations/*/backupPlans/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token} + # received from a previous `ListBackups` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackups` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @param return_partial_success [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field will be populated. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListBackupsRequest.new + # + # # Call the list_backups method. + # result = client.list_backups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup. + # p item + # end + # + def list_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupsRequest + + # Converts hash and nil to an 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_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.list_backups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backups, "backups", 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 + + ## + # Retrieve the details of a single Backup. + # + # @overload get_backup(request, options = nil) + # Pass arguments to `get_backup` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup(name: nil) + # Pass arguments to `get_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Full name of the Backup resource. + # Format: `projects/*/locations/*/backupPlans/*/backups/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::Backup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetBackupRequest.new + # + # # Call the get_backup method. + # result = client.get_backup request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::Backup. + # p result + # + def get_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupRequest + + # Converts hash and nil to an 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.get_backup 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 Backup. + # + # @overload update_backup(request, options = nil) + # Pass arguments to `update_backup` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::UpdateBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_backup(backup: nil, update_mask: nil) + # Pass arguments to `update_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash] + # Required. A new version of the Backup resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. This is used to specify the fields to be overwritten in the + # Backup targeted for update. The values for each of these + # updated fields will be taken from the `backup_plan` provided + # with this request. Field names are relative to the root of the resource. + # If no `update_mask` is provided, all fields in `backup` will be + # written to the target Backup resource. + # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored + # and are not used to update the target Backup. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new + # + # # Call the update_backup method. + # result = client.update_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest + + # Converts hash and nil to an 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.update_backup 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 existing Backup. + # + # @overload delete_backup(request, options = nil) + # Pass arguments to `delete_backup` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::DeleteBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_backup(name: nil, etag: nil, force: nil) + # Pass arguments to `delete_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the Backup resource. + # Format: `projects/*/locations/*/backupPlans/*/backups/*` + # @param etag [::String] + # Optional. If provided, this value must match the current value of the + # target Backup's {::Google::Cloud::GkeBackup::V1::Backup#etag etag} field or the + # request is rejected. + # @param force [::Boolean] + # Optional. If set to true, any VolumeBackups below this Backup will also be + # deleted. Otherwise, the request will only succeed if the Backup has no + # VolumeBackups. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new + # + # # Call the delete_backup method. + # result = client.delete_backup request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest + + # Converts hash and nil to an 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_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.delete_backup 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 the VolumeBackups for a given Backup. + # + # @overload list_volume_backups(request, options = nil) + # Pass arguments to `list_volume_backups` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_volume_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_volume_backups` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The Backup that contains the VolumeBackups to list. + # Format: `projects/*/locations/*/backupPlans/*/backups/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token} + # received from a previous `ListVolumeBackups` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListVolumeBackups` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.new + # + # # Call the list_volume_backups method. + # result = client.list_volume_backups request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup. + # p item + # end + # + def list_volume_backups request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest + + # Converts hash and nil to an 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_volume_backups.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_volume_backups.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_volume_backups.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.list_volume_backups request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_volume_backups, "volume_backups", 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 + + ## + # Retrieve the details of a single VolumeBackup. + # + # @overload get_volume_backup(request, options = nil) + # Pass arguments to `get_volume_backup` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_volume_backup(name: nil) + # Pass arguments to `get_volume_backup` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Full name of the VolumeBackup resource. + # Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::VolumeBackup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new + # + # # Call the get_volume_backup method. + # result = client.get_volume_backup request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeBackup. + # p result + # + def get_volume_backup request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest + + # Converts hash and nil to an 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_volume_backup.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_volume_backup.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_volume_backup.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.get_volume_backup 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 new RestorePlan in a given location. + # + # @overload create_restore_plan(request, options = nil) + # Pass arguments to `create_restore_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_restore_plan(parent: nil, restore_plan: nil, restore_plan_id: nil) + # Pass arguments to `create_restore_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 within which to create the RestorePlan. + # Format: `projects/*/locations/*` + # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash] + # Required. The RestorePlan resource object to create. + # @param restore_plan_id [::String] + # Required. The client-provided short name for the RestorePlan resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of RestorePlans in this location + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new + # + # # Call the create_restore_plan method. + # result = client.create_restore_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest + + # Converts hash and nil to an 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_restore_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_restore_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.create_restore_plan 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 RestorePlans in a given location. + # + # @overload list_restore_plans(request, options = nil) + # Pass arguments to `list_restore_plans` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_restore_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_restore_plans` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 that contains the RestorePlans to list. + # Format: `projects/*/locations/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token} + # received from a previous `ListRestorePlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListRestorePlans` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.new + # + # # Call the list_restore_plans method. + # result = client.list_restore_plans request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan. + # p item + # end + # + def list_restore_plans request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest + + # Converts hash and nil to an 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_restore_plans.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore_plans.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_restore_plans.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.list_restore_plans request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plans, "restore_plans", 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 + + ## + # Retrieve the details of a single RestorePlan. + # + # @overload get_restore_plan(request, options = nil) + # Pass arguments to `get_restore_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_restore_plan(name: nil) + # Pass arguments to `get_restore_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified RestorePlan name. + # Format: `projects/*/locations/*/restorePlans/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestorePlan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::RestorePlan] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new + # + # # Call the get_restore_plan method. + # result = client.get_restore_plan request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlan. + # p result + # + def get_restore_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest + + # Converts hash and nil to an 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_restore_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_restore_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.get_restore_plan 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 RestorePlan. + # + # @overload update_restore_plan(request, options = nil) + # Pass arguments to `update_restore_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_restore_plan(restore_plan: nil, update_mask: nil) + # Pass arguments to `update_restore_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash] + # Required. A new version of the RestorePlan resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. This is used to specify the fields to be overwritten in the + # RestorePlan targeted for update. The values for each of these + # updated fields will be taken from the `restore_plan` provided + # with this request. Field names are relative to the root of the resource. + # If no `update_mask` is provided, all fields in `restore_plan` will be + # written to the target RestorePlan resource. + # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored + # and are not used to update the target RestorePlan. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new + # + # # Call the update_restore_plan method. + # result = client.update_restore_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest + + # Converts hash and nil to an 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_restore_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_restore_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.update_restore_plan 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 existing RestorePlan. + # + # @overload delete_restore_plan(request, options = nil) + # Pass arguments to `delete_restore_plan` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_restore_plan(name: nil, etag: nil, force: nil) + # Pass arguments to `delete_restore_plan` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified RestorePlan name. + # Format: `projects/*/locations/*/restorePlans/*` + # @param etag [::String] + # Optional. If provided, this value must match the current value of the + # target RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#etag etag} + # field or the request is rejected. + # @param force [::Boolean] + # Optional. If set to true, any Restores below this RestorePlan will also be + # deleted. Otherwise, the request will only succeed if the RestorePlan has no + # Restores. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new + # + # # Call the delete_restore_plan method. + # result = client.delete_restore_plan request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore_plan request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest + + # Converts hash and nil to an 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_restore_plan.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore_plan.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_restore_plan.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.delete_restore_plan 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 new RestoreChannel in a given location. + # + # @overload create_restore_channel(request, options = nil) + # Pass arguments to `create_restore_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_restore_channel(parent: nil, restore_channel: nil, restore_channel_id: nil) + # Pass arguments to `create_restore_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 within which to create the RestoreChannel. + # Format: `projects/*/locations/*` + # @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash] + # Required. The RestoreChannel resource object to create. + # @param restore_channel_id [::String] + # Optional. The client-provided short name for the RestoreChannel resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of RestoreChannels in this location + # If the user does not provide a name, a uuid will be used as the name. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new + # + # # Call the create_restore_channel method. + # result = client.create_restore_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest + + # Converts hash and nil to an 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_restore_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_restore_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.create_restore_channel 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 RestoreChannels in a given location. + # + # @overload list_restore_channels(request, options = nil) + # Pass arguments to `list_restore_channels` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_restore_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_restore_channels` via keyword arguments. Note that at + # least one keyword argument is required. To specify no 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 that contains the RestoreChannels to list. + # Format: `projects/*/locations/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token} + # received from a previous `ListRestoreChannels` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListRestoreChannels` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.new + # + # # Call the list_restore_channels method. + # result = client.list_restore_channels request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestoreChannel. + # p item + # end + # + def list_restore_channels request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest + + # Converts hash and nil to an 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_restore_channels.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore_channels.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_restore_channels.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.list_restore_channels request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restore_channels, "restore_channels", 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 + + ## + # Retrieve the details of a single RestoreChannel. + # + # @overload get_restore_channel(request, options = nil) + # Pass arguments to `get_restore_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_restore_channel(name: nil) + # Pass arguments to `get_restore_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified RestoreChannel name. + # Format: `projects/*/locations/*/restoreChannels/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestoreChannel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::RestoreChannel] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new + # + # # Call the get_restore_channel method. + # result = client.get_restore_channel request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::RestoreChannel. + # p result + # + def get_restore_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest + + # Converts hash and nil to an 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_restore_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_restore_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.get_restore_channel 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 RestoreChannel. + # + # @overload update_restore_channel(request, options = nil) + # Pass arguments to `update_restore_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_restore_channel(restore_channel: nil, update_mask: nil) + # Pass arguments to `update_restore_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash] + # Required. A new version of the RestoreChannel resource that contains + # updated fields. This may be sparsely populated if an `update_mask` is + # provided. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. This is used to specify the fields to be overwritten in the + # RestoreChannel targeted for update. The values for each of these + # updated fields will be taken from the `restore_channel` provided + # with this request. Field names are relative to the root of the resource + # (e.g., `description`, `destination_project_id`, etc.) + # If no `update_mask` is provided, all fields in `restore_channel` will + # be written to the target RestoreChannel resource. Note that + # OUTPUT_ONLY and IMMUTABLE fields in `restore_channel` are ignored and + # are not used to update the target RestoreChannel. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new + # + # # Call the update_restore_channel method. + # result = client.update_restore_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest + + # Converts hash and nil to an 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_restore_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_restore_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.update_restore_channel 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 existing RestoreChannel. + # + # @overload delete_restore_channel(request, options = nil) + # Pass arguments to `delete_restore_channel` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_restore_channel(name: nil, etag: nil) + # Pass arguments to `delete_restore_channel` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Fully qualified RestoreChannel name. + # Format: `projects/*/locations/*/restoreChannels/*` + # @param etag [::String] + # Optional. If provided, this value must match the current value of the + # target RestoreChannel's + # {::Google::Cloud::GkeBackup::V1::RestoreChannel#etag etag} field or the request + # is rejected. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.new + # + # # Call the delete_restore_channel method. + # result = client.delete_restore_channel request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore_channel request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest + + # Converts hash and nil to an 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_restore_channel.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore_channel.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_restore_channel.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.delete_restore_channel 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 RestorePlanBindings in a given location. + # + # @overload list_restore_plan_bindings(request, options = nil) + # Pass arguments to `list_restore_plan_bindings` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_restore_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_restore_plan_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 RestoreChannel that contains the ListRestorePlanBindings to + # list. Format: `projects/*/locations/*/restoreChannels/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token} + # received from a previous `ListRestorePlanBindings` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListRestorePlanBindings` must match the call that provided the page + # token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.new + # + # # Call the list_restore_plan_bindings method. + # result = client.list_restore_plan_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::GkeBackup::V1::RestorePlanBinding. + # p item + # end + # + def list_restore_plan_bindings request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest + + # Converts hash and nil to an 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_restore_plan_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::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore_plan_bindings.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_restore_plan_bindings.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.list_restore_plan_bindings request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plan_bindings, "restore_plan_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 + + ## + # Retrieve the details of a single RestorePlanBinding. + # + # @overload get_restore_plan_binding(request, options = nil) + # Pass arguments to `get_restore_plan_binding` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_restore_plan_binding(name: nil) + # Pass arguments to `get_restore_plan_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. Fully qualified RestorePlanBinding name. + # Format: + # `projects/*/locations/*/restoreChannels/*/restorePlanBindings/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestorePlanBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::RestorePlanBinding] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new + # + # # Call the get_restore_plan_binding method. + # result = client.get_restore_plan_binding request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlanBinding. + # p result + # + def get_restore_plan_binding request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest + + # Converts hash and nil to an 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_restore_plan_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::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore_plan_binding.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_restore_plan_binding.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.get_restore_plan_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 + + ## + # Creates a new Restore for the given RestorePlan. + # + # @overload create_restore(request, options = nil) + # Pass arguments to `create_restore` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::CreateRestoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::CreateRestoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_restore(parent: nil, restore: nil, restore_id: nil) + # Pass arguments to `create_restore` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The RestorePlan within which to create the Restore. + # Format: `projects/*/locations/*/restorePlans/*` + # @param restore [::Google::Cloud::GkeBackup::V1::Restore, ::Hash] + # Required. The restore resource to create. + # @param restore_id [::String] + # Required. The client-provided short name for the Restore resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of Restores in this RestorePlan. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new + # + # # Call the create_restore method. + # result = client.create_restore request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestoreRequest + + # Converts hash and nil to an 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_restore.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.create_restore.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.create_restore 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 the Restores for a given RestorePlan. + # + # @overload list_restores(request, options = nil) + # Pass arguments to `list_restores` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListRestoresRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListRestoresRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_restores` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The RestorePlan that contains the Restores to list. + # Format: `projects/*/locations/*/restorePlans/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token} + # received from a previous `ListRestores` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to `ListRestores` + # must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListRestoresRequest.new + # + # # Call the list_restores method. + # result = client.list_restores request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::Restore. + # p item + # end + # + def list_restores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestoresRequest + + # Converts hash and nil to an 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_restores.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restores.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_restores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.list_restores request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restores, "restores", 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 the details of a single Restore. + # + # @overload get_restore(request, options = nil) + # Pass arguments to `get_restore` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetRestoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetRestoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_restore(name: nil) + # Pass arguments to `get_restore` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Name of the restore resource. + # Format: `projects/*/locations/*/restorePlans/*/restores/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::Restore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::Restore] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetRestoreRequest.new + # + # # Call the get_restore method. + # result = client.get_restore request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::Restore. + # p result + # + def get_restore request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestoreRequest + + # Converts hash and nil to an 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_restore.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_restore.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.get_restore 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 Restore. + # + # @overload update_restore(request, options = nil) + # Pass arguments to `update_restore` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter 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_restore(restore: nil, update_mask: nil) + # Pass arguments to `update_restore` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param restore [::Google::Cloud::GkeBackup::V1::Restore, ::Hash] + # Required. A new version of the Restore resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] + # Optional. This is used to specify the fields to be overwritten in the + # Restore targeted for update. The values for each of these + # updated fields will be taken from the `restore` provided + # with this request. Field names are relative to the root of the resource. + # If no `update_mask` is provided, all fields in `restore` will be + # written to the target Restore resource. + # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored + # and are not used to update the target Restore. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new + # + # # Call the update_restore method. + # result = client.update_restore request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest + + # Converts hash and nil to an 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_restore.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.update_restore.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.update_restore 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 existing Restore. + # + # @overload delete_restore(request, options = nil) + # Pass arguments to `delete_restore` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload delete_restore(name: nil, etag: nil, force: nil) + # Pass arguments to `delete_restore` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Full name of the Restore + # Format: `projects/*/locations/*/restorePlans/*/restores/*` + # @param etag [::String] + # Optional. If provided, this value must match the current value of the + # target Restore's {::Google::Cloud::GkeBackup::V1::Restore#etag etag} field or + # the request is rejected. + # @param force [::Boolean] + # Optional. If set to true, any VolumeRestores below this restore will also + # be deleted. Otherwise, the request will only succeed if the restore has no + # VolumeRestores. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::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/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new + # + # # Call the delete_restore method. + # result = client.delete_restore request + # + # # The returned object is of type Gapic::Operation. You can use it to + # # check the status of an operation, cancel it, or wait for results. + # # Here is how 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_restore request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest + + # Converts hash and nil to an 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_restore.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_restore.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.delete_restore.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.delete_restore 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 the VolumeRestores for a given Restore. + # + # @overload list_volume_restores(request, options = nil) + # Pass arguments to `list_volume_restores` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload list_volume_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) + # Pass arguments to `list_volume_restores` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param parent [::String] + # Required. The Restore that contains the VolumeRestores to list. + # Format: `projects/*/locations/*/restorePlans/*/restores/*` + # @param page_size [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @param page_token [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token} + # received from a previous `ListVolumeRestores` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListVolumeRestores` must match the call that provided the page token. + # @param filter [::String] + # Optional. Field match expression used to filter the results. + # @param order_by [::String] + # Optional. Field by which to sort the results. + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.new + # + # # Call the list_volume_restores method. + # result = client.list_volume_restores request + # + # # The returned object is of type Gapic::PagedEnumerable. You can iterate + # # over elements, and API calls will be issued to fetch pages as needed. + # result.each do |item| + # # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeRestore. + # p item + # end + # + def list_volume_restores request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest + + # Converts hash and nil to an 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_volume_restores.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_volume_restores.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.list_volume_restores.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.list_volume_restores request, options do |result, operation| + result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_volume_restores, "volume_restores", 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 + + ## + # Retrieve the details of a single VolumeRestore. + # + # @overload get_volume_restore(request, options = nil) + # Pass arguments to `get_volume_restore` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_volume_restore(name: nil) + # Pass arguments to `get_volume_restore` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param name [::String] + # Required. Full name of the VolumeRestore resource. + # Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::VolumeRestore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::VolumeRestore] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new + # + # # Call the get_volume_restore method. + # result = client.get_volume_restore request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeRestore. + # p result + # + def get_volume_restore request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest + + # Converts hash and nil to an 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_volume_restore.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_volume_restore.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_volume_restore.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.get_volume_restore 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 the link to the backupIndex. + # + # @overload get_backup_index_download_url(request, options = nil) + # Pass arguments to `get_backup_index_download_url` via a request object, either of type + # {::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest} or an equivalent Hash. + # + # @param request [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest, ::Hash] + # A request object representing the call parameters. Required. To specify no + # parameters, or to keep all the default parameter values, pass an empty Hash. + # @param options [::Gapic::CallOptions, ::Hash] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @overload get_backup_index_download_url(backup: nil) + # Pass arguments to `get_backup_index_download_url` via keyword arguments. Note that at + # least one keyword argument is required. To specify no parameters, or to keep all + # the default parameter values, pass an empty Hash as a request object (see above). + # + # @param backup [::String] + # Required. Full name of Backup resource. + # Format: + # projects/\\{project}/locations/\\{location}/backupPlans/\\{backup_plan}/backups/\\{backup} + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse] + # + # @raise [::Google::Cloud::Error] if the REST call is aborted. + # + # @example Basic example + # require "google/cloud/gke_backup/v1" + # + # # Create a client object. The client can be reused for multiple calls. + # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + # # Create a request. To set request fields, pass in keyword arguments. + # request = Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new + # + # # Call the get_backup_index_download_url method. + # result = client.get_backup_index_download_url request + # + # # The returned object is of type Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse. + # p result + # + def get_backup_index_download_url request, options = nil + raise ::ArgumentError, "request must be provided" if request.nil? + + request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest + + # Converts hash and nil to an 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_backup_index_download_url.metadata.to_h + + # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers + call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ + lib_name: @config.lib_name, lib_version: @config.lib_version, + gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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_backup_index_download_url.timeout, + metadata: call_metadata, + retry_policy: @config.rpcs.get_backup_index_download_url.retry_policy + + options.apply_defaults timeout: @config.timeout, + metadata: @config.metadata, + retry_policy: @config.retry_policy + + @backup_for_gke_stub.get_backup_index_download_url 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 BackupForGKE REST API. + # + # This class represents the configuration for BackupForGKE 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::GkeBackup::V1::BackupForGKE::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_backup_plan to 20 seconds, + # # and all remaining timeouts to 10 seconds. + # ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.configure do |config| + # config.timeout = 10.0 + # config.rpcs.create_backup_plan.timeout = 20.0 + # end + # + # # Apply the above configuration only to a new client. + # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + # config.timeout = 10.0 + # config.rpcs.create_backup_plan.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 = "gkebackup.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 BackupForGKE 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_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_plan + ## + # RPC-specific configuration for `list_backup_plans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plans + ## + # RPC-specific configuration for `get_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan + ## + # RPC-specific configuration for `update_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_plan + ## + # RPC-specific configuration for `delete_backup_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_plan + ## + # RPC-specific configuration for `create_backup_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup_channel + ## + # RPC-specific configuration for `list_backup_channels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_channels + ## + # RPC-specific configuration for `get_backup_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_channel + ## + # RPC-specific configuration for `update_backup_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup_channel + ## + # RPC-specific configuration for `delete_backup_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup_channel + ## + # RPC-specific configuration for `list_backup_plan_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backup_plan_bindings + ## + # RPC-specific configuration for `get_backup_plan_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_plan_binding + ## + # RPC-specific configuration for `create_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :create_backup + ## + # RPC-specific configuration for `list_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_backups + ## + # RPC-specific configuration for `get_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup + ## + # RPC-specific configuration for `update_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :update_backup + ## + # RPC-specific configuration for `delete_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_backup + ## + # RPC-specific configuration for `list_volume_backups` + # @return [::Gapic::Config::Method] + # + attr_reader :list_volume_backups + ## + # RPC-specific configuration for `get_volume_backup` + # @return [::Gapic::Config::Method] + # + attr_reader :get_volume_backup + ## + # RPC-specific configuration for `create_restore_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :create_restore_plan + ## + # RPC-specific configuration for `list_restore_plans` + # @return [::Gapic::Config::Method] + # + attr_reader :list_restore_plans + ## + # RPC-specific configuration for `get_restore_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :get_restore_plan + ## + # RPC-specific configuration for `update_restore_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :update_restore_plan + ## + # RPC-specific configuration for `delete_restore_plan` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_restore_plan + ## + # RPC-specific configuration for `create_restore_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :create_restore_channel + ## + # RPC-specific configuration for `list_restore_channels` + # @return [::Gapic::Config::Method] + # + attr_reader :list_restore_channels + ## + # RPC-specific configuration for `get_restore_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :get_restore_channel + ## + # RPC-specific configuration for `update_restore_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :update_restore_channel + ## + # RPC-specific configuration for `delete_restore_channel` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_restore_channel + ## + # RPC-specific configuration for `list_restore_plan_bindings` + # @return [::Gapic::Config::Method] + # + attr_reader :list_restore_plan_bindings + ## + # RPC-specific configuration for `get_restore_plan_binding` + # @return [::Gapic::Config::Method] + # + attr_reader :get_restore_plan_binding + ## + # RPC-specific configuration for `create_restore` + # @return [::Gapic::Config::Method] + # + attr_reader :create_restore + ## + # RPC-specific configuration for `list_restores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_restores + ## + # RPC-specific configuration for `get_restore` + # @return [::Gapic::Config::Method] + # + attr_reader :get_restore + ## + # RPC-specific configuration for `update_restore` + # @return [::Gapic::Config::Method] + # + attr_reader :update_restore + ## + # RPC-specific configuration for `delete_restore` + # @return [::Gapic::Config::Method] + # + attr_reader :delete_restore + ## + # RPC-specific configuration for `list_volume_restores` + # @return [::Gapic::Config::Method] + # + attr_reader :list_volume_restores + ## + # RPC-specific configuration for `get_volume_restore` + # @return [::Gapic::Config::Method] + # + attr_reader :get_volume_restore + ## + # RPC-specific configuration for `get_backup_index_download_url` + # @return [::Gapic::Config::Method] + # + attr_reader :get_backup_index_download_url + + # @private + def initialize parent_rpcs = nil + create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan + @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config + list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans + @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config + get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan + @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config + update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan + @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config + delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan + @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config + create_backup_channel_config = parent_rpcs.create_backup_channel if parent_rpcs.respond_to? :create_backup_channel + @create_backup_channel = ::Gapic::Config::Method.new create_backup_channel_config + list_backup_channels_config = parent_rpcs.list_backup_channels if parent_rpcs.respond_to? :list_backup_channels + @list_backup_channels = ::Gapic::Config::Method.new list_backup_channels_config + get_backup_channel_config = parent_rpcs.get_backup_channel if parent_rpcs.respond_to? :get_backup_channel + @get_backup_channel = ::Gapic::Config::Method.new get_backup_channel_config + update_backup_channel_config = parent_rpcs.update_backup_channel if parent_rpcs.respond_to? :update_backup_channel + @update_backup_channel = ::Gapic::Config::Method.new update_backup_channel_config + delete_backup_channel_config = parent_rpcs.delete_backup_channel if parent_rpcs.respond_to? :delete_backup_channel + @delete_backup_channel = ::Gapic::Config::Method.new delete_backup_channel_config + list_backup_plan_bindings_config = parent_rpcs.list_backup_plan_bindings if parent_rpcs.respond_to? :list_backup_plan_bindings + @list_backup_plan_bindings = ::Gapic::Config::Method.new list_backup_plan_bindings_config + get_backup_plan_binding_config = parent_rpcs.get_backup_plan_binding if parent_rpcs.respond_to? :get_backup_plan_binding + @get_backup_plan_binding = ::Gapic::Config::Method.new get_backup_plan_binding_config + create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup + @create_backup = ::Gapic::Config::Method.new create_backup_config + list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups + @list_backups = ::Gapic::Config::Method.new list_backups_config + get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup + @get_backup = ::Gapic::Config::Method.new get_backup_config + update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup + @update_backup = ::Gapic::Config::Method.new update_backup_config + delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup + @delete_backup = ::Gapic::Config::Method.new delete_backup_config + list_volume_backups_config = parent_rpcs.list_volume_backups if parent_rpcs.respond_to? :list_volume_backups + @list_volume_backups = ::Gapic::Config::Method.new list_volume_backups_config + get_volume_backup_config = parent_rpcs.get_volume_backup if parent_rpcs.respond_to? :get_volume_backup + @get_volume_backup = ::Gapic::Config::Method.new get_volume_backup_config + create_restore_plan_config = parent_rpcs.create_restore_plan if parent_rpcs.respond_to? :create_restore_plan + @create_restore_plan = ::Gapic::Config::Method.new create_restore_plan_config + list_restore_plans_config = parent_rpcs.list_restore_plans if parent_rpcs.respond_to? :list_restore_plans + @list_restore_plans = ::Gapic::Config::Method.new list_restore_plans_config + get_restore_plan_config = parent_rpcs.get_restore_plan if parent_rpcs.respond_to? :get_restore_plan + @get_restore_plan = ::Gapic::Config::Method.new get_restore_plan_config + update_restore_plan_config = parent_rpcs.update_restore_plan if parent_rpcs.respond_to? :update_restore_plan + @update_restore_plan = ::Gapic::Config::Method.new update_restore_plan_config + delete_restore_plan_config = parent_rpcs.delete_restore_plan if parent_rpcs.respond_to? :delete_restore_plan + @delete_restore_plan = ::Gapic::Config::Method.new delete_restore_plan_config + create_restore_channel_config = parent_rpcs.create_restore_channel if parent_rpcs.respond_to? :create_restore_channel + @create_restore_channel = ::Gapic::Config::Method.new create_restore_channel_config + list_restore_channels_config = parent_rpcs.list_restore_channels if parent_rpcs.respond_to? :list_restore_channels + @list_restore_channels = ::Gapic::Config::Method.new list_restore_channels_config + get_restore_channel_config = parent_rpcs.get_restore_channel if parent_rpcs.respond_to? :get_restore_channel + @get_restore_channel = ::Gapic::Config::Method.new get_restore_channel_config + update_restore_channel_config = parent_rpcs.update_restore_channel if parent_rpcs.respond_to? :update_restore_channel + @update_restore_channel = ::Gapic::Config::Method.new update_restore_channel_config + delete_restore_channel_config = parent_rpcs.delete_restore_channel if parent_rpcs.respond_to? :delete_restore_channel + @delete_restore_channel = ::Gapic::Config::Method.new delete_restore_channel_config + list_restore_plan_bindings_config = parent_rpcs.list_restore_plan_bindings if parent_rpcs.respond_to? :list_restore_plan_bindings + @list_restore_plan_bindings = ::Gapic::Config::Method.new list_restore_plan_bindings_config + get_restore_plan_binding_config = parent_rpcs.get_restore_plan_binding if parent_rpcs.respond_to? :get_restore_plan_binding + @get_restore_plan_binding = ::Gapic::Config::Method.new get_restore_plan_binding_config + create_restore_config = parent_rpcs.create_restore if parent_rpcs.respond_to? :create_restore + @create_restore = ::Gapic::Config::Method.new create_restore_config + list_restores_config = parent_rpcs.list_restores if parent_rpcs.respond_to? :list_restores + @list_restores = ::Gapic::Config::Method.new list_restores_config + get_restore_config = parent_rpcs.get_restore if parent_rpcs.respond_to? :get_restore + @get_restore = ::Gapic::Config::Method.new get_restore_config + update_restore_config = parent_rpcs.update_restore if parent_rpcs.respond_to? :update_restore + @update_restore = ::Gapic::Config::Method.new update_restore_config + delete_restore_config = parent_rpcs.delete_restore if parent_rpcs.respond_to? :delete_restore + @delete_restore = ::Gapic::Config::Method.new delete_restore_config + list_volume_restores_config = parent_rpcs.list_volume_restores if parent_rpcs.respond_to? :list_volume_restores + @list_volume_restores = ::Gapic::Config::Method.new list_volume_restores_config + get_volume_restore_config = parent_rpcs.get_volume_restore if parent_rpcs.respond_to? :get_volume_restore + @get_volume_restore = ::Gapic::Config::Method.new get_volume_restore_config + get_backup_index_download_url_config = parent_rpcs.get_backup_index_download_url if parent_rpcs.respond_to? :get_backup_index_download_url + @get_backup_index_download_url = ::Gapic::Config::Method.new get_backup_index_download_url_config + + yield self if block_given? + end + end + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb new file mode 100644 index 000000000000..4a4ab7171215 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb @@ -0,0 +1,925 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 GkeBackup + module V1 + module BackupForGKE + module Rest + # Service that implements Longrunning Operations API. + class Operations + # @private + API_VERSION = "" + + # @private + DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$" + + # @private + attr_reader :operations_stub + + ## + # Configuration for the BackupForGKE 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 BackupForGKE 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::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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::GkeBackup::V1::VERSION, + transports_version_send: [:rest] + + call_metadata[:"x-goog-api-version"] = API_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 = "gkebackup.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] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_operation REST call + # + # @param request_pb [::Google::Longrunning::GetOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_get_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_operation REST call + # + # @param request_pb [::Google::Longrunning::DeleteOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_delete_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the cancel_operation REST call + # + # @param request_pb [::Google::Longrunning::CancelOperationRequest] + # A request object representing the call parameters. Required. + # @return [Array(String, [String, nil], Hash{String => String})] + # Uri, Body, Query string parameters + def self.transcode_cancel_operation_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{name}:cancel", + body: "*", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb new file mode 100644 index 000000000000..3e489d411cc2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb @@ -0,0 +1,2472 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gkebackup/v1/gkebackup_pb" + +module Google + module Cloud + module GkeBackup + module V1 + module BackupForGKE + module Rest + ## + # REST service stub for the BackupForGKE 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_backup_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_plan", + 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_backup_plans REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse] + # A result object deserialized from the server's reply + def list_backup_plans request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plans_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_plans", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse.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_backup_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupPlan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::BackupPlan] + # A result object deserialized from the server's reply + def get_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::BackupPlan.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_backup_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_plan", + 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_backup_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_plan", + 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_backup_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_channel_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_channel", + 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_backup_channels REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse] + # A result object deserialized from the server's reply + def list_backup_channels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_channels_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_channels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse.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_backup_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupChannel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::BackupChannel] + # A result object deserialized from the server's reply + def get_backup_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_channel_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_channel", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::BackupChannel.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_backup_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_channel_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_channel", + 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_backup_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_channel_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_channel", + 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_backup_plan_bindings REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse] + # A result object deserialized from the server's reply + def list_backup_plan_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_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_backup_plan_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse.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_backup_plan_binding REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupPlanBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding] + # A result object deserialized from the server's reply + def get_backup_plan_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_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_backup_plan_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::BackupPlanBinding.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_backup REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup", + 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_backups REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListBackupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::ListBackupsResponse] + # A result object deserialized from the server's reply + def list_backups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::ListBackupsResponse.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_backup REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::Backup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::Backup] + # A result object deserialized from the server's reply + def get_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::Backup.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_backup REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup", + 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_backup REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup", + 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_volume_backups REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse] + # A result object deserialized from the server's reply + def list_volume_backups request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_volume_backups_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_volume_backups", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse.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_volume_backup REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::VolumeBackup] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup] + # A result object deserialized from the server's reply + def get_volume_backup request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_volume_backup_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_volume_backup", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::VolumeBackup.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_restore_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_restore_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_restore_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore_plan", + 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_restore_plans REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse] + # A result object deserialized from the server's reply + def list_restore_plans request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_restore_plans_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore_plans", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse.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_restore_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestorePlan] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::RestorePlan] + # A result object deserialized from the server's reply + def get_restore_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_restore_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore_plan", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::RestorePlan.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_restore_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_restore_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_restore_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore_plan", + 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_restore_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_restore_plan request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_restore_plan_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore_plan", + 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_restore_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_restore_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_restore_channel_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore_channel", + 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_restore_channels REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse] + # A result object deserialized from the server's reply + def list_restore_channels request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_restore_channels_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore_channels", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse.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_restore_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestoreChannel] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::RestoreChannel] + # A result object deserialized from the server's reply + def get_restore_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_restore_channel_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore_channel", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::RestoreChannel.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_restore_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_restore_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_restore_channel_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore_channel", + 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_restore_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_restore_channel request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_restore_channel_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore_channel", + 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_restore_plan_bindings REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse] + # A result object deserialized from the server's reply + def list_restore_plan_bindings request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_restore_plan_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_restore_plan_bindings", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse.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_restore_plan_binding REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestorePlanBinding] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::RestorePlanBinding] + # A result object deserialized from the server's reply + def get_restore_plan_binding request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_restore_plan_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_restore_plan_binding", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::RestorePlanBinding.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_restore REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateRestoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_restore request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_create_restore_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore", + 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_restores REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestoresRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListRestoresResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::ListRestoresResponse] + # A result object deserialized from the server's reply + def list_restores request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_restores_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restores", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::ListRestoresResponse.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_restore REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::Restore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::Restore] + # A result object deserialized from the server's reply + def get_restore request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_restore_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::Restore.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_restore REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_restore request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_update_restore_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore", + 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_restore REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @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_restore request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_delete_restore_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_restore", + 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_volume_restores REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse] + # A result object deserialized from the server's reply + def list_volume_restores request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_list_volume_restores_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_volume_restores", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse.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_volume_restore REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::VolumeRestore] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::VolumeRestore] + # A result object deserialized from the server's reply + def get_volume_restore request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_volume_restore_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_volume_restore", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::VolumeRestore.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_backup_index_download_url REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest] + # A request object representing the call parameters. Required. + # @param options [::Gapic::CallOptions] + # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. + # + # @yield [result, operation] Access the result along with the TransportOperation object + # @yieldparam result [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse] + # @yieldparam operation [::Gapic::Rest::TransportOperation] + # + # @return [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse] + # A result object deserialized from the server's reply + def get_backup_index_download_url request_pb, options = nil + raise ::ArgumentError, "request must be provided" if request_pb.nil? + + verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_index_download_url_request request_pb + query_string_params = if query_string_params.any? + query_string_params.to_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_backup_index_download_url", + options: options + ) + operation = ::Gapic::Rest::TransportOperation.new response + result = ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse.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_backup_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest] + # 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_backup_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupPlans", + body: "backup_plan", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_plans REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest] + # 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_backup_plans_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupPlans", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest] + # 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_backup_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest] + # 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_backup_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_plan.name}", + body: "backup_plan", + matches: [ + ["backup_plan.name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest] + # 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_backup_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest] + # 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_backup_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backupChannels", + body: "backup_channel", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_channels REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest] + # 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_backup_channels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupChannels", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest] + # 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_backup_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupChannels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest] + # 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_backup_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup_channel.name}", + body: "backup_channel", + matches: [ + ["backup_channel.name", %r{^projects/[^/]+/locations/[^/]+/backupChannels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest] + # 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_backup_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupChannels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backup_plan_bindings REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest] + # 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_backup_plan_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backupPlanBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupChannels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_plan_binding REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest] + # 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_backup_plan_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupChannels/[^/]+/backupPlanBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_backup REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateBackupRequest] + # 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_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/backups", + body: "backup", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_backups REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupsRequest] + # 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_backups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/backups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupRequest] + # 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_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_backup REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateBackupRequest] + # 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_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{backup.name}", + body: "backup", + matches: [ + ["backup.name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_backup REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteBackupRequest] + # 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_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_volume_backups REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest] + # 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_volume_backups_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/volumeBackups", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_volume_backup REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest] + # 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_volume_backup_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/volumeBackups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_restore_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest] + # 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_restore_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/restorePlans", + body: "restore_plan", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_restore_plans REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest] + # 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_restore_plans_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/restorePlans", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_restore_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest] + # 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_restore_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_restore_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest] + # 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_restore_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{restore_plan.name}", + body: "restore_plan", + matches: [ + ["restore_plan.name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_restore_plan REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest] + # 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_restore_plan_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_restore_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest] + # 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_restore_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/restoreChannels", + body: "restore_channel", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_restore_channels REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest] + # 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_restore_channels_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/restoreChannels", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_restore_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest] + # 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_restore_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/restoreChannels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_restore_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest] + # 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_restore_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{restore_channel.name}", + body: "restore_channel", + matches: [ + ["restore_channel.name", %r{^projects/[^/]+/locations/[^/]+/restoreChannels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_restore_channel REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest] + # 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_restore_channel_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/restoreChannels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_restore_plan_bindings REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest] + # 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_restore_plan_bindings_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/restorePlanBindings", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/restoreChannels/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_restore_plan_binding REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest] + # 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_restore_plan_binding_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/restoreChannels/[^/]+/restorePlanBindings/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the create_restore REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateRestoreRequest] + # 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_restore_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :post, + uri_template: "/v1/{parent}/restores", + body: "restore", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_restores REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestoresRequest] + # 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_restores_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/restores", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_restore REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestoreRequest] + # 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_restore_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the update_restore REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest] + # 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_restore_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :patch, + uri_template: "/v1/{restore.name}", + body: "restore", + matches: [ + ["restore.name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the delete_restore REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest] + # 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_restore_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :delete, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the list_volume_restores REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest] + # 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_volume_restores_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{parent}/volumeRestores", + matches: [ + ["parent", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_volume_restore REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest] + # 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_volume_restore_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{name}", + matches: [ + ["name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/volumeRestores/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + + ## + # @private + # + # GRPC transcoding helper method for the get_backup_index_download_url REST call + # + # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest] + # 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_backup_index_download_url_request request_pb + transcoder = Gapic::Rest::GrpcTranscoder.new + .with_bindings( + uri_method: :get, + uri_template: "/v1/{backup}:getBackupIndexDownloadUrl", + matches: [ + ["backup", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] + ] + ) + transcoder.transcode request_pb + end + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/bindings_override.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/bindings_override.rb new file mode 100644 index 000000000000..3cecd22eea98 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/bindings_override.rb @@ -0,0 +1,228 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 GkeBackup + ## + # @example Loading just the REST part of this package, including all its services, and instantiating a REST client + # + # require "google/cloud/gke_backup/v1/rest" + # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + module V1 + ## + # @private + # Initialize the mixin bindings configuration + # + def self.configure + @configure ||= begin + namespace = ["Google", "Cloud", "GkeBackup"] + 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/[^/]+/backupPlans/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/volumeBackups/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] + ], + body: nil + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :get, + uri_template: "/v1/{resource}:getIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/volumeRestores/[^/]+/?$}, 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/[^/]+/backupPlans/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/volumeBackups/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:setIamPolicy", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/volumeRestores/[^/]+/?$}, 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/[^/]+/backupPlans/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/volumeBackups/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] + ], + body: "*" + ), + Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( + uri_method: :post, + uri_template: "/v1/{resource}:testIamPermissions", + matches: [ + ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/volumeRestores/[^/]+/?$}, false] + ], + body: "*" + ) + ] + default_config + end + yield @configure if block_given? + @configure + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/rest.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/rest.rb new file mode 100644 index 000000000000..d2eccfd5c930 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/rest.rb @@ -0,0 +1,38 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gke_backup/v1/backup_for_gke/rest" +require "google/cloud/gke_backup/v1/bindings_override" +require "google/cloud/gke_backup/v1/version" + +module Google + module Cloud + module GkeBackup + ## + # To load just the REST part of this package, including all its services, and instantiate a REST client: + # + # @example + # + # require "google/cloud/gke_backup/v1/rest" + # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new + # + module V1 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/version.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/version.rb new file mode 100644 index 000000000000..5231353fab35 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/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 GkeBackup + module V1 + VERSION = "0.0.1" + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_channel_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_channel_pb.rb new file mode 100644 index 000000000000..27547c0e4c68 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_channel_pb.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkebackup/v1/backup_channel.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n.google/cloud/gkebackup/v1/backup_channel.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x04\n\rBackupChannel\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12#\n\x13\x64\x65stination_project\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12I\n\x06labels\x18\x06 \x03(\x0b\x32\x34.google.cloud.gkebackup.v1.BackupChannel.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x64\x65stination_project_id\x18\t \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:\x94\x01\xea\x41\x90\x01\n&gkebackup.googleapis.com/BackupChannel\x12Gprojects/{project}/locations/{location}/backupChannels/{backup_channel}*\x0e\x62\x61\x63kupChannels2\rbackupChannelB\xc9\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x12\x42\x61\x63kupChannelProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GkeBackup + module V1 + BackupChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupChannel").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_pb.rb new file mode 100644 index 000000000000..919732eb274b --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_pb.rb @@ -0,0 +1,51 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkebackup/v1/backup.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/gkebackup/v1/common_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/gkebackup/v1/backup.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/gkebackup/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x0e\n\x06\x42\x61\x63kup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\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\x13\n\x06manual\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12\x42\n\x06labels\x18\x06 \x03(\x0b\x32-.google.cloud.gkebackup.v1.Backup.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x65lete_lock_days\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\x12@\n\x17\x64\x65lete_lock_expire_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0bretain_days\x18\t \x01(\x05\x42\x03\xe0\x41\x01\x12;\n\x12retain_expire_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x45\n\x0e\x65ncryption_key\x18\x0b \x01(\x0b\x32(.google.cloud.gkebackup.v1.EncryptionKeyB\x03\xe0\x41\x03\x12\x1d\n\x0e\x61ll_namespaces\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03H\x00\x12I\n\x13selected_namespaces\x18\r \x01(\x0b\x32%.google.cloud.gkebackup.v1.NamespacesB\x03\xe0\x41\x03H\x00\x12P\n\x15selected_applications\x18\x0e \x01(\x0b\x32*.google.cloud.gkebackup.v1.NamespacedNamesB\x03\xe0\x41\x03H\x00\x12!\n\x14\x63ontains_volume_data\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x12\x1d\n\x10\x63ontains_secrets\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12P\n\x10\x63luster_metadata\x18\x11 \x01(\x0b\x32\x31.google.cloud.gkebackup.v1.Backup.ClusterMetadataB\x03\xe0\x41\x03\x12;\n\x05state\x18\x12 \x01(\x0e\x32\'.google.cloud.gkebackup.v1.Backup.StateB\x03\xe0\x41\x03\x12\x19\n\x0cstate_reason\x18\x13 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0eresource_count\x18\x15 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cvolume_count\x18\x16 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nsize_bytes\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x18 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x19 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpod_count\x18\x1a \x01(\x05\x42\x03\xe0\x41\x03\x12%\n\x18\x63onfig_backup_size_bytes\x18\x1b \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fpermissive_mode\x18\x1c \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x1d \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03\x1a\xb6\x02\n\x0f\x43lusterMetadata\x12\x14\n\x07\x63luster\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bk8s_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12j\n\x13\x62\x61\x63kup_crd_versions\x18\x03 \x03(\x0b\x32H.google.cloud.gkebackup.v1.Backup.ClusterMetadata.BackupCrdVersionsEntryB\x03\xe0\x41\x03\x12\x1a\n\x0bgke_version\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1d\n\x0e\x61nthos_version\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x1a\x38\n\x16\x42\x61\x63kupCrdVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x12\n\x10platform_version\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05:x\xea\x41u\n\x1fgkebackup.googleapis.com/Backup\x12Rprojects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}B\x0e\n\x0c\x62\x61\x63kup_scopeB\xc2\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x0b\x42\x61\x63kupProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.gkebackup.v1.EncryptionKey", "google/cloud/gkebackup/v1/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 + +module Google + module Cloud + module GkeBackup + module V1 + Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Backup").msgclass + Backup::ClusterMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Backup.ClusterMetadata").msgclass + Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Backup.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_binding_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_binding_pb.rb new file mode 100644 index 000000000000..f4e4374aadbc --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_binding_pb.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkebackup/v1/backup_plan_binding.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/cloud/gkebackup/v1/common_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n3google/cloud/gkebackup/v1/backup_plan_binding.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/gkebackup/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8e\x0e\n\x11\x42\x61\x63kupPlanBinding\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\x43\n\x0b\x62\x61\x63kup_plan\x18\x05 \x01(\tB.\xe0\x41\x05\xe0\x41\x03\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan\x12<\n\x07\x63luster\x18\x06 \x01(\tB+\xe0\x41\x05\xe0\x41\x03\xfa\x41\"\n container.googleapis.com/Cluster\x12`\n\x13\x62\x61\x63kup_plan_details\x18\x07 \x01(\x0b\x32>.google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetailsB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x03\x1a\x9b\t\n\x11\x42\x61\x63kupPlanDetails\x12 \n\x13protected_pod_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12X\n\x05state\x18\x02 \x01(\x0e\x32\x44.google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails.StateB\x03\xe0\x41\x03\x12\x44\n\x1blast_successful_backup_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x1anext_scheduled_backup_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0erpo_risk_level\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16last_successful_backup\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12v\n\x15\x62\x61\x63kup_config_details\x18\x07 \x01(\x0b\x32R.google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails.BackupConfigDetailsB\x03\xe0\x41\x03\x12|\n\x18retention_policy_details\x18\x08 \x01(\x0b\x32U.google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails.RetentionPolicyDetailsB\x03\xe0\x41\x03\x1a\xe8\x02\n\x13\x42\x61\x63kupConfigDetails\x12\x1d\n\x0e\x61ll_namespaces\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x12I\n\x13selected_namespaces\x18\x02 \x01(\x0b\x32%.google.cloud.gkebackup.v1.NamespacesB\x03\xe0\x41\x03H\x00\x12P\n\x15selected_applications\x18\x03 \x01(\x0b\x32*.google.cloud.gkebackup.v1.NamespacedNamesB\x03\xe0\x41\x03H\x00\x12 \n\x13include_volume_data\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1c\n\x0finclude_secrets\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x45\n\x0e\x65ncryption_key\x18\x07 \x01(\x0b\x32(.google.cloud.gkebackup.v1.EncryptionKeyB\x03\xe0\x41\x03\x42\x0e\n\x0c\x62\x61\x63kup_scope\x1a_\n\x16RetentionPolicyDetails\x12$\n\x17\x62\x61\x63kup_delete_lock_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1f\n\x12\x62\x61\x63kup_retain_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"{\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_PENDING\x10\x01\x12\x10\n\x0cPROVISIONING\x10\x02\x12\t\n\x05READY\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0f\n\x0b\x44\x45\x41\x43TIVATED\x10\x05\x12\x0c\n\x08\x44\x45LETING\x10\x06:\xc9\x01\xea\x41\xc5\x01\n*gkebackup.googleapis.com/BackupPlanBinding\x12pprojects/{project}/locations/{location}/backupChannels/{backup_channel}/backupPlanBindings/{backup_plan_binding}*\x12\x62\x61\x63kupPlanBindings2\x11\x62\x61\x63kupPlanBindingB\xcd\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x16\x42\x61\x63kupPlanBindingProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.gkebackup.v1.Namespaces", "google/cloud/gkebackup/v1/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 + +module Google + module Cloud + module GkeBackup + module V1 + BackupPlanBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlanBinding").msgclass + BackupPlanBinding::BackupPlanDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails").msgclass + BackupPlanBinding::BackupPlanDetails::BackupConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails.BackupConfigDetails").msgclass + BackupPlanBinding::BackupPlanDetails::RetentionPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails.RetentionPolicyDetails").msgclass + BackupPlanBinding::BackupPlanDetails::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb new file mode 100644 index 000000000000..dbf29498bf2f --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb @@ -0,0 +1,63 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkebackup/v1/backup_plan.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/gkebackup/v1/common_pb' +require 'google/protobuf/duration_pb' +require 'google/protobuf/timestamp_pb' +require 'google/type/date_pb' +require 'google/type/dayofweek_pb' +require 'google/type/timeofday_pb' + + +descriptor_data = "\n+google/cloud/gkebackup/v1/backup_plan.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/gkebackup/v1/common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\xe2\x0e\n\nBackupPlan\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\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<\n\x07\x63luster\x18\x06 \x01(\tB+\xe0\x41\x05\xe0\x41\x02\xfa\x41\"\n container.googleapis.com/Cluster\x12T\n\x10retention_policy\x18\x07 \x01(\x0b\x32\x35.google.cloud.gkebackup.v1.BackupPlan.RetentionPolicyB\x03\xe0\x41\x01\x12\x46\n\x06labels\x18\x08 \x03(\x0b\x32\x31.google.cloud.gkebackup.v1.BackupPlan.LabelsEntryB\x03\xe0\x41\x01\x12L\n\x0f\x62\x61\x63kup_schedule\x18\t \x01(\x0b\x32..google.cloud.gkebackup.v1.BackupPlan.ScheduleB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65\x61\x63tivated\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\x12N\n\rbackup_config\x18\x0c \x01(\x0b\x32\x32.google.cloud.gkebackup.v1.BackupPlan.BackupConfigB\x03\xe0\x41\x01\x12 \n\x13protected_pod_count\x18\r \x01(\x05\x42\x03\xe0\x41\x03\x12?\n\x05state\x18\x0e \x01(\x0e\x32+.google.cloud.gkebackup.v1.BackupPlan.StateB\x03\xe0\x41\x03\x12\x19\n\x0cstate_reason\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0erpo_risk_level\x18\x10 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0frpo_risk_reason\x18\x11 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x0e\x62\x61\x63kup_channel\x18\x12 \x01(\tB.\xe0\x41\x03\xfa\x41(\n&gkebackup.googleapis.com/BackupChannel\x12\x44\n\x1blast_successful_backup_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1am\n\x0fRetentionPolicy\x12$\n\x17\x62\x61\x63kup_delete_lock_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1f\n\x12\x62\x61\x63kup_retain_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x13\n\x06locked\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xbf\x01\n\x08Schedule\x12\x1a\n\rcron_schedule\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06paused\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12=\n\nrpo_config\x18\x03 \x01(\x0b\x32$.google.cloud.gkebackup.v1.RpoConfigB\x03\xe0\x41\x01\x12\x43\n\x1anext_scheduled_backup_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\xf0\x02\n\x0c\x42\x61\x63kupConfig\x12\x18\n\x0e\x61ll_namespaces\x18\x01 \x01(\x08H\x00\x12\x44\n\x13selected_namespaces\x18\x02 \x01(\x0b\x32%.google.cloud.gkebackup.v1.NamespacesH\x00\x12K\n\x15selected_applications\x18\x03 \x01(\x0b\x32*.google.cloud.gkebackup.v1.NamespacedNamesH\x00\x12 \n\x13include_volume_data\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0finclude_secrets\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x45\n\x0e\x65ncryption_key\x18\x06 \x01(\x0b\x32(.google.cloud.gkebackup.v1.EncryptionKeyB\x03\xe0\x41\x01\x12\x1c\n\x0fpermissive_mode\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0e\n\x0c\x62\x61\x63kup_scope\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"{\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_PENDING\x10\x01\x12\x10\n\x0cPROVISIONING\x10\x02\x12\t\n\x05READY\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0f\n\x0b\x44\x45\x41\x43TIVATED\x10\x05\x12\x0c\n\x08\x44\x45LETING\x10\x06:k\xea\x41h\n#gkebackup.googleapis.com/BackupPlan\x12\x41projects/{project}/locations/{location}/backupPlans/{backup_plan}\"x\n\tRpoConfig\x12\x1f\n\x12target_rpo_minutes\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12J\n\x11\x65xclusion_windows\x18\x02 \x03(\x0b\x32*.google.cloud.gkebackup.v1.ExclusionWindowB\x03\xe0\x41\x01\"\xde\x02\n\x0f\x45xclusionWindow\x12/\n\nstart_time\x18\x01 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x02\x12\x30\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x33\n\x16single_occurrence_date\x18\x03 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x0f\n\x05\x64\x61ily\x18\x04 \x01(\x08H\x00\x12P\n\x0c\x64\x61ys_of_week\x18\x05 \x01(\x0b\x32\x38.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekListH\x00\x1a\x42\n\rDayOfWeekList\x12\x31\n\x0c\x64\x61ys_of_week\x18\x01 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x42\x0c\n\nrecurrenceB\xc6\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x0f\x42\x61\x63kupPlanProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.gkebackup.v1.Namespaces", "google/cloud/gkebackup/v1/common.proto"], + ["google.type.TimeOfDay", "google/type/timeofday.proto"], + ["google.protobuf.Duration", "google/protobuf/duration.proto"], + ["google.type.Date", "google/type/date.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GkeBackup + module V1 + BackupPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan").msgclass + BackupPlan::RetentionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy").msgclass + BackupPlan::Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan.Schedule").msgclass + BackupPlan::BackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan.BackupConfig").msgclass + BackupPlan::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan.State").enummodule + RpoConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RpoConfig").msgclass + ExclusionWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ExclusionWindow").msgclass + ExclusionWindow::DayOfWeekList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/common_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/common_pb.rb new file mode 100644 index 000000000000..3ad3f16cef39 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/common_pb.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkebackup/v1/common.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' + + +descriptor_data = "\n&google/cloud/gkebackup/v1/common.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"%\n\nNamespaces\x12\x17\n\nnamespaces\x18\x01 \x03(\tB\x03\xe0\x41\x01\";\n\x0eNamespacedName\x12\x16\n\tnamespace\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01\"[\n\x0fNamespacedNames\x12H\n\x10namespaced_names\x18\x01 \x03(\x0b\x32).google.cloud.gkebackup.v1.NamespacedNameB\x03\xe0\x41\x01\"Z\n\rEncryptionKey\x12I\n\x16gcp_kms_encryption_key\x18\x01 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"T\n\x0eVolumeTypeEnum\"B\n\nVolumeType\x12\x1b\n\x17VOLUME_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13GCE_PERSISTENT_DISK\x10\x01\x42\xc2\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x0b\x43ommonProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GkeBackup + module V1 + Namespaces = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Namespaces").msgclass + NamespacedName = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.NamespacedName").msgclass + NamespacedNames = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.NamespacedNames").msgclass + EncryptionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.EncryptionKey").msgclass + VolumeTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeTypeEnum").msgclass + VolumeTypeEnum::VolumeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb new file mode 100644 index 000000000000..d189fd5b240a --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb @@ -0,0 +1,121 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkebackup/v1/gkebackup.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/gkebackup/v1/backup_pb' +require 'google/cloud/gkebackup/v1/backup_channel_pb' +require 'google/cloud/gkebackup/v1/backup_plan_pb' +require 'google/cloud/gkebackup/v1/backup_plan_binding_pb' +require 'google/cloud/gkebackup/v1/restore_pb' +require 'google/cloud/gkebackup/v1/restore_channel_pb' +require 'google/cloud/gkebackup/v1/restore_plan_pb' +require 'google/cloud/gkebackup/v1/restore_plan_binding_pb' +require 'google/cloud/gkebackup/v1/volume_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/gkebackup/v1/gkebackup.proto\x12\x19google.cloud.gkebackup.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/gkebackup/v1/backup.proto\x1a.google/cloud/gkebackup/v1/backup_channel.proto\x1a+google/cloud/gkebackup/v1/backup_plan.proto\x1a\x33google/cloud/gkebackup/v1/backup_plan_binding.proto\x1a\'google/cloud/gkebackup/v1/restore.proto\x1a/google/cloud/gkebackup/v1/restore_channel.proto\x1a,google/cloud/gkebackup/v1/restore_plan.proto\x1a\x34google/cloud/gkebackup/v1/restore_plan_binding.proto\x1a&google/cloud/gkebackup/v1/volume.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\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\"\xb2\x01\n\x17\x43reateBackupPlanRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12?\n\x0b\x62\x61\x63kup_plan\x18\x02 \x01(\x0b\x32%.google.cloud.gkebackup.v1.BackupPlanB\x03\xe0\x41\x02\x12\x1b\n\x0e\x62\x61\x63kup_plan_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xb0\x01\n\x16ListBackupPlansRequest\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\"\x84\x01\n\x17ListBackupPlansResponse\x12;\n\x0c\x62\x61\x63kup_plans\x18\x01 \x03(\x0b\x32%.google.cloud.gkebackup.v1.BackupPlan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x14GetBackupPlanRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan\"\x90\x01\n\x17UpdateBackupPlanRequest\x12?\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\x0b\x32%.google.cloud.gkebackup.v1.BackupPlanB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"g\n\x17\x44\x65leteBackupPlanRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xbe\x01\n\x1a\x43reateBackupChannelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x45\n\x0e\x62\x61\x63kup_channel\x18\x02 \x01(\x0b\x32(.google.cloud.gkebackup.v1.BackupChannelB\x03\xe0\x41\x02\x12\x1e\n\x11\x62\x61\x63kup_channel_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xb3\x01\n\x19ListBackupChannelsRequest\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\x1aListBackupChannelsResponse\x12\x41\n\x0f\x62\x61\x63kup_channels\x18\x01 \x03(\x0b\x32(.google.cloud.gkebackup.v1.BackupChannel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"W\n\x17GetBackupChannelRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&gkebackup.googleapis.com/BackupChannel\"\x99\x01\n\x1aUpdateBackupChannelRequest\x12\x45\n\x0e\x62\x61\x63kup_channel\x18\x01 \x01(\x0b\x32(.google.cloud.gkebackup.v1.BackupChannelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x81\x01\n\x1a\x44\x65leteBackupChannelRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&gkebackup.googleapis.com/BackupChannel\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xbc\x01\n\x1dListBackupPlanBindingsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&gkebackup.googleapis.com/BackupChannel\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\"\x9a\x01\n\x1eListBackupPlanBindingsResponse\x12J\n\x14\x62\x61\x63kup_plan_bindings\x18\x01 \x03(\x0b\x32,.google.cloud.gkebackup.v1.BackupPlanBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x1bGetBackupPlanBindingRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gkebackup.googleapis.com/BackupPlanBinding\"\xa2\x01\n\x13\x43reateBackupRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan\x12\x36\n\x06\x62\x61\x63kup\x18\x02 \x01(\x0b\x32!.google.cloud.gkebackup.v1.BackupB\x03\xe0\x41\x01\x12\x16\n\tbackup_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xd3\x01\n\x12ListBackupsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan\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\x12#\n\x16return_partial_success\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"w\n\x13ListBackupsResponse\x12\x32\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32!.google.cloud.gkebackup.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"I\n\x10GetBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkebackup.googleapis.com/Backup\"\x83\x01\n\x13UpdateBackupRequest\x12\x36\n\x06\x62\x61\x63kup\x18\x01 \x01(\x0b\x32!.google.cloud.gkebackup.v1.BackupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"s\n\x13\x44\x65leteBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkebackup.googleapis.com/Backup\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xb0\x01\n\x18ListVolumeBackupsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkebackup.googleapis.com/Backup\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\"u\n\x19ListVolumeBackupsResponse\x12?\n\x0evolume_backups\x18\x01 \x03(\x0b\x32\'.google.cloud.gkebackup.v1.VolumeBackup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"U\n\x16GetVolumeBackupRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkebackup.googleapis.com/VolumeBackup\"\xb6\x01\n\x18\x43reateRestorePlanRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x41\n\x0crestore_plan\x18\x02 \x01(\x0b\x32&.google.cloud.gkebackup.v1.RestorePlanB\x03\xe0\x41\x02\x12\x1c\n\x0frestore_plan_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xb1\x01\n\x17ListRestorePlansRequest\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\"\x87\x01\n\x18ListRestorePlansResponse\x12=\n\rrestore_plans\x18\x01 \x03(\x0b\x32&.google.cloud.gkebackup.v1.RestorePlan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x15GetRestorePlanRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$gkebackup.googleapis.com/RestorePlan\"\x93\x01\n\x18UpdateRestorePlanRequest\x12\x41\n\x0crestore_plan\x18\x01 \x01(\x0b\x32&.google.cloud.gkebackup.v1.RestorePlanB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"}\n\x18\x44\x65leteRestorePlanRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$gkebackup.googleapis.com/RestorePlan\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xc2\x01\n\x1b\x43reateRestoreChannelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12G\n\x0frestore_channel\x18\x02 \x01(\x0b\x32).google.cloud.gkebackup.v1.RestoreChannelB\x03\xe0\x41\x02\x12\x1f\n\x12restore_channel_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xb4\x01\n\x1aListRestoreChannelsRequest\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\x1bListRestoreChannelsResponse\x12\x43\n\x10restore_channels\x18\x01 \x03(\x0b\x32).google.cloud.gkebackup.v1.RestoreChannel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Y\n\x18GetRestoreChannelRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'gkebackup.googleapis.com/RestoreChannel\"\x9c\x01\n\x1bUpdateRestoreChannelRequest\x12G\n\x0frestore_channel\x18\x01 \x01(\x0b\x32).google.cloud.gkebackup.v1.RestoreChannelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"o\n\x1b\x44\x65leteRestoreChannelRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'gkebackup.googleapis.com/RestoreChannel\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xbe\x01\n\x1eListRestorePlanBindingsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'gkebackup.googleapis.com/RestoreChannel\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\"\xa2\x01\n\x1fListRestorePlanBindingsResponse\x12L\n\x15restore_plan_bindings\x18\x01 \x03(\x0b\x32-.google.cloud.gkebackup.v1.RestorePlanBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"a\n\x1cGetRestorePlanBindingRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+gkebackup.googleapis.com/RestorePlanBinding\"\xa7\x01\n\x14\x43reateRestoreRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$gkebackup.googleapis.com/RestorePlan\x12\x38\n\x07restore\x18\x02 \x01(\x0b\x32\".google.cloud.gkebackup.v1.RestoreB\x03\xe0\x41\x02\x12\x17\n\nrestore_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xb0\x01\n\x13ListRestoresRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$gkebackup.googleapis.com/RestorePlan\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\x14ListRestoresResponse\x12\x34\n\x08restores\x18\x01 \x03(\x0b\x32\".google.cloud.gkebackup.v1.Restore\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x11GetRestoreRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkebackup.googleapis.com/Restore\"\x86\x01\n\x14UpdateRestoreRequest\x12\x38\n\x07restore\x18\x01 \x01(\x0b\x32\".google.cloud.gkebackup.v1.RestoreB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"u\n\x14\x44\x65leteRestoreRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkebackup.googleapis.com/Restore\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xb2\x01\n\x19ListVolumeRestoresRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkebackup.googleapis.com/Restore\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\"x\n\x1aListVolumeRestoresResponse\x12\x41\n\x0fvolume_restores\x18\x01 \x03(\x0b\x32(.google.cloud.gkebackup.v1.VolumeRestore\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"W\n\x17GetVolumeRestoreRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&gkebackup.googleapis.com/VolumeRestore\"[\n GetBackupIndexDownloadUrlRequest\x12\x37\n\x06\x62\x61\x63kup\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkebackup.googleapis.com/Backup\"<\n!GetBackupIndexDownloadUrlResponse\x12\x17\n\nsigned_url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x32\xd1\x43\n\x0c\x42\x61\x63kupForGKE\x12\xf2\x01\n\x10\x43reateBackupPlan\x12\x32.google.cloud.gkebackup.v1.CreateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41!parent,backup_plan,backup_plan_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/backupPlans:\x0b\x62\x61\x63kup_plan\x12\xba\x01\n\x0fListBackupPlans\x12\x31.google.cloud.gkebackup.v1.ListBackupPlansRequest\x1a\x32.google.cloud.gkebackup.v1.ListBackupPlansResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/backupPlans\x12\xa7\x01\n\rGetBackupPlan\x12/.google.cloud.gkebackup.v1.GetBackupPlanRequest\x1a%.google.cloud.gkebackup.v1.BackupPlan\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xf4\x01\n\x10UpdateBackupPlan\x12\x32.google.cloud.gkebackup.v1.UpdateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41\x17\x62\x61\x63kup_plan,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}:\x0b\x62\x61\x63kup_plan\x12\xd2\x01\n\x10\x44\x65leteBackupPlan\x12\x32.google.cloud.gkebackup.v1.DeleteBackupPlanRequest\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/*/backupPlans/*}\x12\x87\x02\n\x13\x43reateBackupChannel\x12\x35.google.cloud.gkebackup.v1.CreateBackupChannelRequest\x1a\x1d.google.longrunning.Operation\"\x99\x01\xca\x41\"\n\rBackupChannel\x12\x11OperationMetadata\xda\x41\'parent,backup_channel,backup_channel_id\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/backupChannels:\x0e\x62\x61\x63kup_channel\x12\xc6\x01\n\x12ListBackupChannels\x12\x34.google.cloud.gkebackup.v1.ListBackupChannelsRequest\x1a\x35.google.cloud.gkebackup.v1.ListBackupChannelsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/backupChannels\x12\xb3\x01\n\x10GetBackupChannel\x12\x32.google.cloud.gkebackup.v1.GetBackupChannelRequest\x1a(.google.cloud.gkebackup.v1.BackupChannel\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/backupChannels/*}\x12\x89\x02\n\x13UpdateBackupChannel\x12\x35.google.cloud.gkebackup.v1.UpdateBackupChannelRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\"\n\rBackupChannel\x12\x11OperationMetadata\xda\x41\x1a\x62\x61\x63kup_channel,update_mask\x82\xd3\xe4\x93\x02S2A/v1/{backup_channel.name=projects/*/locations/*/backupChannels/*}:\x0e\x62\x61\x63kup_channel\x12\xdb\x01\n\x13\x44\x65leteBackupChannel\x12\x35.google.cloud.gkebackup.v1.DeleteBackupChannelRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/backupChannels/*}\x12\xe7\x01\n\x16ListBackupPlanBindings\x12\x38.google.cloud.gkebackup.v1.ListBackupPlanBindingsRequest\x1a\x39.google.cloud.gkebackup.v1.ListBackupPlanBindingsResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1/{parent=projects/*/locations/*/backupChannels/*}/backupPlanBindings\x12\xd4\x01\n\x14GetBackupPlanBinding\x12\x36.google.cloud.gkebackup.v1.GetBackupPlanBindingRequest\x1a,.google.cloud.gkebackup.v1.BackupPlanBinding\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/backupChannels/*/backupPlanBindings/*}\x12\xe1\x01\n\x0c\x43reateBackup\x12..google.cloud.gkebackup.v1.CreateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x81\x01\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x17parent,backup,backup_id\x82\xd3\xe4\x93\x02\x43\"9/v1/{parent=projects/*/locations/*/backupPlans/*}/backups:\x06\x62\x61\x63kup\x12\xb8\x01\n\x0bListBackups\x12-.google.cloud.gkebackup.v1.ListBackupsRequest\x1a..google.cloud.gkebackup.v1.ListBackupsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/backupPlans/*}/backups\x12\xa5\x01\n\tGetBackup\x12+.google.cloud.gkebackup.v1.GetBackupRequest\x1a!.google.cloud.gkebackup.v1.Backup\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}\x12\xe3\x01\n\x0cUpdateBackup\x12..google.cloud.gkebackup.v1.UpdateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x12\x62\x61\x63kup,update_mask\x82\xd3\xe4\x93\x02J2@/v1/{backup.name=projects/*/locations/*/backupPlans/*/backups/*}:\x06\x62\x61\x63kup\x12\xd4\x01\n\x0c\x44\x65leteBackup\x12..google.cloud.gkebackup.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}\x12\xda\x01\n\x11ListVolumeBackups\x12\x33.google.cloud.gkebackup.v1.ListVolumeBackupsRequest\x1a\x34.google.cloud.gkebackup.v1.ListVolumeBackupsResponse\"Z\xda\x41\x06parent\x82\xd3\xe4\x93\x02K\x12I/v1/{parent=projects/*/locations/*/backupPlans/*/backups/*}/volumeBackups\x12\xc7\x01\n\x0fGetVolumeBackup\x12\x31.google.cloud.gkebackup.v1.GetVolumeBackupRequest\x1a\'.google.cloud.gkebackup.v1.VolumeBackup\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\x12I/v1/{name=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}\x12\xf9\x01\n\x11\x43reateRestorePlan\x12\x33.google.cloud.gkebackup.v1.CreateRestorePlanRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0bRestorePlan\x12\x11OperationMetadata\xda\x41#parent,restore_plan,restore_plan_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/restorePlans:\x0crestore_plan\x12\xbe\x01\n\x10ListRestorePlans\x12\x32.google.cloud.gkebackup.v1.ListRestorePlansRequest\x1a\x33.google.cloud.gkebackup.v1.ListRestorePlansResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/restorePlans\x12\xab\x01\n\x0eGetRestorePlan\x12\x30.google.cloud.gkebackup.v1.GetRestorePlanRequest\x1a&.google.cloud.gkebackup.v1.RestorePlan\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/restorePlans/*}\x12\xfb\x01\n\x11UpdateRestorePlan\x12\x33.google.cloud.gkebackup.v1.UpdateRestorePlanRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41 \n\x0bRestorePlan\x12\x11OperationMetadata\xda\x41\x18restore_plan,update_mask\x82\xd3\xe4\x93\x02M2=/v1/{restore_plan.name=projects/*/locations/*/restorePlans/*}:\x0crestore_plan\x12\xd5\x01\n\x11\x44\x65leteRestorePlan\x12\x33.google.cloud.gkebackup.v1.DeleteRestorePlanRequest\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/*/restorePlans/*}\x12\x8e\x02\n\x14\x43reateRestoreChannel\x12\x36.google.cloud.gkebackup.v1.CreateRestoreChannelRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41#\n\x0eRestoreChannel\x12\x11OperationMetadata\xda\x41)parent,restore_channel,restore_channel_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/restoreChannels:\x0frestore_channel\x12\xca\x01\n\x13ListRestoreChannels\x12\x35.google.cloud.gkebackup.v1.ListRestoreChannelsRequest\x1a\x36.google.cloud.gkebackup.v1.ListRestoreChannelsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/restoreChannels\x12\xb7\x01\n\x11GetRestoreChannel\x12\x33.google.cloud.gkebackup.v1.GetRestoreChannelRequest\x1a).google.cloud.gkebackup.v1.RestoreChannel\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/restoreChannels/*}\x12\x90\x02\n\x14UpdateRestoreChannel\x12\x36.google.cloud.gkebackup.v1.UpdateRestoreChannelRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41#\n\x0eRestoreChannel\x12\x11OperationMetadata\xda\x41\x1brestore_channel,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{restore_channel.name=projects/*/locations/*/restoreChannels/*}:\x0frestore_channel\x12\xde\x01\n\x14\x44\x65leteRestoreChannel\x12\x36.google.cloud.gkebackup.v1.DeleteRestoreChannelRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/restoreChannels/*}\x12\xec\x01\n\x17ListRestorePlanBindings\x12\x39.google.cloud.gkebackup.v1.ListRestorePlanBindingsRequest\x1a:.google.cloud.gkebackup.v1.ListRestorePlanBindingsResponse\"Z\xda\x41\x06parent\x82\xd3\xe4\x93\x02K\x12I/v1/{parent=projects/*/locations/*/restoreChannels/*}/restorePlanBindings\x12\xd9\x01\n\x15GetRestorePlanBinding\x12\x37.google.cloud.gkebackup.v1.GetRestorePlanBindingRequest\x1a-.google.cloud.gkebackup.v1.RestorePlanBinding\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\x12I/v1/{name=projects/*/locations/*/restoreChannels/*/restorePlanBindings/*}\x12\xe9\x01\n\rCreateRestore\x12/.google.cloud.gkebackup.v1.CreateRestoreRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1c\n\x07Restore\x12\x11OperationMetadata\xda\x41\x19parent,restore,restore_id\x82\xd3\xe4\x93\x02\x46\";/v1/{parent=projects/*/locations/*/restorePlans/*}/restores:\x07restore\x12\xbd\x01\n\x0cListRestores\x12..google.cloud.gkebackup.v1.ListRestoresRequest\x1a/.google.cloud.gkebackup.v1.ListRestoresResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/restorePlans/*}/restores\x12\xaa\x01\n\nGetRestore\x12,.google.cloud.gkebackup.v1.GetRestoreRequest\x1a\".google.cloud.gkebackup.v1.Restore\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}\x12\xeb\x01\n\rUpdateRestore\x12/.google.cloud.gkebackup.v1.UpdateRestoreRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1c\n\x07Restore\x12\x11OperationMetadata\xda\x41\x13restore,update_mask\x82\xd3\xe4\x93\x02N2C/v1/{restore.name=projects/*/locations/*/restorePlans/*/restores/*}:\x07restore\x12\xd8\x01\n\rDeleteRestore\x12/.google.cloud.gkebackup.v1.DeleteRestoreRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}\x12\xe0\x01\n\x12ListVolumeRestores\x12\x34.google.cloud.gkebackup.v1.ListVolumeRestoresRequest\x1a\x35.google.cloud.gkebackup.v1.ListVolumeRestoresResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v1/{parent=projects/*/locations/*/restorePlans/*/restores/*}/volumeRestores\x12\xcd\x01\n\x10GetVolumeRestore\x12\x32.google.cloud.gkebackup.v1.GetVolumeRestoreRequest\x1a(.google.cloud.gkebackup.v1.VolumeRestore\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v1/{name=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}\x12\xfe\x01\n\x19GetBackupIndexDownloadUrl\x12;.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest\x1a<.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlResponse\"f\xda\x41\x06\x62\x61\x63kup\x82\xd3\xe4\x93\x02W\x12U/v1/{backup=projects/*/locations/*/backupPlans/*/backups/*}:getBackupIndexDownloadUrl\x1aL\xca\x41\x18gkebackup.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa1\x03\n\x1d\x63om.google.cloud.gkebackup.v1B\x0eGKEBackupProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1\xea\x41^\n container.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}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.cloud.gkebackup.v1.BackupPlan", "google/cloud/gkebackup/v1/backup_plan.proto"], + ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], + ["google.cloud.gkebackup.v1.BackupChannel", "google/cloud/gkebackup/v1/backup_channel.proto"], + ["google.cloud.gkebackup.v1.BackupPlanBinding", "google/cloud/gkebackup/v1/backup_plan_binding.proto"], + ["google.cloud.gkebackup.v1.Backup", "google/cloud/gkebackup/v1/backup.proto"], + ["google.cloud.gkebackup.v1.VolumeBackup", "google/cloud/gkebackup/v1/volume.proto"], + ["google.cloud.gkebackup.v1.RestorePlan", "google/cloud/gkebackup/v1/restore_plan.proto"], + ["google.cloud.gkebackup.v1.RestoreChannel", "google/cloud/gkebackup/v1/restore_channel.proto"], + ["google.cloud.gkebackup.v1.RestorePlanBinding", "google/cloud/gkebackup/v1/restore_plan_binding.proto"], + ["google.cloud.gkebackup.v1.Restore", "google/cloud/gkebackup/v1/restore.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GkeBackup + module V1 + OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.OperationMetadata").msgclass + CreateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.CreateBackupPlanRequest").msgclass + ListBackupPlansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupPlansRequest").msgclass + ListBackupPlansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupPlansResponse").msgclass + GetBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetBackupPlanRequest").msgclass + UpdateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.UpdateBackupPlanRequest").msgclass + DeleteBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.DeleteBackupPlanRequest").msgclass + CreateBackupChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.CreateBackupChannelRequest").msgclass + ListBackupChannelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupChannelsRequest").msgclass + ListBackupChannelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupChannelsResponse").msgclass + GetBackupChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetBackupChannelRequest").msgclass + UpdateBackupChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.UpdateBackupChannelRequest").msgclass + DeleteBackupChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.DeleteBackupChannelRequest").msgclass + ListBackupPlanBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupPlanBindingsRequest").msgclass + ListBackupPlanBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupPlanBindingsResponse").msgclass + GetBackupPlanBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetBackupPlanBindingRequest").msgclass + CreateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.CreateBackupRequest").msgclass + ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupsRequest").msgclass + ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupsResponse").msgclass + GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetBackupRequest").msgclass + UpdateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.UpdateBackupRequest").msgclass + DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.DeleteBackupRequest").msgclass + ListVolumeBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListVolumeBackupsRequest").msgclass + ListVolumeBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListVolumeBackupsResponse").msgclass + GetVolumeBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetVolumeBackupRequest").msgclass + CreateRestorePlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.CreateRestorePlanRequest").msgclass + ListRestorePlansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestorePlansRequest").msgclass + ListRestorePlansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestorePlansResponse").msgclass + GetRestorePlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetRestorePlanRequest").msgclass + UpdateRestorePlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.UpdateRestorePlanRequest").msgclass + DeleteRestorePlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.DeleteRestorePlanRequest").msgclass + CreateRestoreChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.CreateRestoreChannelRequest").msgclass + ListRestoreChannelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestoreChannelsRequest").msgclass + ListRestoreChannelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestoreChannelsResponse").msgclass + GetRestoreChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetRestoreChannelRequest").msgclass + UpdateRestoreChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.UpdateRestoreChannelRequest").msgclass + DeleteRestoreChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.DeleteRestoreChannelRequest").msgclass + ListRestorePlanBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestorePlanBindingsRequest").msgclass + ListRestorePlanBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestorePlanBindingsResponse").msgclass + GetRestorePlanBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetRestorePlanBindingRequest").msgclass + CreateRestoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.CreateRestoreRequest").msgclass + ListRestoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestoresRequest").msgclass + ListRestoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestoresResponse").msgclass + GetRestoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetRestoreRequest").msgclass + UpdateRestoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.UpdateRestoreRequest").msgclass + DeleteRestoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.DeleteRestoreRequest").msgclass + ListVolumeRestoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListVolumeRestoresRequest").msgclass + ListVolumeRestoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListVolumeRestoresResponse").msgclass + GetVolumeRestoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetVolumeRestoreRequest").msgclass + GetBackupIndexDownloadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest").msgclass + GetBackupIndexDownloadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlResponse").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_services_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_services_pb.rb new file mode 100644 index 000000000000..6f86aab972cb --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_services_pb.rb @@ -0,0 +1,122 @@ +# Generated by the protocol buffer compiler. DO NOT EDIT! +# Source: google/cloud/gkebackup/v1/gkebackup.proto for package 'Google.Cloud.GkeBackup.V1' +# Original file comments: +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.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/gkebackup/v1/gkebackup_pb' + +module Google + module Cloud + module GkeBackup + module V1 + module BackupForGKE + # BackupForGKE allows Kubernetes administrators to configure, execute, and + # manage backup and restore operations for their GKE clusters. + class Service + + include ::GRPC::GenericService + + self.marshal_class_method = :encode + self.unmarshal_class_method = :decode + self.service_name = 'google.cloud.gkebackup.v1.BackupForGKE' + + # Creates a new BackupPlan in a given location. + rpc :CreateBackupPlan, ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest, ::Google::Longrunning::Operation + # Lists BackupPlans in a given location. + rpc :ListBackupPlans, ::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest, ::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse + # Retrieve the details of a single BackupPlan. + rpc :GetBackupPlan, ::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest, ::Google::Cloud::GkeBackup::V1::BackupPlan + # Update a BackupPlan. + rpc :UpdateBackupPlan, ::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest, ::Google::Longrunning::Operation + # Deletes an existing BackupPlan. + rpc :DeleteBackupPlan, ::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest, ::Google::Longrunning::Operation + # Creates a new BackupChannel in a given location. + rpc :CreateBackupChannel, ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest, ::Google::Longrunning::Operation + # Lists BackupChannels in a given location. + rpc :ListBackupChannels, ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest, ::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse + # Retrieve the details of a single BackupChannel. + rpc :GetBackupChannel, ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest, ::Google::Cloud::GkeBackup::V1::BackupChannel + # Update a BackupChannel. + rpc :UpdateBackupChannel, ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest, ::Google::Longrunning::Operation + # Deletes an existing BackupChannel. + rpc :DeleteBackupChannel, ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest, ::Google::Longrunning::Operation + # Lists BackupPlanBindings in a given location. + rpc :ListBackupPlanBindings, ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest, ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse + # Retrieve the details of a single BackupPlanBinding. + rpc :GetBackupPlanBinding, ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest, ::Google::Cloud::GkeBackup::V1::BackupPlanBinding + # Creates a Backup for the given BackupPlan. + rpc :CreateBackup, ::Google::Cloud::GkeBackup::V1::CreateBackupRequest, ::Google::Longrunning::Operation + # Lists the Backups for a given BackupPlan. + rpc :ListBackups, ::Google::Cloud::GkeBackup::V1::ListBackupsRequest, ::Google::Cloud::GkeBackup::V1::ListBackupsResponse + # Retrieve the details of a single Backup. + rpc :GetBackup, ::Google::Cloud::GkeBackup::V1::GetBackupRequest, ::Google::Cloud::GkeBackup::V1::Backup + # Update a Backup. + rpc :UpdateBackup, ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest, ::Google::Longrunning::Operation + # Deletes an existing Backup. + rpc :DeleteBackup, ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest, ::Google::Longrunning::Operation + # Lists the VolumeBackups for a given Backup. + rpc :ListVolumeBackups, ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse + # Retrieve the details of a single VolumeBackup. + rpc :GetVolumeBackup, ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, ::Google::Cloud::GkeBackup::V1::VolumeBackup + # Creates a new RestorePlan in a given location. + rpc :CreateRestorePlan, ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, ::Google::Longrunning::Operation + # Lists RestorePlans in a given location. + rpc :ListRestorePlans, ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, ::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse + # Retrieve the details of a single RestorePlan. + rpc :GetRestorePlan, ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, ::Google::Cloud::GkeBackup::V1::RestorePlan + # Update a RestorePlan. + rpc :UpdateRestorePlan, ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, ::Google::Longrunning::Operation + # Deletes an existing RestorePlan. + rpc :DeleteRestorePlan, ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, ::Google::Longrunning::Operation + # Creates a new RestoreChannel in a given location. + rpc :CreateRestoreChannel, ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest, ::Google::Longrunning::Operation + # Lists RestoreChannels in a given location. + rpc :ListRestoreChannels, ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest, ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse + # Retrieve the details of a single RestoreChannel. + rpc :GetRestoreChannel, ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest, ::Google::Cloud::GkeBackup::V1::RestoreChannel + # Update a RestoreChannel. + rpc :UpdateRestoreChannel, ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest, ::Google::Longrunning::Operation + # Deletes an existing RestoreChannel. + rpc :DeleteRestoreChannel, ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest, ::Google::Longrunning::Operation + # Lists RestorePlanBindings in a given location. + rpc :ListRestorePlanBindings, ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest, ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse + # Retrieve the details of a single RestorePlanBinding. + rpc :GetRestorePlanBinding, ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest, ::Google::Cloud::GkeBackup::V1::RestorePlanBinding + # Creates a new Restore for the given RestorePlan. + rpc :CreateRestore, ::Google::Cloud::GkeBackup::V1::CreateRestoreRequest, ::Google::Longrunning::Operation + # Lists the Restores for a given RestorePlan. + rpc :ListRestores, ::Google::Cloud::GkeBackup::V1::ListRestoresRequest, ::Google::Cloud::GkeBackup::V1::ListRestoresResponse + # Retrieves the details of a single Restore. + rpc :GetRestore, ::Google::Cloud::GkeBackup::V1::GetRestoreRequest, ::Google::Cloud::GkeBackup::V1::Restore + # Update a Restore. + rpc :UpdateRestore, ::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest, ::Google::Longrunning::Operation + # Deletes an existing Restore. + rpc :DeleteRestore, ::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest, ::Google::Longrunning::Operation + # Lists the VolumeRestores for a given Restore. + rpc :ListVolumeRestores, ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest, ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse + # Retrieve the details of a single VolumeRestore. + rpc :GetVolumeRestore, ::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest, ::Google::Cloud::GkeBackup::V1::VolumeRestore + # Retrieve the link to the backupIndex. + rpc :GetBackupIndexDownloadUrl, ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest, ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse + end + + Stub = Service.rpc_stub_class + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_channel_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_channel_pb.rb new file mode 100644 index 000000000000..9171f3c8b4cf --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_channel_pb.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkebackup/v1/restore_channel.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n/google/cloud/gkebackup/v1/restore_channel.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb7\x04\n\x0eRestoreChannel\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12#\n\x13\x64\x65stination_project\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12J\n\x06labels\x18\x06 \x03(\x0b\x32\x35.google.cloud.gkebackup.v1.RestoreChannel.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x64\x65stination_project_id\x18\t \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:\x99\x01\xea\x41\x95\x01\n\'gkebackup.googleapis.com/RestoreChannel\x12Iprojects/{project}/locations/{location}/restoreChannels/{restore_channel}*\x0frestoreChannels2\x0erestoreChannelB\xca\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x13RestoreChannelProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GkeBackup + module V1 + RestoreChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreChannel").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_pb.rb new file mode 100644 index 000000000000..4d6232bd18d3 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_pb.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkebackup/v1/restore.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/gkebackup/v1/common_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n\'google/cloud/gkebackup/v1/restore.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/gkebackup/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xee\n\n\x07Restore\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\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:\n\x06\x62\x61\x63kup\x18\x06 \x01(\tB*\xe0\x41\x05\xe0\x41\x02\xfa\x41!\n\x1fgkebackup.googleapis.com/Backup\x12\x39\n\x07\x63luster\x18\x07 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n container.googleapis.com/Cluster\x12\x45\n\x0erestore_config\x18\x08 \x01(\x0b\x32(.google.cloud.gkebackup.v1.RestoreConfigB\x03\xe0\x41\x03\x12>\n\x06labels\x18\t \x03(\x0b\x32..google.cloud.gkebackup.v1.Restore.LabelsEntry\x12<\n\x05state\x18\n \x01(\x0e\x32(.google.cloud.gkebackup.v1.Restore.StateB\x03\xe0\x41\x03\x12\x19\n\x0cstate_reason\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12%\n\x18resources_restored_count\x18\r \x01(\x05\x42\x03\xe0\x41\x03\x12%\n\x18resources_excluded_count\x18\x0e \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16resources_failed_count\x18\x0f \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16volumes_restored_count\x18\x10 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x11 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x06\x66ilter\x18\x12 \x01(\x0b\x32).google.cloud.gkebackup.v1.Restore.FilterB\x06\xe0\x41\x05\xe0\x41\x01\x12p\n$volume_data_restore_policy_overrides\x18\x13 \x03(\x0b\x32:.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverrideB\x06\xe0\x41\x05\xe0\x41\x01\x1a\xa2\x01\n\x06\x46ilter\x12K\n\x11inclusion_filters\x18\x01 \x03(\x0b\x32+.google.cloud.gkebackup.v1.ResourceSelectorB\x03\xe0\x41\x01\x12K\n\x11\x65xclusion_filters\x18\x02 \x03(\x0b\x32+.google.cloud.gkebackup.v1.ResourceSelectorB\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\"v\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\x0e\n\nVALIDATING\x10\x06:}\xea\x41z\n gkebackup.googleapis.com/Restore\x12Vprojects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}\"\xef\x1a\n\rRestoreConfig\x12i\n\x1avolume_data_restore_policy\x18\x01 \x01(\x0e\x32@.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyB\x03\xe0\x41\x01\x12u\n cluster_resource_conflict_policy\x18\x02 \x01(\x0e\x32\x46.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicyB\x03\xe0\x41\x01\x12u\n namespaced_resource_restore_mode\x18\x03 \x01(\x0e\x32\x46.google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreModeB\x03\xe0\x41\x01\x12q\n\x1e\x63luster_resource_restore_scope\x18\x04 \x01(\x0b\x32\x44.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScopeB\x03\xe0\x41\x01\x12\x18\n\x0e\x61ll_namespaces\x18\x05 \x01(\x08H\x00\x12\x44\n\x13selected_namespaces\x18\x06 \x01(\x0b\x32%.google.cloud.gkebackup.v1.NamespacesH\x00\x12K\n\x15selected_applications\x18\x07 \x01(\x0b\x32*.google.cloud.gkebackup.v1.NamespacedNamesH\x00\x12\x17\n\rno_namespaces\x18\t \x01(\x08H\x00\x12\x44\n\x13\x65xcluded_namespaces\x18\n \x01(\x0b\x32%.google.cloud.gkebackup.v1.NamespacesH\x00\x12Z\n\x12substitution_rules\x18\x08 \x03(\x0b\x32\x39.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRuleB\x03\xe0\x41\x01\x12^\n\x14transformation_rules\x18\x0b \x03(\x0b\x32;.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleB\x03\xe0\x41\x01\x12y\n#volume_data_restore_policy_bindings\x18\x0c \x03(\x0b\x32G.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBindingB\x03\xe0\x41\x01\x12Q\n\rrestore_order\x18\r \x01(\x0b\x32\x35.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrderB\x03\xe0\x41\x01\x1a\x44\n\tGroupKind\x12\x1b\n\x0eresource_group\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rresource_kind\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x86\x02\n\x1b\x43lusterResourceRestoreScope\x12U\n\x14selected_group_kinds\x18\x01 \x03(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x01\x12U\n\x14\x65xcluded_group_kinds\x18\x02 \x03(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x01\x12\x1c\n\x0f\x61ll_group_kinds\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0eno_group_kinds\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xe3\x01\n\x10SubstitutionRule\x12\x1e\n\x11target_namespaces\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12S\n\x12target_group_kinds\x18\x02 \x03(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x01\x12\x1d\n\x10target_json_path\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12#\n\x16original_value_pattern\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tnew_value\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x8a\x02\n\x18TransformationRuleAction\x12U\n\x02op\x18\x01 \x01(\x0e\x32\x44.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.OpB\x03\xe0\x41\x02\x12\x16\n\tfrom_path\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x04 \x01(\tB\x03\xe0\x41\x01\"X\n\x02Op\x12\x12\n\x0eOP_UNSPECIFIED\x10\x00\x12\n\n\x06REMOVE\x10\x01\x12\x08\n\x04MOVE\x10\x02\x12\x08\n\x04\x43OPY\x10\x03\x12\x07\n\x03\x41\x44\x44\x10\x04\x12\x08\n\x04TEST\x10\x05\x12\x0b\n\x07REPLACE\x10\x06\x1a\x8f\x01\n\x0eResourceFilter\x12\x17\n\nnamespaces\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12L\n\x0bgroup_kinds\x18\x02 \x03(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x01\x12\x16\n\tjson_path\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\xe4\x01\n\x12TransformationRule\x12]\n\rfield_actions\x18\x01 \x03(\x0b\x32\x41.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleActionB\x03\xe0\x41\x02\x12U\n\x0fresource_filter\x18\x02 \x01(\x0b\x32\x37.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilterB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\xcd\x01\n\x1eVolumeDataRestorePolicyBinding\x12U\n\x06policy\x18\x01 \x01(\x0e\x32@.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyB\x03\xe0\x41\x02\x12K\n\x0bvolume_type\x18\x02 \x01(\x0e\x32\x34.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeTypeH\x00\x42\x07\n\x05scope\x1a\xb0\x02\n\x0cRestoreOrder\x12o\n\x17group_kind_dependencies\x18\x01 \x03(\x0b\x32I.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependencyB\x03\xe0\x41\x01\x1a\xae\x01\n\x13GroupKindDependency\x12K\n\nsatisfying\x18\x01 \x01(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x02\x12J\n\trequiring\x18\x02 \x01(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x02\"\xaf\x01\n\x17VolumeDataRestorePolicy\x12*\n&VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED\x10\x00\x12#\n\x1fRESTORE_VOLUME_DATA_FROM_BACKUP\x10\x01\x12#\n\x1fREUSE_VOLUME_HANDLE_FROM_BACKUP\x10\x02\x12\x1e\n\x1aNO_VOLUME_DATA_RESTORATION\x10\x03\"\x83\x01\n\x1d\x43lusterResourceConflictPolicy\x12\x30\n,CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED\x10\x00\x12\x18\n\x14USE_EXISTING_VERSION\x10\x01\x12\x16\n\x12USE_BACKUP_VERSION\x10\x02\"\xe0\x01\n\x1dNamespacedResourceRestoreMode\x12\x30\n,NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x44\x45LETE_AND_RESTORE\x10\x01\x12\x14\n\x10\x46\x41IL_ON_CONFLICT\x10\x02\x12\x1a\n\x16MERGE_SKIP_ON_CONFLICT\x10\x03\x12$\n MERGE_REPLACE_VOLUME_ON_CONFLICT\x10\x04\x12\x1d\n\x19MERGE_REPLACE_ON_CONFLICT\x10\x05\x42#\n!namespaced_resource_restore_scope\"\x87\x02\n\x10ResourceSelector\x12K\n\ngroup_kind\x18\x01 \x01(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tnamespace\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12L\n\x06labels\x18\x04 \x03(\x0b\x32\x37.google.cloud.gkebackup.v1.ResourceSelector.LabelsEntryB\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\"\xc6\x01\n\x1fVolumeDataRestorePolicyOverride\x12U\n\x06policy\x18\x01 \x01(\x0e\x32@.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyB\x03\xe0\x41\x02\x12\x43\n\rselected_pvcs\x18\x02 \x01(\x0b\x32*.google.cloud.gkebackup.v1.NamespacedNamesH\x00\x42\x07\n\x05scopeB\xc3\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x0cRestoreProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.gkebackup.v1.Namespaces", "google/cloud/gkebackup/v1/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 + +module Google + module Cloud + module GkeBackup + module V1 + Restore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Restore").msgclass + Restore::Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Restore.Filter").msgclass + Restore::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Restore.State").enummodule + RestoreConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig").msgclass + RestoreConfig::GroupKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.GroupKind").msgclass + RestoreConfig::ClusterResourceRestoreScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope").msgclass + RestoreConfig::SubstitutionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule").msgclass + RestoreConfig::TransformationRuleAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction").msgclass + RestoreConfig::TransformationRuleAction::Op = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op").enummodule + RestoreConfig::ResourceFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter").msgclass + RestoreConfig::TransformationRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.TransformationRule").msgclass + RestoreConfig::VolumeDataRestorePolicyBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding").msgclass + RestoreConfig::RestoreOrder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder").msgclass + RestoreConfig::RestoreOrder::GroupKindDependency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency").msgclass + RestoreConfig::VolumeDataRestorePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy").enummodule + RestoreConfig::ClusterResourceConflictPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy").enummodule + RestoreConfig::NamespacedResourceRestoreMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode").enummodule + ResourceSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ResourceSelector").msgclass + VolumeDataRestorePolicyOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_binding_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_binding_pb.rb new file mode 100644 index 000000000000..faad4f1fe4d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_binding_pb.rb @@ -0,0 +1,48 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkebackup/v1/restore_plan_binding.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/field_info_pb' +require 'google/api/resource_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n4google/cloud/gkebackup/v1/restore_plan_binding.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\x04\n\x12RestorePlanBinding\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\x42\n\x0crestore_plan\x18\x05 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$gkebackup.googleapis.com/RestorePlan\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12@\n\x0b\x62\x61\x63kup_plan\x18\x07 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan:\xd0\x01\xea\x41\xcc\x01\n+gkebackup.googleapis.com/RestorePlanBinding\x12tprojects/{project}/locations/{location}/restoreChannels/{restore_channel}/restorePlanBindings/{restore_plan_binding}*\x13restorePlanBindings2\x12restorePlanBindingB\xce\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x17RestorePlanBindingProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GkeBackup + module V1 + RestorePlanBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestorePlanBinding").msgclass + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_pb.rb new file mode 100644 index 000000000000..f97faadb07ae --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_pb.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkebackup/v1/restore_plan.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/gkebackup/v1/restore_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n,google/cloud/gkebackup/v1/restore_plan.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/gkebackup/v1/restore.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x06\n\x0bRestorePlan\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\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\x43\n\x0b\x62\x61\x63kup_plan\x18\x06 \x01(\tB.\xe0\x41\x05\xe0\x41\x02\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan\x12<\n\x07\x63luster\x18\x07 \x01(\tB+\xe0\x41\x05\xe0\x41\x02\xfa\x41\"\n container.googleapis.com/Cluster\x12\x45\n\x0erestore_config\x18\x08 \x01(\x0b\x32(.google.cloud.gkebackup.v1.RestoreConfigB\x03\xe0\x41\x02\x12G\n\x06labels\x18\t \x03(\x0b\x32\x32.google.cloud.gkebackup.v1.RestorePlan.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x03\x12@\n\x05state\x18\x0b \x01(\x0e\x32,.google.cloud.gkebackup.v1.RestorePlan.StateB\x03\xe0\x41\x03\x12\x19\n\x0cstate_reason\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12H\n\x0frestore_channel\x18\r \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'gkebackup.googleapis.com/RestoreChannel\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_PENDING\x10\x01\x12\t\n\x05READY\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04:n\xea\x41k\n$gkebackup.googleapis.com/RestorePlan\x12\x43projects/{project}/locations/{location}/restorePlans/{restore_plan}B\xc7\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x10RestorePlanProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.gkebackup.v1.RestoreConfig", "google/cloud/gkebackup/v1/restore.proto"], + ] + imports.each do |type_name, expected_filename| + import_file = pool.lookup(type_name).file_descriptor + if import_file.name != expected_filename + warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" + end + end + warn "Each proto file must use a consistent fully-qualified name." + warn "This will become an error in the next major version." +end + +module Google + module Cloud + module GkeBackup + module V1 + RestorePlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestorePlan").msgclass + RestorePlan::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestorePlan.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/volume_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/volume_pb.rb new file mode 100644 index 000000000000..3a79c075afb1 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/volume_pb.rb @@ -0,0 +1,54 @@ +# frozen_string_literal: true +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: google/cloud/gkebackup/v1/volume.proto + +require 'google/protobuf' + +require 'google/api/field_behavior_pb' +require 'google/api/resource_pb' +require 'google/cloud/gkebackup/v1/common_pb' +require 'google/protobuf/timestamp_pb' + + +descriptor_data = "\n&google/cloud/gkebackup/v1/volume.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/gkebackup/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf1\x07\n\x0cVolumeBackup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\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\x42\n\nsource_pvc\x18\x05 \x01(\x0b\x32).google.cloud.gkebackup.v1.NamespacedNameB\x03\xe0\x41\x03\x12!\n\x14volume_backup_handle\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12O\n\x06\x66ormat\x18\x07 \x01(\x0e\x32:.google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormatB\x03\xe0\x41\x03\x12\x1a\n\rstorage_bytes\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x64isk_size_bytes\x18\t \x01(\x03\x42\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x41\n\x05state\x18\x0b \x01(\x0e\x32-.google.cloud.gkebackup.v1.VolumeBackup.StateB\x03\xe0\x41\x03\x12\x1a\n\rstate_message\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\"S\n\x12VolumeBackupFormat\x12$\n VOLUME_BACKUP_FORMAT_UNSPECIFIED\x10\x00\x12\x17\n\x13GCE_PERSISTENT_DISK\x10\x01\"\x86\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x10\n\x0cSNAPSHOTTING\x10\x02\x12\r\n\tUPLOADING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0c\n\x08\x44\x45LETING\x10\x06\x12\x0e\n\nCLEANED_UP\x10\x07:\x9d\x01\xea\x41\x99\x01\n%gkebackup.googleapis.com/VolumeBackup\x12pprojects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}/volumeBackups/{volume_backup}\"\xe7\x06\n\rVolumeRestore\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\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\x1a\n\rvolume_backup\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x42\n\ntarget_pvc\x18\x06 \x01(\x0b\x32).google.cloud.gkebackup.v1.NamespacedNameB\x03\xe0\x41\x03\x12\x1a\n\rvolume_handle\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12M\n\x0bvolume_type\x18\x08 \x01(\x0e\x32\x33.google.cloud.gkebackup.v1.VolumeRestore.VolumeTypeB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x05state\x18\n \x01(\x0e\x32..google.cloud.gkebackup.v1.VolumeRestore.StateB\x03\xe0\x41\x03\x12\x1a\n\rstate_message\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0c \x01(\tB\x03\xe0\x41\x03\"B\n\nVolumeType\x12\x1b\n\x17VOLUME_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13GCE_PERSISTENT_DISK\x10\x01\"d\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\r\n\tRESTORING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05:\xa4\x01\xea\x41\xa0\x01\n&gkebackup.googleapis.com/VolumeRestore\x12vprojects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}/volumeRestores/{volume_restore}B\xc2\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x0bVolumeProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" + +pool = Google::Protobuf::DescriptorPool.generated_pool + +begin + pool.add_serialized_file(descriptor_data) +rescue TypeError + # Compatibility code: will be removed in the next major version. + require 'google/protobuf/descriptor_pb' + parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) + parsed.clear_dependency + serialized = parsed.class.encode(parsed) + file = pool.add_serialized_file(serialized) + warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" + imports = [ + ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], + ["google.cloud.gkebackup.v1.NamespacedName", "google/cloud/gkebackup/v1/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 + +module Google + module Cloud + module GkeBackup + module V1 + VolumeBackup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeBackup").msgclass + VolumeBackup::VolumeBackupFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat").enummodule + VolumeBackup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeBackup.State").enummodule + VolumeRestore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeRestore").msgclass + VolumeRestore::VolumeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeRestore.VolumeType").enummodule + VolumeRestore::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeRestore.State").enummodule + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/README.md new file mode 100644 index 000000000000..755f1ad7e94e --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/README.md @@ -0,0 +1,4 @@ +# Backup for GKE 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-gke_backup-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/client.rb new file mode 100644 index 000000000000..d59ba51a5612 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/field_behavior.rb new file mode 100644 index 000000000000..582be187d115 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/field_info.rb new file mode 100644 index 000000000000..0f5acf0a5538 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/launch_stage.rb new file mode 100644 index 000000000000..9392a413fb1b --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/resource.rb new file mode 100644 index 000000000000..25dec4847ac1 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup.rb new file mode 100644 index 000000000000..746ed529579e --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup.rb @@ -0,0 +1,264 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeBackup + module V1 + # Represents a request to perform a single point-in-time capture of + # some portion of the state of a GKE cluster, the record of the backup + # operation itself, and an anchor for the underlying artifacts that + # comprise the Backup (the config backup and VolumeBackups). + # @!attribute [r] name + # @return [::String] + # Output only. The fully qualified name of the Backup. + # `projects/*/locations/*/backupPlans/*/backups/*` + # @!attribute [r] uid + # @return [::String] + # Output only. Server generated global unique identifier of + # [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this Backup resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this Backup resource was last updated. + # @!attribute [r] manual + # @return [::Boolean] + # Output only. This flag indicates whether this Backup resource was created + # manually by a user or via a schedule in the BackupPlan. A value of True + # means that the Backup was created manually. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. A set of custom labels supplied by user. + # @!attribute [rw] delete_lock_days + # @return [::Integer] + # Optional. Minimum age for this Backup (in days). If this field is set to a + # non-zero value, the Backup will be "locked" against deletion (either manual + # or automatic deletion) for the number of days provided (measured from the + # creation time of the Backup). MUST be an integer value between 0-90 + # (inclusive). + # + # Defaults to parent BackupPlan's + # {::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy#backup_delete_lock_days backup_delete_lock_days} + # setting and may only be increased + # (either at creation time or in a subsequent update). + # @!attribute [r] delete_lock_expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which an existing delete lock will expire for this + # backup (calculated from create_time + + # {::Google::Cloud::GkeBackup::V1::Backup#delete_lock_days delete_lock_days}). + # @!attribute [rw] retain_days + # @return [::Integer] + # Optional. The age (in days) after which this Backup will be automatically + # deleted. Must be an integer value >= 0: + # + # - If 0, no automatic deletion will occur for this Backup. + # - If not 0, this must be >= + # {::Google::Cloud::GkeBackup::V1::Backup#delete_lock_days delete_lock_days} and + # <= 365. + # + # Once a Backup is created, this value may only be increased. + # + # Defaults to the parent BackupPlan's + # {::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy#backup_retain_days backup_retain_days} + # value. + # @!attribute [r] retain_expire_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The time at which this Backup will be automatically deleted + # (calculated from create_time + + # {::Google::Cloud::GkeBackup::V1::Backup#retain_days retain_days}). + # @!attribute [r] encryption_key + # @return [::Google::Cloud::GkeBackup::V1::EncryptionKey] + # Output only. The customer managed encryption key that was used to encrypt + # the Backup's artifacts. Inherited from the parent BackupPlan's + # {::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig#encryption_key encryption_key} + # value. + # @!attribute [r] all_namespaces + # @return [::Boolean] + # Output only. If True, all namespaces were included in the Backup. + # + # Note: The following fields are mutually exclusive: `all_namespaces`, `selected_namespaces`, `selected_applications`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] selected_namespaces + # @return [::Google::Cloud::GkeBackup::V1::Namespaces] + # Output only. If set, the list of namespaces that were included in the + # Backup. + # + # Note: The following fields are mutually exclusive: `selected_namespaces`, `all_namespaces`, `selected_applications`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] selected_applications + # @return [::Google::Cloud::GkeBackup::V1::NamespacedNames] + # Output only. If set, the list of ProtectedApplications whose resources + # were included in the Backup. + # + # Note: The following fields are mutually exclusive: `selected_applications`, `all_namespaces`, `selected_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] contains_volume_data + # @return [::Boolean] + # Output only. Whether or not the Backup contains volume data. Controlled by + # the parent BackupPlan's + # {::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig#include_volume_data include_volume_data} + # value. + # @!attribute [r] contains_secrets + # @return [::Boolean] + # Output only. Whether or not the Backup contains Kubernetes Secrets. + # Controlled by the parent BackupPlan's + # {::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig#include_secrets include_secrets} + # value. + # @!attribute [r] cluster_metadata + # @return [::Google::Cloud::GkeBackup::V1::Backup::ClusterMetadata] + # Output only. Information about the GKE cluster from which this Backup was + # created. + # @!attribute [r] state + # @return [::Google::Cloud::GkeBackup::V1::Backup::State] + # Output only. Current state of the Backup + # @!attribute [r] state_reason + # @return [::String] + # Output only. Human-readable description of why the backup is in the current + # `state`. This field is only meant for human readability and should not be + # used programmatically as this field is not guaranteed to be consistent. + # @!attribute [r] complete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Completion time of the Backup + # @!attribute [r] resource_count + # @return [::Integer] + # Output only. The total number of Kubernetes resources included in the + # Backup. + # @!attribute [r] volume_count + # @return [::Integer] + # Output only. The total number of volume backups contained in the Backup. + # @!attribute [r] size_bytes + # @return [::Integer] + # Output only. The total size of the Backup in bytes = config backup size + + # sum(volume backup sizes) + # @!attribute [r] etag + # @return [::String] + # Output only. `etag` is used for optimistic concurrency control as a way to + # help prevent simultaneous updates of a backup from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform backup updates in order to avoid + # race conditions: An `etag` is returned in the response to `GetBackup`, + # and systems are expected to put that etag in the request to + # `UpdateBackup` or `DeleteBackup` to ensure that their change will be + # applied to the same version of the resource. + # @!attribute [rw] description + # @return [::String] + # Optional. User specified descriptive string for this Backup. + # @!attribute [r] pod_count + # @return [::Integer] + # Output only. The total number of Kubernetes Pods contained in the Backup. + # @!attribute [r] config_backup_size_bytes + # @return [::Integer] + # Output only. The size of the config backup in bytes. + # @!attribute [r] permissive_mode + # @return [::Boolean] + # Output only. If false, Backup will fail when Backup for GKE detects + # Kubernetes configuration that is non-standard or + # requires additional setup to restore. + # + # Inherited from the parent BackupPlan's + # {::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig#permissive_mode permissive_mode} + # value. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. [Output Only] Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. [Output Only] Reserved for future use. + class Backup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Information about the GKE cluster from which this Backup was created. + # @!attribute [r] cluster + # @return [::String] + # Output only. The source cluster from which this Backup was created. + # Valid formats: + # + # - `projects/*/locations/*/clusters/*` + # - `projects/*/zones/*/clusters/*` + # + # This is inherited from the parent BackupPlan's + # {::Google::Cloud::GkeBackup::V1::BackupPlan#cluster cluster} field. + # @!attribute [r] k8s_version + # @return [::String] + # Output only. The Kubernetes server version of the source cluster. + # @!attribute [r] backup_crd_versions + # @return [::Google::Protobuf::Map{::String => ::String}] + # Output only. A list of the Backup for GKE CRD versions found in the + # cluster. + # @!attribute [r] gke_version + # @return [::String] + # Output only. GKE version + # + # Note: The following fields are mutually exclusive: `gke_version`, `anthos_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] anthos_version + # @return [::String] + # Output only. Anthos version + # + # Note: The following fields are mutually exclusive: `anthos_version`, `gke_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ClusterMetadata + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # @!attribute [rw] key + # @return [::String] + # @!attribute [rw] value + # @return [::String] + class BackupCrdVersionsEntry + 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 + + # State + module State + # The Backup resource is in the process of being created. + STATE_UNSPECIFIED = 0 + + # The Backup resource has been created and the associated BackupJob + # Kubernetes resource has been injected into the source cluster. + CREATING = 1 + + # The gkebackup agent in the cluster has begun executing the backup + # operation. + IN_PROGRESS = 2 + + # The backup operation has completed successfully. + SUCCEEDED = 3 + + # The backup operation has failed. + FAILED = 4 + + # This Backup resource (and its associated artifacts) is in the process + # of being deleted. + DELETING = 5 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_channel.rb new file mode 100644 index 000000000000..73729f855d2e --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_channel.rb @@ -0,0 +1,86 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeBackup + module V1 + # A BackupChannel imposes constraints on where clusters can be backed up. + # The BackupChannel should be in the same project and region + # as the cluster being backed up. + # The backup can be created only in destination_project. + # @!attribute [rw] name + # @return [::String] + # Identifier. The fully qualified name of the BackupChannel. + # `projects/*/locations/*/backupChannels/*` + # @!attribute [rw] destination_project + # @return [::String] + # Required. Immutable. The project where Backups are allowed to be stored. + # The format is `projects/{projectId}` or `projects/{projectNumber}`. + # @!attribute [r] uid + # @return [::String] + # Output only. Server generated global unique identifier of + # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this BackupChannel resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this BackupChannel resource was last + # updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. A set of custom labels supplied by user. + # @!attribute [rw] description + # @return [::String] + # Optional. User specified descriptive string for this BackupChannel. + # @!attribute [r] etag + # @return [::String] + # Output only. `etag` is used for optimistic concurrency control as a way to + # help prevent simultaneous updates of a BackupChannel from overwriting each + # other. It is strongly suggested that systems make use of the 'etag' in the + # read-modify-write cycle to perform BackupChannel updates in order to + # avoid race conditions: An `etag` is returned in the response to + # `GetBackupChannel`, and systems are expected to put that etag in the + # request to `UpdateBackupChannel` or `DeleteBackupChannel` to + # ensure that their change will be applied to the same version of the + # resource. + # @!attribute [r] destination_project_id + # @return [::String] + # Output only. The project_id where Backups are allowed to be stored. + # Example Project ID: "my-project-id". + # This will be an OUTPUT_ONLY field to return the project_id of the + # destination project. + class BackupChannel + 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 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb new file mode 100644 index 000000000000..35c5337bd66f --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb @@ -0,0 +1,367 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeBackup + module V1 + # Defines the configuration and scheduling for a "line" of Backups. + # @!attribute [r] name + # @return [::String] + # Output only. The full name of the BackupPlan resource. + # Format: `projects/*/locations/*/backupPlans/*` + # @!attribute [r] uid + # @return [::String] + # Output only. Server generated global unique identifier of + # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this BackupPlan resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this BackupPlan resource was last + # updated. + # @!attribute [rw] description + # @return [::String] + # Optional. User specified descriptive string for this BackupPlan. + # @!attribute [rw] cluster + # @return [::String] + # Required. Immutable. The source cluster from which Backups will be created + # via this BackupPlan. Valid formats: + # + # - `projects/*/locations/*/clusters/*` + # - `projects/*/zones/*/clusters/*` + # @!attribute [rw] retention_policy + # @return [::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy] + # Optional. RetentionPolicy governs lifecycle of Backups created under this + # plan. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. A set of custom labels supplied by user. + # @!attribute [rw] backup_schedule + # @return [::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule] + # Optional. Defines a schedule for automatic Backup creation via this + # BackupPlan. + # @!attribute [r] etag + # @return [::String] + # Output only. `etag` is used for optimistic concurrency control as a way to + # help prevent simultaneous updates of a backup plan from overwriting each + # other. It is strongly suggested that systems make use of the 'etag' in the + # read-modify-write cycle to perform BackupPlan updates in order to avoid + # race conditions: An `etag` is returned in the response to `GetBackupPlan`, + # and systems are expected to put that etag in the request to + # `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change + # will be applied to the same version of the resource. + # @!attribute [rw] deactivated + # @return [::Boolean] + # Optional. This flag indicates whether this BackupPlan has been deactivated. + # Setting this field to True locks the BackupPlan such that no further + # updates will be allowed (except deletes), including the deactivated field + # itself. It also prevents any new Backups from being created via this + # BackupPlan (including scheduled Backups). + # + # Default: False + # @!attribute [rw] backup_config + # @return [::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig] + # Optional. Defines the configuration of Backups created via this BackupPlan. + # @!attribute [r] protected_pod_count + # @return [::Integer] + # Output only. The number of Kubernetes Pods backed up in the + # last successful Backup created via this BackupPlan. + # @!attribute [r] state + # @return [::Google::Cloud::GkeBackup::V1::BackupPlan::State] + # Output only. State of the BackupPlan. This State field reflects the + # various stages a BackupPlan can be in + # during the Create operation. It will be set to "DEACTIVATED" + # if the BackupPlan is deactivated on an Update + # @!attribute [r] state_reason + # @return [::String] + # Output only. Human-readable description of why BackupPlan is in the current + # `state`. This field is only meant for human readability and should not be + # used programmatically as this field is not guaranteed to be consistent. + # @!attribute [r] rpo_risk_level + # @return [::Integer] + # Output only. A number that represents the current risk level of this + # BackupPlan from RPO perspective with 1 being no risk and 5 being highest + # risk. + # @!attribute [r] rpo_risk_reason + # @return [::String] + # Output only. Human-readable description of why the BackupPlan is in the + # current rpo_risk_level and action items if any. + # @!attribute [r] backup_channel + # @return [::String] + # Output only. The fully qualified name of the BackupChannel to be used to + # create a backup. This field is set only if the cluster being backed up is + # in a different project. + # `projects/*/locations/*/backupChannels/*` + # @!attribute [r] last_successful_backup_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Completion time of the last successful Backup. This is sourced + # from a successful Backup's complete_time field. This field is added to + # maintain consistency with BackupPlanBinding to display last successful + # backup time. + class BackupPlan + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # RetentionPolicy defines a Backup retention policy for a BackupPlan. + # @!attribute [rw] backup_delete_lock_days + # @return [::Integer] + # Optional. Minimum age for Backups created via this BackupPlan (in days). + # This field MUST be an integer value between 0-90 (inclusive). + # A Backup created under this BackupPlan will NOT be deletable until it + # reaches Backup's (create_time + backup_delete_lock_days). + # Updating this field of a BackupPlan does NOT affect existing Backups + # under it. Backups created AFTER a successful update will inherit + # the new value. + # + # Default: 0 (no delete blocking) + # @!attribute [rw] backup_retain_days + # @return [::Integer] + # Optional. The default maximum age of a Backup created via this + # BackupPlan. This field MUST be an integer value >= 0 and <= 365. If + # specified, a Backup created under this BackupPlan will be automatically + # deleted after its age reaches (create_time + backup_retain_days). If not + # specified, Backups created under this BackupPlan will NOT be subject to + # automatic deletion. Updating this field does NOT affect existing Backups + # under it. Backups created AFTER a successful update will automatically + # pick up the new value. NOTE: backup_retain_days must be >= + # {::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy#backup_delete_lock_days backup_delete_lock_days}. + # If + # {::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule#cron_schedule cron_schedule} + # is defined, then this must be + # <= 360 * the creation interval. If + # {::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule#rpo_config rpo_config} is + # defined, then this must be + # <= 360 * [target_rpo_minutes][Schedule.rpo_config.target_rpo_minutes] / + # (1440minutes/day). + # + # Default: 0 (no automatic deletion) + # @!attribute [rw] locked + # @return [::Boolean] + # Optional. This flag denotes whether the retention policy of this + # BackupPlan is locked. If set to True, no further update is allowed on + # this policy, including the `locked` field itself. + # + # Default: False + class RetentionPolicy + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines scheduling parameters for automatically creating Backups + # via this BackupPlan. + # @!attribute [rw] cron_schedule + # @return [::String] + # Optional. A standard [cron](https://wikipedia.com/wiki/cron) string that + # defines a repeating schedule for creating Backups via this BackupPlan. + # This is mutually exclusive with the + # {::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule#rpo_config rpo_config} + # field since at most one schedule can be defined for a BackupPlan. If this + # is defined, then + # {::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy#backup_retain_days backup_retain_days} + # must also be defined. + # + # Default (empty): no automatic backup creation will occur. + # @!attribute [rw] paused + # @return [::Boolean] + # Optional. This flag denotes whether automatic Backup creation is paused + # for this BackupPlan. + # + # Default: False + # @!attribute [rw] rpo_config + # @return [::Google::Cloud::GkeBackup::V1::RpoConfig] + # Optional. Defines the RPO schedule configuration for this BackupPlan. + # This is mutually exclusive with the + # {::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule#cron_schedule cron_schedule} + # field since at most one schedule can be defined for a BackupPLan. If this + # is defined, then + # {::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy#backup_retain_days backup_retain_days} + # must also be defined. + # + # Default (empty): no automatic backup creation will occur. + # @!attribute [r] next_scheduled_backup_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Start time of next scheduled backup under this BackupPlan by + # either cron_schedule or rpo config. + class Schedule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # BackupConfig defines the configuration of Backups created via this + # BackupPlan. + # @!attribute [rw] all_namespaces + # @return [::Boolean] + # If True, include all namespaced resources + # + # Note: The following fields are mutually exclusive: `all_namespaces`, `selected_namespaces`, `selected_applications`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] selected_namespaces + # @return [::Google::Cloud::GkeBackup::V1::Namespaces] + # If set, include just the resources in the listed namespaces. + # + # Note: The following fields are mutually exclusive: `selected_namespaces`, `all_namespaces`, `selected_applications`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] selected_applications + # @return [::Google::Cloud::GkeBackup::V1::NamespacedNames] + # If set, include just the resources referenced by the listed + # ProtectedApplications. + # + # Note: The following fields are mutually exclusive: `selected_applications`, `all_namespaces`, `selected_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] include_volume_data + # @return [::Boolean] + # Optional. This flag specifies whether volume data should be backed up + # when PVCs are included in the scope of a Backup. + # + # Default: False + # @!attribute [rw] include_secrets + # @return [::Boolean] + # Optional. This flag specifies whether Kubernetes Secret resources should + # be included when they fall into the scope of Backups. + # + # Default: False + # @!attribute [rw] encryption_key + # @return [::Google::Cloud::GkeBackup::V1::EncryptionKey] + # Optional. This defines a customer managed encryption key that will be + # used to encrypt the "config" portion (the Kubernetes resources) of + # Backups created via this plan. + # + # Default (empty): Config backup artifacts will not be encrypted. + # @!attribute [rw] permissive_mode + # @return [::Boolean] + # Optional. If false, Backups will fail when Backup for GKE detects + # Kubernetes configuration that is non-standard or + # requires additional setup to restore. + # + # Default: False + class BackupConfig + 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 + + # State + module State + # Default first value for Enums. + STATE_UNSPECIFIED = 0 + + # Waiting for cluster state to be RUNNING. + CLUSTER_PENDING = 1 + + # The BackupPlan is in the process of being created. + PROVISIONING = 2 + + # The BackupPlan has successfully been created and is ready for Backups. + READY = 3 + + # BackupPlan creation has failed. + FAILED = 4 + + # The BackupPlan has been deactivated. + DEACTIVATED = 5 + + # The BackupPlan is in the process of being deleted. + DELETING = 6 + end + end + + # Defines RPO scheduling configuration for automatically creating + # Backups via this BackupPlan. + # @!attribute [rw] target_rpo_minutes + # @return [::Integer] + # Required. Defines the target RPO for the BackupPlan in minutes, which means + # the target maximum data loss in time that is acceptable for this + # BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400, + # i.e., 60 days. + # @!attribute [rw] exclusion_windows + # @return [::Array<::Google::Cloud::GkeBackup::V1::ExclusionWindow>] + # Optional. User specified time windows during which backup can NOT happen + # for this BackupPlan - backups should start and finish outside of any given + # exclusion window. Note: backup jobs will be scheduled to start and + # finish outside the duration of the window as much as possible, but + # running jobs will not get canceled when it runs into the window. + # All the time and date values in exclusion_windows entry in the API are in + # UTC. + # We only allow <=1 recurrence (daily or weekly) exclusion window for a + # BackupPlan while no restriction on number of single occurrence + # windows. + class RpoConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines a time window during which no backup should + # happen. All time and date are in UTC. + # @!attribute [rw] start_time + # @return [::Google::Type::TimeOfDay] + # Required. Specifies the start time of the window using time of the day in + # UTC. + # @!attribute [rw] duration + # @return [::Google::Protobuf::Duration] + # Required. Specifies duration of the window. + # Duration must be >= 5 minutes and < (target RPO - 20 minutes). + # Additional restrictions based on the recurrence type to allow some time for + # backup to happen: + # - single_occurrence_date: no restriction, but UI may warn about this when + # duration >= target RPO + # - daily window: duration < 24 hours + # - weekly window: + # - days of week includes all seven days of a week: duration < 24 hours + # - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours) + # @!attribute [rw] single_occurrence_date + # @return [::Google::Type::Date] + # No recurrence. The exclusion window occurs only once and on this + # date in UTC. + # + # Note: The following fields are mutually exclusive: `single_occurrence_date`, `daily`, `days_of_week`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] daily + # @return [::Boolean] + # The exclusion window occurs every day if set to "True". + # Specifying this field to "False" is an error. + # + # Note: The following fields are mutually exclusive: `daily`, `single_occurrence_date`, `days_of_week`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] days_of_week + # @return [::Google::Cloud::GkeBackup::V1::ExclusionWindow::DayOfWeekList] + # The exclusion window occurs on these days of each week in UTC. + # + # Note: The following fields are mutually exclusive: `days_of_week`, `single_occurrence_date`, `daily`. If a field in that set is populated, all other fields in the set will automatically be cleared. + class ExclusionWindow + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Holds repeated DaysOfWeek values as a container. + # @!attribute [rw] days_of_week + # @return [::Array<::Google::Type::DayOfWeek>] + # Optional. A list of days of week. + class DayOfWeekList + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan_binding.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan_binding.rb new file mode 100644 index 000000000000..2fb17cd58110 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan_binding.rb @@ -0,0 +1,208 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeBackup + module V1 + # A BackupPlanBinding binds a BackupPlan with a BackupChannel. + # This resource is created automatically when a BackupPlan is created using a + # BackupChannel. This also serves as a holder for cross-project fields + # that need to be displayed in the current project. + # @!attribute [rw] name + # @return [::String] + # Identifier. The fully qualified name of the BackupPlanBinding. + # `projects/*/locations/*/backupChannels/*/backupPlanBindings/*` + # @!attribute [r] uid + # @return [::String] + # Output only. Server generated global unique identifier of + # [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this binding was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this binding was created. + # @!attribute [r] backup_plan + # @return [::String] + # Output only. Immutable. The fully qualified name of the BackupPlan bound + # with the parent BackupChannel. + # `projects/*/locations/*/backupPlans/{backup_plan}` + # @!attribute [r] cluster + # @return [::String] + # Output only. Immutable. The fully qualified name of the cluster that is + # being backed up Valid formats: + # + # - `projects/*/locations/*/clusters/*` + # - `projects/*/zones/*/clusters/*` + # @!attribute [r] backup_plan_details + # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding::BackupPlanDetails] + # Output only. Contains details about the backup plan/backup. + # @!attribute [r] etag + # @return [::String] + # Output only. `etag` is used for optimistic concurrency control as a way to + # help prevent simultaneous updates of a BackupPlanBinding from overwriting + # each other. It is strongly suggested that systems make use of the 'etag' in + # the read-modify-write cycle to perform BackupPlanBinding updates in + # order to avoid race conditions: An `etag` is returned in the response to + # `GetBackupPlanBinding`, and systems are expected to put that etag in + # the request to `UpdateBackupPlanBinding` or + # `DeleteBackupPlanBinding` to ensure that their change will be applied + # to the same version of the resource. + class BackupPlanBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Contains metadata about the backup plan/backup. + # @!attribute [r] protected_pod_count + # @return [::Integer] + # Output only. The number of Kubernetes Pods backed up in the + # last successful Backup created via this BackupPlan. + # @!attribute [r] state + # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding::BackupPlanDetails::State] + # Output only. State of the BackupPlan. + # @!attribute [r] last_successful_backup_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Completion time of the last successful Backup. This is + # sourced from a successful Backup's complete_time field. + # @!attribute [r] next_scheduled_backup_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Start time of next scheduled backup under this BackupPlan by + # either cron_schedule or rpo config. This is sourced from BackupPlan. + # @!attribute [r] rpo_risk_level + # @return [::Integer] + # Output only. A number that represents the current risk level of this + # BackupPlan from RPO perspective with 1 being no risk and 5 being highest + # risk. + # @!attribute [r] last_successful_backup + # @return [::String] + # Output only. The fully qualified name of the last successful Backup + # created under this BackupPlan. + # `projects/*/locations/*/backupPlans/*/backups/*` + # @!attribute [r] backup_config_details + # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding::BackupPlanDetails::BackupConfigDetails] + # Output only. Contains details about the BackupConfig of Backups created + # via this BackupPlan. + # @!attribute [r] retention_policy_details + # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding::BackupPlanDetails::RetentionPolicyDetails] + # Output only. Contains details about the RetentionPolicy of Backups + # created via this BackupPlan. + class BackupPlanDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # BackupConfigDetails defines the configuration of Backups created via this + # BackupPlan. + # @!attribute [r] all_namespaces + # @return [::Boolean] + # Output only. If True, include all namespaced resources + # + # Note: The following fields are mutually exclusive: `all_namespaces`, `selected_namespaces`, `selected_applications`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] selected_namespaces + # @return [::Google::Cloud::GkeBackup::V1::Namespaces] + # Output only. If set, include just the resources in the listed + # namespaces. + # + # Note: The following fields are mutually exclusive: `selected_namespaces`, `all_namespaces`, `selected_applications`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] selected_applications + # @return [::Google::Cloud::GkeBackup::V1::NamespacedNames] + # Output only. If set, include just the resources referenced by the + # listed ProtectedApplications. + # + # Note: The following fields are mutually exclusive: `selected_applications`, `all_namespaces`, `selected_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [r] include_volume_data + # @return [::Boolean] + # Output only. This flag specifies whether volume data should be backed + # up when PVCs are included in the scope of a Backup. + # + # Default: False + # @!attribute [r] include_secrets + # @return [::Boolean] + # Output only. This flag specifies whether Kubernetes Secret resources + # should be included when they fall into the scope of Backups. + # + # Default: False + # @!attribute [r] encryption_key + # @return [::Google::Cloud::GkeBackup::V1::EncryptionKey] + # Output only. This defines a customer managed encryption key that will + # be used to encrypt the "config" portion (the Kubernetes resources) of + # Backups created via this plan. + # + # Default (empty): Config backup artifacts will not be encrypted. + class BackupConfigDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # RetentionPolicyDetails defines a Backup retention policy for a + # BackupPlan. + # @!attribute [rw] backup_delete_lock_days + # @return [::Integer] + # Optional. Minimum age for Backups created via this BackupPlan (in + # days). This field MUST be an integer value between 0-90 (inclusive). A + # Backup created under this BackupPlan will NOT be deletable until it + # reaches Backup's (create_time + backup_delete_lock_days). + # Updating this field of a BackupPlan does NOT affect existing Backups + # under it. Backups created AFTER a successful update will inherit + # the new value. + # + # Default: 0 (no delete blocking) + # @!attribute [rw] backup_retain_days + # @return [::Integer] + # Optional. The default maximum age of a Backup created via this + # BackupPlan. This field MUST be an integer value >= 0 and <= 365. If + # specified, a Backup created under this BackupPlan will be automatically + # deleted after its age reaches (create_time + backup_retain_days). If + # not specified, Backups created under this BackupPlan will NOT be + # subject to automatic deletion. + # Default: 0 (no automatic deletion) + class RetentionPolicyDetails + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # State + module State + # Default first value for Enums. + STATE_UNSPECIFIED = 0 + + # Waiting for cluster state to be RUNNING. + CLUSTER_PENDING = 1 + + # The BackupPlan is in the process of being created. + PROVISIONING = 2 + + # The BackupPlan has successfully been created and is ready for Backups. + READY = 3 + + # BackupPlan creation has failed. + FAILED = 4 + + # The BackupPlan has been deactivated. + DEACTIVATED = 5 + + # The BackupPlan is in the process of being deleted. + DELETING = 6 + end + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/common.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/common.rb new file mode 100644 index 000000000000..6354ff63b070 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/common.rb @@ -0,0 +1,82 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeBackup + module V1 + # A list of Kubernetes Namespaces. + # @!attribute [rw] namespaces + # @return [::Array<::String>] + # Optional. A list of Kubernetes Namespaces. + class Namespaces + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A reference to a namespaced resource in Kubernetes. + # @!attribute [rw] namespace + # @return [::String] + # Optional. The Namespace of the Kubernetes resource. + # @!attribute [rw] name + # @return [::String] + # Optional. The name of the Kubernetes resource. + class NamespacedName + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A list of namespaced Kubernetes resources. + # @!attribute [rw] namespaced_names + # @return [::Array<::Google::Cloud::GkeBackup::V1::NamespacedName>] + # Optional. A list of namespaced Kubernetes resources. + class NamespacedNames + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defined a customer managed encryption key that will be used to encrypt Backup + # artifacts. + # @!attribute [rw] gcp_kms_encryption_key + # @return [::String] + # Optional. Google Cloud KMS encryption key. Format: + # `projects/*/locations/*/keyRings/*/cryptoKeys/*` + class EncryptionKey + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Message to encapsulate VolumeType enum. + class VolumeTypeEnum + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Supported volume types. + module VolumeType + # Default + VOLUME_TYPE_UNSPECIFIED = 0 + + # Compute Engine Persistent Disk volume + GCE_PERSISTENT_DISK = 1 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb new file mode 100644 index 000000000000..6ddcfad1c13d --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb @@ -0,0 +1,1065 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeBackup + module V1 + # Represents the metadata of the 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 + # {::Google::Longrunning::Operation#error google.longrunning.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 + + # Request message for CreateBackupPlan. + # @!attribute [rw] parent + # @return [::String] + # Required. The location within which to create the BackupPlan. + # Format: `projects/*/locations/*` + # @!attribute [rw] backup_plan + # @return [::Google::Cloud::GkeBackup::V1::BackupPlan] + # Required. The BackupPlan resource object to create. + # @!attribute [rw] backup_plan_id + # @return [::String] + # Required. The client-provided short name for the BackupPlan resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of BackupPlans in this location + class CreateBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListBackupPlans. + # @!attribute [rw] parent + # @return [::String] + # Required. The location that contains the BackupPlans to list. + # Format: `projects/*/locations/*` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlans` must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Field match expression used to filter the results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field by which to sort the results. + class ListBackupPlansRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListBackupPlans. + # @!attribute [rw] backup_plans + # @return [::Array<::Google::Cloud::GkeBackup::V1::BackupPlan>] + # The list of BackupPlans matching the given criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest#page_token page_token} + # in a subsequent `ListBackupPlans` call to retrieve the next page of + # results. If this field is omitted or empty, then there are no more results + # to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupPlansResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetBackupPlan. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified BackupPlan name. + # Format: `projects/*/locations/*/backupPlans/*` + class GetBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateBackupPlan. + # @!attribute [rw] backup_plan + # @return [::Google::Cloud::GkeBackup::V1::BackupPlan] + # Required. A new version of the BackupPlan resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. This is used to specify the fields to be overwritten in the + # BackupPlan targeted for update. The values for each of these + # updated fields will be taken from the `backup_plan` provided + # with this request. Field names are relative to the root of the resource + # (e.g., `description`, `backup_config.include_volume_data`, etc.) + # If no `update_mask` is provided, all fields in `backup_plan` will be + # written to the target BackupPlan resource. + # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored + # and are not used to update the target BackupPlan. + class UpdateBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteBackupPlan. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified BackupPlan name. + # Format: `projects/*/locations/*/backupPlans/*` + # @!attribute [rw] etag + # @return [::String] + # Optional. If provided, this value must match the current value of the + # target BackupPlan's {::Google::Cloud::GkeBackup::V1::BackupPlan#etag etag} field + # or the request is rejected. + class DeleteBackupPlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateBackupChannel. + # @!attribute [rw] parent + # @return [::String] + # Required. The location within which to create the BackupChannel. + # Format: `projects/*/locations/*` + # @!attribute [rw] backup_channel + # @return [::Google::Cloud::GkeBackup::V1::BackupChannel] + # Required. The BackupChannel resource object to create. + # @!attribute [rw] backup_channel_id + # @return [::String] + # Optional. The client-provided short name for the BackupChannel resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of BackupChannels in this location + # If the user does not provide a name, a uuid will be used as the name. + class CreateBackupChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListBackupChannels. + # @!attribute [rw] parent + # @return [::String] + # Required. The location that contains the BackupChannels to list. + # Format: `projects/*/locations/*` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token} + # received from a previous `ListBackupChannels` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupChannels` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Field match expression used to filter the results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field by which to sort the results. + class ListBackupChannelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListBackupChannels. + # @!attribute [rw] backup_channels + # @return [::Array<::Google::Cloud::GkeBackup::V1::BackupChannel>] + # The list of BackupChannels matching the given criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest#page_token page_token} + # in a subsequent `ListBackupChannels` call to retrieve the next page of + # results. If this field is omitted or empty, then there are no more results + # to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupChannelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetBackupChannel. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified BackupChannel name. + # Format: `projects/*/locations/*/backupChannels/*` + class GetBackupChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateBackupChannel. + # @!attribute [rw] backup_channel + # @return [::Google::Cloud::GkeBackup::V1::BackupChannel] + # Required. A new version of the BackupChannel resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. This is used to specify the fields to be overwritten in the + # BackupChannel targeted for update. The values for each of these + # updated fields will be taken from the `backup_channel` provided + # with this request. Field names are relative to the root of the resource + # (e.g., `description`, `labels`, etc.) + # If no `update_mask` is provided, all fields in `backup_channel` will + # be written to the target BackupChannel resource. Note that + # OUTPUT_ONLY and IMMUTABLE fields in `backup_channel` are ignored and + # are not used to update the target BackupChannel. + class UpdateBackupChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteBackupChannel. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified BackupChannel name. + # Format: `projects/*/locations/*/backupChannels/*` + # @!attribute [rw] etag + # @return [::String] + # Optional. If provided, this value must match the current value of the + # target BackupChannel's {::Google::Cloud::GkeBackup::V1::BackupChannel#etag etag} + # field or the request is rejected. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any BackupPlanAssociations below this + # BackupChannel will also be deleted. Otherwise, the request will only + # succeed if the BackupChannel has no BackupPlanAssociations. + class DeleteBackupChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListBackupPlanBindings. + # @!attribute [rw] parent + # @return [::String] + # Required. The BackupChannel that contains the BackupPlanBindings to list. + # Format: `projects/*/locations/*/backupChannels/*` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token} + # received from a previous `ListBackupPlanBindings` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackupPlanBindings` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Field match expression used to filter the results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field by which to sort the results. + class ListBackupPlanBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListBackupPlanBindings. + # @!attribute [rw] backup_plan_bindings + # @return [::Array<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>] + # The list of BackupPlanBindings matching the given criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest#page_token page_token} + # in a subsequent `ListBackupPlanBindingss` call to retrieve the next page of + # results. If this field is omitted or empty, then there are no more results + # to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupPlanBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetBackupPlanBinding. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified BackupPlanBinding name. + # Format: + # `projects/*/locations/*/backupChannels/*/backupPlanBindings/*` + class GetBackupPlanBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateBackup. + # @!attribute [rw] parent + # @return [::String] + # Required. The BackupPlan within which to create the Backup. + # Format: `projects/*/locations/*/backupPlans/*` + # @!attribute [rw] backup + # @return [::Google::Cloud::GkeBackup::V1::Backup] + # Optional. The Backup resource to create. + # @!attribute [rw] backup_id + # @return [::String] + # Optional. The client-provided short name for the Backup resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of Backups in this BackupPlan + class CreateBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListBackups. + # @!attribute [rw] parent + # @return [::String] + # Required. The BackupPlan that contains the Backups to list. + # Format: `projects/*/locations/*/backupPlans/*` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token} + # received from a previous `ListBackups` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListBackups` must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Field match expression used to filter the results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field by which to sort the results. + # @!attribute [rw] return_partial_success + # @return [::Boolean] + # Optional. If set to true, the response will return partial results when + # some regions are unreachable and the unreachable field will be populated. + class ListBackupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListBackups. + # @!attribute [rw] backups + # @return [::Array<::Google::Cloud::GkeBackup::V1::Backup>] + # The list of Backups matching the given criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::GkeBackup::V1::ListBackupsRequest#page_token page_token} in a + # subsequent `ListBackups` call to retrieve the next page of results. If this + # field is omitted or empty, then there are no more results to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListBackupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetBackup. + # @!attribute [rw] name + # @return [::String] + # Required. Full name of the Backup resource. + # Format: `projects/*/locations/*/backupPlans/*/backups/*` + class GetBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateBackup. + # @!attribute [rw] backup + # @return [::Google::Cloud::GkeBackup::V1::Backup] + # Required. A new version of the Backup resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. This is used to specify the fields to be overwritten in the + # Backup targeted for update. The values for each of these + # updated fields will be taken from the `backup_plan` provided + # with this request. Field names are relative to the root of the resource. + # If no `update_mask` is provided, all fields in `backup` will be + # written to the target Backup resource. + # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored + # and are not used to update the target Backup. + class UpdateBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteBackup. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the Backup resource. + # Format: `projects/*/locations/*/backupPlans/*/backups/*` + # @!attribute [rw] etag + # @return [::String] + # Optional. If provided, this value must match the current value of the + # target Backup's {::Google::Cloud::GkeBackup::V1::Backup#etag etag} field or the + # request is rejected. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any VolumeBackups below this Backup will also be + # deleted. Otherwise, the request will only succeed if the Backup has no + # VolumeBackups. + class DeleteBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListVolumeBackups. + # @!attribute [rw] parent + # @return [::String] + # Required. The Backup that contains the VolumeBackups to list. + # Format: `projects/*/locations/*/backupPlans/*/backups/*` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token} + # received from a previous `ListVolumeBackups` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListVolumeBackups` must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Field match expression used to filter the results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field by which to sort the results. + class ListVolumeBackupsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListVolumeBackups. + # @!attribute [rw] volume_backups + # @return [::Array<::Google::Cloud::GkeBackup::V1::VolumeBackup>] + # The list of VolumeBackups matching the given criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest#page_token page_token} + # in a subsequent `ListVolumeBackups` call to retrieve the next page of + # results. If this field is omitted or empty, then there are no more results + # to return. + class ListVolumeBackupsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetVolumeBackup. + # @!attribute [rw] name + # @return [::String] + # Required. Full name of the VolumeBackup resource. + # Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*` + class GetVolumeBackupRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateRestorePlan. + # @!attribute [rw] parent + # @return [::String] + # Required. The location within which to create the RestorePlan. + # Format: `projects/*/locations/*` + # @!attribute [rw] restore_plan + # @return [::Google::Cloud::GkeBackup::V1::RestorePlan] + # Required. The RestorePlan resource object to create. + # @!attribute [rw] restore_plan_id + # @return [::String] + # Required. The client-provided short name for the RestorePlan resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of RestorePlans in this location + class CreateRestorePlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRestorePlans. + # @!attribute [rw] parent + # @return [::String] + # Required. The location that contains the RestorePlans to list. + # Format: `projects/*/locations/*` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token} + # received from a previous `ListRestorePlans` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListRestorePlans` must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Field match expression used to filter the results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field by which to sort the results. + class ListRestorePlansRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRestorePlans. + # @!attribute [rw] restore_plans + # @return [::Array<::Google::Cloud::GkeBackup::V1::RestorePlan>] + # The list of RestorePlans matching the given criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest#page_token page_token} + # in a subsequent `ListRestorePlans` call to retrieve the next page of + # results. If this field is omitted or empty, then there are no more results + # to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListRestorePlansResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetRestorePlan. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified RestorePlan name. + # Format: `projects/*/locations/*/restorePlans/*` + class GetRestorePlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateRestorePlan. + # @!attribute [rw] restore_plan + # @return [::Google::Cloud::GkeBackup::V1::RestorePlan] + # Required. A new version of the RestorePlan resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. This is used to specify the fields to be overwritten in the + # RestorePlan targeted for update. The values for each of these + # updated fields will be taken from the `restore_plan` provided + # with this request. Field names are relative to the root of the resource. + # If no `update_mask` is provided, all fields in `restore_plan` will be + # written to the target RestorePlan resource. + # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored + # and are not used to update the target RestorePlan. + class UpdateRestorePlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteRestorePlan. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified RestorePlan name. + # Format: `projects/*/locations/*/restorePlans/*` + # @!attribute [rw] etag + # @return [::String] + # Optional. If provided, this value must match the current value of the + # target RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#etag etag} + # field or the request is rejected. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any Restores below this RestorePlan will also be + # deleted. Otherwise, the request will only succeed if the RestorePlan has no + # Restores. + class DeleteRestorePlanRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateRestoreChannel. + # @!attribute [rw] parent + # @return [::String] + # Required. The location within which to create the RestoreChannel. + # Format: `projects/*/locations/*` + # @!attribute [rw] restore_channel + # @return [::Google::Cloud::GkeBackup::V1::RestoreChannel] + # Required. The RestoreChannel resource object to create. + # @!attribute [rw] restore_channel_id + # @return [::String] + # Optional. The client-provided short name for the RestoreChannel resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of RestoreChannels in this location + # If the user does not provide a name, a uuid will be used as the name. + class CreateRestoreChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRestoreChannels. + # @!attribute [rw] parent + # @return [::String] + # Required. The location that contains the RestoreChannels to list. + # Format: `projects/*/locations/*` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token} + # received from a previous `ListRestoreChannels` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListRestoreChannels` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Field match expression used to filter the results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field by which to sort the results. + class ListRestoreChannelsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRestoreChannels. + # @!attribute [rw] restore_channels + # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreChannel>] + # The list of RestoreChannels matching the given criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest#page_token page_token} + # in a subsequent `ListRestoreChannels` call to retrieve the next page of + # results. If this field is omitted or empty, then there are no more results + # to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListRestoreChannelsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetRestoreChannel. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified RestoreChannel name. + # Format: `projects/*/locations/*/restoreChannels/*` + class GetRestoreChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateRestoreChannel. + # @!attribute [rw] restore_channel + # @return [::Google::Cloud::GkeBackup::V1::RestoreChannel] + # Required. A new version of the RestoreChannel resource that contains + # updated fields. This may be sparsely populated if an `update_mask` is + # provided. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. This is used to specify the fields to be overwritten in the + # RestoreChannel targeted for update. The values for each of these + # updated fields will be taken from the `restore_channel` provided + # with this request. Field names are relative to the root of the resource + # (e.g., `description`, `destination_project_id`, etc.) + # If no `update_mask` is provided, all fields in `restore_channel` will + # be written to the target RestoreChannel resource. Note that + # OUTPUT_ONLY and IMMUTABLE fields in `restore_channel` are ignored and + # are not used to update the target RestoreChannel. + class UpdateRestoreChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteRestoreChannel. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified RestoreChannel name. + # Format: `projects/*/locations/*/restoreChannels/*` + # @!attribute [rw] etag + # @return [::String] + # Optional. If provided, this value must match the current value of the + # target RestoreChannel's + # {::Google::Cloud::GkeBackup::V1::RestoreChannel#etag etag} field or the request + # is rejected. + class DeleteRestoreChannelRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRestorePlanBindings. + # @!attribute [rw] parent + # @return [::String] + # Required. The RestoreChannel that contains the ListRestorePlanBindings to + # list. Format: `projects/*/locations/*/restoreChannels/*` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token} + # received from a previous `ListRestorePlanBindings` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListRestorePlanBindings` must match the call that provided the page + # token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Field match expression used to filter the results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field by which to sort the results. + class ListRestorePlanBindingsRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRestorePlanBindings. + # @!attribute [rw] restore_plan_bindings + # @return [::Array<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>] + # The list of RestorePlanBindings matching the given criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest#page_token page_token} + # in a subsequent `ListRestorePlanBindings` call to retrieve the next page of + # results. If this field is omitted or empty, then there are no more results + # to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Unordered list. Locations that could not be reached. + class ListRestorePlanBindingsResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetRestorePlanBinding. + # @!attribute [rw] name + # @return [::String] + # Required. Fully qualified RestorePlanBinding name. + # Format: + # `projects/*/locations/*/restoreChannels/*/restorePlanBindings/*` + class GetRestorePlanBindingRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for CreateRestore. + # @!attribute [rw] parent + # @return [::String] + # Required. The RestorePlan within which to create the Restore. + # Format: `projects/*/locations/*/restorePlans/*` + # @!attribute [rw] restore + # @return [::Google::Cloud::GkeBackup::V1::Restore] + # Required. The restore resource to create. + # @!attribute [rw] restore_id + # @return [::String] + # Required. The client-provided short name for the Restore resource. + # This name must: + # + # - be between 1 and 63 characters long (inclusive) + # - consist of only lower-case ASCII letters, numbers, and dashes + # - start with a lower-case letter + # - end with a lower-case letter or number + # - be unique within the set of Restores in this RestorePlan. + class CreateRestoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListRestores. + # @!attribute [rw] parent + # @return [::String] + # Required. The RestorePlan that contains the Restores to list. + # Format: `projects/*/locations/*/restorePlans/*` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token} + # received from a previous `ListRestores` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to `ListRestores` + # must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Field match expression used to filter the results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field by which to sort the results. + class ListRestoresRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListRestores. + # @!attribute [rw] restores + # @return [::Array<::Google::Cloud::GkeBackup::V1::Restore>] + # The list of Restores matching the given criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::GkeBackup::V1::ListRestoresRequest#page_token page_token} in a + # subsequent `ListRestores` call to retrieve the next page of results. If + # this field is omitted or empty, then there are no more results to return. + # @!attribute [rw] unreachable + # @return [::Array<::String>] + # Locations that could not be reached. + class ListRestoresResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetRestore. + # @!attribute [rw] name + # @return [::String] + # Required. Name of the restore resource. + # Format: `projects/*/locations/*/restorePlans/*/restores/*` + class GetRestoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for UpdateRestore. + # @!attribute [rw] restore + # @return [::Google::Cloud::GkeBackup::V1::Restore] + # Required. A new version of the Restore resource that contains updated + # fields. This may be sparsely populated if an `update_mask` is provided. + # @!attribute [rw] update_mask + # @return [::Google::Protobuf::FieldMask] + # Optional. This is used to specify the fields to be overwritten in the + # Restore targeted for update. The values for each of these + # updated fields will be taken from the `restore` provided + # with this request. Field names are relative to the root of the resource. + # If no `update_mask` is provided, all fields in `restore` will be + # written to the target Restore resource. + # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored + # and are not used to update the target Restore. + class UpdateRestoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for DeleteRestore. + # @!attribute [rw] name + # @return [::String] + # Required. Full name of the Restore + # Format: `projects/*/locations/*/restorePlans/*/restores/*` + # @!attribute [rw] etag + # @return [::String] + # Optional. If provided, this value must match the current value of the + # target Restore's {::Google::Cloud::GkeBackup::V1::Restore#etag etag} field or + # the request is rejected. + # @!attribute [rw] force + # @return [::Boolean] + # Optional. If set to true, any VolumeRestores below this restore will also + # be deleted. Otherwise, the request will only succeed if the restore has no + # VolumeRestores. + class DeleteRestoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for ListVolumeRestores. + # @!attribute [rw] parent + # @return [::String] + # Required. The Restore that contains the VolumeRestores to list. + # Format: `projects/*/locations/*/restorePlans/*/restores/*` + # @!attribute [rw] page_size + # @return [::Integer] + # Optional. The target number of results to return in a single response. + # If not specified, a default value will be chosen by the service. + # Note that the response may include a partial list and a caller should + # only rely on the response's + # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token} + # to determine if there are more instances left to be queried. + # @!attribute [rw] page_token + # @return [::String] + # Optional. The value of + # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token} + # received from a previous `ListVolumeRestores` call. + # Provide this to retrieve the subsequent page in a multi-page list of + # results. When paginating, all other parameters provided to + # `ListVolumeRestores` must match the call that provided the page token. + # @!attribute [rw] filter + # @return [::String] + # Optional. Field match expression used to filter the results. + # @!attribute [rw] order_by + # @return [::String] + # Optional. Field by which to sort the results. + class ListVolumeRestoresRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for ListVolumeRestores. + # @!attribute [rw] volume_restores + # @return [::Array<::Google::Cloud::GkeBackup::V1::VolumeRestore>] + # The list of VolumeRestores matching the given criteria. + # @!attribute [rw] next_page_token + # @return [::String] + # A token which may be sent as + # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest#page_token page_token} + # in a subsequent `ListVolumeRestores` call to retrieve the next page of + # results. If this field is omitted or empty, then there are no more results + # to return. + class ListVolumeRestoresResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetVolumeRestore. + # @!attribute [rw] name + # @return [::String] + # Required. Full name of the VolumeRestore resource. + # Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` + class GetVolumeRestoreRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Request message for GetBackupIndexDownloadUrl. + # @!attribute [rw] backup + # @return [::String] + # Required. Full name of Backup resource. + # Format: + # projects/\\{project}/locations/\\{location}/backupPlans/\\{backup_plan}/backups/\\{backup} + class GetBackupIndexDownloadUrlRequest + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Response message for GetBackupIndexDownloadUrl. + # @!attribute [rw] signed_url + # @return [::String] + # Required. The signed URL for downloading the backup index. + class GetBackupIndexDownloadUrlResponse + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore.rb new file mode 100644 index 000000000000..15fe4ce0fde9 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore.rb @@ -0,0 +1,680 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeBackup + module V1 + # Represents both a request to Restore some portion of a Backup into + # a target GKE cluster and a record of the restore operation itself. + # @!attribute [r] name + # @return [::String] + # Output only. The full name of the Restore resource. + # Format: `projects/*/locations/*/restorePlans/*/restores/*` + # @!attribute [r] uid + # @return [::String] + # Output only. Server generated global unique identifier of + # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this Restore resource was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this Restore resource was last + # updated. + # @!attribute [rw] description + # @return [::String] + # Optional. User specified descriptive string for this Restore. + # @!attribute [rw] backup + # @return [::String] + # Required. Immutable. A reference to the + # {::Google::Cloud::GkeBackup::V1::Backup Backup} used as the source from which + # this Restore will restore. Note that this Backup must be a sub-resource of + # the RestorePlan's + # {::Google::Cloud::GkeBackup::V1::RestorePlan#backup_plan backup_plan}. Format: + # `projects/*/locations/*/backupPlans/*/backups/*`. + # @!attribute [r] cluster + # @return [::String] + # Output only. The target cluster into which this Restore will restore data. + # Valid formats: + # + # - `projects/*/locations/*/clusters/*` + # - `projects/*/zones/*/clusters/*` + # + # Inherited from parent RestorePlan's + # {::Google::Cloud::GkeBackup::V1::RestorePlan#cluster cluster} value. + # @!attribute [r] restore_config + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig] + # Output only. Configuration of the Restore. Inherited from parent + # RestorePlan's + # {::Google::Cloud::GkeBackup::V1::RestorePlan#restore_config restore_config}. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # A set of custom labels supplied by user. + # @!attribute [r] state + # @return [::Google::Cloud::GkeBackup::V1::Restore::State] + # Output only. The current state of the Restore. + # @!attribute [r] state_reason + # @return [::String] + # Output only. Human-readable description of why the Restore is in its + # current state. This field is only meant for human readability and should + # not be used programmatically as this field is not guaranteed to be + # consistent. + # @!attribute [r] complete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. Timestamp of when the restore operation completed. + # @!attribute [r] resources_restored_count + # @return [::Integer] + # Output only. Number of resources restored during the restore execution. + # @!attribute [r] resources_excluded_count + # @return [::Integer] + # Output only. Number of resources excluded during the restore execution. + # @!attribute [r] resources_failed_count + # @return [::Integer] + # Output only. Number of resources that failed to be restored during the + # restore execution. + # @!attribute [r] volumes_restored_count + # @return [::Integer] + # Output only. Number of volumes restored during the restore execution. + # @!attribute [r] etag + # @return [::String] + # Output only. `etag` is used for optimistic concurrency control as a way to + # help prevent simultaneous updates of a restore from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform restore updates in order to avoid + # race conditions: An `etag` is returned in the response to `GetRestore`, + # and systems are expected to put that etag in the request to + # `UpdateRestore` or `DeleteRestore` to ensure that their change will be + # applied to the same version of the resource. + # @!attribute [rw] filter + # @return [::Google::Cloud::GkeBackup::V1::Restore::Filter] + # Optional. Immutable. Filters resources for `Restore`. If not specified, the + # scope of the restore will remain the same as defined in the `RestorePlan`. + # If this is specified and no resources are matched by the + # `inclusion_filters` or everything is excluded by the `exclusion_filters`, + # nothing will be restored. This filter can only be specified if the value of + # {::Google::Cloud::GkeBackup::V1::RestoreConfig#namespaced_resource_restore_mode namespaced_resource_restore_mode} + # is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or + # `MERGE_REPLACE_ON_CONFLICT`. + # @!attribute [rw] volume_data_restore_policy_overrides + # @return [::Array<::Google::Cloud::GkeBackup::V1::VolumeDataRestorePolicyOverride>] + # Optional. Immutable. Overrides the volume data restore policies selected in + # the Restore Config for override-scoped resources. + class Restore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines the filter for `Restore`. This filter can be used to further + # refine the resource selection of the `Restore` beyond the coarse-grained + # scope defined in the `RestorePlan`. `exclusion_filters` take precedence + # over `inclusion_filters`. If a resource matches both `inclusion_filters` + # and `exclusion_filters`, it will not be restored. + # @!attribute [rw] inclusion_filters + # @return [::Array<::Google::Cloud::GkeBackup::V1::ResourceSelector>] + # Optional. Selects resources for restoration. If specified, only resources + # which match `inclusion_filters` will be selected for restoration. A + # resource will be selected if it matches any `ResourceSelector` of the + # `inclusion_filters`. + # @!attribute [rw] exclusion_filters + # @return [::Array<::Google::Cloud::GkeBackup::V1::ResourceSelector>] + # Optional. Excludes resources from restoration. If specified, + # a resource will not be restored if it matches + # any `ResourceSelector` of the `exclusion_filters`. + class Filter + 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 + + # Possible values for state of the Restore. + module State + # The Restore resource is in the process of being created. + STATE_UNSPECIFIED = 0 + + # The Restore resource has been created and the associated RestoreJob + # Kubernetes resource has been injected into target cluster. + CREATING = 1 + + # The gkebackup agent in the cluster has begun executing the restore + # operation. + IN_PROGRESS = 2 + + # The restore operation has completed successfully. Restored workloads may + # not yet be operational. + SUCCEEDED = 3 + + # The restore operation has failed. + FAILED = 4 + + # This Restore resource is in the process of being deleted. + DELETING = 5 + + # The Kubernetes resources created by this Restore are being + # validated. + VALIDATING = 6 + end + end + + # Configuration of a restore. + # @!attribute [rw] volume_data_restore_policy + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] + # Optional. Specifies the mechanism to be used to restore volume data. + # Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as + # NO_VOLUME_DATA_RESTORATION). + # @!attribute [rw] cluster_resource_conflict_policy + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ClusterResourceConflictPolicy] + # Optional. Defines the behavior for handling the situation where + # cluster-scoped resources being restored already exist in the target + # cluster. This MUST be set to a value other than + # CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if + # {::Google::Cloud::GkeBackup::V1::RestoreConfig#cluster_resource_restore_scope cluster_resource_restore_scope} + # is not empty. + # @!attribute [rw] namespaced_resource_restore_mode + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::NamespacedResourceRestoreMode] + # Optional. Defines the behavior for handling the situation where sets of + # namespaced resources being restored already exist in the target cluster. + # This MUST be set to a value other than + # NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. + # @!attribute [rw] cluster_resource_restore_scope + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ClusterResourceRestoreScope] + # Optional. Identifies the cluster-scoped resources to restore from the + # Backup. Not specifying it means NO cluster resource will be restored. + # @!attribute [rw] all_namespaces + # @return [::Boolean] + # Restore all namespaced resources in the Backup if set to "True". + # Specifying this field to "False" is an error. + # + # Note: The following fields are mutually exclusive: `all_namespaces`, `selected_namespaces`, `selected_applications`, `no_namespaces`, `excluded_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] selected_namespaces + # @return [::Google::Cloud::GkeBackup::V1::Namespaces] + # A list of selected Namespaces to restore from the Backup. The listed + # Namespaces and all resources contained in them will be restored. + # + # Note: The following fields are mutually exclusive: `selected_namespaces`, `all_namespaces`, `selected_applications`, `no_namespaces`, `excluded_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] selected_applications + # @return [::Google::Cloud::GkeBackup::V1::NamespacedNames] + # A list of selected ProtectedApplications to restore. The listed + # ProtectedApplications and all the resources to which they refer will be + # restored. + # + # Note: The following fields are mutually exclusive: `selected_applications`, `all_namespaces`, `selected_namespaces`, `no_namespaces`, `excluded_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] no_namespaces + # @return [::Boolean] + # Do not restore any namespaced resources if set to "True". + # Specifying this field to "False" is not allowed. + # + # Note: The following fields are mutually exclusive: `no_namespaces`, `all_namespaces`, `selected_namespaces`, `selected_applications`, `excluded_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] excluded_namespaces + # @return [::Google::Cloud::GkeBackup::V1::Namespaces] + # A list of selected namespaces excluded from restoration. All + # namespaces except those in this list will be restored. + # + # Note: The following fields are mutually exclusive: `excluded_namespaces`, `all_namespaces`, `selected_namespaces`, `selected_applications`, `no_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. + # @!attribute [rw] substitution_rules + # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::SubstitutionRule>] + # Optional. A list of transformation rules to be applied against Kubernetes + # resources as they are selected for restoration from a Backup. Rules are + # executed in order defined - this order matters, as changes made by a rule + # may impact the filtering logic of subsequent rules. An empty list means no + # substitution will occur. + # @!attribute [rw] transformation_rules + # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRule>] + # Optional. A list of transformation rules to be applied against Kubernetes + # resources as they are selected for restoration from a Backup. Rules are + # executed in order defined - this order matters, as changes made by a rule + # may impact the filtering logic of subsequent rules. An empty list means no + # transformation will occur. + # @!attribute [rw] volume_data_restore_policy_bindings + # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicyBinding>] + # Optional. A table that binds volumes by their scope to a restore policy. + # Bindings must have a unique scope. Any volumes not scoped in the bindings + # are subject to the policy defined in volume_data_restore_policy. + # @!attribute [rw] restore_order + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder] + # Optional. RestoreOrder contains custom ordering to use on a Restore. + class RestoreConfig + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # This is a direct map to the Kubernetes GroupKind type + # [GroupKind](https://godoc.org/k8s.io/apimachinery/pkg/runtime/schema#GroupKind) + # and is used for identifying specific "types" of resources to restore. + # @!attribute [rw] resource_group + # @return [::String] + # Optional. API group string of a Kubernetes resource, e.g. + # "apiextensions.k8s.io", "storage.k8s.io", etc. + # Note: use empty string for core API group. + # @!attribute [rw] resource_kind + # @return [::String] + # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase + # (PascalCase) and singular form. E.g. "CustomResourceDefinition", + # "StorageClass", etc. + class GroupKind + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Defines the scope of cluster-scoped resources to restore. + # + # Some group kinds are not reasonable choices for a restore, and will cause + # an error if selected here. Any scope selection that would restore + # "all valid" resources automatically excludes these group kinds. + # - Node + # - ComponentStatus + # - gkebackup.gke.io/BackupJob + # - gkebackup.gke.io/RestoreJob + # - metrics.k8s.io/NodeMetrics + # - migration.k8s.io/StorageState + # - migration.k8s.io/StorageVersionMigration + # - snapshot.storage.k8s.io/VolumeSnapshotContent + # - storage.k8s.io/CSINode + # - storage.k8s.io/VolumeAttachment + # + # Some group kinds are driven by restore configuration elsewhere, + # and will cause an error if selected here. + # - Namespace + # - PersistentVolume + # @!attribute [rw] selected_group_kinds + # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] + # Optional. A list of cluster-scoped resource group kinds to restore from + # the backup. If specified, only the selected resources will be restored. + # Mutually exclusive to any other field in the message. + # @!attribute [rw] excluded_group_kinds + # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] + # Optional. A list of cluster-scoped resource group kinds to NOT restore + # from the backup. If specified, all valid cluster-scoped resources will be + # restored except for those specified in the list. + # Mutually exclusive to any other field in the message. + # @!attribute [rw] all_group_kinds + # @return [::Boolean] + # Optional. If True, all valid cluster-scoped resources will be restored. + # Mutually exclusive to any other field in the message. + # @!attribute [rw] no_group_kinds + # @return [::Boolean] + # Optional. If True, no cluster-scoped resources will be restored. + # This has the same restore scope as if the message is not defined. + # Mutually exclusive to any other field in the message. + class ClusterResourceRestoreScope + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A transformation rule to be applied against Kubernetes resources as they + # are selected for restoration from a Backup. A rule contains both filtering + # logic (which resources are subject to substitution) and substitution logic. + # @!attribute [rw] target_namespaces + # @return [::Array<::String>] + # Optional. (Filtering parameter) Any resource subject to substitution must + # be contained within one of the listed Kubernetes Namespace in the Backup. + # If this field is not provided, no namespace filtering will be performed + # (all resources in all Namespaces, including all cluster-scoped resources, + # will be candidates for substitution). + # To mix cluster-scoped and namespaced resources in the same rule, use an + # empty string ("") as one of the target namespaces. + # @!attribute [rw] target_group_kinds + # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] + # Optional. (Filtering parameter) Any resource subject to substitution must + # belong to one of the listed "types". If this field is not provided, no + # type filtering will be performed (all resources of all types matching + # previous filtering parameters will be candidates for substitution). + # @!attribute [rw] target_json_path + # @return [::String] + # Required. This is a [JSONPath] + # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) + # expression that matches specific fields of candidate + # resources and it operates as both a filtering parameter (resources that + # are not matched with this expression will not be candidates for + # substitution) as well as a field identifier (identifies exactly which + # fields out of the candidate resources will be modified). + # @!attribute [rw] original_value_pattern + # @return [::String] + # Optional. (Filtering parameter) This is a [regular expression] + # (https://en.wikipedia.org/wiki/Regular_expression) + # that is compared against the fields matched by the target_json_path + # expression (and must also have passed the previous filters). + # Substitution will not be performed against fields whose + # value does not match this expression. If this field is NOT specified, + # then ALL fields matched by the target_json_path expression will undergo + # substitution. Note that an empty (e.g., "", rather than unspecified) + # value for this field will only match empty fields. + # @!attribute [rw] new_value + # @return [::String] + # Optional. This is the new value to set for any fields that pass the + # filtering and selection criteria. To remove a value from a Kubernetes + # resource, either leave this field unspecified, or set it to the empty + # string (""). + class SubstitutionRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # TransformationRuleAction defines a TransformationRule action based on the + # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) + # @!attribute [rw] op + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] + # Required. op specifies the operation to perform. + # @!attribute [rw] from_path + # @return [::String] + # Optional. A string containing a JSON Pointer value that references the + # location in the target document to move the value from. + # @!attribute [rw] path + # @return [::String] + # Optional. A string containing a JSON-Pointer value that references a + # location within the target document where the operation is performed. + # @!attribute [rw] value + # @return [::String] + # Optional. A string that specifies the desired value in string format to + # use for transformation. + class TransformationRuleAction + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Possible values for operations of a transformation rule action. + module Op + # Unspecified operation + OP_UNSPECIFIED = 0 + + # The "remove" operation removes the value at the target location. + REMOVE = 1 + + # The "move" operation removes the value at a specified location and + # adds it to the target location. + MOVE = 2 + + # The "copy" operation copies the value at a specified location to the + # target location. + COPY = 3 + + # The "add" operation performs one of the following functions, + # depending upon what the target location references: + # 1. If the target location specifies an array index, a new value is + # inserted into the array at the specified index. + # 2. If the target location specifies an object member that does not + # already exist, a new member is added to the object. + # 3. If the target location specifies an object member that does exist, + # that member's value is replaced. + ADD = 4 + + # The "test" operation tests that a value at the target location is + # equal to a specified value. + TEST = 5 + + # The "replace" operation replaces the value at the target location + # with a new value. The operation object MUST contain a "value" member + # whose content specifies the replacement value. + REPLACE = 6 + end + end + + # ResourceFilter specifies matching criteria to limit the scope of a + # change to a specific set of kubernetes resources that are selected for + # restoration from a backup. + # @!attribute [rw] namespaces + # @return [::Array<::String>] + # Optional. (Filtering parameter) Any resource subject to transformation + # must be contained within one of the listed Kubernetes Namespace in the + # Backup. If this field is not provided, no namespace filtering will be + # performed (all resources in all Namespaces, including all cluster-scoped + # resources, will be candidates for transformation). + # @!attribute [rw] group_kinds + # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] + # Optional. (Filtering parameter) Any resource subject to transformation + # must belong to one of the listed "types". If this field is not provided, + # no type filtering will be performed (all resources of all types matching + # previous filtering parameters will be candidates for transformation). + # @!attribute [rw] json_path + # @return [::String] + # Optional. This is a [JSONPath] + # (https://github.com/json-path/JsonPath/blob/master/README.md) + # expression that matches specific fields of candidate + # resources and it operates as a filtering parameter (resources that + # are not matched with this expression will not be candidates for + # transformation). + class ResourceFilter + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # A transformation rule to be applied against Kubernetes resources as they + # are selected for restoration from a Backup. A rule contains both filtering + # logic (which resources are subject to transform) and transformation logic. + # @!attribute [rw] field_actions + # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] + # Required. A list of transformation rule actions to take against candidate + # resources. Actions are executed in order defined - this order matters, as + # they could potentially interfere with each other and the first operation + # could affect the outcome of the second operation. + # @!attribute [rw] resource_filter + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] + # Optional. This field is used to specify a set of fields that should be + # used to determine which resources in backup should be acted upon by the + # supplied transformation rule actions, and this will ensure that only + # specific resources are affected by transformation rule actions. + # @!attribute [rw] description + # @return [::String] + # Optional. The description is a user specified string description of the + # transformation rule. + class TransformationRule + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Binds resources in the scope to the given VolumeDataRestorePolicy. + # @!attribute [rw] policy + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] + # Required. The VolumeDataRestorePolicy to apply when restoring volumes in + # scope. + # @!attribute [rw] volume_type + # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] + # The volume type, as determined by the PVC's bound PV, + # to apply the policy to. + class VolumeDataRestorePolicyBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + + # Allows customers to specify dependencies between resources + # that Backup for GKE can use to compute a resasonable restore order. + # @!attribute [rw] group_kind_dependencies + # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] + # Optional. Contains a list of group kind dependency pairs provided + # by the customer, that is used by Backup for GKE to + # generate a group kind restore order. + class RestoreOrder + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Defines a dependency between two group kinds. + # @!attribute [rw] satisfying + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] + # Required. The satisfying group kind must be restored first + # in order to satisfy the dependency. + # @!attribute [rw] requiring + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] + # Required. The requiring group kind requires that the other + # group kind be restored first. + class GroupKindDependency + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + + # Defines how volume data should be restored. + module VolumeDataRestorePolicy + # Unspecified (illegal). + VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 + + # For each PVC to be restored, create a new underlying volume and PV + # from the corresponding VolumeBackup contained within the Backup. + RESTORE_VOLUME_DATA_FROM_BACKUP = 1 + + # For each PVC to be restored, attempt to reuse the original PV contained + # in the Backup (with its original underlying volume). This option + # is likely only usable when restoring a workload to its original cluster. + REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 + + # For each PVC to be restored, create PVC without any particular + # action to restore data. In this case, the normal Kubernetes provisioning + # logic would kick in, and this would likely result in either dynamically + # provisioning blank PVs or binding to statically provisioned PVs. + NO_VOLUME_DATA_RESTORATION = 3 + end + + # Defines the behavior for handling the situation where cluster-scoped + # resources being restored already exist in the target cluster. + module ClusterResourceConflictPolicy + # Unspecified. Only allowed if no cluster-scoped resources will be + # restored. + CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 + + # Do not attempt to restore the conflicting resource. + USE_EXISTING_VERSION = 1 + + # Delete the existing version before re-creating it from the Backup. + # This is a dangerous option which could cause unintentional + # data loss if used inappropriately. For example, deleting a CRD will + # cause Kubernetes to delete all CRs of that type. + USE_BACKUP_VERSION = 2 + end + + # Defines the behavior for handling the situation where sets of namespaced + # resources being restored already exist in the target cluster. + module NamespacedResourceRestoreMode + # Unspecified (invalid). + NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 + + # When conflicting top-level resources (either Namespaces or + # ProtectedApplications, depending upon the scope) are encountered, this + # will first trigger a delete of the conflicting resource AND ALL OF ITS + # REFERENCED RESOURCES (e.g., all resources in the Namespace or all + # resources referenced by the ProtectedApplication) before restoring the + # resources from the Backup. This mode should only be used when you are + # intending to revert some portion of a cluster to an earlier state. + DELETE_AND_RESTORE = 1 + + # If conflicting top-level resources (either Namespaces or + # ProtectedApplications, depending upon the scope) are encountered at the + # beginning of a restore process, the Restore will fail. If a conflict + # occurs during the restore process itself (e.g., because an out of band + # process creates conflicting resources), a conflict will be reported. + FAIL_ON_CONFLICT = 2 + + # This mode merges the backup and the target cluster and skips the + # conflicting resources. If a single resource to restore exists in the + # cluster before restoration, the resource will be skipped, otherwise it + # will be restored. + MERGE_SKIP_ON_CONFLICT = 3 + + # This mode merges the backup and the target cluster and skips the + # conflicting resources except volume data. If a PVC to restore already + # exists, this mode will restore/reconnect the volume without overwriting + # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will + # apply the volume data policy for the conflicting PVCs: + # - RESTORE_VOLUME_DATA_FROM_BACKUP: restore data only and respect the + # reclaim policy of the original PV; + # - REUSE_VOLUME_HANDLE_FROM_BACKUP: reconnect and respect the reclaim + # policy of the original PV; + # - NO_VOLUME_DATA_RESTORATION: new provision and respect the reclaim + # policy of the original PV. + # Note that this mode could cause data loss as the original PV can be + # retained or deleted depending on its reclaim policy. + MERGE_REPLACE_VOLUME_ON_CONFLICT = 4 + + # This mode merges the backup and the target cluster and replaces the + # conflicting resources with the ones in the backup. If a single resource + # to restore exists in the cluster before restoration, the resource will be + # replaced with the one from the backup. To replace an existing resource, + # the first attempt is to update the resource to match the one from the + # backup; if the update fails, the second attempt is to delete the resource + # and restore it from the backup. + # Note that this mode could cause data loss as it replaces the existing + # resources in the target cluster, and the original PV can be retained or + # deleted depending on its reclaim policy. + MERGE_REPLACE_ON_CONFLICT = 5 + end + end + + # Defines a selector to identify a single or a group of resources. + # Conditions in the selector are optional, but at least one field + # should be set to a non-empty value. If a condition is not specified, + # no restrictions will be applied on that dimension. + # If more than one condition is specified, a resource will be selected + # if and only if all conditions are met. + # @!attribute [rw] group_kind + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] + # Optional. Selects resources using their Kubernetes GroupKinds. If + # specified, only resources of provided GroupKind will be selected. + # @!attribute [rw] name + # @return [::String] + # Optional. Selects resources using their resource names. If specified, + # only resources with the provided name will be selected. + # @!attribute [rw] namespace + # @return [::String] + # Optional. Selects resources using their namespaces. This only applies to + # namespace scoped resources and cannot be used for selecting + # cluster scoped resources. If specified, only resources in the provided + # namespace will be selected. If not specified, the filter will apply to + # both cluster scoped and namespace scoped resources (e.g. name or label). + # The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource + # itself will be restored if and only if any resources within the namespace + # are restored. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. Selects resources using Kubernetes + # [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). + # If specified, a resource will be selected if and only if the resource + # has all of the provided labels and all the label values match. + class ResourceSelector + 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 + + # Defines an override to apply a VolumeDataRestorePolicy for scoped resources. + # @!attribute [rw] policy + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] + # Required. The VolumeDataRestorePolicy to apply when restoring volumes in + # scope. + # @!attribute [rw] selected_pvcs + # @return [::Google::Cloud::GkeBackup::V1::NamespacedNames] + # A list of PVCs to apply the policy override to. + class VolumeDataRestorePolicyOverride + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_channel.rb new file mode 100644 index 000000000000..7478087e3aaa --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_channel.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 Cloud + module GkeBackup + module V1 + # A RestoreChannel imposes constraints on where backups can be restored. + # The RestoreChannel should be in the same project and region + # as the backups. The backups can only be restored in the + # `destination_project`. + # @!attribute [rw] name + # @return [::String] + # Identifier. The fully qualified name of the RestoreChannel. + # `projects/*/locations/*/restoreChannels/*` + # @!attribute [rw] destination_project + # @return [::String] + # Required. Immutable. The project into which the backups will be restored. + # The format is `projects/{projectId}` or `projects/{projectNumber}`. + # @!attribute [r] uid + # @return [::String] + # Output only. Server generated global unique identifier of + # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this RestoreChannel was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this RestoreChannel was last updated. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. A set of custom labels supplied by user. + # @!attribute [rw] description + # @return [::String] + # Optional. User specified descriptive string for this RestoreChannel. + # @!attribute [r] etag + # @return [::String] + # Output only. `etag` is used for optimistic concurrency control as a way to + # help prevent simultaneous updates of a RestoreChannel from overwriting each + # other. It is strongly suggested that systems make use of the 'etag' in the + # read-modify-write cycle to perform RestoreChannel updates in order to + # avoid race conditions: An `etag` is returned in the response to + # `GetRestoreChannel`, and systems are expected to put that etag in the + # request to `UpdateRestoreChannel` or `DeleteRestoreChannel` to + # ensure that their change will be applied to the same version of the + # resource. + # @!attribute [r] destination_project_id + # @return [::String] + # Output only. The project_id where backups will be restored. + # Example Project ID: "my-project-id". + # This will be an OUTPUT_ONLY field to return the project_id of the + # destination project. + class RestoreChannel + 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 + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb new file mode 100644 index 000000000000..9db6446b088f --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb @@ -0,0 +1,126 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeBackup + module V1 + # The configuration of a potential series of Restore operations to be performed + # against Backups belong to a particular BackupPlan. + # @!attribute [r] name + # @return [::String] + # Output only. The full name of the RestorePlan resource. + # Format: `projects/*/locations/*/restorePlans/*`. + # @!attribute [r] uid + # @return [::String] + # Output only. Server generated global unique identifier of + # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this RestorePlan resource was + # created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this RestorePlan resource was last + # updated. + # @!attribute [rw] description + # @return [::String] + # Optional. User specified descriptive string for this RestorePlan. + # @!attribute [rw] backup_plan + # @return [::String] + # Required. Immutable. A reference to the + # {::Google::Cloud::GkeBackup::V1::BackupPlan BackupPlan} from which Backups may + # be used as the source for Restores created via this RestorePlan. Format: + # `projects/*/locations/*/backupPlans/*`. + # @!attribute [rw] cluster + # @return [::String] + # Required. Immutable. The target cluster into which Restores created via + # this RestorePlan will restore data. NOTE: the cluster's region must be the + # same as the RestorePlan. Valid formats: + # + # - `projects/*/locations/*/clusters/*` + # - `projects/*/zones/*/clusters/*` + # @!attribute [rw] restore_config + # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig] + # Required. Configuration of Restores created via this RestorePlan. + # @!attribute [rw] labels + # @return [::Google::Protobuf::Map{::String => ::String}] + # Optional. A set of custom labels supplied by user. + # @!attribute [r] etag + # @return [::String] + # Output only. `etag` is used for optimistic concurrency control as a way to + # help prevent simultaneous updates of a restore from overwriting each other. + # It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform restore updates in order to avoid + # race conditions: An `etag` is returned in the response to `GetRestorePlan`, + # and systems are expected to put that etag in the request to + # `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change + # will be applied to the same version of the resource. + # @!attribute [r] state + # @return [::Google::Cloud::GkeBackup::V1::RestorePlan::State] + # Output only. State of the RestorePlan. This State field reflects the + # various stages a RestorePlan can be in + # during the Create operation. + # @!attribute [r] state_reason + # @return [::String] + # Output only. Human-readable description of why RestorePlan is in the + # current `state`. This field is only meant for human readability and should + # not be used programmatically as this field is not guaranteed to be + # consistent. + # @!attribute [r] restore_channel + # @return [::String] + # Output only. The fully qualified name of the RestoreChannel to be used to + # create a RestorePlan. This field is set only if the `backup_plan` is in a + # different project than the RestorePlan. Format: + # `projects/*/locations/*/restoreChannels/*` + class RestorePlan + 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 + + # State + module State + # Default first value for Enums. + STATE_UNSPECIFIED = 0 + + # Waiting for cluster state to be RUNNING. + CLUSTER_PENDING = 1 + + # The RestorePlan has successfully been created and is ready for Restores. + READY = 2 + + # RestorePlan creation has failed. + FAILED = 3 + + # The RestorePlan is in the process of being deleted. + DELETING = 4 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan_binding.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan_binding.rb new file mode 100644 index 000000000000..5587783149a0 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan_binding.rb @@ -0,0 +1,68 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 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 GkeBackup + module V1 + # A RestorePlanBinding binds a RestorePlan with a RestoreChannel. + # This resource is created automatically when a RestorePlan is created using a + # RestoreChannel. This also serves as a holder for cross-project fields + # that need to be displayed in the current project. + # @!attribute [rw] name + # @return [::String] + # Identifier. The fully qualified name of the RestorePlanBinding. + # `projects/*/locations/*/restoreChannels/*/restorePlanBindings/*` + # @!attribute [r] uid + # @return [::String] + # Output only. Server generated global unique identifier of + # [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this binding was created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this binding was created. + # @!attribute [r] restore_plan + # @return [::String] + # Output only. The fully qualified name of the RestorePlan bound to this + # RestoreChannel. `projects/*/locations/*/restorePlans/{restore_plan}` + # @!attribute [r] etag + # @return [::String] + # Output only. `etag` is used for optimistic concurrency control as a way to + # help prevent simultaneous updates of a RestorePlanBinding from overwriting + # each other. It is strongly suggested that systems make use of the 'etag' in + # the read-modify-write cycle to perform RestorePlanBinding updates in + # order to avoid race conditions: An `etag` is returned in the response to + # `GetRestorePlanBinding`, and systems are expected to put that etag in + # the request to `UpdateRestorePlanBinding` or + # `DeleteRestorePlanBinding` to ensure that their change will be applied + # to the same version of the resource. + # @!attribute [r] backup_plan + # @return [::String] + # Output only. The fully qualified name of the BackupPlan bound to the + # specified RestorePlan. `projects/*/locations/*/backukpPlans/{backup_plan}` + class RestorePlanBinding + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/volume.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/volume.rb new file mode 100644 index 000000000000..88558b631a1b --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/volume.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 Cloud + module GkeBackup + module V1 + # Represents the backup of a specific persistent volume as a component of a + # Backup - both the record of the operation and a pointer to the underlying + # storage-specific artifacts. + # @!attribute [r] name + # @return [::String] + # Output only. The full name of the VolumeBackup resource. + # Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`. + # @!attribute [r] uid + # @return [::String] + # Output only. Server generated global unique identifier of + # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this VolumeBackup resource was + # created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this VolumeBackup resource was last + # updated. + # @!attribute [r] source_pvc + # @return [::Google::Cloud::GkeBackup::V1::NamespacedName] + # Output only. A reference to the source Kubernetes PVC from which this + # VolumeBackup was created. + # @!attribute [r] volume_backup_handle + # @return [::String] + # Output only. A storage system-specific opaque handle to the underlying + # volume backup. + # @!attribute [r] format + # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup::VolumeBackupFormat] + # Output only. The format used for the volume backup. + # @!attribute [r] storage_bytes + # @return [::Integer] + # Output only. The aggregate size of the underlying artifacts associated with + # this VolumeBackup in the backup storage. This may change over time when + # multiple backups of the same volume share the same backup storage + # location. In particular, this is likely to increase in size when + # the immediately preceding backup of the same volume is deleted. + # @!attribute [r] disk_size_bytes + # @return [::Integer] + # Output only. The minimum size of the disk to which this VolumeBackup can be + # restored. + # @!attribute [r] complete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the associated underlying volume backup + # operation completed. + # @!attribute [r] state + # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup::State] + # Output only. The current state of this VolumeBackup. + # @!attribute [r] state_message + # @return [::String] + # Output only. A human readable message explaining why the VolumeBackup is in + # its current state. This field is only meant for human consumption and + # should not be used programmatically as this field is not guaranteed to be + # consistent. + # @!attribute [r] etag + # @return [::String] + # Output only. `etag` is used for optimistic concurrency control as a way to + # help prevent simultaneous updates of a volume backup from overwriting each + # other. It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform volume backup updates in order to avoid + # race conditions. + # @!attribute [r] satisfies_pzs + # @return [::Boolean] + # Output only. [Output Only] Reserved for future use. + # @!attribute [r] satisfies_pzi + # @return [::Boolean] + # Output only. [Output Only] Reserved for future use. + class VolumeBackup + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Identifies the format used for the volume backup. + module VolumeBackupFormat + # Default value, not specified. + VOLUME_BACKUP_FORMAT_UNSPECIFIED = 0 + + # Compute Engine Persistent Disk snapshot based volume backup. + GCE_PERSISTENT_DISK = 1 + end + + # The current state of a VolumeBackup + module State + # This is an illegal state and should not be encountered. + STATE_UNSPECIFIED = 0 + + # A volume for the backup was identified and backup process is about to + # start. + CREATING = 1 + + # The volume backup operation has begun and is in the initial "snapshot" + # phase of the process. Any defined ProtectedApplication "pre" hooks will + # be executed before entering this state and "post" hooks will be executed + # upon leaving this state. + SNAPSHOTTING = 2 + + # The snapshot phase of the volume backup operation has completed and + # the snapshot is now being uploaded to backup storage. + UPLOADING = 3 + + # The volume backup operation has completed successfully. + SUCCEEDED = 4 + + # The volume backup operation has failed. + FAILED = 5 + + # This VolumeBackup resource (and its associated artifacts) is in the + # process of being deleted. + DELETING = 6 + + # The underlying artifacts of a volume backup (eg: persistent disk + # snapshots) are deleted. + CLEANED_UP = 7 + end + end + + # Represents the operation of restoring a volume from a VolumeBackup. + # @!attribute [r] name + # @return [::String] + # Output only. Full name of the VolumeRestore resource. + # Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` + # @!attribute [r] uid + # @return [::String] + # Output only. Server generated global unique identifier of + # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. + # @!attribute [r] create_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this VolumeRestore resource was + # created. + # @!attribute [r] update_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when this VolumeRestore resource was last + # updated. + # @!attribute [r] volume_backup + # @return [::String] + # Output only. The full name of the VolumeBackup from which the volume will + # be restored. Format: + # `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`. + # @!attribute [r] target_pvc + # @return [::Google::Cloud::GkeBackup::V1::NamespacedName] + # Output only. The reference to the target Kubernetes PVC to be restored. + # @!attribute [r] volume_handle + # @return [::String] + # Output only. A storage system-specific opaque handler to the underlying + # volume created for the target PVC from the volume backup. + # @!attribute [r] volume_type + # @return [::Google::Cloud::GkeBackup::V1::VolumeRestore::VolumeType] + # Output only. The type of volume provisioned + # @!attribute [r] complete_time + # @return [::Google::Protobuf::Timestamp] + # Output only. The timestamp when the associated underlying volume + # restoration completed. + # @!attribute [r] state + # @return [::Google::Cloud::GkeBackup::V1::VolumeRestore::State] + # Output only. The current state of this VolumeRestore. + # @!attribute [r] state_message + # @return [::String] + # Output only. A human readable message explaining why the VolumeRestore is + # in its current state. + # @!attribute [r] etag + # @return [::String] + # Output only. `etag` is used for optimistic concurrency control as a way to + # help prevent simultaneous updates of a volume restore from overwriting each + # other. It is strongly suggested that systems make use of the `etag` in the + # read-modify-write cycle to perform volume restore updates in order to avoid + # race conditions. + class VolumeRestore + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + + # Supported volume types. + module VolumeType + # Default + VOLUME_TYPE_UNSPECIFIED = 0 + + # Compute Engine Persistent Disk volume + GCE_PERSISTENT_DISK = 1 + end + + # The current state of a VolumeRestore + module State + # This is an illegal state and should not be encountered. + STATE_UNSPECIFIED = 0 + + # A volume for the restore was identified and restore process is about to + # start. + CREATING = 1 + + # The volume is currently being restored. + RESTORING = 2 + + # The volume has been successfully restored. + SUCCEEDED = 3 + + # The volume restoration process failed. + FAILED = 4 + + # This VolumeRestore resource is in the process of being deleted. + DELETING = 5 + end + end + end + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/longrunning/operations.rb new file mode 100644 index 000000000000..7a757f512165 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/any.rb new file mode 100644 index 000000000000..58691995f02e --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/duration.rb new file mode 100644 index 000000000000..ea59f1f91daf --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/empty.rb new file mode 100644 index 000000000000..83e4481834a6 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/field_mask.rb new file mode 100644 index 000000000000..7f3ffc78601a --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/timestamp.rb new file mode 100644 index 000000000000..74352be9c58c --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/rpc/status.rb new file mode 100644 index 000000000000..c1a1c07eb2db --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/date.rb new file mode 100644 index 000000000000..14ec426522d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/date.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! + + +module Google + module Type + # Represents a whole or partial calendar date, such as a birthday. The time of + # day and time zone are either specified elsewhere or are insignificant. The + # date is relative to the Gregorian Calendar. This can represent one of the + # following: + # + # * A full date, with non-zero year, month, and day values + # * A month and day value, with a zero year, such as an anniversary + # * A year on its own, with zero month and day values + # * A year and month value, with a zero day, such as a credit card expiration + # date + # + # Related types are {::Google::Type::TimeOfDay google.type.TimeOfDay} and + # `google.protobuf.Timestamp`. + # @!attribute [rw] year + # @return [::Integer] + # Year of the date. Must be from 1 to 9999, or 0 to specify a date without + # a year. + # @!attribute [rw] month + # @return [::Integer] + # Month of a year. Must be from 1 to 12, or 0 to specify a year without a + # month and day. + # @!attribute [rw] day + # @return [::Integer] + # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 + # to specify a year by itself or a year and month where the day isn't + # significant. + class Date + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/dayofweek.rb new file mode 100644 index 000000000000..973211b9ffe7 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/dayofweek.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! + + +module Google + module Type + # Represents a day of the week. + module DayOfWeek + # The day of the week is unspecified. + DAY_OF_WEEK_UNSPECIFIED = 0 + + # Monday + MONDAY = 1 + + # Tuesday + TUESDAY = 2 + + # Wednesday + WEDNESDAY = 3 + + # Thursday + THURSDAY = 4 + + # Friday + FRIDAY = 5 + + # Saturday + SATURDAY = 6 + + # Sunday + SUNDAY = 7 + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/expr.rb new file mode 100644 index 000000000000..53e7733b6592 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/timeofday.rb new file mode 100644 index 000000000000..b0c888c8c14a --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/timeofday.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! + + +module Google + module Type + # Represents a time of day. The date and time zone are either not significant + # or are specified elsewhere. An API may choose to allow leap seconds. Related + # types are {::Google::Type::Date google.type.Date} and + # `google.protobuf.Timestamp`. + # @!attribute [rw] hours + # @return [::Integer] + # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose + # to allow the value "24:00:00" for scenarios like business closing time. + # @!attribute [rw] minutes + # @return [::Integer] + # Minutes of hour of day. Must be from 0 to 59. + # @!attribute [rw] seconds + # @return [::Integer] + # Seconds of minutes of the time. Must normally be from 0 to 59. An API may + # allow the value 60 if it allows leap-seconds. + # @!attribute [rw] nanos + # @return [::Integer] + # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. + class TimeOfDay + include ::Google::Protobuf::MessageExts + extend ::Google::Protobuf::MessageExts::ClassMethods + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/Gemfile new file mode 100644 index 000000000000..89f79468ef2f --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1", path: "../" +else + gem "google-cloud-gke_backup-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-gke_backup-v1/snippets/backup_for_gke/create_backup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup.rb new file mode 100644 index 000000000000..9dc71958dd80 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup.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 gkebackup_v1_generated_BackupForGKE_CreateBackup_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the create_backup call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup. +# +def create_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::CreateBackupRequest.new + + # Call the create_backup method. + result = client.create_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_CreateBackup_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_channel.rb new file mode 100644 index 000000000000..74db8e912529 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_channel.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 gkebackup_v1_generated_BackupForGKE_CreateBackupChannel_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the create_backup_channel call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup_channel. +# +def create_backup_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new + + # Call the create_backup_channel method. + result = client.create_backup_channel request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_CreateBackupChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_plan.rb new file mode 100644 index 000000000000..957dfc20c5c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_plan.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 gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the create_backup_plan call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup_plan. +# +def create_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new + + # Call the create_backup_plan method. + result = client.create_backup_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore.rb new file mode 100644 index 000000000000..63e786ae5aaa --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore.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 gkebackup_v1_generated_BackupForGKE_CreateRestore_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the create_restore call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore. +# +def create_restore + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new + + # Call the create_restore method. + result = client.create_restore request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_CreateRestore_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_channel.rb new file mode 100644 index 000000000000..71363897d319 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_channel.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 gkebackup_v1_generated_BackupForGKE_CreateRestoreChannel_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the create_restore_channel call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore_channel. +# +def create_restore_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new + + # Call the create_restore_channel method. + result = client.create_restore_channel request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_CreateRestoreChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_plan.rb new file mode 100644 index 000000000000..e3f0621ede47 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_plan.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 gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the create_restore_plan call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore_plan. +# +def create_restore_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new + + # Call the create_restore_plan method. + result = client.create_restore_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup.rb new file mode 100644 index 000000000000..34938923549f --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup.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 gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the delete_backup call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup. +# +def delete_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new + + # Call the delete_backup method. + result = client.delete_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_channel.rb new file mode 100644 index 000000000000..0eb6bc33b82e --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_channel.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 gkebackup_v1_generated_BackupForGKE_DeleteBackupChannel_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the delete_backup_channel call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup_channel. +# +def delete_backup_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new + + # Call the delete_backup_channel method. + result = client.delete_backup_channel request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_DeleteBackupChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_plan.rb new file mode 100644 index 000000000000..ad917a877742 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_plan.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 gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the delete_backup_plan call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup_plan. +# +def delete_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.new + + # Call the delete_backup_plan method. + result = client.delete_backup_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore.rb new file mode 100644 index 000000000000..d7060b3758d9 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore.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 gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the delete_restore call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore. +# +def delete_restore + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new + + # Call the delete_restore method. + result = client.delete_restore request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_channel.rb new file mode 100644 index 000000000000..2c28198a7754 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_channel.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 gkebackup_v1_generated_BackupForGKE_DeleteRestoreChannel_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the delete_restore_channel call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore_channel. +# +def delete_restore_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.new + + # Call the delete_restore_channel method. + result = client.delete_restore_channel request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_DeleteRestoreChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_plan.rb new file mode 100644 index 000000000000..855134c6f2b0 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_plan.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 gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the delete_restore_plan call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore_plan. +# +def delete_restore_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new + + # Call the delete_restore_plan method. + result = client.delete_restore_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup.rb new file mode 100644 index 000000000000..c696be7b46bc --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup.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 gkebackup_v1_generated_BackupForGKE_GetBackup_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the get_backup call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup. +# +def get_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::GetBackupRequest.new + + # Call the get_backup method. + result = client.get_backup request + + # The returned object is of type Google::Cloud::GkeBackup::V1::Backup. + p result +end +# [END gkebackup_v1_generated_BackupForGKE_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_channel.rb new file mode 100644 index 000000000000..3756946ee678 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_channel.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 gkebackup_v1_generated_BackupForGKE_GetBackupChannel_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the get_backup_channel call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_channel. +# +def get_backup_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new + + # Call the get_backup_channel method. + result = client.get_backup_channel request + + # The returned object is of type Google::Cloud::GkeBackup::V1::BackupChannel. + p result +end +# [END gkebackup_v1_generated_BackupForGKE_GetBackupChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_index_download_url.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_index_download_url.rb new file mode 100644 index 000000000000..46138b138163 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_index_download_url.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 gkebackup_v1_generated_BackupForGKE_GetBackupIndexDownloadUrl_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the get_backup_index_download_url call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_index_download_url. +# +def get_backup_index_download_url + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new + + # Call the get_backup_index_download_url method. + result = client.get_backup_index_download_url request + + # The returned object is of type Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse. + p result +end +# [END gkebackup_v1_generated_BackupForGKE_GetBackupIndexDownloadUrl_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan.rb new file mode 100644 index 000000000000..40c66d9577d7 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan.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 gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the get_backup_plan call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_plan. +# +def get_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new + + # Call the get_backup_plan method. + result = client.get_backup_plan request + + # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlan. + p result +end +# [END gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan_binding.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan_binding.rb new file mode 100644 index 000000000000..eb6c802bf42c --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan_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 gkebackup_v1_generated_BackupForGKE_GetBackupPlanBinding_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the get_backup_plan_binding call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_plan_binding. +# +def get_backup_plan_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new + + # Call the get_backup_plan_binding method. + result = client.get_backup_plan_binding request + + # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlanBinding. + p result +end +# [END gkebackup_v1_generated_BackupForGKE_GetBackupPlanBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore.rb new file mode 100644 index 000000000000..068f3377306c --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore.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 gkebackup_v1_generated_BackupForGKE_GetRestore_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the get_restore call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore. +# +def get_restore + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::GetRestoreRequest.new + + # Call the get_restore method. + result = client.get_restore request + + # The returned object is of type Google::Cloud::GkeBackup::V1::Restore. + p result +end +# [END gkebackup_v1_generated_BackupForGKE_GetRestore_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_channel.rb new file mode 100644 index 000000000000..e1d7326eff88 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_channel.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 gkebackup_v1_generated_BackupForGKE_GetRestoreChannel_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the get_restore_channel call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_channel. +# +def get_restore_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new + + # Call the get_restore_channel method. + result = client.get_restore_channel request + + # The returned object is of type Google::Cloud::GkeBackup::V1::RestoreChannel. + p result +end +# [END gkebackup_v1_generated_BackupForGKE_GetRestoreChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan.rb new file mode 100644 index 000000000000..ead4676bd72c --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan.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 gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the get_restore_plan call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_plan. +# +def get_restore_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new + + # Call the get_restore_plan method. + result = client.get_restore_plan request + + # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlan. + p result +end +# [END gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan_binding.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan_binding.rb new file mode 100644 index 000000000000..2fcc61374824 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan_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 gkebackup_v1_generated_BackupForGKE_GetRestorePlanBinding_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the get_restore_plan_binding call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_plan_binding. +# +def get_restore_plan_binding + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new + + # Call the get_restore_plan_binding method. + result = client.get_restore_plan_binding request + + # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlanBinding. + p result +end +# [END gkebackup_v1_generated_BackupForGKE_GetRestorePlanBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_backup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_backup.rb new file mode 100644 index 000000000000..bf3e4483700a --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_backup.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 gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the get_volume_backup call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_volume_backup. +# +def get_volume_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new + + # Call the get_volume_backup method. + result = client.get_volume_backup request + + # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeBackup. + p result +end +# [END gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_restore.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_restore.rb new file mode 100644 index 000000000000..565d2934a5cf --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_restore.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 gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the get_volume_restore call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_volume_restore. +# +def get_volume_restore + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new + + # Call the get_volume_restore method. + result = client.get_volume_restore request + + # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeRestore. + p result +end +# [END gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_channels.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_channels.rb new file mode 100644 index 000000000000..733450ae3ce7 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_channels.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 gkebackup_v1_generated_BackupForGKE_ListBackupChannels_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the list_backup_channels call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_channels. +# +def list_backup_channels + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.new + + # Call the list_backup_channels method. + result = client.list_backup_channels request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupChannel. + p item + end +end +# [END gkebackup_v1_generated_BackupForGKE_ListBackupChannels_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plan_bindings.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plan_bindings.rb new file mode 100644 index 000000000000..a780fd527094 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plan_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 gkebackup_v1_generated_BackupForGKE_ListBackupPlanBindings_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the list_backup_plan_bindings call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_plan_bindings. +# +def list_backup_plan_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.new + + # Call the list_backup_plan_bindings method. + result = client.list_backup_plan_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::GkeBackup::V1::BackupPlanBinding. + p item + end +end +# [END gkebackup_v1_generated_BackupForGKE_ListBackupPlanBindings_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plans.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plans.rb new file mode 100644 index 000000000000..31a456fd2506 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plans.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 gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the list_backup_plans call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_plans. +# +def list_backup_plans + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.new + + # Call the list_backup_plans method. + result = client.list_backup_plans request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupPlan. + p item + end +end +# [END gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backups.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backups.rb new file mode 100644 index 000000000000..fe5a2a626313 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backups.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 gkebackup_v1_generated_BackupForGKE_ListBackups_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the list_backups call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backups. +# +def list_backups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::ListBackupsRequest.new + + # Call the list_backups method. + result = client.list_backups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup. + p item + end +end +# [END gkebackup_v1_generated_BackupForGKE_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_channels.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_channels.rb new file mode 100644 index 000000000000..234f2465fa88 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_channels.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 gkebackup_v1_generated_BackupForGKE_ListRestoreChannels_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the list_restore_channels call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_channels. +# +def list_restore_channels + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.new + + # Call the list_restore_channels method. + result = client.list_restore_channels request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::GkeBackup::V1::RestoreChannel. + p item + end +end +# [END gkebackup_v1_generated_BackupForGKE_ListRestoreChannels_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plan_bindings.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plan_bindings.rb new file mode 100644 index 000000000000..20ed0f0420e1 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plan_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 gkebackup_v1_generated_BackupForGKE_ListRestorePlanBindings_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the list_restore_plan_bindings call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_plan_bindings. +# +def list_restore_plan_bindings + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.new + + # Call the list_restore_plan_bindings method. + result = client.list_restore_plan_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::GkeBackup::V1::RestorePlanBinding. + p item + end +end +# [END gkebackup_v1_generated_BackupForGKE_ListRestorePlanBindings_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plans.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plans.rb new file mode 100644 index 000000000000..ea5531535897 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plans.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 gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the list_restore_plans call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_plans. +# +def list_restore_plans + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.new + + # Call the list_restore_plans method. + result = client.list_restore_plans request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan. + p item + end +end +# [END gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restores.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restores.rb new file mode 100644 index 000000000000..e1b7530c195e --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restores.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 gkebackup_v1_generated_BackupForGKE_ListRestores_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the list_restores call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restores. +# +def list_restores + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::ListRestoresRequest.new + + # Call the list_restores method. + result = client.list_restores request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::GkeBackup::V1::Restore. + p item + end +end +# [END gkebackup_v1_generated_BackupForGKE_ListRestores_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_backups.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_backups.rb new file mode 100644 index 000000000000..7ab6a11e5a16 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_backups.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 gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the list_volume_backups call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_volume_backups. +# +def list_volume_backups + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.new + + # Call the list_volume_backups method. + result = client.list_volume_backups request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup. + p item + end +end +# [END gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_restores.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_restores.rb new file mode 100644 index 000000000000..75c43204e722 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_restores.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 gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the list_volume_restores call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_volume_restores. +# +def list_volume_restores + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.new + + # Call the list_volume_restores method. + result = client.list_volume_restores request + + # The returned object is of type Gapic::PagedEnumerable. You can iterate + # over elements, and API calls will be issued to fetch pages as needed. + result.each do |item| + # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeRestore. + p item + end +end +# [END gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup.rb new file mode 100644 index 000000000000..f406f9a035f9 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup.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 gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the update_backup call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup. +# +def update_backup + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new + + # Call the update_backup method. + result = client.update_backup request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_channel.rb new file mode 100644 index 000000000000..c9766c3b371d --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_channel.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 gkebackup_v1_generated_BackupForGKE_UpdateBackupChannel_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the update_backup_channel call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup_channel. +# +def update_backup_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new + + # Call the update_backup_channel method. + result = client.update_backup_channel request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_UpdateBackupChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_plan.rb new file mode 100644 index 000000000000..a4ea65d15828 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_plan.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 gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the update_backup_plan call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup_plan. +# +def update_backup_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new + + # Call the update_backup_plan method. + result = client.update_backup_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore.rb new file mode 100644 index 000000000000..fe782c8457e2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore.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 gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the update_restore call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore. +# +def update_restore + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new + + # Call the update_restore method. + result = client.update_restore request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_channel.rb new file mode 100644 index 000000000000..2958cdf118bf --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_channel.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 gkebackup_v1_generated_BackupForGKE_UpdateRestoreChannel_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the update_restore_channel call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore_channel. +# +def update_restore_channel + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new + + # Call the update_restore_channel method. + result = client.update_restore_channel request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_UpdateRestoreChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_plan.rb new file mode 100644 index 000000000000..78b9d9af5d2c --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_plan.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 gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync] +require "google/cloud/gke_backup/v1" + +## +# Snippet for the update_restore_plan call in the BackupForGKE service +# +# This snippet has been automatically generated and should be regarded as a code +# template only. It will require modifications to work: +# - It may require correct/in-range values for request initialization. +# - It may require specifying regional endpoints when creating the service +# client as shown in https://cloud.google.com/ruby/docs/reference. +# +# This is an auto-generated example demonstrating basic usage of +# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore_plan. +# +def update_restore_plan + # Create a client object. The client can be reused for multiple calls. + client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new + + # Create a request. To set request fields, pass in keyword arguments. + request = Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new + + # Call the update_restore_plan method. + result = client.update_restore_plan request + + # The returned object is of type Gapic::Operation. You can use it to + # check the status of an operation, cancel it, or wait for results. + # Here is 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 gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/snippet_metadata_google.cloud.gkebackup.v1.json b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/snippet_metadata_google.cloud.gkebackup.v1.json new file mode 100644 index 000000000000..b421549460ad --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/snippet_metadata_google.cloud.gkebackup.v1.json @@ -0,0 +1,1575 @@ +{ + "client_library": { + "name": "google-cloud-gke_backup-v1", + "version": "", + "language": "RUBY", + "apis": [ + { + "id": "google.cloud.gkebackup.v1", + "version": "v1" + } + ] + }, + "snippets": [ + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync", + "title": "Snippet for the create_backup_plan call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup_plan.", + "file": "backup_for_gke/create_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup_plan", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "CreateBackupPlan", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.CreateBackupPlan", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync", + "title": "Snippet for the list_backup_plans call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_plans.", + "file": "backup_for_gke/list_backup_plans.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_plans", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_plans", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "ListBackupPlans", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListBackupPlans", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync", + "title": "Snippet for the get_backup_plan call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_plan.", + "file": "backup_for_gke/get_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_plan", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::BackupPlan", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "GetBackupPlan", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetBackupPlan", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync", + "title": "Snippet for the update_backup_plan call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup_plan.", + "file": "backup_for_gke/update_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_plan", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "UpdateBackupPlan", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackupPlan", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync", + "title": "Snippet for the delete_backup_plan call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup_plan.", + "file": "backup_for_gke/delete_backup_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup_plan", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "DeleteBackupPlan", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackupPlan", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_CreateBackupChannel_sync", + "title": "Snippet for the create_backup_channel call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup_channel.", + "file": "backup_for_gke/create_backup_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup_channel", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "CreateBackupChannel", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.CreateBackupChannel", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_ListBackupChannels_sync", + "title": "Snippet for the list_backup_channels call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_channels.", + "file": "backup_for_gke/list_backup_channels.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_channels", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_channels", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "ListBackupChannels", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListBackupChannels", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_GetBackupChannel_sync", + "title": "Snippet for the get_backup_channel call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_channel.", + "file": "backup_for_gke/get_backup_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_channel", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::BackupChannel", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "GetBackupChannel", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetBackupChannel", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_UpdateBackupChannel_sync", + "title": "Snippet for the update_backup_channel call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup_channel.", + "file": "backup_for_gke/update_backup_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup_channel", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "UpdateBackupChannel", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackupChannel", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_DeleteBackupChannel_sync", + "title": "Snippet for the delete_backup_channel call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup_channel.", + "file": "backup_for_gke/delete_backup_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup_channel", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "DeleteBackupChannel", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackupChannel", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_ListBackupPlanBindings_sync", + "title": "Snippet for the list_backup_plan_bindings call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_plan_bindings.", + "file": "backup_for_gke/list_backup_plan_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backup_plan_bindings", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_plan_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "ListBackupPlanBindings", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListBackupPlanBindings", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_GetBackupPlanBinding_sync", + "title": "Snippet for the get_backup_plan_binding call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_plan_binding.", + "file": "backup_for_gke/get_backup_plan_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_plan_binding", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_plan_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::BackupPlanBinding", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "GetBackupPlanBinding", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetBackupPlanBinding", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_CreateBackup_sync", + "title": "Snippet for the create_backup call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup.", + "file": "backup_for_gke/create_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_backup", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::CreateBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "CreateBackup", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.CreateBackup", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_ListBackups_sync", + "title": "Snippet for the list_backups call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backups.", + "file": "backup_for_gke/list_backups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_backups", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::ListBackupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::ListBackupsResponse", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "ListBackups", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListBackups", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_GetBackup_sync", + "title": "Snippet for the get_backup call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup.", + "file": "backup_for_gke/get_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::GetBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::Backup", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "GetBackup", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetBackup", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync", + "title": "Snippet for the update_backup call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup.", + "file": "backup_for_gke/update_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_backup", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::UpdateBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "UpdateBackup", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackup", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync", + "title": "Snippet for the delete_backup call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup.", + "file": "backup_for_gke/delete_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_backup", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::DeleteBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "DeleteBackup", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackup", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync", + "title": "Snippet for the list_volume_backups call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_volume_backups.", + "file": "backup_for_gke/list_volume_backups.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_volume_backups", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_volume_backups", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "ListVolumeBackups", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeBackups", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync", + "title": "Snippet for the get_volume_backup call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_volume_backup.", + "file": "backup_for_gke/get_volume_backup.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_volume_backup", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_volume_backup", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::VolumeBackup", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "GetVolumeBackup", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeBackup", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync", + "title": "Snippet for the create_restore_plan call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore_plan.", + "file": "backup_for_gke/create_restore_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_restore_plan", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "CreateRestorePlan", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.CreateRestorePlan", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync", + "title": "Snippet for the list_restore_plans call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_plans.", + "file": "backup_for_gke/list_restore_plans.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_restore_plans", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_plans", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "ListRestorePlans", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListRestorePlans", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync", + "title": "Snippet for the get_restore_plan call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_plan.", + "file": "backup_for_gke/get_restore_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_restore_plan", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::RestorePlan", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "GetRestorePlan", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetRestorePlan", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync", + "title": "Snippet for the update_restore_plan call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore_plan.", + "file": "backup_for_gke/update_restore_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_restore_plan", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "UpdateRestorePlan", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.UpdateRestorePlan", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync", + "title": "Snippet for the delete_restore_plan call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore_plan.", + "file": "backup_for_gke/delete_restore_plan.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_restore_plan", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore_plan", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "DeleteRestorePlan", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestorePlan", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_CreateRestoreChannel_sync", + "title": "Snippet for the create_restore_channel call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore_channel.", + "file": "backup_for_gke/create_restore_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_restore_channel", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "CreateRestoreChannel", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.CreateRestoreChannel", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_ListRestoreChannels_sync", + "title": "Snippet for the list_restore_channels call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_channels.", + "file": "backup_for_gke/list_restore_channels.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_restore_channels", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_channels", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "ListRestoreChannels", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListRestoreChannels", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_GetRestoreChannel_sync", + "title": "Snippet for the get_restore_channel call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_channel.", + "file": "backup_for_gke/get_restore_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_restore_channel", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::RestoreChannel", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "GetRestoreChannel", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetRestoreChannel", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_UpdateRestoreChannel_sync", + "title": "Snippet for the update_restore_channel call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore_channel.", + "file": "backup_for_gke/update_restore_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_restore_channel", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "UpdateRestoreChannel", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.UpdateRestoreChannel", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_DeleteRestoreChannel_sync", + "title": "Snippet for the delete_restore_channel call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore_channel.", + "file": "backup_for_gke/delete_restore_channel.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_restore_channel", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore_channel", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "DeleteRestoreChannel", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestoreChannel", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_ListRestorePlanBindings_sync", + "title": "Snippet for the list_restore_plan_bindings call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_plan_bindings.", + "file": "backup_for_gke/list_restore_plan_bindings.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_restore_plan_bindings", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_plan_bindings", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "ListRestorePlanBindings", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListRestorePlanBindings", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_GetRestorePlanBinding_sync", + "title": "Snippet for the get_restore_plan_binding call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_plan_binding.", + "file": "backup_for_gke/get_restore_plan_binding.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_restore_plan_binding", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_plan_binding", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::RestorePlanBinding", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "GetRestorePlanBinding", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetRestorePlanBinding", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_CreateRestore_sync", + "title": "Snippet for the create_restore call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore.", + "file": "backup_for_gke/create_restore.rb", + "language": "RUBY", + "client_method": { + "short_name": "create_restore", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::CreateRestoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "CreateRestore", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.CreateRestore", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_ListRestores_sync", + "title": "Snippet for the list_restores call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restores.", + "file": "backup_for_gke/list_restores.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_restores", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restores", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::ListRestoresRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::ListRestoresResponse", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "ListRestores", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListRestores", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_GetRestore_sync", + "title": "Snippet for the get_restore call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore.", + "file": "backup_for_gke/get_restore.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_restore", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::GetRestoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::Restore", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "GetRestore", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetRestore", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync", + "title": "Snippet for the update_restore call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore.", + "file": "backup_for_gke/update_restore.rb", + "language": "RUBY", + "client_method": { + "short_name": "update_restore", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "UpdateRestore", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.UpdateRestore", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync", + "title": "Snippet for the delete_restore call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore.", + "file": "backup_for_gke/delete_restore.rb", + "language": "RUBY", + "client_method": { + "short_name": "delete_restore", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Longrunning::Operation", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "DeleteRestore", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestore", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 53, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync", + "title": "Snippet for the list_volume_restores call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_volume_restores.", + "file": "backup_for_gke/list_volume_restores.rb", + "language": "RUBY", + "client_method": { + "short_name": "list_volume_restores", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_volume_restores", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "ListVolumeRestores", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeRestores", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 50, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync", + "title": "Snippet for the get_volume_restore call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_volume_restore.", + "file": "backup_for_gke/get_volume_restore.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_volume_restore", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_volume_restore", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::VolumeRestore", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "GetVolumeRestore", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeRestore", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + }, + { + "region_tag": "gkebackup_v1_generated_BackupForGKE_GetBackupIndexDownloadUrl_sync", + "title": "Snippet for the get_backup_index_download_url call in the BackupForGKE service", + "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_index_download_url.", + "file": "backup_for_gke/get_backup_index_download_url.rb", + "language": "RUBY", + "client_method": { + "short_name": "get_backup_index_download_url", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_index_download_url", + "async": false, + "parameters": [ + { + "type": "::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest", + "name": "request" + } + ], + "result_type": "::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse", + "client": { + "short_name": "BackupForGKE::Client", + "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" + }, + "method": { + "short_name": "GetBackupIndexDownloadUrl", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetBackupIndexDownloadUrl", + "service": { + "short_name": "BackupForGKE", + "full_name": "google.cloud.gkebackup.v1.BackupForGKE" + } + } + }, + "canonical": true, + "origin": "API_DEFINITION", + "segments": [ + { + "start": 20, + "end": 46, + "type": "FULL" + } + ] + } + ] +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_operations_test.rb b/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_operations_test.rb new file mode 100644 index 000000000000..c5f15700016e --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_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/gkebackup/v1/gkebackup_pb" +require "google/cloud/gkebackup/v1/gkebackup_services_pb" +require "google/cloud/gke_backup/v1/backup_for_gke" + +class ::Google::Cloud::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::Operations::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_paths_test.rb b/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_paths_test.rb new file mode 100644 index 000000000000..c3005889bc18 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_paths_test.rb @@ -0,0 +1,199 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gke_backup/v1/backup_for_gke" + +class ::Google::Cloud::GkeBackup::V1::BackupForGKE::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_backup_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_path project: "value0", location: "value1", backup_plan: "value2", backup: "value3" + assert_equal "projects/value0/locations/value1/backupPlans/value2/backups/value3", path + end + end + + def test_backup_channel_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_channel_path project: "value0", location: "value1", backup_channel: "value2" + assert_equal "projects/value0/locations/value1/backupChannels/value2", path + end + end + + def test_backup_plan_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_plan_path project: "value0", location: "value1", backup_plan: "value2" + assert_equal "projects/value0/locations/value1/backupPlans/value2", path + end + end + + def test_backup_plan_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::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.backup_plan_binding_path project: "value0", location: "value1", backup_channel: "value2", backup_plan_binding: "value3" + assert_equal "projects/value0/locations/value1/backupChannels/value2/backupPlanBindings/value3", path + end + end + + def test_cluster_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.cluster_path project: "value0", location: "value1", cluster: "value2" + assert_equal "projects/value0/locations/value1/clusters/value2", path + end + end + + def test_crypto_key_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" + assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/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::GkeBackup::V1::BackupForGKE::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_restore_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.restore_path project: "value0", location: "value1", restore_plan: "value2", restore: "value3" + assert_equal "projects/value0/locations/value1/restorePlans/value2/restores/value3", path + end + end + + def test_restore_channel_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.restore_channel_path project: "value0", location: "value1", restore_channel: "value2" + assert_equal "projects/value0/locations/value1/restoreChannels/value2", path + end + end + + def test_restore_plan_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.restore_plan_path project: "value0", location: "value1", restore_plan: "value2" + assert_equal "projects/value0/locations/value1/restorePlans/value2", path + end + end + + def test_restore_plan_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::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.restore_plan_binding_path project: "value0", location: "value1", restore_channel: "value2", restore_plan_binding: "value3" + assert_equal "projects/value0/locations/value1/restoreChannels/value2/restorePlanBindings/value3", path + end + end + + def test_volume_backup_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.volume_backup_path project: "value0", location: "value1", backup_plan: "value2", backup: "value3", volume_backup: "value4" + assert_equal "projects/value0/locations/value1/backupPlans/value2/backups/value3/volumeBackups/value4", path + end + end + + def test_volume_restore_path + grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + ::Gapic::ServiceStub.stub :new, DummyStub.new do + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + path = client.volume_restore_path project: "value0", location: "value1", restore_plan: "value2", restore: "value3", volume_restore: "value4" + assert_equal "projects/value0/locations/value1/restorePlans/value2/restores/value3/volumeRestores/value4", path + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_rest_test.rb b/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_rest_test.rb new file mode 100644 index 000000000000..865d2dbce1bd --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_rest_test.rb @@ -0,0 +1,2274 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gkebackup/v1/gkebackup_pb" +require "google/cloud/gke_backup/v1/backup_for_gke/rest" + + +class ::Google::Cloud::GkeBackup::V1::BackupForGKE::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_backup_plan + # 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" + backup_plan = {} + backup_plan_id = "hello world" + + create_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_create_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_backup_plan({ parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_backup_plan parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_backup_plan ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_backup_plan({ parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_backup_plan(::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_plan_client_stub.call_count + end + end + end + + def test_list_backup_plans + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse.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_backup_plans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_backup_plans_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_plans_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_plans({ parent: parent, page_size: 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_backup_plans parent: parent, page_size: 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_backup_plans ::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.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_backup_plans({ 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_backup_plans(::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.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_backup_plans_client_stub.call_count + end + end + end + + def test_get_backup_plan + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::BackupPlan.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_plan({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_plan name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_plan ::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_plan({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_plan(::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_plan_client_stub.call_count + end + end + end + + def test_update_backup_plan + # 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. + backup_plan = {} + update_mask = {} + + update_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_update_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup_plan backup_plan: backup_plan, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup_plan ::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup_plan(::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_plan_client_stub.call_count + end + end + end + + def test_delete_backup_plan + # 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_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_delete_backup_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup_plan({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup_plan name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup_plan ::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup_plan({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup_plan(::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.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_backup_plan_client_stub.call_count + end + end + end + + def test_create_backup_channel + # 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" + backup_channel = {} + backup_channel_id = "hello world" + + create_backup_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_create_backup_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_backup_channel({ parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_backup_channel parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_backup_channel ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new(parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_backup_channel({ parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_backup_channel(::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new(parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_channel_client_stub.call_count + end + end + end + + def test_list_backup_channels + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse.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_backup_channels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_backup_channels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_channels_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_channels({ parent: parent, page_size: 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_backup_channels parent: parent, page_size: 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_backup_channels ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.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_backup_channels({ 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_backup_channels(::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.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_backup_channels_client_stub.call_count + end + end + end + + def test_get_backup_channel + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::BackupChannel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_backup_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_channel({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_channel name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_channel ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_channel({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_channel(::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_channel_client_stub.call_count + end + end + end + + def test_update_backup_channel + # 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. + backup_channel = {} + update_mask = {} + + update_backup_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_update_backup_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup_channel({ backup_channel: backup_channel, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup_channel backup_channel: backup_channel, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup_channel ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new(backup_channel: backup_channel, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup_channel({ backup_channel: backup_channel, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup_channel(::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new(backup_channel: backup_channel, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_channel_client_stub.call_count + end + end + end + + def test_delete_backup_channel + # 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" + force = true + + delete_backup_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_delete_backup_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup_channel({ name: name, etag: etag, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup_channel name: name, etag: etag, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup_channel ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new(name: name, etag: etag, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup_channel({ name: name, etag: etag, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup_channel(::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new(name: name, etag: etag, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_channel_client_stub.call_count + end + end + end + + def test_list_backup_plan_bindings + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse.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_backup_plan_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::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_backup_plan_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backup_plan_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backup_plan_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_backup_plan_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_backup_plan_bindings ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.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_backup_plan_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_backup_plan_bindings(::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.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_backup_plan_bindings_client_stub.call_count + end + end + end + + def test_get_backup_plan_binding + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::BackupPlanBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_plan_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::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_backup_plan_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_plan_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_plan_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_plan_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_plan_binding ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_plan_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_plan_binding(::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_plan_binding_client_stub.call_count + end + end + end + + def test_create_backup + # 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" + backup = {} + backup_id = "hello world" + + create_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_create_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_backup_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_backup({ parent: parent, backup: backup, backup_id: backup_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_backup parent: parent, backup: backup, backup_id: backup_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_backup ::Google::Cloud::GkeBackup::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_backup({ parent: parent, backup: backup, backup_id: backup_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_backup(::Google::Cloud::GkeBackup::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_backup_client_stub.call_count + end + end + end + + def test_list_backups + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::ListBackupsResponse.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" + return_partial_success = true + + list_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.list_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.list_backups ::Google::Cloud::GkeBackup::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.list_backups(::Google::Cloud::GkeBackup::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, list_backups_client_stub.call_count + end + end + end + + def test_get_backup + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::Backup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup ::Google::Cloud::GkeBackup::V1::GetBackupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup(::Google::Cloud::GkeBackup::V1::GetBackupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_client_stub.call_count + end + end + end + + def test_update_backup + # 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. + backup = {} + update_mask = {} + + update_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_update_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_backup_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_backup({ backup: backup, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_backup backup: backup, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_backup ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_backup({ backup: backup, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_backup(::Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_backup_client_stub.call_count + end + end + end + + def test_delete_backup + # 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" + force = true + + delete_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_backup({ name: name, etag: etag, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_backup name: name, etag: etag, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_backup ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new(name: name, etag: etag, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_backup({ name: name, etag: etag, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_backup(::Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new(name: name, etag: etag, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_backup_client_stub.call_count + end + end + end + + def test_list_volume_backups + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse.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_volume_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_volume_backups_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_volume_backups_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_volume_backups({ parent: parent, page_size: 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_volume_backups parent: parent, page_size: 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_volume_backups ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.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_volume_backups({ 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_volume_backups(::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.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_volume_backups_client_stub.call_count + end + end + end + + def test_get_volume_backup + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::VolumeBackup.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_volume_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_volume_backup_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_volume_backup_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_volume_backup({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_volume_backup name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_volume_backup ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_volume_backup({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_volume_backup(::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_volume_backup_client_stub.call_count + end + end + end + + def test_create_restore_plan + # 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" + restore_plan = {} + restore_plan_id = "hello world" + + create_restore_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_create_restore_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_restore_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_restore_plan({ parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_restore_plan parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_restore_plan ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new(parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_restore_plan({ parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_restore_plan(::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new(parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_restore_plan_client_stub.call_count + end + end + end + + def test_list_restore_plans + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse.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_restore_plans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_restore_plans_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_restore_plans_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_restore_plans({ parent: parent, page_size: 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_restore_plans parent: parent, page_size: 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_restore_plans ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.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_restore_plans({ 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_restore_plans(::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.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_restore_plans_client_stub.call_count + end + end + end + + def test_get_restore_plan + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::RestorePlan.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_restore_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_restore_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_restore_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_restore_plan({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_restore_plan name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_restore_plan ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_restore_plan({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_restore_plan(::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_restore_plan_client_stub.call_count + end + end + end + + def test_update_restore_plan + # 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. + restore_plan = {} + update_mask = {} + + update_restore_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_update_restore_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_restore_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_restore_plan({ restore_plan: restore_plan, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_restore_plan restore_plan: restore_plan, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_restore_plan ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new(restore_plan: restore_plan, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_restore_plan({ restore_plan: restore_plan, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_restore_plan(::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new(restore_plan: restore_plan, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_restore_plan_client_stub.call_count + end + end + end + + def test_delete_restore_plan + # 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" + force = true + + delete_restore_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_delete_restore_plan_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_restore_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_restore_plan({ name: name, etag: etag, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_restore_plan name: name, etag: etag, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_restore_plan ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new(name: name, etag: etag, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_restore_plan({ name: name, etag: etag, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_restore_plan(::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new(name: name, etag: etag, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_restore_plan_client_stub.call_count + end + end + end + + def test_create_restore_channel + # 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" + restore_channel = {} + restore_channel_id = "hello world" + + create_restore_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_create_restore_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_restore_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_restore_channel({ parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_restore_channel parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_restore_channel ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new(parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_restore_channel({ parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_restore_channel(::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new(parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_restore_channel_client_stub.call_count + end + end + end + + def test_list_restore_channels + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse.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_restore_channels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_restore_channels_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_restore_channels_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_restore_channels({ parent: parent, page_size: 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_restore_channels parent: parent, page_size: 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_restore_channels ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.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_restore_channels({ 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_restore_channels(::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.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_restore_channels_client_stub.call_count + end + end + end + + def test_get_restore_channel + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::RestoreChannel.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_restore_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_restore_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_restore_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_restore_channel({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_restore_channel name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_restore_channel ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_restore_channel({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_restore_channel(::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_restore_channel_client_stub.call_count + end + end + end + + def test_update_restore_channel + # 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. + restore_channel = {} + update_mask = {} + + update_restore_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_update_restore_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_restore_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_restore_channel({ restore_channel: restore_channel, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_restore_channel restore_channel: restore_channel, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_restore_channel ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new(restore_channel: restore_channel, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_restore_channel({ restore_channel: restore_channel, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_restore_channel(::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new(restore_channel: restore_channel, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_restore_channel_client_stub.call_count + end + end + end + + def test_delete_restore_channel + # 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_restore_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_delete_restore_channel_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_restore_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_restore_channel({ name: name, etag: etag }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_restore_channel name: name, etag: etag do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_restore_channel ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.new(name: name, etag: etag) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_restore_channel({ name: name, etag: etag }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_restore_channel(::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.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_restore_channel_client_stub.call_count + end + end + end + + def test_list_restore_plan_bindings + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse.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_restore_plan_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::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_restore_plan_bindings_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_restore_plan_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_restore_plan_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_restore_plan_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_restore_plan_bindings ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.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_restore_plan_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_restore_plan_bindings(::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.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_restore_plan_bindings_client_stub.call_count + end + end + end + + def test_get_restore_plan_binding + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::RestorePlanBinding.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_restore_plan_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::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_restore_plan_binding_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_restore_plan_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_restore_plan_binding({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_restore_plan_binding name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_restore_plan_binding ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_restore_plan_binding({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_restore_plan_binding(::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_restore_plan_binding_client_stub.call_count + end + end + end + + def test_create_restore + # 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" + restore = {} + restore_id = "hello world" + + create_restore_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_create_restore_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, create_restore_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.create_restore({ parent: parent, restore: restore, restore_id: restore_id }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.create_restore parent: parent, restore: restore, restore_id: restore_id do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.create_restore ::Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new(parent: parent, restore: restore, restore_id: restore_id) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.create_restore({ parent: parent, restore: restore, restore_id: restore_id }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.create_restore(::Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new(parent: parent, restore: restore, restore_id: restore_id), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, create_restore_client_stub.call_count + end + end + end + + def test_list_restores + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::ListRestoresResponse.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_restores_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_restores_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_restores_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_restores({ parent: parent, page_size: 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_restores parent: parent, page_size: 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_restores ::Google::Cloud::GkeBackup::V1::ListRestoresRequest.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_restores({ 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_restores(::Google::Cloud::GkeBackup::V1::ListRestoresRequest.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_restores_client_stub.call_count + end + end + end + + def test_get_restore + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::Restore.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_restore_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_restore_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_restore_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_restore({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_restore name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_restore ::Google::Cloud::GkeBackup::V1::GetRestoreRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_restore({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_restore(::Google::Cloud::GkeBackup::V1::GetRestoreRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_restore_client_stub.call_count + end + end + end + + def test_update_restore + # 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. + restore = {} + update_mask = {} + + update_restore_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_update_restore_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, update_restore_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.update_restore({ restore: restore, update_mask: update_mask }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.update_restore restore: restore, update_mask: update_mask do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.update_restore ::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new(restore: restore, update_mask: update_mask) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.update_restore({ restore: restore, update_mask: update_mask }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.update_restore(::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new(restore: restore, update_mask: update_mask), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, update_restore_client_stub.call_count + end + end + end + + def test_delete_restore + # 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" + force = true + + delete_restore_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_delete_restore_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, delete_restore_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.delete_restore({ name: name, etag: etag, force: force }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.delete_restore name: name, etag: etag, force: force do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.delete_restore ::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new(name: name, etag: etag, force: force) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.delete_restore({ name: name, etag: etag, force: force }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.delete_restore(::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new(name: name, etag: etag, force: force), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, delete_restore_client_stub.call_count + end + end + end + + def test_list_volume_restores + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse.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_volume_restores_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_volume_restores_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, list_volume_restores_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.list_volume_restores({ parent: parent, page_size: 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_volume_restores parent: parent, page_size: 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_volume_restores ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.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_volume_restores({ 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_volume_restores(::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.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_volume_restores_client_stub.call_count + end + end + end + + def test_get_volume_restore + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::VolumeRestore.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + name = "hello world" + + get_volume_restore_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_volume_restore_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_volume_restore_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_volume_restore({ name: name }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_volume_restore name: name do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_volume_restore ::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new(name: name) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_volume_restore({ name: name }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_volume_restore(::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new(name: name), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_volume_restore_client_stub.call_count + end + end + end + + def test_get_backup_index_download_url + # Create test objects. + client_result = ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse.new + http_response = OpenStruct.new body: client_result.to_json + + call_options = {} + + # Create request parameters for a unary method. + backup = "hello world" + + get_backup_index_download_url_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| + assert options.metadata.key? :"x-goog-api-client" + assert options.metadata[:"x-goog-api-client"].include? "rest" + refute options.metadata[:"x-goog-api-client"].include? "grpc" + end + + ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_backup_index_download_url_request, ["", "", {}] do + Gapic::Rest::ClientStub.stub :new, get_backup_index_download_url_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| + config.credentials = :dummy_value + end + + # Use hash object + client.get_backup_index_download_url({ backup: backup }) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use named arguments + client.get_backup_index_download_url backup: backup do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object + client.get_backup_index_download_url ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new(backup: backup) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use hash object with options + client.get_backup_index_download_url({ backup: backup }, call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Use protobuf object with options + client.get_backup_index_download_url(::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new(backup: backup), call_options) do |_result, response| + assert_equal http_response, response.underlying_op + end + + # Verify method calls + assert_equal 5, get_backup_index_download_url_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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::Rest::Client::Configuration, config + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_test.rb b/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_test.rb new file mode 100644 index 000000000000..c34b7118d5dc --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_test.rb @@ -0,0 +1,2658 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gkebackup/v1/gkebackup_pb" +require "google/cloud/gke_backup/v1/backup_for_gke" + +class ::Google::Cloud::GkeBackup::V1::BackupForGKE::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_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_plan = {} + backup_plan_id = "hello world" + + create_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup_plan, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::BackupPlan), request["backup_plan"] + assert_equal "hello world", request["backup_plan_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_backup_plan({ parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id }) do |response, 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_backup_plan parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id do |response, 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_backup_plan ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id) do |response, operation| + assert_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_backup_plan({ parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id }, grpc_options) do |response, operation| + assert_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_backup_plan(::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id), grpc_options) do |response, operation| + assert_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_backup_plan_client_stub.call_rpc_count + end + end + + def test_list_backup_plans + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_plans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_plans, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest, 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_backup_plans_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_backup_plans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_backup_plans ::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.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_backup_plans({ 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_backup_plans(::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.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_backup_plans_client_stub.call_rpc_count + end + end + + def test_get_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::BackupPlan.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_plan, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_plan({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_plan name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_plan ::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_plan({ 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_backup_plan(::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.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_backup_plan_client_stub.call_rpc_count + end + end + + def test_update_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + backup_plan = {} + update_mask = {} + + update_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_plan, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::BackupPlan), request["backup_plan"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup_plan({ backup_plan: backup_plan, 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_backup_plan backup_plan: backup_plan, 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_backup_plan ::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, 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_backup_plan({ backup_plan: backup_plan, 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_backup_plan(::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, 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_backup_plan_client_stub.call_rpc_count + end + end + + def test_delete_backup_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup_plan, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup_plan({ 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_backup_plan 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_backup_plan ::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.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_backup_plan({ 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_backup_plan(::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.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_backup_plan_client_stub.call_rpc_count + end + end + + def test_create_backup_channel + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup_channel = {} + backup_channel_id = "hello world" + + create_backup_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup_channel, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::BackupChannel), request["backup_channel"] + assert_equal "hello world", request["backup_channel_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_backup_channel({ parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id }) do |response, 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_backup_channel parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id do |response, 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_backup_channel ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new(parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id) do |response, operation| + assert_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_backup_channel({ parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id }, grpc_options) do |response, operation| + assert_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_backup_channel(::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new(parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id), grpc_options) do |response, operation| + assert_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_backup_channel_client_stub.call_rpc_count + end + end + + def test_list_backup_channels + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_channels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_channels, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest, 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_backup_channels_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backup_channels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_backup_channels parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_backup_channels ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.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_backup_channels({ 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_backup_channels(::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.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_backup_channels_client_stub.call_rpc_count + end + end + + def test_get_backup_channel + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::BackupChannel.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_channel, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_channel({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_channel name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_channel ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_channel({ 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_backup_channel(::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.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_backup_channel_client_stub.call_rpc_count + end + end + + def test_update_backup_channel + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + backup_channel = {} + update_mask = {} + + update_backup_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup_channel, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::BackupChannel), request["backup_channel"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup_channel({ backup_channel: backup_channel, 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_backup_channel backup_channel: backup_channel, 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_backup_channel ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new(backup_channel: backup_channel, 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_backup_channel({ backup_channel: backup_channel, 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_backup_channel(::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new(backup_channel: backup_channel, 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_backup_channel_client_stub.call_rpc_count + end + end + + def test_delete_backup_channel + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + force = true + + delete_backup_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup_channel, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup_channel({ name: name, etag: etag, 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_backup_channel name: name, etag: etag, 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_backup_channel ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new(name: name, etag: etag, 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_backup_channel({ name: name, etag: etag, 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_backup_channel(::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new(name: name, etag: etag, 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_backup_channel_client_stub.call_rpc_count + end + end + + def test_list_backup_plan_bindings + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_plan_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backup_plan_bindings, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest, 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_backup_plan_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backup_plan_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_backup_plan_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_backup_plan_bindings ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.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_backup_plan_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_backup_plan_bindings(::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.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_backup_plan_bindings_client_stub.call_rpc_count + end + end + + def test_get_backup_plan_binding + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::BackupPlanBinding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_plan_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_plan_binding, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_plan_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_plan_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_plan_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_plan_binding ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_plan_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_backup_plan_binding(::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.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_backup_plan_binding_client_stub.call_rpc_count + end + end + + def test_create_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + backup = {} + backup_id = "hello world" + + create_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_backup, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::CreateBackupRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::Backup), request["backup"] + assert_equal "hello world", request["backup_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_backup_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_backup({ parent: parent, backup: backup, backup_id: backup_id }) do |response, 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_backup parent: parent, backup: backup, backup_id: backup_id do |response, 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_backup ::Google::Cloud::GkeBackup::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id) do |response, operation| + assert_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_backup({ parent: parent, backup: backup, backup_id: backup_id }, grpc_options) do |response, operation| + assert_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_backup(::Google::Cloud::GkeBackup::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id), grpc_options) do |response, operation| + assert_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_backup_client_stub.call_rpc_count + end + end + + def test_list_backups + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::ListBackupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + return_partial_success = true + + list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_backups, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::ListBackupsRequest, 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"] + assert_equal true, request["return_partial_success"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, list_backups_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups ::Google::Cloud::GkeBackup::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups(::Google::Cloud::GkeBackup::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups_client_stub.call_rpc_count + end + end + + def test_get_backup + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::Backup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::GetBackupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup ::Google::Cloud::GkeBackup::V1::GetBackupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup({ 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_backup(::Google::Cloud::GkeBackup::V1::GetBackupRequest.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_backup_client_stub.call_rpc_count + end + end + + def test_update_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + backup = {} + update_mask = {} + + update_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_backup, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::Backup), request["backup"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_backup_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_backup({ backup: backup, 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_backup backup: backup, 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_backup ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new(backup: backup, 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_backup({ backup: backup, 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_backup(::Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new(backup: backup, 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_backup_client_stub.call_rpc_count + end + end + + def test_delete_backup + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + force = true + + delete_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_backup, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_backup_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_backup({ name: name, etag: etag, 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_backup name: name, etag: etag, 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_backup ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new(name: name, etag: etag, 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_backup({ name: name, etag: etag, 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_backup(::Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new(name: name, etag: etag, 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_backup_client_stub.call_rpc_count + end + end + + def test_list_volume_backups + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_volume_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_volume_backups, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, 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_volume_backups_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_volume_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_volume_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_volume_backups ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.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_volume_backups({ 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_volume_backups(::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.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_volume_backups_client_stub.call_rpc_count + end + end + + def test_get_volume_backup + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::VolumeBackup.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_volume_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_volume_backup, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_volume_backup_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_volume_backup({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_volume_backup name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_volume_backup ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_volume_backup({ 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_volume_backup(::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.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_volume_backup_client_stub.call_rpc_count + end + end + + def test_create_restore_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + restore_plan = {} + restore_plan_id = "hello world" + + create_restore_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_restore_plan, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::RestorePlan), request["restore_plan"] + assert_equal "hello world", request["restore_plan_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_restore_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_restore_plan({ parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id }) do |response, 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_restore_plan parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id do |response, 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_restore_plan ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new(parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id) do |response, operation| + assert_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_restore_plan({ parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id }, grpc_options) do |response, operation| + assert_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_restore_plan(::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new(parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id), grpc_options) do |response, operation| + assert_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_restore_plan_client_stub.call_rpc_count + end + end + + def test_list_restore_plans + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_restore_plans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_restore_plans, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, 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_restore_plans_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_restore_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_restore_plans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_restore_plans ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.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_restore_plans({ 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_restore_plans(::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.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_restore_plans_client_stub.call_rpc_count + end + end + + def test_get_restore_plan + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::RestorePlan.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_restore_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_restore_plan, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_restore_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_restore_plan({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_restore_plan name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_restore_plan ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_restore_plan({ 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_restore_plan(::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.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_restore_plan_client_stub.call_rpc_count + end + end + + def test_update_restore_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + restore_plan = {} + update_mask = {} + + update_restore_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_restore_plan, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::RestorePlan), request["restore_plan"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_restore_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_restore_plan({ restore_plan: restore_plan, 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_restore_plan restore_plan: restore_plan, 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_restore_plan ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new(restore_plan: restore_plan, 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_restore_plan({ restore_plan: restore_plan, 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_restore_plan(::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new(restore_plan: restore_plan, 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_restore_plan_client_stub.call_rpc_count + end + end + + def test_delete_restore_plan + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + force = true + + delete_restore_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_restore_plan, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_restore_plan_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_restore_plan({ name: name, etag: etag, 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_restore_plan name: name, etag: etag, 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_restore_plan ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new(name: name, etag: etag, 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_restore_plan({ name: name, etag: etag, 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_restore_plan(::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new(name: name, etag: etag, 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_restore_plan_client_stub.call_rpc_count + end + end + + def test_create_restore_channel + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + restore_channel = {} + restore_channel_id = "hello world" + + create_restore_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_restore_channel, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::RestoreChannel), request["restore_channel"] + assert_equal "hello world", request["restore_channel_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_restore_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_restore_channel({ parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id }) do |response, 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_restore_channel parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id do |response, 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_restore_channel ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new(parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id) do |response, operation| + assert_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_restore_channel({ parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id }, grpc_options) do |response, operation| + assert_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_restore_channel(::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new(parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id), grpc_options) do |response, operation| + assert_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_restore_channel_client_stub.call_rpc_count + end + end + + def test_list_restore_channels + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_restore_channels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_restore_channels, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest, 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_restore_channels_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_restore_channels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_restore_channels parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_restore_channels ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.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_restore_channels({ 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_restore_channels(::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.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_restore_channels_client_stub.call_rpc_count + end + end + + def test_get_restore_channel + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::RestoreChannel.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_restore_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_restore_channel, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_restore_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_restore_channel({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_restore_channel name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_restore_channel ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_restore_channel({ 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_restore_channel(::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.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_restore_channel_client_stub.call_rpc_count + end + end + + def test_update_restore_channel + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + restore_channel = {} + update_mask = {} + + update_restore_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_restore_channel, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::RestoreChannel), request["restore_channel"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_restore_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_restore_channel({ restore_channel: restore_channel, 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_restore_channel restore_channel: restore_channel, 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_restore_channel ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new(restore_channel: restore_channel, 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_restore_channel({ restore_channel: restore_channel, 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_restore_channel(::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new(restore_channel: restore_channel, 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_restore_channel_client_stub.call_rpc_count + end + end + + def test_delete_restore_channel + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_restore_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_restore_channel, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_restore_channel_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_restore_channel({ 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_restore_channel 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_restore_channel ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.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_restore_channel({ 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_restore_channel(::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.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_restore_channel_client_stub.call_rpc_count + end + end + + def test_list_restore_plan_bindings + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_restore_plan_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_restore_plan_bindings, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest, 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_restore_plan_bindings_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_restore_plan_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_restore_plan_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_restore_plan_bindings ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.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_restore_plan_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_restore_plan_bindings(::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.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_restore_plan_bindings_client_stub.call_rpc_count + end + end + + def test_get_restore_plan_binding + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::RestorePlanBinding.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_restore_plan_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_restore_plan_binding, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_restore_plan_binding_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_restore_plan_binding({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_restore_plan_binding name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_restore_plan_binding ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_restore_plan_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_restore_plan_binding(::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.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_restore_plan_binding_client_stub.call_rpc_count + end + end + + def test_create_restore + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + parent = "hello world" + restore = {} + restore_id = "hello world" + + create_restore_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :create_restore, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::CreateRestoreRequest, request + assert_equal "hello world", request["parent"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::Restore), request["restore"] + assert_equal "hello world", request["restore_id"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, create_restore_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.create_restore({ parent: parent, restore: restore, restore_id: restore_id }) do |response, 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_restore parent: parent, restore: restore, restore_id: restore_id do |response, 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_restore ::Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new(parent: parent, restore: restore, restore_id: restore_id) do |response, operation| + assert_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_restore({ parent: parent, restore: restore, restore_id: restore_id }, grpc_options) do |response, operation| + assert_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_restore(::Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new(parent: parent, restore: restore, restore_id: restore_id), grpc_options) do |response, operation| + assert_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_restore_client_stub.call_rpc_count + end + end + + def test_list_restores + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::ListRestoresResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_restores_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_restores, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::ListRestoresRequest, 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_restores_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_restores({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_restores parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_restores ::Google::Cloud::GkeBackup::V1::ListRestoresRequest.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_restores({ 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_restores(::Google::Cloud::GkeBackup::V1::ListRestoresRequest.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_restores_client_stub.call_rpc_count + end + end + + def test_get_restore + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::Restore.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_restore_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_restore, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::GetRestoreRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_restore_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_restore({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_restore name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_restore ::Google::Cloud::GkeBackup::V1::GetRestoreRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_restore({ 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_restore(::Google::Cloud::GkeBackup::V1::GetRestoreRequest.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_restore_client_stub.call_rpc_count + end + end + + def test_update_restore + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + restore = {} + update_mask = {} + + update_restore_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :update_restore, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest, request + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::Restore), request["restore"] + assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, update_restore_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.update_restore({ restore: restore, 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_restore restore: restore, 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_restore ::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new(restore: restore, 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_restore({ restore: restore, 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_restore(::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new(restore: restore, 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_restore_client_stub.call_rpc_count + end + end + + def test_delete_restore + # Create GRPC objects. + grpc_response = ::Google::Longrunning::Operation.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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" + force = true + + delete_restore_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :delete_restore, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest, request + assert_equal "hello world", request["name"] + assert_equal "hello world", request["etag"] + assert_equal true, request["force"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, delete_restore_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.delete_restore({ name: name, etag: etag, 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_restore name: name, etag: etag, 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_restore ::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new(name: name, etag: etag, 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_restore({ name: name, etag: etag, 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_restore(::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new(name: name, etag: etag, 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_restore_client_stub.call_rpc_count + end + end + + def test_list_volume_restores + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_volume_restores_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :list_volume_restores, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest, 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_volume_restores_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.list_volume_restores({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_volume_restores parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_volume_restores ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.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_volume_restores({ 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_volume_restores(::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.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_volume_restores_client_stub.call_rpc_count + end + end + + def test_get_volume_restore + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::VolumeRestore.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_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_volume_restore_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_volume_restore, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest, request + assert_equal "hello world", request["name"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_volume_restore_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_volume_restore({ name: name }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_volume_restore name: name do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_volume_restore ::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new(name: name) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_volume_restore({ 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_volume_restore(::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.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_volume_restore_client_stub.call_rpc_count + end + end + + def test_get_backup_index_download_url + # Create GRPC objects. + grpc_response = ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse.new + grpc_operation = GRPC::ActiveCall::Operation.new nil + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + grpc_options = {} + + # Create request parameters for a unary method. + backup = "hello world" + + get_backup_index_download_url_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| + assert_equal :get_backup_index_download_url, name + assert_kind_of ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest, request + assert_equal "hello world", request["backup"] + refute_nil options + end + + Gapic::ServiceStub.stub :new, get_backup_index_download_url_client_stub do + # Create client + client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + + # Use hash object + client.get_backup_index_download_url({ backup: backup }) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use named arguments + client.get_backup_index_download_url backup: backup do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object + client.get_backup_index_download_url ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new(backup: backup) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use hash object with options + client.get_backup_index_download_url({ backup: backup }, grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Use protobuf object with options + client.get_backup_index_download_url(::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new(backup: backup), grpc_options) do |response, operation| + assert_equal grpc_response, response + assert_equal grpc_operation, operation + end + + # Verify method calls + assert_equal 5, get_backup_index_download_url_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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = creds + end + assert_kind_of ::Google::Cloud::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::Client.new do |config| + config.credentials = grpc_channel + end + end + + assert_kind_of ::Google::Cloud::GkeBackup::V1::BackupForGKE::Operations, client.operations_client + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/test/helper.rb b/owl-bot-staging/google-cloud-gke_backup-v1/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup-v1/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" diff --git a/owl-bot-staging/google-cloud-gke_backup/.gitignore b/owl-bot-staging/google-cloud-gke_backup/.gitignore new file mode 100644 index 000000000000..0135b6bc6cfc --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/.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-gke_backup/.repo-metadata.json b/owl-bot-staging/google-cloud-gke_backup/.repo-metadata.json new file mode 100644 index 000000000000..f9f3879bef30 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "api_id": "gkebackup.googleapis.com", + "api_shortname": "gkebackup", + "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup/latest", + "distribution_name": "google-cloud-gke_backup", + "is_cloud": true, + "language": "ruby", + "name": "gkebackup", + "name_pretty": "Backup for GKE API", + "product_documentation": "https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/", + "release_level": "unreleased", + "repo": "googleapis/google-cloud-ruby", + "requires_billing": true, + "ruby-cloud-description": "Backup for GKE lets you protect, manage, and restore your containerized applications and data for stateful workloads running on Google Kubernetes Engine clusters.", + "ruby-cloud-product-url": "https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/", + "library_type": "GAPIC_AUTO" +} diff --git a/owl-bot-staging/google-cloud-gke_backup/.rubocop.yml b/owl-bot-staging/google-cloud-gke_backup/.rubocop.yml new file mode 100644 index 000000000000..b5042ce8eb70 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/.rubocop.yml @@ -0,0 +1,39 @@ +inherit_gem: + google-style: google-style.yml + +AllCops: + Exclude: + - "google-cloud-gke_backup.gemspec" + - "Rakefile" + - "acceptance/**/*" + - "test/**/*" + +Bundler/OrderedGems: + Enabled: false +Documentation: + Enabled: false +Layout/LineLength: + Enabled: false +Metrics/BlockLength: + Exclude: + - "samples/**/acceptance/*.rb" +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/FileName: + Exclude: + - "lib/google-cloud-gke_backup.rb" + +Style/BlockDelimiters: + Exclude: + - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-gke_backup/.toys.rb b/owl-bot-staging/google-cloud-gke_backup/.toys.rb new file mode 100644 index 000000000000..177e22456e8a --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/.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-gke_backup/.yardopts b/owl-bot-staging/google-cloud-gke_backup/.yardopts new file mode 100644 index 000000000000..73f0b541e6b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/.yardopts @@ -0,0 +1,11 @@ +--no-private +--title="Backup for GKE API" +--exclude _pb\.rb$ +--markup markdown +--markup-provider redcarpet + +./lib/**/*.rb +- +README.md +AUTHENTICATION.md +LICENSE.md diff --git a/owl-bot-staging/google-cloud-gke_backup/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gke_backup/AUTHENTICATION.md new file mode 100644 index 000000000000..77be14ebc09c --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/AUTHENTICATION.md @@ -0,0 +1,122 @@ +# Authentication + +The recommended way to authenticate to the google-cloud-gke_backup 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-gke_backup 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/gke_backup" + +client = Google::Cloud::GkeBackup.backup_for_gke do |config| + config.credentials = "path/to/credentialfile.json" +end +``` + +To configure a credentials file globally for all clients: + +```ruby +require "google/cloud/gke_backup" + +Google::Cloud::GkeBackup.configure do |config| + config.credentials = "path/to/credentialfile.json" +end + +client = Google::Cloud::GkeBackup.backup_for_gke +``` + +### 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-gke_backup +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/gke_backup" + +ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" + +client = Google::Cloud::GkeBackup.backup_for_gke +``` + +### 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-gke_backup/CHANGELOG.md b/owl-bot-staging/google-cloud-gke_backup/CHANGELOG.md new file mode 100644 index 000000000000..f88957a62ba2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/CHANGELOG.md @@ -0,0 +1,2 @@ +# Release History + diff --git a/owl-bot-staging/google-cloud-gke_backup/Gemfile b/owl-bot-staging/google-cloud-gke_backup/Gemfile new file mode 100644 index 000000000000..812c2196554d --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/Gemfile @@ -0,0 +1,28 @@ +source "https://rubygems.org" + +gemspec + +local_dependencies = ["google-cloud-gke_backup-v1"] + +main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-gke_backup.gemspec")) +local_dependencies.each do |name| + spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ + unless File.file? spec_path + warn "WARNING: Disabled local dependency for #{name} because gemspec not found." + next + end + version = Bundler.load_gemspec(spec_path).version + if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } + warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." + next + end + gem name, path: "../#{name}" +end + +gem "google-style", "~> 1.30.1" +gem "minitest", "~> 5.22" +gem "minitest-focus", "~> 1.4" +gem "minitest-rg", "~> 5.3" +gem "rake", ">= 13.0" +gem "redcarpet", "~> 3.6" +gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gke_backup/LICENSE.md b/owl-bot-staging/google-cloud-gke_backup/LICENSE.md new file mode 100644 index 000000000000..c261857ba6ad --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/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-gke_backup/README.md b/owl-bot-staging/google-cloud-gke_backup/README.md new file mode 100644 index 000000000000..0011d7c132ff --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/README.md @@ -0,0 +1,142 @@ +# Ruby Client for the Backup for GKE API + +API Client library for the Backup for GKE API + +Backup for GKE lets you protect, manage, and restore your containerized applications and data for stateful workloads running on Google Kubernetes Engine clusters. + +Actual client classes for the various versions of this API are defined in +_versioned_ client gems, with names of the form `google-cloud-gke_backup-v*`. +The gem `google-cloud-gke_backup` is the main client library that brings the +versioned gems in as dependencies, and provides high-level methods for +constructing clients. More information on versioned clients can be found below +in the section titled *Which client should I use?*. + +View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup/latest) +for this library, google-cloud-gke_backup, to see the convenience methods for +constructing client objects. Reference documentation for the client objects +themselves can be found in the client library documentation for the versioned +client gems: +[google-cloud-gke_backup-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest). + +See also the [Product Documentation](https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/) +for more usage information. + +## Quick Start + +``` +$ gem install google-cloud-gke_backup +``` + +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/gkebackup.googleapis.com) +1. [Set up authentication.](AUTHENTICATION.md) + +```ruby +require "google/cloud/gke_backup" + +client = Google::Cloud::GkeBackup.backup_for_gke +request = ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new # (request fields as keyword arguments...) +response = client.create_backup_plan request +``` + +## 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. + +Debug logging also requires that the versioned clients for this service be +sufficiently recent, released after about Dec 10, 2024. If logging is not +working, try updating the versioned clients in your bundle or installed gems: +[google-cloud-gke_backup-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest). + +## 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-gke_backup`, +and lower-level _versioned_ client libraries with names such as +`google-cloud-gke_backup-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-gke_backup`. +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-gke_backup-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-gke_backup/Rakefile b/owl-bot-staging/google-cloud-gke_backup/Rakefile new file mode 100644 index 000000000000..dfb2030ce6d0 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/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 = true +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-gke_backup 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/gke_backup/v1/backup_for_gke/credentials" + ::Google::Cloud::GkeBackup::V1::BackupForGKE::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-gke_backup 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-gke_backup 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-gke_backup 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-gke_backup gem does not have doctest tests." +end + +desc "Run the CI build" +task :ci do + header "BUILDING google-cloud-gke_backup" + header "google-cloud-gke_backup rubocop", "*" + Rake::Task[:rubocop].invoke + header "google-cloud-gke_backup yard", "*" + Rake::Task[:yard].invoke + header "google-cloud-gke_backup 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-gke_backup 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-gke_backup 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-gke_backup/google-cloud-gke_backup.gemspec b/owl-bot-staging/google-cloud-gke_backup/google-cloud-gke_backup.gemspec new file mode 100644 index 000000000000..0d9d4aa105b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/google-cloud-gke_backup.gemspec @@ -0,0 +1,27 @@ +# -*- ruby -*- +# encoding: utf-8 + +require File.expand_path("lib/google/cloud/gke_backup/version", __dir__) + +Gem::Specification.new do |gem| + gem.name = "google-cloud-gke_backup" + gem.version = Google::Cloud::GkeBackup::VERSION + + gem.authors = ["Google LLC"] + gem.email = "googleapis-packages@google.com" + gem.description = "Backup for GKE lets you protect, manage, and restore your containerized applications and data for stateful workloads running on Google Kubernetes Engine clusters." + gem.summary = "API Client library for the Backup for GKE API" + 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") + + ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] + gem.require_paths = ["lib"] + + gem.required_ruby_version = ">= 3.0" + + gem.add_dependency "google-cloud-core", "~> 1.6" + gem.add_dependency "google-cloud-gke_backup-v1", "~> 1.0" +end diff --git a/owl-bot-staging/google-cloud-gke_backup/lib/google-cloud-gke_backup.rb b/owl-bot-staging/google-cloud-gke_backup/lib/google-cloud-gke_backup.rb new file mode 100644 index 000000000000..a4cdd9d60eb0 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/lib/google-cloud-gke_backup.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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/gke_backup" unless defined? Google::Cloud::GkeBackup::VERSION diff --git a/owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup.rb b/owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup.rb new file mode 100644 index 000000000000..7047e6279a27 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup.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! + +# Require this file early so that the version constant gets defined before +# requiring "google/cloud". This is because google-cloud-core will load the +# entrypoint (gem name) file, which in turn re-requires this file (hence +# causing a require cycle) unless the version constant is already defined. +require "google/cloud/gke_backup/version" + +require "googleauth" +gem "google-cloud-core" +require "google/cloud" unless defined? ::Google::Cloud.new +require "google/cloud/config" + +# Set the default configuration +::Google::Cloud.configure.add_config! :gke_backup do |config| + config.add_field! :endpoint, nil, match: ::String + config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] + config.add_field! :scope, nil, match: [::Array, ::String] + config.add_field! :lib_name, nil, match: ::String + config.add_field! :lib_version, nil, match: ::String + config.add_field! :interceptors, nil, match: ::Array + config.add_field! :timeout, nil, match: ::Numeric + config.add_field! :metadata, nil, match: ::Hash + config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] + config.add_field! :quota_project, nil, match: ::String + config.add_field! :universe_domain, nil, match: ::String +end + +module Google + module Cloud + module GkeBackup + ## + # Create a new client object for BackupForGKE. + # + # By default, this returns an instance of + # [Google::Cloud::GkeBackup::V1::BackupForGKE::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Cloud-GkeBackup-V1-BackupForGKE-Client) + # for a gRPC client for version V1 of the API. + # However, you can specify a different API version by passing it in the + # `version` parameter. If the BackupForGKE service is + # supported by that API version, and the corresponding gem is available, the + # appropriate versioned client will be returned. + # You can also specify a different transport by passing `:rest` or `:grpc` in + # the `transport` parameter. + # + # Raises an exception if the currently installed versioned client gem for the + # given API version does not support the given transport of the BackupForGKE service. + # You can determine whether the method will succeed by calling + # {Google::Cloud::GkeBackup.backup_for_gke_available?}. + # + # ## About BackupForGKE + # + # BackupForGKE allows Kubernetes administrators to configure, execute, and + # manage backup and restore operations for their GKE clusters. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [::Object] A client object for the specified version. + # + def self.backup_for_gke version: :v1, transport: :grpc, &block + require "google/cloud/gke_backup/#{version.to_s.downcase}" + + package_name = Google::Cloud::GkeBackup + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + service_module = Google::Cloud::GkeBackup.const_get(package_name).const_get(:BackupForGKE) + service_module = service_module.const_get(:Rest) if transport == :rest + service_module.const_get(:Client).new(&block) + end + + ## + # Determines whether the BackupForGKE service is supported by the current client. + # If true, you can retrieve a client object by calling {Google::Cloud::GkeBackup.backup_for_gke}. + # If false, that method will raise an exception. This could happen if the given + # API version does not exist or does not support the BackupForGKE service, + # or if the versioned client gem needs an update to support the BackupForGKE service. + # + # @param version [::String, ::Symbol] The API version to connect to. Optional. + # Defaults to `:v1`. + # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. + # @return [boolean] Whether the service is available. + # + def self.backup_for_gke_available? version: :v1, transport: :grpc + require "google/cloud/gke_backup/#{version.to_s.downcase}" + package_name = Google::Cloud::GkeBackup + .constants + .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } + .first + return false unless package_name + service_module = Google::Cloud::GkeBackup.const_get package_name + return false unless service_module.const_defined? :BackupForGKE + service_module = service_module.const_get :BackupForGKE + if transport == :rest + return false unless service_module.const_defined? :Rest + service_module = service_module.const_get :Rest + end + service_module.const_defined? :Client + rescue ::LoadError + false + end + + ## + # Configure the google-cloud-gke_backup library. + # + # The following configuration parameters are supported: + # + # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - + # The path to the keyfile as a String, the contents of the keyfile as a + # Hash, or a Google::Auth::Credentials object. + # * `lib_name` (*type:* `String`) - + # The library name as recorded in instrumentation and logging. + # * `lib_version` (*type:* `String`) - + # The library version as recorded in instrumentation and logging. + # * `interceptors` (*type:* `Array`) - + # An array of interceptors that are run before calls are executed. + # * `timeout` (*type:* `Numeric`) - + # Default timeout in seconds. + # * `metadata` (*type:* `Hash{Symbol=>String}`) - + # Additional headers to be sent with the call. + # * `retry_policy` (*type:* `Hash`) - + # 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 [::Google::Cloud::Config] The default configuration used by this library + # + def self.configure + yield ::Google::Cloud.configure.gke_backup if block_given? + + ::Google::Cloud.configure.gke_backup + end + end + end +end + +helper_path = ::File.join __dir__, "gke_backup", "helpers.rb" +require "google/cloud/gke_backup/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup/version.rb b/owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup/version.rb new file mode 100644 index 000000000000..539dad38ab16 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup/version.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! + + +module Google + module Cloud + module GkeBackup + VERSION = "0.0.1" + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/client_test.rb b/owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/client_test.rb new file mode 100644 index 000000000000..e48b43f3eaa6 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/client_test.rb @@ -0,0 +1,64 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# 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 "google/cloud/gke_backup" +require "gapic/common" +require "gapic/grpc" +require "gapic/rest" + +class Google::Cloud::GkeBackup::ClientConstructionMinitest < 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_backup_for_gke_grpc + skip unless Google::Cloud::GkeBackup.backup_for_gke_available? transport: :grpc + Gapic::ServiceStub.stub :new, DummyStub.new do + grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure + client = Google::Cloud::GkeBackup.backup_for_gke transport: :grpc do |config| + config.credentials = grpc_channel + end + assert_kind_of Google::Cloud::GkeBackup::V1::BackupForGKE::Client, client + end + end + + def test_backup_for_gke_rest + skip unless Google::Cloud::GkeBackup.backup_for_gke_available? transport: :rest + Gapic::Rest::ClientStub.stub :new, DummyStub.new do + client = Google::Cloud::GkeBackup.backup_for_gke transport: :rest do |config| + config.credentials = :dummy_credentials + end + assert_kind_of Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client, client + end + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/version_test.rb b/owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/version_test.rb new file mode 100644 index 000000000000..63c8789f6038 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/version_test.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 "helper" +require "google/cloud/gke_backup/version" + +class Google::Cloud::GkeBackup::VersionMinitest < Minitest::Test + def test_has_a_version + refute_nil Google::Cloud::GkeBackup::VERSION + end +end diff --git a/owl-bot-staging/google-cloud-gke_backup/test/helper.rb b/owl-bot-staging/google-cloud-gke_backup/test/helper.rb new file mode 100644 index 000000000000..f0e715458fa2 --- /dev/null +++ b/owl-bot-staging/google-cloud-gke_backup/test/helper.rb @@ -0,0 +1,25 @@ +# frozen_string_literal: true + +# Copyright 2026 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Auto-generated by gapic-generator-ruby. DO NOT EDIT! + +require "minitest/autorun" +require "minitest/focus" +require "minitest/rg" + +require "grpc" + +require "ostruct" From fa88685251ccf5dff099e83e883764a7a348a32c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Mon, 5 Jan 2026 22:25:20 +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 --- .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 39 - .../google-cloud-essential_contacts/.toys.rb | 28 - .../google-cloud-essential_contacts/.yardopts | 11 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-essential_contacts/Gemfile | 28 - .../LICENSE.md | 201 - .../google-cloud-essential_contacts/README.md | 142 - .../google-cloud-essential_contacts/Rakefile | 169 - .../google-cloud-essential_contacts.gemspec | 27 - .../lib/google-cloud-essential_contacts.rb | 19 - .../lib/google/cloud/essential_contacts.rb | 156 - .../cloud/essential_contacts/version.rb | 26 - .../cloud/essential_contacts/client_test.rb | 64 - .../cloud/essential_contacts/version_test.rb | 26 - .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 33 - ...oogle-cloud-eventarc-publishing-v1.gemspec | 28 - .../google-cloud-eventarc-publishing-v1.rb | 21 - .../google/cloud/eventarc/publishing/v1.rb | 47 - .../eventarc/publishing/v1/cloud_event_pb.rb | 51 - .../cloud/eventarc/publishing/v1/publisher.rb | 84 - .../publishing/v1/publisher/client.rb | 729 --- .../publishing/v1/publisher/credentials.rb | 53 - .../eventarc/publishing/v1/publisher/rest.rb | 81 - .../publishing/v1/publisher/rest/client.rb | 665 --- .../v1/publisher/rest/service_stub.rb | 269 - .../eventarc/publishing/v1/publisher_pb.rb | 58 - .../publishing/v1/publisher_services_pb.rb | 79 - .../cloud/eventarc/publishing/v1/rest.rb | 39 - .../cloud/eventarc/publishing/v1/version.rb | 30 - .../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 - .../eventarc/publishing/v1/cloud_event.rb | 125 - .../cloud/eventarc/publishing/v1/publisher.rb | 119 - .../proto_docs/google/protobuf/any.rb | 145 - .../proto_docs/google/protobuf/duration.rb | 98 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../snippets/Gemfile | 32 - .../snippets/publisher/publish.rb | 47 - .../publish_channel_connection_events.rb | 47 - .../snippets/publisher/publish_events.rb | 47 - ...a_google.cloud.eventarc.publishing.v1.json | 135 - .../publishing/v1/publisher_rest_test.rb | 266 - .../eventarc/publishing/v1/publisher_test.rb | 289 - .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 39 - .../google-cloud-eventarc-publishing/.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-eventarc-publishing/Gemfile | 28 - .../LICENSE.md | 201 - .../README.md | 142 - .../google-cloud-eventarc-publishing/Rakefile | 169 - .../google-cloud-eventarc-publishing.gemspec | 27 - .../lib/google-cloud-eventarc-publishing.rb | 19 - .../lib/google/cloud/eventarc/publishing.rb | 186 - .../cloud/eventarc/publishing/version.rb | 28 - .../cloud/eventarc/publishing/client_test.rb | 64 - .../cloud/eventarc/publishing/version_test.rb | 26 - .../test/helper.rb | 25 - .../google-cloud-eventarc-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-eventarc-v1/.rubocop.yml | 33 - .../google-cloud-eventarc-v1/.toys.rb | 28 - .../google-cloud-eventarc-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-eventarc-v1/CHANGELOG.md | 2 - .../google-cloud-eventarc-v1/Gemfile | 11 - .../google-cloud-eventarc-v1/LICENSE.md | 201 - .../google-cloud-eventarc-v1/README.md | 154 - .../google-cloud-eventarc-v1/Rakefile | 169 - .../gapic_metadata.json | 213 - .../google-cloud-eventarc-v1.gemspec | 30 - .../lib/google-cloud-eventarc-v1.rb | 21 - .../lib/google/cloud/eventarc/v1.rb | 45 - .../cloud/eventarc/v1/bindings_override.rb | 276 - .../eventarc/v1/channel_connection_pb.rb | 47 - .../google/cloud/eventarc/v1/channel_pb.rb | 48 - .../google/cloud/eventarc/v1/discovery_pb.rb | 47 - .../google/cloud/eventarc/v1/enrollment_pb.rb | 47 - .../lib/google/cloud/eventarc/v1/eventarc.rb | 57 - .../cloud/eventarc/v1/eventarc/client.rb | 4680 ---------------- .../cloud/eventarc/v1/eventarc/credentials.rb | 51 - .../cloud/eventarc/v1/eventarc/operations.rb | 841 --- .../cloud/eventarc/v1/eventarc/paths.rb | 331 -- .../google/cloud/eventarc/v1/eventarc/rest.rb | 55 - .../cloud/eventarc/v1/eventarc/rest/client.rb | 4373 --------------- .../eventarc/v1/eventarc/rest/operations.rb | 925 ---- .../eventarc/v1/eventarc/rest/service_stub.rb | 2474 --------- .../google/cloud/eventarc/v1/eventarc_pb.rb | 118 - .../cloud/eventarc/v1/eventarc_services_pb.rb | 124 - .../cloud/eventarc/v1/google_api_source_pb.rb | 52 - .../eventarc/v1/google_channel_config_pb.rb | 47 - .../cloud/eventarc/v1/logging_config_pb.rb | 45 - .../cloud/eventarc/v1/message_bus_pb.rb | 49 - .../cloud/eventarc/v1/network_config_pb.rb | 45 - .../google/cloud/eventarc/v1/pipeline_pb.rb | 65 - .../lib/google/cloud/eventarc/v1/rest.rb | 38 - .../google/cloud/eventarc/v1/trigger_pb.rb | 59 - .../lib/google/cloud/eventarc/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/eventarc/v1/channel.rb | 120 - .../cloud/eventarc/v1/channel_connection.rb | 71 - .../google/cloud/eventarc/v1/discovery.rb | 90 - .../google/cloud/eventarc/v1/enrollment.rb | 95 - .../google/cloud/eventarc/v1/eventarc.rb | 940 ---- .../cloud/eventarc/v1/google_api_source.rb | 132 - .../eventarc/v1/google_channel_config.rb | 64 - .../cloud/eventarc/v1/logging_config.rb | 78 - .../google/cloud/eventarc/v1/message_bus.rb | 94 - .../cloud/eventarc/v1/network_config.rb | 37 - .../google/cloud/eventarc/v1/pipeline.rb | 606 --- .../google/cloud/eventarc/v1/trigger.rb | 316 -- .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/code.rb | 185 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../google-cloud-eventarc-v1/snippets/Gemfile | 32 - .../snippets/eventarc/create_channel.rb | 54 - .../eventarc/create_channel_connection.rb | 54 - .../snippets/eventarc/create_enrollment.rb | 54 - .../eventarc/create_google_api_source.rb | 54 - .../snippets/eventarc/create_message_bus.rb | 54 - .../snippets/eventarc/create_pipeline.rb | 54 - .../snippets/eventarc/create_trigger.rb | 54 - .../snippets/eventarc/delete_channel.rb | 54 - .../eventarc/delete_channel_connection.rb | 54 - .../snippets/eventarc/delete_enrollment.rb | 54 - .../eventarc/delete_google_api_source.rb | 54 - .../snippets/eventarc/delete_message_bus.rb | 54 - .../snippets/eventarc/delete_pipeline.rb | 54 - .../snippets/eventarc/delete_trigger.rb | 54 - .../snippets/eventarc/get_channel.rb | 47 - .../eventarc/get_channel_connection.rb | 47 - .../snippets/eventarc/get_enrollment.rb | 47 - .../eventarc/get_google_api_source.rb | 47 - .../eventarc/get_google_channel_config.rb | 47 - .../snippets/eventarc/get_message_bus.rb | 47 - .../snippets/eventarc/get_pipeline.rb | 47 - .../snippets/eventarc/get_provider.rb | 47 - .../snippets/eventarc/get_trigger.rb | 47 - .../eventarc/list_channel_connections.rb | 51 - .../snippets/eventarc/list_channels.rb | 51 - .../snippets/eventarc/list_enrollments.rb | 51 - .../eventarc/list_google_api_sources.rb | 51 - .../eventarc/list_message_bus_enrollments.rb | 47 - .../snippets/eventarc/list_message_buses.rb | 51 - .../snippets/eventarc/list_pipelines.rb | 51 - .../snippets/eventarc/list_providers.rb | 51 - .../snippets/eventarc/list_triggers.rb | 51 - .../snippets/eventarc/update_channel.rb | 54 - .../snippets/eventarc/update_enrollment.rb | 54 - .../eventarc/update_google_api_source.rb | 54 - .../eventarc/update_google_channel_config.rb | 47 - .../snippets/eventarc/update_message_bus.rb | 54 - .../snippets/eventarc/update_pipeline.rb | 54 - .../snippets/eventarc/update_trigger.rb | 54 - ...pet_metadata_google.cloud.eventarc.v1.json | 1575 ------ .../eventarc/v1/eventarc_operations_test.rb | 400 -- .../cloud/eventarc/v1/eventarc_paths_test.rb | 244 - .../cloud/eventarc/v1/eventarc_rest_test.rb | 2290 -------- .../google/cloud/eventarc/v1/eventarc_test.rb | 2690 ---------- .../google-cloud-eventarc-v1/test/helper.rb | 25 - .../google-cloud-eventarc/.gitignore | 22 - .../google-cloud-eventarc/.repo-metadata.json | 18 - .../google-cloud-eventarc/.rubocop.yml | 39 - .../google-cloud-eventarc/.toys.rb | 28 - .../google-cloud-eventarc/.yardopts | 11 - .../google-cloud-eventarc/AUTHENTICATION.md | 122 - .../google-cloud-eventarc/CHANGELOG.md | 2 - owl-bot-staging/google-cloud-eventarc/Gemfile | 28 - .../google-cloud-eventarc/LICENSE.md | 201 - .../google-cloud-eventarc/README.md | 142 - .../google-cloud-eventarc/Rakefile | 169 - .../google-cloud-eventarc.gemspec | 27 - .../lib/google-cloud-eventarc.rb | 19 - .../lib/google/cloud/eventarc.rb | 157 - .../lib/google/cloud/eventarc/version.rb | 26 - .../test/google/cloud/eventarc/client_test.rb | 64 - .../google/cloud/eventarc/version_test.rb | 26 - .../google-cloud-eventarc/test/helper.rb | 25 - .../google-cloud-filestore-v1/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-filestore-v1/.rubocop.yml | 33 - .../google-cloud-filestore-v1/.toys.rb | 28 - .../google-cloud-filestore-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-filestore-v1/CHANGELOG.md | 2 - .../google-cloud-filestore-v1/Gemfile | 11 - .../google-cloud-filestore-v1/LICENSE.md | 201 - .../google-cloud-filestore-v1/README.md | 154 - .../google-cloud-filestore-v1/Rakefile | 169 - .../gapic_metadata.json | 108 - .../google-cloud-filestore-v1.gemspec | 30 - .../lib/google-cloud-filestore-v1.rb | 21 - .../lib/google/cloud/filestore/v1.rb | 45 - .../cloud/filestore/v1/bindings_override.rb | 75 - .../filestore/v1/cloud_filestore_manager.rb | 74 - .../v1/cloud_filestore_manager/client.rb | 2370 -------- .../v1/cloud_filestore_manager/credentials.rb | 47 - .../v1/cloud_filestore_manager/operations.rb | 841 --- .../v1/cloud_filestore_manager/paths.rb | 109 - .../v1/cloud_filestore_manager/rest.rb | 72 - .../v1/cloud_filestore_manager/rest/client.rb | 2209 -------- .../rest/operations.rb | 925 ---- .../rest/service_stub.rb | 1188 ---- .../v1/cloud_filestore_service_pb.rb | 101 - .../v1/cloud_filestore_service_services_pb.rb | 107 - .../lib/google/cloud/filestore/v1/rest.rb | 38 - .../lib/google/cloud/filestore/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/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/common/operation_metadata.rb | 54 - .../filestore/v1/cloud_filestore_service.rb | 1103 ---- .../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/timestamp.rb | 127 - .../proto_docs/google/protobuf/wrappers.rb | 121 - .../proto_docs/google/rpc/status.rb | 48 - .../snippets/Gemfile | 32 - .../cloud_filestore_manager/create_backup.rb | 54 - .../create_instance.rb | 54 - .../create_snapshot.rb | 54 - .../cloud_filestore_manager/delete_backup.rb | 54 - .../delete_instance.rb | 54 - .../delete_snapshot.rb | 54 - .../cloud_filestore_manager/get_backup.rb | 47 - .../cloud_filestore_manager/get_instance.rb | 47 - .../cloud_filestore_manager/get_snapshot.rb | 47 - .../cloud_filestore_manager/list_backups.rb | 51 - .../cloud_filestore_manager/list_instances.rb | 51 - .../cloud_filestore_manager/list_snapshots.rb | 51 - .../promote_replica.rb | 54 - .../restore_instance.rb | 54 - .../revert_instance.rb | 54 - .../cloud_filestore_manager/update_backup.rb | 54 - .../update_instance.rb | 54 - .../update_snapshot.rb | 54 - ...et_metadata_google.cloud.filestore.v1.json | 735 --- ...cloud_filestore_manager_operations_test.rb | 400 -- .../v1/cloud_filestore_manager_paths_test.rb | 91 - .../v1/cloud_filestore_manager_rest_test.rb | 1098 ---- .../v1/cloud_filestore_manager_test.rb | 1292 ----- .../google-cloud-filestore-v1/test/helper.rb | 25 - .../google-cloud-filestore/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-filestore/.rubocop.yml | 39 - .../google-cloud-filestore/.toys.rb | 28 - .../google-cloud-filestore/.yardopts | 11 - .../google-cloud-filestore/AUTHENTICATION.md | 122 - .../google-cloud-filestore/CHANGELOG.md | 2 - .../google-cloud-filestore/Gemfile | 28 - .../google-cloud-filestore/LICENSE.md | 201 - .../google-cloud-filestore/README.md | 142 - .../google-cloud-filestore/Rakefile | 169 - .../google-cloud-filestore.gemspec | 27 - .../lib/google-cloud-filestore.rb | 19 - .../lib/google/cloud/filestore.rb | 174 - .../lib/google/cloud/filestore/version.rb | 26 - .../google/cloud/filestore/client_test.rb | 64 - .../google/cloud/filestore/version_test.rb | 26 - .../google-cloud-filestore/test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 208 - ...google-cloud-financial_services-v1.gemspec | 29 - .../lib/google-cloud-financial_services-v1.rb | 21 - .../lib/google/cloud/financial_services/v1.rb | 45 - .../google/cloud/financial_services/v1/aml.rb | 57 - .../cloud/financial_services/v1/aml/client.rb | 4704 ---------------- .../financial_services/v1/aml/credentials.rb | 47 - .../financial_services/v1/aml/operations.rb | 841 --- .../cloud/financial_services/v1/aml/paths.rb | 195 - .../cloud/financial_services/v1/aml/rest.rb | 55 - .../financial_services/v1/aml/rest/client.rb | 4403 --------------- .../v1/aml/rest/operations.rb | 925 ---- .../v1/aml/rest/service_stub.rb | 2417 --------- .../v1/bindings_override.rb | 75 - .../cloud/financial_services/v1/rest.rb | 38 - .../cloud/financial_services/v1/version.rb | 28 - .../v1/backtest_result_pb.rb | 62 - .../v1/bigquery_destination_pb.rb | 45 - .../cloud/financialservices/v1/dataset_pb.rb | 60 - .../financialservices/v1/engine_config_pb.rb | 65 - .../financialservices/v1/engine_version_pb.rb | 52 - .../cloud/financialservices/v1/instance_pb.rb | 64 - .../v1/line_of_business_pb.rb | 42 - .../cloud/financialservices/v1/model_pb.rb | 61 - .../v1/prediction_result_pb.rb | 62 - .../cloud/financialservices/v1/service_pb.rb | 57 - .../v1/service_services_pb.rb | 138 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../financialservices/v1/backtest_result.rb | 277 - .../v1/bigquery_destination.rb | 56 - .../cloud/financialservices/v1/dataset.rb | 242 - .../financialservices/v1/engine_config.rb | 324 -- .../financialservices/v1/engine_version.rb | 126 - .../cloud/financialservices/v1/instance.rb | 318 -- .../financialservices/v1/line_of_business.rb | 38 - .../cloud/financialservices/v1/model.rb | 256 - .../financialservices/v1/prediction_result.rb | 277 - .../cloud/financialservices/v1/service.rb | 60 - .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/datetime.rb | 103 - .../proto_docs/google/type/interval.rb | 45 - .../snippets/Gemfile | 32 - .../snippets/aml/create_backtest_result.rb | 54 - .../snippets/aml/create_dataset.rb | 54 - .../snippets/aml/create_engine_config.rb | 54 - .../snippets/aml/create_instance.rb | 54 - .../snippets/aml/create_model.rb | 54 - .../snippets/aml/create_prediction_result.rb | 54 - .../snippets/aml/delete_backtest_result.rb | 54 - .../snippets/aml/delete_dataset.rb | 54 - .../snippets/aml/delete_engine_config.rb | 54 - .../snippets/aml/delete_instance.rb | 54 - .../snippets/aml/delete_model.rb | 54 - .../snippets/aml/delete_prediction_result.rb | 54 - .../aml/export_backtest_result_metadata.rb | 54 - .../aml/export_engine_config_metadata.rb | 54 - .../snippets/aml/export_model_metadata.rb | 54 - .../aml/export_prediction_result_metadata.rb | 54 - .../snippets/aml/export_registered_parties.rb | 54 - .../snippets/aml/get_backtest_result.rb | 47 - .../snippets/aml/get_dataset.rb | 47 - .../snippets/aml/get_engine_config.rb | 47 - .../snippets/aml/get_engine_version.rb | 47 - .../snippets/aml/get_instance.rb | 47 - .../snippets/aml/get_model.rb | 47 - .../snippets/aml/get_prediction_result.rb | 47 - .../snippets/aml/import_registered_parties.rb | 54 - .../snippets/aml/list_backtest_results.rb | 51 - .../snippets/aml/list_datasets.rb | 51 - .../snippets/aml/list_engine_configs.rb | 51 - .../snippets/aml/list_engine_versions.rb | 51 - .../snippets/aml/list_instances.rb | 51 - .../snippets/aml/list_models.rb | 51 - .../snippets/aml/list_prediction_results.rb | 51 - .../snippets/aml/update_backtest_result.rb | 54 - .../snippets/aml/update_dataset.rb | 54 - .../snippets/aml/update_engine_config.rb | 54 - .../snippets/aml/update_instance.rb | 54 - .../snippets/aml/update_model.rb | 54 - .../snippets/aml/update_prediction_result.rb | 54 - ...ata_google.cloud.financialservices.v1.json | 1535 ------ .../v1/aml_operations_test.rb | 400 -- .../financial_services/v1/aml_paths_test.rb | 139 - .../financial_services/v1/aml_rest_test.rb | 2225 -------- .../cloud/financial_services/v1/aml_test.rb | 2625 --------- .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../google-cloud-financial_services/.toys.rb | 28 - .../google-cloud-financial_services/.yardopts | 11 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-financial_services/Gemfile | 28 - .../LICENSE.md | 201 - .../google-cloud-financial_services/README.md | 142 - .../google-cloud-financial_services/Rakefile | 169 - .../google-cloud-financial_services.gemspec | 27 - .../lib/google-cloud-financial_services.rb | 19 - .../lib/google/cloud/financial_services.rb | 157 - .../cloud/financial_services/version.rb | 26 - .../cloud/financial_services/client_test.rb | 64 - .../cloud/financial_services/version_test.rb | 26 - .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../google-cloud-firestore-admin-v1/.toys.rb | 28 - .../google-cloud-firestore-admin-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../google-cloud-firestore-admin-v1/Gemfile | 11 - .../LICENSE.md | 201 - .../google-cloud-firestore-admin-v1/README.md | 154 - .../google-cloud-firestore-admin-v1/Rakefile | 169 - .../gapic_metadata.json | 178 - .../google-cloud-firestore-admin-v1.gemspec | 29 - .../lib/google-cloud-firestore-admin-v1.rb | 21 - .../lib/google/cloud/firestore/admin/v1.rb | 47 - .../firestore/admin/v1/firestore_admin.rb | 85 - .../admin/v1/firestore_admin/client.rb | 3849 ------------- .../admin/v1/firestore_admin/credentials.rb | 54 - .../admin/v1/firestore_admin/operations.rb | 843 --- .../admin/v1/firestore_admin/paths.rb | 220 - .../admin/v1/firestore_admin/rest.rb | 82 - .../admin/v1/firestore_admin/rest/client.rb | 3573 ------------ .../v1/firestore_admin/rest/operations.rb | 927 ---- .../v1/firestore_admin/rest/service_stub.rb | 2050 ------- .../google/cloud/firestore/admin/v1/rest.rb | 39 - .../cloud/firestore/admin/v1/version.rb | 30 - .../google/firestore/admin/v1/backup_pb.rb | 51 - .../google/firestore/admin/v1/database_pb.rb | 64 - .../lib/google/firestore/admin/v1/field_pb.rb | 52 - .../firestore/admin/v1/firestore_admin_pb.rb | 112 - .../admin/v1/firestore_admin_services_pb.rb | 220 - .../lib/google/firestore/admin/v1/index_pb.rb | 56 - .../google/firestore/admin/v1/location_pb.rb | 44 - .../google/firestore/admin/v1/operation_pb.rb | 65 - .../google/firestore/admin/v1/schedule_pb.rb | 54 - .../google/firestore/admin/v1/snapshot_pb.rb | 49 - .../firestore/admin/v1/user_creds_pb.rb | 51 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../proto_docs/google/api/routing.rb | 459 -- .../google/firestore/admin/v1/backup.rb | 99 - .../google/firestore/admin/v1/database.rb | 367 -- .../google/firestore/admin/v1/field.rb | 139 - .../firestore/admin/v1/firestore_admin.rb | 746 --- .../google/firestore/admin/v1/index.rb | 249 - .../google/firestore/admin/v1/location.rb | 35 - .../google/firestore/admin/v1/operation.rb | 349 -- .../google/firestore/admin/v1/schedule.rb | 94 - .../google/firestore/admin/v1/snapshot.rb | 48 - .../google/firestore/admin/v1/user_creds.rb | 78 - .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/dayofweek.rb | 49 - .../snippets/Gemfile | 32 - .../firestore_admin/bulk_delete_documents.rb | 54 - .../firestore_admin/clone_database.rb | 54 - .../firestore_admin/create_backup_schedule.rb | 47 - .../firestore_admin/create_database.rb | 54 - .../snippets/firestore_admin/create_index.rb | 54 - .../firestore_admin/create_user_creds.rb | 47 - .../snippets/firestore_admin/delete_backup.rb | 47 - .../firestore_admin/delete_backup_schedule.rb | 47 - .../firestore_admin/delete_database.rb | 54 - .../snippets/firestore_admin/delete_index.rb | 47 - .../firestore_admin/delete_user_creds.rb | 47 - .../firestore_admin/disable_user_creds.rb | 47 - .../firestore_admin/enable_user_creds.rb | 47 - .../firestore_admin/export_documents.rb | 54 - .../snippets/firestore_admin/get_backup.rb | 47 - .../firestore_admin/get_backup_schedule.rb | 47 - .../snippets/firestore_admin/get_database.rb | 47 - .../snippets/firestore_admin/get_field.rb | 47 - .../snippets/firestore_admin/get_index.rb | 47 - .../firestore_admin/get_user_creds.rb | 47 - .../firestore_admin/import_documents.rb | 54 - .../firestore_admin/list_backup_schedules.rb | 47 - .../snippets/firestore_admin/list_backups.rb | 47 - .../firestore_admin/list_databases.rb | 47 - .../snippets/firestore_admin/list_fields.rb | 51 - .../snippets/firestore_admin/list_indexes.rb | 51 - .../firestore_admin/list_user_creds.rb | 47 - .../firestore_admin/reset_user_password.rb | 47 - .../firestore_admin/restore_database.rb | 54 - .../firestore_admin/update_backup_schedule.rb | 47 - .../firestore_admin/update_database.rb | 54 - .../snippets/firestore_admin/update_field.rb | 54 - ...et_metadata_google.firestore.admin.v1.json | 1295 ----- .../v1/firestore_admin_operations_test.rb | 400 -- .../admin/v1/firestore_admin_paths_test.rb | 163 - .../admin/v1/firestore_admin_rest_test.rb | 1862 ------- .../admin/v1/firestore_admin_test.rb | 2104 -------- .../test/helper.rb | 25 - .../google-cloud-firestore-admin/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-firestore-admin/.rubocop.yml | 39 - .../google-cloud-firestore-admin/.toys.rb | 28 - .../google-cloud-firestore-admin/.yardopts | 11 - .../AUTHENTICATION.md | 122 - .../google-cloud-firestore-admin/CHANGELOG.md | 2 - .../google-cloud-firestore-admin/Gemfile | 28 - .../google-cloud-firestore-admin/LICENSE.md | 201 - .../google-cloud-firestore-admin/README.md | 142 - .../google-cloud-firestore-admin/Rakefile | 169 - .../google-cloud-firestore-admin.gemspec | 27 - .../lib/google-cloud-firestore-admin.rb | 19 - .../lib/google/cloud/firestore/admin.rb | 185 - .../google/cloud/firestore/admin/version.rb | 28 - .../cloud/firestore/admin/client_test.rb | 64 - .../cloud/firestore/admin/version_test.rb | 26 - .../test/helper.rb | 25 - .../google-cloud-firestore-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-firestore-v1/.rubocop.yml | 33 - .../google-cloud-firestore-v1/.toys.rb | 28 - .../google-cloud-firestore-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-firestore-v1/CHANGELOG.md | 2 - .../google-cloud-firestore-v1/Gemfile | 11 - .../google-cloud-firestore-v1/LICENSE.md | 201 - .../google-cloud-firestore-v1/README.md | 154 - .../google-cloud-firestore-v1/Rakefile | 169 - .../gapic_metadata.json | 103 - .../google-cloud-firestore-v1.gemspec | 29 - .../lib/google-cloud-firestore-v1.rb | 21 - .../lib/google/cloud/firestore/v1.rb | 45 - .../google/cloud/firestore/v1/firestore.rb | 61 - .../cloud/firestore/v1/firestore/client.rb | 2413 --------- .../firestore/v1/firestore/credentials.rb | 52 - .../cloud/firestore/v1/firestore/rest.rb | 58 - .../firestore/v1/firestore/rest/client.rb | 2079 ------- .../v1/firestore/rest/service_stub.rb | 1026 ---- .../lib/google/cloud/firestore/v1/rest.rb | 37 - .../lib/google/cloud/firestore/v1/version.rb | 28 - .../firestore/v1/aggregation_result_pb.rb | 45 - .../google/firestore/v1/bloom_filter_pb.rb | 43 - .../lib/google/firestore/v1/common_pb.rb | 49 - .../lib/google/firestore/v1/document_pb.rb | 55 - .../google/firestore/v1/explain_stats_pb.rb | 45 - .../lib/google/firestore/v1/firestore_pb.rb | 103 - .../firestore/v1/firestore_services_pb.rb | 114 - .../lib/google/firestore/v1/pipeline_pb.rb | 46 - .../lib/google/firestore/v1/query_pb.rb | 68 - .../google/firestore/v1/query_profile_pb.rb | 51 - .../lib/google/firestore/v1/write_pb.rb | 59 - .../proto_docs/README.md | 4 - .../proto_docs/google/api/client.rb | 473 -- .../proto_docs/google/api/field_behavior.rb | 85 - .../proto_docs/google/api/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../proto_docs/google/api/routing.rb | 459 -- .../google/firestore/v1/aggregation_result.rb | 53 - .../google/firestore/v1/bloom_filter.rb | 79 - .../proto_docs/google/firestore/v1/common.rb | 101 - .../google/firestore/v1/document.rb | 317 -- .../google/firestore/v1/explain_stats.rb | 41 - .../google/firestore/v1/firestore.rb | 1110 ---- .../google/firestore/v1/pipeline.rb | 51 - .../proto_docs/google/firestore/v1/query.rb | 629 --- .../google/firestore/v1/query_profile.rb | 98 - .../proto_docs/google/firestore/v1/write.rb | 317 -- .../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/struct.rb | 108 - .../proto_docs/google/protobuf/timestamp.rb | 127 - .../proto_docs/google/protobuf/wrappers.rb | 121 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/latlng.rb | 38 - .../snippets/Gemfile | 32 - .../snippets/firestore/batch_get_documents.rb | 50 - .../snippets/firestore/batch_write.rb | 47 - .../snippets/firestore/begin_transaction.rb | 47 - .../snippets/firestore/commit.rb | 47 - .../snippets/firestore/create_document.rb | 47 - .../snippets/firestore/delete_document.rb | 47 - .../snippets/firestore/execute_pipeline.rb | 50 - .../snippets/firestore/get_document.rb | 47 - .../snippets/firestore/list_collection_ids.rb | 47 - .../snippets/firestore/list_documents.rb | 51 - .../snippets/firestore/listen.rb | 56 - .../snippets/firestore/partition_query.rb | 51 - .../snippets/firestore/rollback.rb | 47 - .../firestore/run_aggregation_query.rb | 50 - .../snippets/firestore/run_query.rb | 50 - .../snippets/firestore/update_document.rb | 47 - .../snippets/firestore/write.rb | 56 - .../snippet_metadata_google.firestore.v1.json | 695 --- .../cloud/firestore/v1/firestore_rest_test.rb | 951 ---- .../cloud/firestore/v1/firestore_test.rb | 1329 ----- .../google-cloud-firestore-v1/test/helper.rb | 25 - .../google-cloud-functions-v1/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-functions-v1/.rubocop.yml | 33 - .../google-cloud-functions-v1/.toys.rb | 28 - .../google-cloud-functions-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-functions-v1/CHANGELOG.md | 2 - .../google-cloud-functions-v1/Gemfile | 11 - .../google-cloud-functions-v1/LICENSE.md | 201 - .../google-cloud-functions-v1/README.md | 154 - .../google-cloud-functions-v1/Rakefile | 169 - .../gapic_metadata.json | 73 - .../google-cloud-functions-v1.gemspec | 30 - .../lib/google-cloud-functions-v1.rb | 21 - .../lib/google/cloud/functions/v1.rb | 45 - .../cloud/functions/v1/bindings_override.rb | 64 - .../functions/v1/cloud_functions_service.rb | 56 - .../v1/cloud_functions_service/client.rb | 1609 ------ .../v1/cloud_functions_service/credentials.rb | 51 - .../v1/cloud_functions_service/operations.rb | 833 --- .../v1/cloud_functions_service/paths.rb | 109 - .../v1/cloud_functions_service/rest.rb | 54 - .../v1/cloud_functions_service/rest/client.rb | 1497 ------ .../rest/operations.rb | 923 ---- .../rest/service_stub.rb | 759 --- .../google/cloud/functions/v1/functions_pb.rb | 85 - .../functions/v1/functions_services_pb.rb | 106 - .../cloud/functions/v1/operations_pb.rb | 48 - .../lib/google/cloud/functions/v1/rest.rb | 38 - .../lib/google/cloud/functions/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/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/functions/v1/functions.rb | 773 --- .../google/cloud/functions/v1/operations.rb | 77 - .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../cloud_functions_service/call_function.rb | 47 - .../create_function.rb | 54 - .../delete_function.rb | 54 - .../generate_download_url.rb | 47 - .../generate_upload_url.rb | 47 - .../cloud_functions_service/get_function.rb | 47 - .../cloud_functions_service/get_iam_policy.rb | 47 - .../cloud_functions_service/list_functions.rb | 51 - .../cloud_functions_service/set_iam_policy.rb | 47 - .../test_iam_permissions.rb | 47 - .../update_function.rb | 54 - ...et_metadata_google.cloud.functions.v1.json | 455 -- ...cloud_functions_service_operations_test.rb | 400 -- .../v1/cloud_functions_service_paths_test.rb | 91 - .../v1/cloud_functions_service_rest_test.rb | 705 --- .../v1/cloud_functions_service_test.rb | 800 --- .../google-cloud-functions-v1/test/helper.rb | 25 - .../google-cloud-functions-v2/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-functions-v2/.rubocop.yml | 33 - .../google-cloud-functions-v2/.toys.rb | 28 - .../google-cloud-functions-v2/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-functions-v2/CHANGELOG.md | 2 - .../google-cloud-functions-v2/Gemfile | 11 - .../google-cloud-functions-v2/LICENSE.md | 201 - .../google-cloud-functions-v2/README.md | 154 - .../google-cloud-functions-v2/Rakefile | 169 - .../gapic_metadata.json | 58 - .../google-cloud-functions-v2.gemspec | 30 - .../lib/google-cloud-functions-v2.rb | 21 - .../lib/google/cloud/functions/v2.rb | 45 - .../cloud/functions/v2/bindings_override.rb | 97 - .../cloud/functions/v2/function_service.rb | 61 - .../functions/v2/function_service/client.rb | 1300 ----- .../v2/function_service/credentials.rb | 51 - .../v2/function_service/operations.rb | 841 --- .../functions/v2/function_service/paths.rb | 240 - .../functions/v2/function_service/rest.rb | 59 - .../v2/function_service/rest/client.rb | 1210 ----- .../v2/function_service/rest/operations.rb | 925 ---- .../v2/function_service/rest/service_stub.rb | 573 -- .../google/cloud/functions/v2/functions_pb.rb | 99 - .../functions/v2/functions_services_pb.rb | 94 - .../lib/google/cloud/functions/v2/rest.rb | 38 - .../lib/google/cloud/functions/v2/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/launch_stage.rb | 71 - .../proto_docs/google/api/resource.rb | 227 - .../google/cloud/functions/v2/functions.rb | 1129 ---- .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/date.rb | 53 - .../proto_docs/google/type/expr.rb | 75 - .../snippets/Gemfile | 32 - .../function_service/create_function.rb | 54 - .../function_service/delete_function.rb | 54 - .../function_service/generate_download_url.rb | 47 - .../function_service/generate_upload_url.rb | 47 - .../snippets/function_service/get_function.rb | 47 - .../function_service/list_functions.rb | 51 - .../function_service/list_runtimes.rb | 47 - .../function_service/update_function.rb | 54 - ...et_metadata_google.cloud.functions.v2.json | 335 -- .../v2/function_service_operations_test.rb | 400 -- .../v2/function_service_paths_test.rb | 175 - .../v2/function_service_rest_test.rb | 542 -- .../functions/v2/function_service_test.rb | 624 --- .../google-cloud-functions-v2/test/helper.rb | 25 - .../google-cloud-functions/.gitignore | 22 - .../.repo-metadata.json | 18 - .../google-cloud-functions/.rubocop.yml | 39 - .../google-cloud-functions/.toys.rb | 28 - .../google-cloud-functions/.yardopts | 11 - .../google-cloud-functions/AUTHENTICATION.md | 122 - .../google-cloud-functions/CHANGELOG.md | 2 - .../google-cloud-functions/Gemfile | 28 - .../google-cloud-functions/LICENSE.md | 201 - .../google-cloud-functions/README.md | 142 - .../google-cloud-functions/Rakefile | 169 - .../google-cloud-functions.gemspec | 27 - .../lib/google-cloud-functions.rb | 19 - .../lib/google/cloud/functions.rb | 161 - .../lib/google/cloud/functions/version.rb | 26 - .../google/cloud/functions/client_test.rb | 64 - .../google/cloud/functions/version_test.rb | 26 - .../google-cloud-functions/test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 33 - .../.toys.rb | 28 - .../.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 11 - .../LICENSE.md | 201 - .../README.md | 154 - .../Rakefile | 169 - .../gapic_metadata.json | 203 - ...ud-gdc_hardware_management-v1alpha.gemspec | 29 - ...e-cloud-gdc_hardware_management-v1alpha.rb | 21 - .../cloud/gdc_hardware_management/v1alpha.rb | 45 - .../v1alpha/bindings_override.rb | 75 - .../v1alpha/gdc_hardware_management.rb | 56 - .../v1alpha/gdc_hardware_management/client.rb | 4499 ---------------- .../gdc_hardware_management/credentials.rb | 47 - .../gdc_hardware_management/operations.rb | 841 --- .../v1alpha/gdc_hardware_management/paths.rb | 208 - .../v1alpha/gdc_hardware_management/rest.rb | 54 - .../gdc_hardware_management/rest/client.rb | 4205 --------------- .../rest/operations.rb | 925 ---- .../rest/service_stub.rb | 2354 -------- .../gdc_hardware_management/v1alpha/rest.rb | 38 - .../v1alpha/version.rb | 28 - .../v1alpha/resources_pb.rb | 99 - .../v1alpha/service_pb.rb | 107 - .../v1alpha/service_services_pb.rb | 120 - .../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 - .../v1alpha/resources.rb | 1206 ----- .../gdchardwaremanagement/v1alpha/service.rb | 959 ---- .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/date.rb | 53 - .../proto_docs/google/type/datetime.rb | 103 - .../proto_docs/google/type/dayofweek.rb | 49 - .../proto_docs/google/type/postal_address.rb | 135 - .../proto_docs/google/type/timeofday.rb | 45 - .../snippets/Gemfile | 32 - .../gdc_hardware_management/cancel_order.rb | 54 - .../gdc_hardware_management/create_comment.rb | 54 - .../create_hardware.rb | 54 - .../create_hardware_group.rb | 54 - .../gdc_hardware_management/create_order.rb | 54 - .../gdc_hardware_management/create_site.rb | 54 - .../gdc_hardware_management/create_zone.rb | 54 - .../delete_hardware.rb | 54 - .../delete_hardware_group.rb | 54 - .../gdc_hardware_management/delete_order.rb | 54 - .../gdc_hardware_management/delete_site.rb | 54 - .../gdc_hardware_management/delete_zone.rb | 54 - .../get_change_log_entry.rb | 47 - .../gdc_hardware_management/get_comment.rb | 47 - .../gdc_hardware_management/get_hardware.rb | 47 - .../get_hardware_group.rb | 47 - .../gdc_hardware_management/get_order.rb | 47 - .../gdc_hardware_management/get_site.rb | 47 - .../gdc_hardware_management/get_sku.rb | 47 - .../gdc_hardware_management/get_zone.rb | 47 - .../list_change_log_entries.rb | 51 - .../gdc_hardware_management/list_comments.rb | 51 - .../gdc_hardware_management/list_hardware.rb | 51 - .../list_hardware_groups.rb | 51 - .../gdc_hardware_management/list_orders.rb | 51 - .../gdc_hardware_management/list_sites.rb | 51 - .../gdc_hardware_management/list_skus.rb | 51 - .../gdc_hardware_management/list_zones.rb | 51 - .../record_action_on_comment.rb | 47 - .../request_order_date_change.rb | 54 - .../signal_zone_state.rb | 54 - .../gdc_hardware_management/submit_order.rb | 54 - .../update_hardware.rb | 54 - .../update_hardware_group.rb | 54 - .../gdc_hardware_management/update_order.rb | 54 - .../gdc_hardware_management/update_site.rb | 54 - .../gdc_hardware_management/update_zone.rb | 54 - ...e.cloud.gdchardwaremanagement.v1alpha.json | 1495 ------ ...gdc_hardware_management_operations_test.rb | 400 -- .../gdc_hardware_management_paths_test.rb | 151 - .../gdc_hardware_management_rest_test.rb | 2172 -------- .../v1alpha/gdc_hardware_management_test.rb | 2554 --------- .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 18 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 28 - .../LICENSE.md | 201 - .../README.md | 142 - .../Rakefile | 169 - ...ogle-cloud-gdc_hardware_management.gemspec | 27 - .../google-cloud-gdc_hardware_management.rb | 19 - .../google/cloud/gdc_hardware_management.rb | 156 - .../cloud/gdc_hardware_management/version.rb | 26 - .../gdc_hardware_management/client_test.rb | 64 - .../gdc_hardware_management/version_test.rb | 26 - .../test/helper.rb | 25 - .../.gitignore | 22 - .../.repo-metadata.json | 17 - .../.rubocop.yml | 39 - .../.toys.rb | 28 - .../.yardopts | 11 - .../AUTHENTICATION.md | 122 - .../CHANGELOG.md | 2 - .../Gemfile | 28 - .../LICENSE.md | 201 - .../README.md | 142 - .../Rakefile | 169 - ...google-cloud-gemini_data_analytics.gemspec | 27 - .../lib/google-cloud-gemini_data_analytics.rb | 19 - .../lib/google/cloud/gemini_data_analytics.rb | 228 - .../cloud/gemini_data_analytics/version.rb | 26 - .../gemini_data_analytics/client_test.rb | 85 - .../gemini_data_analytics/version_test.rb | 26 - .../test/helper.rb | 25 - .../google-cloud-gke_backup-v1/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-gke_backup-v1/.rubocop.yml | 33 - .../google-cloud-gke_backup-v1/.toys.rb | 28 - .../google-cloud-gke_backup-v1/.yardopts | 12 - .../AUTHENTICATION.md | 122 - .../google-cloud-gke_backup-v1/CHANGELOG.md | 2 - .../google-cloud-gke_backup-v1/Gemfile | 11 - .../google-cloud-gke_backup-v1/LICENSE.md | 201 - .../google-cloud-gke_backup-v1/README.md | 154 - .../google-cloud-gke_backup-v1/Rakefile | 169 - .../gapic_metadata.json | 213 - .../google-cloud-gke_backup-v1.gemspec | 30 - .../lib/google-cloud-gke_backup-v1.rb | 21 - .../lib/google/cloud/gke_backup/v1.rb | 45 - .../cloud/gke_backup/v1/backup_for_gke.rb | 57 - .../gke_backup/v1/backup_for_gke/client.rb | 4776 ----------------- .../v1/backup_for_gke/credentials.rb | 47 - .../v1/backup_for_gke/operations.rb | 841 --- .../gke_backup/v1/backup_for_gke/paths.rb | 296 - .../gke_backup/v1/backup_for_gke/rest.rb | 55 - .../v1/backup_for_gke/rest/client.rb | 4469 --------------- .../v1/backup_for_gke/rest/operations.rb | 925 ---- .../v1/backup_for_gke/rest/service_stub.rb | 2472 --------- .../cloud/gke_backup/v1/bindings_override.rb | 228 - .../lib/google/cloud/gke_backup/v1/rest.rb | 38 - .../lib/google/cloud/gke_backup/v1/version.rb | 28 - .../cloud/gkebackup/v1/backup_channel_pb.rb | 48 - .../google/cloud/gkebackup/v1/backup_pb.rb | 51 - .../gkebackup/v1/backup_plan_binding_pb.rb | 54 - .../cloud/gkebackup/v1/backup_plan_pb.rb | 63 - .../google/cloud/gkebackup/v1/common_pb.rb | 50 - .../google/cloud/gkebackup/v1/gkebackup_pb.rb | 121 - .../gkebackup/v1/gkebackup_services_pb.rb | 122 - .../cloud/gkebackup/v1/restore_channel_pb.rb | 48 - .../google/cloud/gkebackup/v1/restore_pb.rb | 67 - .../gkebackup/v1/restore_plan_binding_pb.rb | 48 - .../cloud/gkebackup/v1/restore_plan_pb.rb | 50 - .../google/cloud/gkebackup/v1/volume_pb.rb | 54 - .../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/gkebackup/v1/backup.rb | 264 - .../cloud/gkebackup/v1/backup_channel.rb | 86 - .../google/cloud/gkebackup/v1/backup_plan.rb | 367 -- .../cloud/gkebackup/v1/backup_plan_binding.rb | 208 - .../google/cloud/gkebackup/v1/common.rb | 82 - .../google/cloud/gkebackup/v1/gkebackup.rb | 1065 ---- .../google/cloud/gkebackup/v1/restore.rb | 680 --- .../cloud/gkebackup/v1/restore_channel.rb | 85 - .../google/cloud/gkebackup/v1/restore_plan.rb | 126 - .../gkebackup/v1/restore_plan_binding.rb | 68 - .../google/cloud/gkebackup/v1/volume.rb | 227 - .../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/timestamp.rb | 127 - .../proto_docs/google/rpc/status.rb | 48 - .../proto_docs/google/type/date.rb | 53 - .../proto_docs/google/type/dayofweek.rb | 49 - .../proto_docs/google/type/expr.rb | 75 - .../proto_docs/google/type/timeofday.rb | 45 - .../snippets/Gemfile | 32 - .../snippets/backup_for_gke/create_backup.rb | 54 - .../backup_for_gke/create_backup_channel.rb | 54 - .../backup_for_gke/create_backup_plan.rb | 54 - .../snippets/backup_for_gke/create_restore.rb | 54 - .../backup_for_gke/create_restore_channel.rb | 54 - .../backup_for_gke/create_restore_plan.rb | 54 - .../snippets/backup_for_gke/delete_backup.rb | 54 - .../backup_for_gke/delete_backup_channel.rb | 54 - .../backup_for_gke/delete_backup_plan.rb | 54 - .../snippets/backup_for_gke/delete_restore.rb | 54 - .../backup_for_gke/delete_restore_channel.rb | 54 - .../backup_for_gke/delete_restore_plan.rb | 54 - .../snippets/backup_for_gke/get_backup.rb | 47 - .../backup_for_gke/get_backup_channel.rb | 47 - .../get_backup_index_download_url.rb | 47 - .../backup_for_gke/get_backup_plan.rb | 47 - .../backup_for_gke/get_backup_plan_binding.rb | 47 - .../snippets/backup_for_gke/get_restore.rb | 47 - .../backup_for_gke/get_restore_channel.rb | 47 - .../backup_for_gke/get_restore_plan.rb | 47 - .../get_restore_plan_binding.rb | 47 - .../backup_for_gke/get_volume_backup.rb | 47 - .../backup_for_gke/get_volume_restore.rb | 47 - .../backup_for_gke/list_backup_channels.rb | 51 - .../list_backup_plan_bindings.rb | 51 - .../backup_for_gke/list_backup_plans.rb | 51 - .../snippets/backup_for_gke/list_backups.rb | 51 - .../backup_for_gke/list_restore_channels.rb | 51 - .../list_restore_plan_bindings.rb | 51 - .../backup_for_gke/list_restore_plans.rb | 51 - .../snippets/backup_for_gke/list_restores.rb | 51 - .../backup_for_gke/list_volume_backups.rb | 51 - .../backup_for_gke/list_volume_restores.rb | 51 - .../snippets/backup_for_gke/update_backup.rb | 54 - .../backup_for_gke/update_backup_channel.rb | 54 - .../backup_for_gke/update_backup_plan.rb | 54 - .../snippets/backup_for_gke/update_restore.rb | 54 - .../backup_for_gke/update_restore_channel.rb | 54 - .../backup_for_gke/update_restore_plan.rb | 54 - ...et_metadata_google.cloud.gkebackup.v1.json | 1575 ------ .../v1/backup_for_gke_operations_test.rb | 400 -- .../v1/backup_for_gke_paths_test.rb | 199 - .../gke_backup/v1/backup_for_gke_rest_test.rb | 2274 -------- .../gke_backup/v1/backup_for_gke_test.rb | 2658 --------- .../google-cloud-gke_backup-v1/test/helper.rb | 25 - .../google-cloud-gke_backup/.gitignore | 22 - .../.repo-metadata.json | 17 - .../google-cloud-gke_backup/.rubocop.yml | 39 - .../google-cloud-gke_backup/.toys.rb | 28 - .../google-cloud-gke_backup/.yardopts | 11 - .../google-cloud-gke_backup/AUTHENTICATION.md | 122 - .../google-cloud-gke_backup/CHANGELOG.md | 2 - .../google-cloud-gke_backup/Gemfile | 28 - .../google-cloud-gke_backup/LICENSE.md | 201 - .../google-cloud-gke_backup/README.md | 142 - .../google-cloud-gke_backup/Rakefile | 169 - .../google-cloud-gke_backup.gemspec | 27 - .../lib/google-cloud-gke_backup.rb | 19 - .../lib/google/cloud/gke_backup.rb | 157 - .../lib/google/cloud/gke_backup/version.rb | 26 - .../google/cloud/gke_backup/client_test.rb | 64 - .../google/cloud/gke_backup/version_test.rb | 26 - .../google-cloud-gke_backup/test/helper.rb | 25 - 1023 files changed, 217060 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/.gitignore delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/.yardopts delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/Gemfile delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/README.md delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/Rakefile delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/google-cloud-essential_contacts.gemspec delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/lib/google-cloud-essential_contacts.rb delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts.rb delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts/version.rb delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-essential_contacts/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/google-cloud-eventarc-publishing-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google-cloud-eventarc-publishing-v1.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/cloud_event_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/cloud_event.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/publisher.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_channel_connection_events.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_events.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/snippet_metadata_google.cloud.eventarc.publishing.v1.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_test.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/.gitignore delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/.yardopts delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/Gemfile delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/README.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/Rakefile delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/google-cloud-eventarc-publishing.gemspec delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/lib/google-cloud-eventarc-publishing.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing/version.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-publishing/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/google-cloud-eventarc-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google-cloud-eventarc-v1.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_connection_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/discovery_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/enrollment_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/client.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/operations.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/paths.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_api_source_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_channel_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/logging_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/message_bus_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/network_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/pipeline_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/trigger_pb.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel_connection.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/discovery.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/enrollment.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/eventarc.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_api_source.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_channel_config.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/logging_config.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/message_bus.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/network_config.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/pipeline.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/trigger.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/rpc/code.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel_connection.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_enrollment.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_google_api_source.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_message_bus.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_pipeline.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel_connection.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_enrollment.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_google_api_source.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_message_bus.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_pipeline.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel_connection.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_enrollment.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_api_source.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_channel_config.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_message_bus.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_pipeline.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_provider.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channel_connections.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channels.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_enrollments.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_google_api_sources.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_bus_enrollments.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_buses.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_pipelines.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_providers.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_triggers.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_channel.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_enrollment.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_api_source.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_channel_config.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_message_bus.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_pipeline.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_trigger.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/snippets/snippet_metadata_google.cloud.eventarc.v1.json delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_test.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc/.gitignore delete mode 100644 owl-bot-staging/google-cloud-eventarc/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-eventarc/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-eventarc/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc/.yardopts delete mode 100644 owl-bot-staging/google-cloud-eventarc/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-eventarc/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-eventarc/Gemfile delete mode 100644 owl-bot-staging/google-cloud-eventarc/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-eventarc/README.md delete mode 100644 owl-bot-staging/google-cloud-eventarc/Rakefile delete mode 100644 owl-bot-staging/google-cloud-eventarc/google-cloud-eventarc.gemspec delete mode 100644 owl-bot-staging/google-cloud-eventarc/lib/google-cloud-eventarc.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc/version.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-eventarc/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/google-cloud-filestore-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google-cloud-filestore-v1.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/operations.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/paths.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/common/operation_metadata.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/filestore/v1/cloud_filestore_service.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_backup.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_instance.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_backup.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_instance.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_backup.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_instance.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_backups.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_instances.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_snapshots.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/promote_replica.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/restore_instance.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/revert_instance.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_backup.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_instance.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/snippets/snippet_metadata_google.cloud.filestore.v1.json delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_test.rb delete mode 100644 owl-bot-staging/google-cloud-filestore-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-filestore/.gitignore delete mode 100644 owl-bot-staging/google-cloud-filestore/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-filestore/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-filestore/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-filestore/.yardopts delete mode 100644 owl-bot-staging/google-cloud-filestore/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-filestore/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-filestore/Gemfile delete mode 100644 owl-bot-staging/google-cloud-filestore/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-filestore/README.md delete mode 100644 owl-bot-staging/google-cloud-filestore/Rakefile delete mode 100644 owl-bot-staging/google-cloud-filestore/google-cloud-filestore.gemspec delete mode 100644 owl-bot-staging/google-cloud-filestore/lib/google-cloud-filestore.rb delete mode 100644 owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore.rb delete mode 100644 owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore/version.rb delete mode 100644 owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-filestore/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/google-cloud-financial_services-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google-cloud-financial_services-v1.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/client.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/operations.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/paths.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/backtest_result_pb.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/bigquery_destination_pb.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/dataset_pb.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/engine_config_pb.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/engine_version_pb.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/instance_pb.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/line_of_business_pb.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/model_pb.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/prediction_result_pb.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/backtest_result.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/bigquery_destination.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/dataset.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_config.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_version.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/instance.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/line_of_business.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/model.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/prediction_result.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/service.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/datetime.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/interval.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_backtest_result.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_engine_config.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_instance.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_model.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_prediction_result.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_backtest_result.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_engine_config.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_instance.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_model.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_prediction_result.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_backtest_result_metadata.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_engine_config_metadata.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_model_metadata.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_prediction_result_metadata.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_registered_parties.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_backtest_result.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_config.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_version.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_instance.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_model.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_prediction_result.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/import_registered_parties.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_backtest_results.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_datasets.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_configs.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_versions.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_instances.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_models.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_prediction_results.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_backtest_result.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_dataset.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_engine_config.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_instance.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_model.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_prediction_result.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/snippets/snippet_metadata_google.cloud.financialservices.v1.json delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_test.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services/.gitignore delete mode 100644 owl-bot-staging/google-cloud-financial_services/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-financial_services/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-financial_services/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services/.yardopts delete mode 100644 owl-bot-staging/google-cloud-financial_services/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-financial_services/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-financial_services/Gemfile delete mode 100644 owl-bot-staging/google-cloud-financial_services/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-financial_services/README.md delete mode 100644 owl-bot-staging/google-cloud-financial_services/Rakefile delete mode 100644 owl-bot-staging/google-cloud-financial_services/google-cloud-financial_services.gemspec delete mode 100644 owl-bot-staging/google-cloud-financial_services/lib/google-cloud-financial_services.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services/version.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-financial_services/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/google-cloud-firestore-admin-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google-cloud-firestore-admin-v1.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/backup_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/database_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/field_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/index_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/location_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/operation_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/schedule_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/snapshot_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/user_creds_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/routing.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/backup.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/database.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/field.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/index.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/location.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/operation.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/schedule.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/snapshot.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/user_creds.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/type/dayofweek.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/bulk_delete_documents.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/clone_database.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_backup_schedule.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_database.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_index.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_user_creds.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup_schedule.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_database.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_index.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_user_creds.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/disable_user_creds.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/enable_user_creds.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/export_documents.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup_schedule.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_database.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_field.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_index.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_user_creds.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/import_documents.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backup_schedules.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backups.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_databases.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_fields.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_indexes.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_user_creds.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/reset_user_password.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/restore_database.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_backup_schedule.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_database.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_field.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/.gitignore delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/.yardopts delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/Gemfile delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/README.md delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/Rakefile delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/google-cloud-firestore-admin.gemspec delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/lib/google-cloud-firestore-admin.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin/version.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-admin/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/google-cloud-firestore-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google-cloud-firestore-v1.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/aggregation_result_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/bloom_filter_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/document_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/explain_stats_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/firestore_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/firestore_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/pipeline_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/query_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/query_profile_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/write_pb.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/routing.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/aggregation_result.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/bloom_filter.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/common.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/document.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/explain_stats.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/firestore.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/pipeline.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query_profile.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/write.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/struct.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/wrappers.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/type/latlng.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_get_documents.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_write.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/begin_transaction.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/commit.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/create_document.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/delete_document.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/execute_pipeline.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/get_document.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_collection_ids.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_documents.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/listen.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/partition_query.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/rollback.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_aggregation_query.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_query.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/update_document.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/write.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/snippets/snippet_metadata_google.firestore.v1.json delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_test.rb delete mode 100644 owl-bot-staging/google-cloud-firestore-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-functions-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-functions-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-functions-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-functions-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-functions-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-functions-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-functions-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-functions-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-functions-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-functions-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-functions-v1/google-cloud-functions-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google-cloud-functions-v1.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_pb.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/operations_pb.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/functions.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/operations.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/call_function.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/create_function.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/delete_function.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_download_url.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_upload_url.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_function.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/list_functions.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/set_iam_policy.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/test_iam_permissions.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/update_function.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/snippets/snippet_metadata_google.cloud.functions.v1.json delete mode 100644 owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/.gitignore delete mode 100644 owl-bot-staging/google-cloud-functions-v2/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-functions-v2/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-functions-v2/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/.yardopts delete mode 100644 owl-bot-staging/google-cloud-functions-v2/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-functions-v2/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-functions-v2/Gemfile delete mode 100644 owl-bot-staging/google-cloud-functions-v2/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-functions-v2/README.md delete mode 100644 owl-bot-staging/google-cloud-functions-v2/Rakefile delete mode 100644 owl-bot-staging/google-cloud-functions-v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-functions-v2/google-cloud-functions-v2.gemspec delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google-cloud-functions-v2.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/client.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/operations.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/paths.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_pb.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/rest.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/version.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/cloud/functions/v2/functions.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/create_function.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/delete_function.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_download_url.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_upload_url.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/get_function.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_functions.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_runtimes.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/function_service/update_function.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/snippets/snippet_metadata_google.cloud.functions.v2.json delete mode 100644 owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_test.rb delete mode 100644 owl-bot-staging/google-cloud-functions-v2/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-functions/.gitignore delete mode 100644 owl-bot-staging/google-cloud-functions/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-functions/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-functions/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-functions/.yardopts delete mode 100644 owl-bot-staging/google-cloud-functions/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-functions/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-functions/Gemfile delete mode 100644 owl-bot-staging/google-cloud-functions/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-functions/README.md delete mode 100644 owl-bot-staging/google-cloud-functions/Rakefile delete mode 100644 owl-bot-staging/google-cloud-functions/google-cloud-functions.gemspec delete mode 100644 owl-bot-staging/google-cloud-functions/lib/google-cloud-functions.rb delete mode 100644 owl-bot-staging/google-cloud-functions/lib/google/cloud/functions.rb delete mode 100644 owl-bot-staging/google-cloud-functions/lib/google/cloud/functions/version.rb delete mode 100644 owl-bot-staging/google-cloud-functions/test/google/cloud/functions/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-functions/test/google/cloud/functions/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-functions/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.gitignore delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.yardopts delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/Gemfile delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/README.md delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/Rakefile delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/google-cloud-gdc_hardware_management-v1alpha.gemspec delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google-cloud-gdc_hardware_management-v1alpha.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/operations.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/paths.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/rest.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/version.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/resources_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/resources.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/service.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/datetime.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/dayofweek.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/postal_address.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/timeofday.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/cancel_order.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_comment.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware_group.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_order.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_site.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_zone.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware_group.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_order.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_site.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_zone.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_change_log_entry.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_comment.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware_group.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_order.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_site.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_sku.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_zone.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_change_log_entries.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_comments.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware_groups.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_orders.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_sites.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_skus.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_zones.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/record_action_on_comment.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/request_order_date_change.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/signal_zone_state.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/submit_order.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware_group.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_order.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_site.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_zone.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/snippet_metadata_google.cloud.gdchardwaremanagement.v1alpha.json delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_test.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/.gitignore delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/.yardopts delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/Gemfile delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/README.md delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/Rakefile delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/google-cloud-gdc_hardware_management.gemspec delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/lib/google-cloud-gdc_hardware_management.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management/version.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-gdc_hardware_management/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/.gitignore delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/.yardopts delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/Gemfile delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/README.md delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/Rakefile delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/google-cloud-gemini_data_analytics.gemspec delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/lib/google-cloud-gemini_data_analytics.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics/version.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-gemini_data_analytics/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/.gitignore delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/.yardopts delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/Gemfile delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/README.md delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/Rakefile delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/google-cloud-gke_backup-v1.gemspec delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google-cloud-gke_backup-v1.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/credentials.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/paths.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/bindings_override.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/rest.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/version.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_channel_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_binding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/common_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_services_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_channel_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_binding_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/volume_pb.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/README.md delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/client.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/field_behavior.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/field_info.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/launch_stage.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/resource.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_channel.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan_binding.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/common.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_channel.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan_binding.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/volume.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/longrunning/operations.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/any.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/duration.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/empty.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/field_mask.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/timestamp.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/rpc/status.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/date.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/dayofweek.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/expr.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/timeofday.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/Gemfile delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_channel.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_channel.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_plan.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_channel.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_channel.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_plan.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_channel.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_index_download_url.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan_binding.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_channel.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan_binding.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_backup.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_restore.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_channels.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plan_bindings.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plans.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backups.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_channels.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plan_bindings.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plans.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restores.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_backups.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_restores.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_channel.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_plan.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_channel.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_plan.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/snippets/snippet_metadata_google.cloud.gkebackup.v1.json delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_operations_test.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_paths_test.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_rest_test.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_test.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup-v1/test/helper.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup/.gitignore delete mode 100644 owl-bot-staging/google-cloud-gke_backup/.repo-metadata.json delete mode 100644 owl-bot-staging/google-cloud-gke_backup/.rubocop.yml delete mode 100644 owl-bot-staging/google-cloud-gke_backup/.toys.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup/.yardopts delete mode 100644 owl-bot-staging/google-cloud-gke_backup/AUTHENTICATION.md delete mode 100644 owl-bot-staging/google-cloud-gke_backup/CHANGELOG.md delete mode 100644 owl-bot-staging/google-cloud-gke_backup/Gemfile delete mode 100644 owl-bot-staging/google-cloud-gke_backup/LICENSE.md delete mode 100644 owl-bot-staging/google-cloud-gke_backup/README.md delete mode 100644 owl-bot-staging/google-cloud-gke_backup/Rakefile delete mode 100644 owl-bot-staging/google-cloud-gke_backup/google-cloud-gke_backup.gemspec delete mode 100644 owl-bot-staging/google-cloud-gke_backup/lib/google-cloud-gke_backup.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup/version.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/client_test.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/version_test.rb delete mode 100644 owl-bot-staging/google-cloud-gke_backup/test/helper.rb diff --git a/owl-bot-staging/google-cloud-essential_contacts/.gitignore b/owl-bot-staging/google-cloud-essential_contacts/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/.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-essential_contacts/.repo-metadata.json b/owl-bot-staging/google-cloud-essential_contacts/.repo-metadata.json deleted file mode 100644 index c386646e2edd..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "essentialcontacts.googleapis.com", - "api_shortname": "essentialcontacts", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-essential_contacts/latest", - "distribution_name": "google-cloud-essential_contacts", - "is_cloud": true, - "language": "ruby", - "name": "essentialcontacts", - "name_pretty": "Essential Contacts API", - "product_documentation": "https://cloud.google.com/resource-manager/docs/managing-notification-contacts/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Many Google Cloud services, such as Cloud Billing, send out notifications to share important information with Google Cloud users. By default, these notifications are sent to members with certain Identity and Access Management (IAM) roles. With Essential Contacts, you can customize who receives notifications by providing your own list of contacts.", - "ruby-cloud-env-prefix": "ESSENTIAL_CONTACTS", - "ruby-cloud-product-url": "https://cloud.google.com/resource-manager/docs/managing-notification-contacts/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-essential_contacts/.rubocop.yml b/owl-bot-staging/google-cloud-essential_contacts/.rubocop.yml deleted file mode 100644 index 407124225c4e..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-essential_contacts.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-essential_contacts.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-essential_contacts/.toys.rb b/owl-bot-staging/google-cloud-essential_contacts/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/.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-essential_contacts/.yardopts b/owl-bot-staging/google-cloud-essential_contacts/.yardopts deleted file mode 100644 index c4cd4d947c99..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Essential Contacts API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-essential_contacts/AUTHENTICATION.md b/owl-bot-staging/google-cloud-essential_contacts/AUTHENTICATION.md deleted file mode 100644 index d9c103556cac..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-essential_contacts 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-essential_contacts 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/essential_contacts" - -client = Google::Cloud::EssentialContacts.essential_contacts_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/essential_contacts" - -Google::Cloud::EssentialContacts.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::EssentialContacts.essential_contacts_service -``` - -### 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-essential_contacts -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/essential_contacts" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::EssentialContacts.essential_contacts_service -``` - -### 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-essential_contacts/CHANGELOG.md b/owl-bot-staging/google-cloud-essential_contacts/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-essential_contacts/Gemfile b/owl-bot-staging/google-cloud-essential_contacts/Gemfile deleted file mode 100644 index 47268f965e6d..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-essential_contacts-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-essential_contacts.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-essential_contacts/LICENSE.md b/owl-bot-staging/google-cloud-essential_contacts/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/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-essential_contacts/README.md b/owl-bot-staging/google-cloud-essential_contacts/README.md deleted file mode 100644 index 5cbde69e337d..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Essential Contacts API - -API Client library for the Essential Contacts API - -Many Google Cloud services, such as Cloud Billing, send out notifications to share important information with Google Cloud users. By default, these notifications are sent to members with certain Identity and Access Management (IAM) roles. With Essential Contacts, you can customize who receives notifications by providing your own list of contacts. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-essential_contacts-v*`. -The gem `google-cloud-essential_contacts` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-essential_contacts/latest) -for this library, google-cloud-essential_contacts, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-essential_contacts-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-essential_contacts-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/resource-manager/docs/managing-notification-contacts/) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-essential_contacts -``` - -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/essentialcontacts.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/essential_contacts" - -client = Google::Cloud::EssentialContacts.essential_contacts_service -request = ::Google::Cloud::EssentialContacts::V1::CreateContactRequest.new # (request fields as keyword arguments...) -response = client.create_contact request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-essential_contacts-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-essential_contacts-v1/latest). - -## 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-essential_contacts`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-essential_contacts-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-essential_contacts`. -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-essential_contacts-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-essential_contacts/Rakefile b/owl-bot-staging/google-cloud-essential_contacts/Rakefile deleted file mode 100644 index b5df6ce9dd01..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/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 = true -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-essential_contacts acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["ESSENTIAL_CONTACTS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["ESSENTIAL_CONTACTS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["ESSENTIAL_CONTACTS_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 ESSENTIAL_CONTACTS_TEST_PROJECT=test123 ESSENTIAL_CONTACTS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/essential_contacts/v1/essential_contacts_service/credentials" - ::Google::Cloud::EssentialContacts::V1::EssentialContactsService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["ESSENTIAL_CONTACTS_PROJECT"] = project - ENV["ESSENTIAL_CONTACTS_TEST_PROJECT"] = project - ENV["ESSENTIAL_CONTACTS_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-essential_contacts 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-essential_contacts 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-essential_contacts 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-essential_contacts gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-essential_contacts" - header "google-cloud-essential_contacts rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-essential_contacts yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-essential_contacts 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-essential_contacts 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-essential_contacts 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-essential_contacts/google-cloud-essential_contacts.gemspec b/owl-bot-staging/google-cloud-essential_contacts/google-cloud-essential_contacts.gemspec deleted file mode 100644 index 81a08d55a89a..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/google-cloud-essential_contacts.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/essential_contacts/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-essential_contacts" - gem.version = Google::Cloud::EssentialContacts::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Many Google Cloud services, such as Cloud Billing, send out notifications to share important information with Google Cloud users. By default, these notifications are sent to members with certain Identity and Access Management (IAM) roles. With Essential Contacts, you can customize who receives notifications by providing your own list of contacts." - gem.summary = "API Client library for the Essential Contacts API" - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-essential_contacts-v1", ">= 0.6", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-essential_contacts/lib/google-cloud-essential_contacts.rb b/owl-bot-staging/google-cloud-essential_contacts/lib/google-cloud-essential_contacts.rb deleted file mode 100644 index ff726a544154..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/lib/google-cloud-essential_contacts.rb +++ /dev/null @@ -1,19 +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/essential_contacts" unless defined? Google::Cloud::EssentialContacts::VERSION diff --git a/owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts.rb b/owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts.rb deleted file mode 100644 index f9dccb541985..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts.rb +++ /dev/null @@ -1,156 +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 this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/essential_contacts/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :essential_contacts do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module EssentialContacts - ## - # Create a new client object for EssentialContactsService. - # - # By default, this returns an instance of - # [Google::Cloud::EssentialContacts::V1::EssentialContactsService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-essential_contacts-v1/latest/Google-Cloud-EssentialContacts-V1-EssentialContactsService-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the EssentialContactsService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the EssentialContactsService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::EssentialContacts.essential_contacts_service_available?}. - # - # ## About EssentialContactsService - # - # Manages contacts for important Google Cloud notifications. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.essential_contacts_service version: :v1, transport: :grpc, &block - require "google/cloud/essential_contacts/#{version.to_s.downcase}" - - package_name = Google::Cloud::EssentialContacts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::EssentialContacts.const_get(package_name).const_get(:EssentialContactsService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the EssentialContactsService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::EssentialContacts.essential_contacts_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the EssentialContactsService service, - # or if the versioned client gem needs an update to support the EssentialContactsService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.essential_contacts_service_available? version: :v1, transport: :grpc - require "google/cloud/essential_contacts/#{version.to_s.downcase}" - package_name = Google::Cloud::EssentialContacts - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::EssentialContacts.const_get package_name - return false unless service_module.const_defined? :EssentialContactsService - service_module = service_module.const_get :EssentialContactsService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-essential_contacts library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # 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 [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.essential_contacts if block_given? - - ::Google::Cloud.configure.essential_contacts - end - end - end -end - -helper_path = ::File.join __dir__, "essential_contacts", "helpers.rb" -require "google/cloud/essential_contacts/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts/version.rb b/owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts/version.rb deleted file mode 100644 index 253433281085..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/lib/google/cloud/essential_contacts/version.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! - - -module Google - module Cloud - module EssentialContacts - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/client_test.rb b/owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/client_test.rb deleted file mode 100644 index 3ad36d160603..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/client_test.rb +++ /dev/null @@ -1,64 +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 "google/cloud/essential_contacts" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::EssentialContacts::ClientConstructionMinitest < 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_essential_contacts_service_grpc - skip unless Google::Cloud::EssentialContacts.essential_contacts_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::EssentialContacts.essential_contacts_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::EssentialContacts::V1::EssentialContactsService::Client, client - end - end - - def test_essential_contacts_service_rest - skip unless Google::Cloud::EssentialContacts.essential_contacts_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::EssentialContacts.essential_contacts_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::EssentialContacts::V1::EssentialContactsService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/version_test.rb b/owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/version_test.rb deleted file mode 100644 index 934c060a3217..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/test/google/cloud/essential_contacts/version_test.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 "helper" -require "google/cloud/essential_contacts/version" - -class Google::Cloud::EssentialContacts::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::EssentialContacts::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-essential_contacts/test/helper.rb b/owl-bot-staging/google-cloud-essential_contacts/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-essential_contacts/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/.gitignore b/owl-bot-staging/google-cloud-eventarc-publishing-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-eventarc-publishing-v1/.repo-metadata.json deleted file mode 100644 index 014edf840907..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "eventarcpublishing.googleapis.com", - "api_shortname": "eventarcpublishing", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest", - "distribution_name": "google-cloud-eventarc-publishing-v1", - "is_cloud": true, - "language": "ruby", - "name": "eventarcpublishing", - "name_pretty": "Eventarc Publishing V1 API", - "product_documentation": "https://cloud.google.com/eventarc/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. Note that google-cloud-eventarc-publishing-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-eventarc-publishing instead. See the readme for more details.", - "ruby-cloud-env-prefix": "EVENTARC", - "ruby-cloud-product-url": "https://cloud.google.com/eventarc/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/.rubocop.yml b/owl-bot-staging/google-cloud-eventarc-publishing-v1/.rubocop.yml deleted file mode 100644 index 60ae90f7ab76..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-eventarc-publishing-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-eventarc-publishing-v1.rb" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/.toys.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/.yardopts b/owl-bot-staging/google-cloud-eventarc-publishing-v1/.yardopts deleted file mode 100644 index 0eb413fa7068..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Eventarc Publishing 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-eventarc-publishing-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-eventarc-publishing-v1/AUTHENTICATION.md deleted file mode 100644 index 6730f31e37c8..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-eventarc-publishing-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-eventarc-publishing-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/eventarc/publishing/v1" - -client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/eventarc/publishing/v1" - -::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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-eventarc-publishing-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/eventarc/publishing/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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-eventarc-publishing-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-eventarc-publishing-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/Gemfile b/owl-bot-staging/google-cloud-eventarc-publishing-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/LICENSE.md b/owl-bot-staging/google-cloud-eventarc-publishing-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/README.md b/owl-bot-staging/google-cloud-eventarc-publishing-v1/README.md deleted file mode 100644 index 4f3113c01616..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Eventarc Publishing V1 API - -Processes events generated by an event provider and delivers them to a subscriber. - -Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Eventarc Publishing V1 API. Most users should consider using -the main client gem, -[google-cloud-eventarc-publishing](https://rubygems.org/gems/google-cloud-eventarc-publishing). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-eventarc-publishing-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/eventarcpublishing.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/eventarc/publishing/v1" - -client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new -request = ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new # (request fields as keyword arguments...) -response = client.publish_channel_connection_events request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/eventarc/) -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/eventarc/publishing/v1" -require "logger" - -client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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-eventarc-publishing`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-eventarc-publishing-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-eventarc-publishing`. -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-eventarc-publishing-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-eventarc-publishing-v1/Rakefile b/owl-bot-staging/google-cloud-eventarc-publishing-v1/Rakefile deleted file mode 100644 index 9ad77ce5856f..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["EVENTARC_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["EVENTARC_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["EVENTARC_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 EVENTARC_TEST_PROJECT=test123 EVENTARC_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/eventarc/publishing/v1/publisher/credentials" - ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["EVENTARC_PROJECT"] = project - ENV["EVENTARC_TEST_PROJECT"] = project - ENV["EVENTARC_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-eventarc-publishing-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-eventarc-publishing-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-eventarc-publishing-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-eventarc-publishing-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-eventarc-publishing-v1" - header "google-cloud-eventarc-publishing-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-eventarc-publishing-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-eventarc-publishing-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-eventarc-publishing-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-eventarc-publishing-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-eventarc-publishing-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-eventarc-publishing-v1/gapic_metadata.json deleted file mode 100644 index 93e22a3adc86..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/gapic_metadata.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.eventarc.publishing.v1", - "libraryPackage": "::Google::Cloud::Eventarc::Publishing::V1", - "services": { - "Publisher": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client", - "rpcs": { - "PublishChannelConnectionEvents": { - "methods": [ - "publish_channel_connection_events" - ] - }, - "PublishEvents": { - "methods": [ - "publish_events" - ] - }, - "Publish": { - "methods": [ - "publish" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/google-cloud-eventarc-publishing-v1.gemspec b/owl-bot-staging/google-cloud-eventarc-publishing-v1/google-cloud-eventarc-publishing-v1.gemspec deleted file mode 100644 index 8e3d1d7363d7..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/google-cloud-eventarc-publishing-v1.gemspec +++ /dev/null @@ -1,28 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/eventarc/publishing/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-eventarc-publishing-v1" - gem.version = Google::Cloud::Eventarc::Publishing::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. Note that google-cloud-eventarc-publishing-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-eventarc-publishing instead. See the readme for more details." - gem.summary = "Processes events generated by an event provider and delivers them to a subscriber." - 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.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google-cloud-eventarc-publishing-v1.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google-cloud-eventarc-publishing-v1.rb deleted file mode 100644 index cfdad23e421f..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google-cloud-eventarc-publishing-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/eventarc/publishing/v1" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1.rb deleted file mode 100644 index 0e65f4632a87..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1.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 "google/cloud/eventarc/publishing/v1/publisher" -require "google/cloud/eventarc/publishing/v1/version" - -module Google - module Cloud - module Eventarc - module Publishing - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/eventarc/publishing/v1" - # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/eventarc/publishing/v1" - # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/eventarc/publishing/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/cloud_event_pb.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/cloud_event_pb.rb deleted file mode 100644 index 4b2b22ac2147..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/cloud_event_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/eventarc/publishing/v1/cloud_event.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/any_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n5google/cloud/eventarc/publishing/v1/cloud_event.proto\x12#google.cloud.eventarc.publishing.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfc\x04\n\nCloudEvent\x12\x0f\n\x02id\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x06source\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x19\n\x0cspec_version\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\x04type\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12X\n\nattributes\x18\x05 \x03(\x0b\x32?.google.cloud.eventarc.publishing.v1.CloudEvent.AttributesEntryB\x03\xe0\x41\x01\x12\x1a\n\x0b\x62inary_data\x18\x06 \x01(\x0c\x42\x03\xe0\x41\x01H\x00\x12\x18\n\ttext_data\x18\x07 \x01(\tB\x03\xe0\x41\x01H\x00\x12/\n\nproto_data\x18\x08 \x01(\x0b\x32\x14.google.protobuf.AnyB\x03\xe0\x41\x01H\x00\x1a\xd3\x01\n\x18\x43loudEventAttributeValue\x12\x14\n\nce_boolean\x18\x01 \x01(\x08H\x00\x12\x14\n\nce_integer\x18\x02 \x01(\x05H\x00\x12\x13\n\tce_string\x18\x03 \x01(\tH\x00\x12\x12\n\x08\x63\x65_bytes\x18\x04 \x01(\x0cH\x00\x12\x10\n\x06\x63\x65_uri\x18\x05 \x01(\tH\x00\x12\x14\n\nce_uri_ref\x18\x06 \x01(\tH\x00\x12\x32\n\x0c\x63\x65_timestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x06\n\x04\x61ttr\x1a{\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12W\n\x05value\x18\x02 \x01(\x0b\x32H.google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue:\x02\x38\x01\x42\x06\n\x04\x64\x61taB\xfb\x01\n\'com.google.cloud.eventarc.publishing.v1B\x0f\x43loudEventProtoP\x01ZGcloud.google.com/go/eventarc/publishing/apiv1/publishingpb;publishingpb\xaa\x02#Google.Cloud.Eventarc.Publishing.V1\xca\x02#Google\\Cloud\\Eventarc\\Publishing\\V1\xea\x02\'Google::Cloud::Eventarc::Publishing::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Any", "google/protobuf/any.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Eventarc - module Publishing - module V1 - CloudEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.CloudEvent").msgclass - CloudEvent::CloudEventAttributeValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.CloudEvent.CloudEventAttributeValue").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher.rb deleted file mode 100644 index 7aabbb71cad3..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher.rb +++ /dev/null @@ -1,84 +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/eventarc/publishing/v1/version" - -require "google/cloud/eventarc/publishing/v1/publisher/credentials" -require "google/cloud/eventarc/publishing/v1/publisher/client" -require "google/cloud/eventarc/publishing/v1/publisher/rest" - -module Google - module Cloud - module Eventarc - module Publishing - module V1 - ## - # Eventarc processes events generated by an event provider and delivers them to - # a subscriber. - # - # An event provider is a software-as-a-service (SaaS) system or - # product that can generate and deliver events through Eventarc. - # - # A third-party event provider is an event provider from outside of Google. - # - # A partner is a third-party event provider that is integrated with Eventarc. - # - # A subscriber is a Google Cloud customer interested in receiving events. - # - # Channel is a first-class Eventarc resource that is created and managed - # by the subscriber in their Google Cloud project. A Channel represents a - # subscriber's intent to receive events from an event provider. A Channel is - # associated with exactly one event provider. - # - # ChannelConnection is a first-class Eventarc resource that - # is created and managed by the partner in their Google Cloud project. A - # ChannelConnection represents a connection between a partner and a - # subscriber's Channel. A ChannelConnection has a one-to-one mapping with a - # Channel. - # - # Bus is a first-class Eventarc resource that is created and managed in a - # Google Cloud project. A Bus provides a discoverable endpoint for events and - # is a router that receives all events published by event providers and - # delivers them to zero or more subscribers. - # - # Publisher allows an event provider to publish events to Eventarc. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/eventarc/publishing/v1/publisher" - # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/eventarc/publishing/v1/publisher/rest" - # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new - # - module Publisher - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "publisher", "helpers.rb" -require "google/cloud/eventarc/publishing/v1/publisher/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb deleted file mode 100644 index 5d67d8c95938..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/client.rb +++ /dev/null @@ -1,729 +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/eventarc/publishing/v1/publisher_pb" - -module Google - module Cloud - module Eventarc - module Publishing - module V1 - module Publisher - ## - # Client for the Publisher service. - # - # Eventarc processes events generated by an event provider and delivers them to - # a subscriber. - # - # An event provider is a software-as-a-service (SaaS) system or - # product that can generate and deliver events through Eventarc. - # - # A third-party event provider is an event provider from outside of Google. - # - # A partner is a third-party event provider that is integrated with Eventarc. - # - # A subscriber is a Google Cloud customer interested in receiving events. - # - # Channel is a first-class Eventarc resource that is created and managed - # by the subscriber in their Google Cloud project. A Channel represents a - # subscriber's intent to receive events from an event provider. A Channel is - # associated with exactly one event provider. - # - # ChannelConnection is a first-class Eventarc resource that - # is created and managed by the partner in their Google Cloud project. A - # ChannelConnection represents a connection between a partner and a - # subscriber's Channel. A ChannelConnection has a one-to-one mapping with a - # Channel. - # - # Bus is a first-class Eventarc resource that is created and managed in a - # Google Cloud project. A Bus provides a discoverable endpoint for events and - # is a router that receives all events published by event providers and - # delivers them to zero or more subscribers. - # - # Publisher allows an event provider to publish events to Eventarc. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "eventarcpublishing.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :publisher_stub - - ## - # Configure the Publisher Client class. - # - # See {::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Publisher clients - # ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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", "Eventarc", "Publishing", "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.publish_channel_connection_events.timeout = 60.0 - - default_config.rpcs.publish.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Publisher 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::Eventarc::Publishing::V1::Publisher::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 - @publisher_stub.universe_domain - end - - ## - # Create a new Publisher client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Publisher 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/eventarc/publishing/v1/publisher_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 - - @publisher_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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 - ) - - @publisher_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @publisher_stub.logger - end - - # Service calls - - ## - # Publish events to a ChannelConnection in a partner's project. - # - # @overload publish_channel_connection_events(request, options = nil) - # Pass arguments to `publish_channel_connection_events` via a request object, either of type - # {::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload publish_channel_connection_events(channel_connection: nil, events: nil, text_events: nil) - # Pass arguments to `publish_channel_connection_events` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param channel_connection [::String] - # The channel_connection that the events are published from. For example: - # `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - # @param events [::Array<::Google::Protobuf::Any, ::Hash>] - # The CloudEvents v1.0 events to publish. No other types are allowed. - # If this field is set, then the `text_events` fields must not be set. - # @param text_events [::Array<::String>] - # The text representation of events to publish. - # CloudEvent v1.0 in JSON format is the only allowed type. Refer to - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - # for specification. - # If this field is set, then the `events` fields must not be set. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/publishing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new - # - # # Call the publish_channel_connection_events method. - # result = client.publish_channel_connection_events request - # - # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse. - # p result - # - def publish_channel_connection_events request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.publish_channel_connection_events.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.channel_connection - header_params["channel_connection"] = request.channel_connection - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.publish_channel_connection_events.timeout, - metadata: metadata, - retry_policy: @config.rpcs.publish_channel_connection_events.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @publisher_stub.call_rpc :publish_channel_connection_events, 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 - - ## - # Publish events to a subscriber's channel. - # - # @overload publish_events(request, options = nil) - # Pass arguments to `publish_events` via a request object, either of type - # {::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload publish_events(channel: nil, events: nil, text_events: nil) - # Pass arguments to `publish_events` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param channel [::String] - # The full name of the channel to publish to. For example: - # `projects/{project}/locations/{location}/channels/{channel-id}`. - # @param events [::Array<::Google::Protobuf::Any, ::Hash>] - # The CloudEvents v1.0 events to publish. No other types are allowed. - # If this field is set, then the `text_events` fields must not be set. - # @param text_events [::Array<::String>] - # The text representation of events to publish. - # CloudEvent v1.0 in JSON format is the only allowed type. Refer to - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - # for specification. - # If this field is set, then the `events` fields must not be set. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/publishing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new - # - # # Call the publish_events method. - # result = client.publish_events request - # - # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse. - # p result - # - def publish_events request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.publish_events.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.channel - header_params["channel"] = request.channel - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.publish_events.timeout, - metadata: metadata, - retry_policy: @config.rpcs.publish_events.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @publisher_stub.call_rpc :publish_events, 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 - - ## - # Publish events to a message bus. - # - # @overload publish(request, options = nil) - # Pass arguments to `publish` via a request object, either of type - # {::Google::Cloud::Eventarc::Publishing::V1::PublishRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::Publishing::V1::PublishRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload publish(message_bus: nil, proto_message: nil, json_message: nil, avro_message: nil) - # Pass arguments to `publish` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param message_bus [::String] - # Required. The full name of the message bus to publish events to. Format: - # `projects/{project}/locations/{location}/messageBuses/{messageBus}`. - # @param proto_message [::Google::Cloud::Eventarc::Publishing::V1::CloudEvent, ::Hash] - # The Protobuf format of the CloudEvent being published. Specification can - # be found here: - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md - # - # Note: The following parameters are mutually exclusive: `proto_message`, `json_message`, `avro_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param json_message [::String] - # The JSON format of the CloudEvent being published. Specification can be - # found here: - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - # - # Note: The following parameters are mutually exclusive: `json_message`, `proto_message`, `avro_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param avro_message [::String] - # The Avro format of the CloudEvent being published. Specification can - # be found here: - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md - # - # Note: The following parameters are mutually exclusive: `avro_message`, `proto_message`, `json_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/publishing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new - # - # # Call the publish method. - # result = client.publish request - # - # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishResponse. - # p result - # - def publish request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::Publishing::V1::PublishRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.publish.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.message_bus - header_params["message_bus"] = request.message_bus - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.publish.timeout, - metadata: metadata, - retry_policy: @config.rpcs.publish.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @publisher_stub.call_rpc :publish, 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 Publisher API. - # - # This class represents the configuration for Publisher, - # 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::Eventarc::Publishing::V1::Publisher::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 - # # publish_channel_connection_events to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.publish_channel_connection_events.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.publish_channel_connection_events.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::Eventarc::Publishing::V1::Publisher::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 = "eventarcpublishing.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 Publisher 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 `publish_channel_connection_events` - # @return [::Gapic::Config::Method] - # - attr_reader :publish_channel_connection_events - ## - # RPC-specific configuration for `publish_events` - # @return [::Gapic::Config::Method] - # - attr_reader :publish_events - ## - # RPC-specific configuration for `publish` - # @return [::Gapic::Config::Method] - # - attr_reader :publish - - # @private - def initialize parent_rpcs = nil - publish_channel_connection_events_config = parent_rpcs.publish_channel_connection_events if parent_rpcs.respond_to? :publish_channel_connection_events - @publish_channel_connection_events = ::Gapic::Config::Method.new publish_channel_connection_events_config - publish_events_config = parent_rpcs.publish_events if parent_rpcs.respond_to? :publish_events - @publish_events = ::Gapic::Config::Method.new publish_events_config - publish_config = parent_rpcs.publish if parent_rpcs.respond_to? :publish - @publish = ::Gapic::Config::Method.new publish_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/credentials.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/credentials.rb deleted file mode 100644 index 50419d0983d2..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/credentials.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 "googleauth" - -module Google - module Cloud - module Eventarc - module Publishing - module V1 - module Publisher - # Credentials for the Publisher API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "EVENTARC_CREDENTIALS", - "EVENTARC_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "EVENTARC_CREDENTIALS_JSON", - "EVENTARC_KEYFILE_JSON", - "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 -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest.rb deleted file mode 100644 index f625fb135fe4..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest.rb +++ /dev/null @@ -1,81 +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/eventarc/publishing/v1/version" - -require "google/cloud/eventarc/publishing/v1/publisher/credentials" -require "google/cloud/eventarc/publishing/v1/publisher/rest/client" - -module Google - module Cloud - module Eventarc - module Publishing - module V1 - ## - # Eventarc processes events generated by an event provider and delivers them to - # a subscriber. - # - # An event provider is a software-as-a-service (SaaS) system or - # product that can generate and deliver events through Eventarc. - # - # A third-party event provider is an event provider from outside of Google. - # - # A partner is a third-party event provider that is integrated with Eventarc. - # - # A subscriber is a Google Cloud customer interested in receiving events. - # - # Channel is a first-class Eventarc resource that is created and managed - # by the subscriber in their Google Cloud project. A Channel represents a - # subscriber's intent to receive events from an event provider. A Channel is - # associated with exactly one event provider. - # - # ChannelConnection is a first-class Eventarc resource that - # is created and managed by the partner in their Google Cloud project. A - # ChannelConnection represents a connection between a partner and a - # subscriber's Channel. A ChannelConnection has a one-to-one mapping with a - # Channel. - # - # Bus is a first-class Eventarc resource that is created and managed in a - # Google Cloud project. A Bus provides a discoverable endpoint for events and - # is a router that receives all events published by event providers and - # delivers them to zero or more subscribers. - # - # Publisher allows an event provider to publish events to Eventarc. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/eventarc/publishing/v1/publisher/rest" - # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new - # - module Publisher - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/eventarc/publishing/v1/publisher/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb deleted file mode 100644 index 9b92a9131331..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/client.rb +++ /dev/null @@ -1,665 +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/eventarc/publishing/v1/publisher_pb" -require "google/cloud/eventarc/publishing/v1/publisher/rest/service_stub" - -module Google - module Cloud - module Eventarc - module Publishing - module V1 - module Publisher - module Rest - ## - # REST client for the Publisher service. - # - # Eventarc processes events generated by an event provider and delivers them to - # a subscriber. - # - # An event provider is a software-as-a-service (SaaS) system or - # product that can generate and deliver events through Eventarc. - # - # A third-party event provider is an event provider from outside of Google. - # - # A partner is a third-party event provider that is integrated with Eventarc. - # - # A subscriber is a Google Cloud customer interested in receiving events. - # - # Channel is a first-class Eventarc resource that is created and managed - # by the subscriber in their Google Cloud project. A Channel represents a - # subscriber's intent to receive events from an event provider. A Channel is - # associated with exactly one event provider. - # - # ChannelConnection is a first-class Eventarc resource that - # is created and managed by the partner in their Google Cloud project. A - # ChannelConnection represents a connection between a partner and a - # subscriber's Channel. A ChannelConnection has a one-to-one mapping with a - # Channel. - # - # Bus is a first-class Eventarc resource that is created and managed in a - # Google Cloud project. A Bus provides a discoverable endpoint for events and - # is a router that receives all events published by event providers and - # delivers them to zero or more subscribers. - # - # Publisher allows an event provider to publish events to Eventarc. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "eventarcpublishing.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :publisher_stub - - ## - # Configure the Publisher Client class. - # - # See {::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Publisher clients - # ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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", "Eventarc", "Publishing", "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.publish_channel_connection_events.timeout = 60.0 - - default_config.rpcs.publish.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Publisher 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::Eventarc::Publishing::V1::Publisher::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 - @publisher_stub.universe_domain - end - - ## - # Create a new Publisher REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Publisher 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 - - @publisher_stub = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @publisher_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 - end - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @publisher_stub.logger - end - - # Service calls - - ## - # Publish events to a ChannelConnection in a partner's project. - # - # @overload publish_channel_connection_events(request, options = nil) - # Pass arguments to `publish_channel_connection_events` via a request object, either of type - # {::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload publish_channel_connection_events(channel_connection: nil, events: nil, text_events: nil) - # Pass arguments to `publish_channel_connection_events` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param channel_connection [::String] - # The channel_connection that the events are published from. For example: - # `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - # @param events [::Array<::Google::Protobuf::Any, ::Hash>] - # The CloudEvents v1.0 events to publish. No other types are allowed. - # If this field is set, then the `text_events` fields must not be set. - # @param text_events [::Array<::String>] - # The text representation of events to publish. - # CloudEvent v1.0 in JSON format is the only allowed type. Refer to - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - # for specification. - # If this field is set, then the `events` fields must not be set. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/publishing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new - # - # # Call the publish_channel_connection_events method. - # result = client.publish_channel_connection_events request - # - # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse. - # p result - # - def publish_channel_connection_events request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.publish_channel_connection_events.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.publish_channel_connection_events.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.publish_channel_connection_events.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @publisher_stub.publish_channel_connection_events 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 - - ## - # Publish events to a subscriber's channel. - # - # @overload publish_events(request, options = nil) - # Pass arguments to `publish_events` via a request object, either of type - # {::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload publish_events(channel: nil, events: nil, text_events: nil) - # Pass arguments to `publish_events` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param channel [::String] - # The full name of the channel to publish to. For example: - # `projects/{project}/locations/{location}/channels/{channel-id}`. - # @param events [::Array<::Google::Protobuf::Any, ::Hash>] - # The CloudEvents v1.0 events to publish. No other types are allowed. - # If this field is set, then the `text_events` fields must not be set. - # @param text_events [::Array<::String>] - # The text representation of events to publish. - # CloudEvent v1.0 in JSON format is the only allowed type. Refer to - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - # for specification. - # If this field is set, then the `events` fields must not be set. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/publishing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new - # - # # Call the publish_events method. - # result = client.publish_events request - # - # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse. - # p result - # - def publish_events request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.publish_events.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.publish_events.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.publish_events.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @publisher_stub.publish_events 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 - - ## - # Publish events to a message bus. - # - # @overload publish(request, options = nil) - # Pass arguments to `publish` via a request object, either of type - # {::Google::Cloud::Eventarc::Publishing::V1::PublishRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::Publishing::V1::PublishRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload publish(message_bus: nil, proto_message: nil, json_message: nil, avro_message: nil) - # Pass arguments to `publish` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param message_bus [::String] - # Required. The full name of the message bus to publish events to. Format: - # `projects/{project}/locations/{location}/messageBuses/{messageBus}`. - # @param proto_message [::Google::Cloud::Eventarc::Publishing::V1::CloudEvent, ::Hash] - # The Protobuf format of the CloudEvent being published. Specification can - # be found here: - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md - # - # Note: The following parameters are mutually exclusive: `proto_message`, `json_message`, `avro_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param json_message [::String] - # The JSON format of the CloudEvent being published. Specification can be - # found here: - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - # - # Note: The following parameters are mutually exclusive: `json_message`, `proto_message`, `avro_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param avro_message [::String] - # The Avro format of the CloudEvent being published. Specification can - # be found here: - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md - # - # Note: The following parameters are mutually exclusive: `avro_message`, `proto_message`, `json_message`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/publishing/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new - # - # # Call the publish method. - # result = client.publish request - # - # # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishResponse. - # p result - # - def publish request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::Publishing::V1::PublishRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.publish.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::Publishing::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.publish.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.publish.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @publisher_stub.publish 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 Publisher REST API. - # - # This class represents the configuration for Publisher 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::Eventarc::Publishing::V1::Publisher::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 - # # publish_channel_connection_events to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.publish_channel_connection_events.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.publish_channel_connection_events.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 = "eventarcpublishing.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 Publisher 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 `publish_channel_connection_events` - # @return [::Gapic::Config::Method] - # - attr_reader :publish_channel_connection_events - ## - # RPC-specific configuration for `publish_events` - # @return [::Gapic::Config::Method] - # - attr_reader :publish_events - ## - # RPC-specific configuration for `publish` - # @return [::Gapic::Config::Method] - # - attr_reader :publish - - # @private - def initialize parent_rpcs = nil - publish_channel_connection_events_config = parent_rpcs.publish_channel_connection_events if parent_rpcs.respond_to? :publish_channel_connection_events - @publish_channel_connection_events = ::Gapic::Config::Method.new publish_channel_connection_events_config - publish_events_config = parent_rpcs.publish_events if parent_rpcs.respond_to? :publish_events - @publish_events = ::Gapic::Config::Method.new publish_events_config - publish_config = parent_rpcs.publish if parent_rpcs.respond_to? :publish - @publish = ::Gapic::Config::Method.new publish_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/service_stub.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/service_stub.rb deleted file mode 100644 index 82c0817073aa..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher/rest/service_stub.rb +++ /dev/null @@ -1,269 +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/eventarc/publishing/v1/publisher_pb" - -module Google - module Cloud - module Eventarc - module Publishing - module V1 - module Publisher - module Rest - ## - # REST service stub for the Publisher 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 publish_channel_connection_events REST call - # - # @param request_pb [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse] - # A result object deserialized from the server's reply - def publish_channel_connection_events request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_publish_channel_connection_events_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "publish_channel_connection_events", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the publish_events REST call - # - # @param request_pb [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse] - # A result object deserialized from the server's reply - def publish_events request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_publish_events_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "publish_events", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the publish REST call - # - # @param request_pb [::Google::Cloud::Eventarc::Publishing::V1::PublishRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::Publishing::V1::PublishResponse] - # A result object deserialized from the server's reply - def publish request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_publish_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "publish", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::Publishing::V1::PublishResponse.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 publish_channel_connection_events REST call - # - # @param request_pb [::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_publish_channel_connection_events_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{channel_connection}:publishEvents", - body: "*", - matches: [ - ["channel_connection", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the publish_events REST call - # - # @param request_pb [::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_publish_events_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{channel}:publishEvents", - body: "*", - matches: [ - ["channel", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the publish REST call - # - # @param request_pb [::Google::Cloud::Eventarc::Publishing::V1::PublishRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_publish_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{message_bus}:publish", - body: "*", - matches: [ - ["message_bus", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_pb.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_pb.rb deleted file mode 100644 index 624ebfd71e45..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_pb.rb +++ /dev/null @@ -1,58 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/eventarc/publishing/v1/publisher.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/cloud/eventarc/publishing/v1/cloud_event_pb' -require 'google/protobuf/any_pb' - - -descriptor_data = "\n3google/cloud/eventarc/publishing/v1/publisher.proto\x12#google.cloud.eventarc.publishing.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x35google/cloud/eventarc/publishing/v1/cloud_event.proto\x1a\x19google/protobuf/any.proto\"~\n%PublishChannelConnectionEventsRequest\x12\x1a\n\x12\x63hannel_connection\x18\x01 \x01(\t\x12$\n\x06\x65vents\x18\x02 \x03(\x0b\x32\x14.google.protobuf.Any\x12\x13\n\x0btext_events\x18\x03 \x03(\t\"(\n&PublishChannelConnectionEventsResponse\"b\n\x14PublishEventsRequest\x12\x0f\n\x07\x63hannel\x18\x01 \x01(\t\x12$\n\x06\x65vents\x18\x02 \x03(\x0b\x32\x14.google.protobuf.Any\x12\x13\n\x0btext_events\x18\x03 \x03(\t\"\x17\n\x15PublishEventsResponse\"\xae\x01\n\x0ePublishRequest\x12\x18\n\x0bmessage_bus\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12H\n\rproto_message\x18\x02 \x01(\x0b\x32/.google.cloud.eventarc.publishing.v1.CloudEventH\x00\x12\x16\n\x0cjson_message\x18\x03 \x01(\tH\x00\x12\x16\n\x0c\x61vro_message\x18\x04 \x01(\x0cH\x00\x42\x08\n\x06\x66ormat\"\x11\n\x0fPublishResponse2\x93\x06\n\tPublisher\x12\x98\x02\n\x1ePublishChannelConnectionEvents\x12J.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest\x1aK.google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse\"]\x82\xd3\xe4\x93\x02W\"R/v1/{channel_connection=projects/*/locations/*/channelConnections/*}:publishEvents:\x01*\x12\xd0\x01\n\rPublishEvents\x12\x39.google.cloud.eventarc.publishing.v1.PublishEventsRequest\x1a:.google.cloud.eventarc.publishing.v1.PublishEventsResponse\"H\x82\xd3\xe4\x93\x02\x42\"=/v1/{channel=projects/*/locations/*/channels/*}:publishEvents:\x01*\x12\xc0\x01\n\x07Publish\x12\x33.google.cloud.eventarc.publishing.v1.PublishRequest\x1a\x34.google.cloud.eventarc.publishing.v1.PublishResponse\"J\x82\xd3\xe4\x93\x02\x44\"?/v1/{message_bus=projects/*/locations/*/messageBuses/*}:publish:\x01*\x1aU\xca\x41!eventarcpublishing.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfa\x01\n\'com.google.cloud.eventarc.publishing.v1B\x0ePublisherProtoP\x01ZGcloud.google.com/go/eventarc/publishing/apiv1/publishingpb;publishingpb\xaa\x02#Google.Cloud.Eventarc.Publishing.V1\xca\x02#Google\\Cloud\\Eventarc\\Publishing\\V1\xea\x02\'Google::Cloud::Eventarc::Publishing::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Any", "google/protobuf/any.proto"], - ["google.cloud.eventarc.publishing.v1.CloudEvent", "google/cloud/eventarc/publishing/v1/cloud_event.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Eventarc - module Publishing - module V1 - PublishChannelConnectionEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsRequest").msgclass - PublishChannelConnectionEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.PublishChannelConnectionEventsResponse").msgclass - PublishEventsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.PublishEventsRequest").msgclass - PublishEventsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.PublishEventsResponse").msgclass - PublishRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.PublishRequest").msgclass - PublishResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.publishing.v1.PublishResponse").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_services_pb.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_services_pb.rb deleted file mode 100644 index 91a3a99f35ea..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/publisher_services_pb.rb +++ /dev/null @@ -1,79 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/eventarc/publishing/v1/publisher.proto for package 'Google.Cloud.Eventarc.Publishing.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/eventarc/publishing/v1/publisher_pb' - -module Google - module Cloud - module Eventarc - module Publishing - module V1 - module Publisher - # Eventarc processes events generated by an event provider and delivers them to - # a subscriber. - # - # An event provider is a software-as-a-service (SaaS) system or - # product that can generate and deliver events through Eventarc. - # - # A third-party event provider is an event provider from outside of Google. - # - # A partner is a third-party event provider that is integrated with Eventarc. - # - # A subscriber is a Google Cloud customer interested in receiving events. - # - # Channel is a first-class Eventarc resource that is created and managed - # by the subscriber in their Google Cloud project. A Channel represents a - # subscriber's intent to receive events from an event provider. A Channel is - # associated with exactly one event provider. - # - # ChannelConnection is a first-class Eventarc resource that - # is created and managed by the partner in their Google Cloud project. A - # ChannelConnection represents a connection between a partner and a - # subscriber's Channel. A ChannelConnection has a one-to-one mapping with a - # Channel. - # - # Bus is a first-class Eventarc resource that is created and managed in a - # Google Cloud project. A Bus provides a discoverable endpoint for events and - # is a router that receives all events published by event providers and - # delivers them to zero or more subscribers. - # - # Publisher allows an event provider to publish events to Eventarc. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.eventarc.publishing.v1.Publisher' - - # Publish events to a ChannelConnection in a partner's project. - rpc :PublishChannelConnectionEvents, ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest, ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse - # Publish events to a subscriber's channel. - rpc :PublishEvents, ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest, ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse - # Publish events to a message bus. - rpc :Publish, ::Google::Cloud::Eventarc::Publishing::V1::PublishRequest, ::Google::Cloud::Eventarc::Publishing::V1::PublishResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/rest.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/rest.rb deleted file mode 100644 index bb17fad8ae69..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/rest.rb +++ /dev/null @@ -1,39 +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/eventarc/publishing/v1/publisher/rest" -require "google/cloud/eventarc/publishing/v1/version" - -module Google - module Cloud - module Eventarc - module Publishing - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/eventarc/publishing/v1/rest" - # client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/version.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/version.rb deleted file mode 100644 index 8f2a79d2ceef..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/lib/google/cloud/eventarc/publishing/v1/version.rb +++ /dev/null @@ -1,30 +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 Eventarc - module Publishing - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/README.md deleted file mode 100644 index e063d6bb52de..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Eventarc Publishing 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-eventarc-publishing-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/cloud_event.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/cloud_event.rb deleted file mode 100644 index 8048b1534086..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/cloud_event.rb +++ /dev/null @@ -1,125 +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 Eventarc - module Publishing - module V1 - # CloudEvent represents a vendor-neutral specification for defining the format - # of event data. - # @!attribute [rw] id - # @return [::String] - # Required. Identifies the event. Producers MUST ensure that source + id is - # unique for each distinct event. - # @!attribute [rw] source - # @return [::String] - # Required. Identifies the context in which an event happened. - # URI-reference - # @!attribute [rw] spec_version - # @return [::String] - # Required. The version of the CloudEvents specification which the event - # uses. - # @!attribute [rw] type - # @return [::String] - # Required. This attribute contains a value describing the type of event - # related to the originating occurrence. - # @!attribute [rw] attributes - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Eventarc::Publishing::V1::CloudEvent::CloudEventAttributeValue}] - # Optional. Used for Optional & Extension Attributes - # @!attribute [rw] binary_data - # @return [::String] - # Optional. Binary data. - # - # Note: The following fields are mutually exclusive: `binary_data`, `text_data`, `proto_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] text_data - # @return [::String] - # Optional. Text data. - # - # Note: The following fields are mutually exclusive: `text_data`, `binary_data`, `proto_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] proto_data - # @return [::Google::Protobuf::Any] - # Optional. Proto data. - # - # NOTE: The `protoData` field only functions as expected when the payload - # is specifically a `CloudEvent` message type, and can't be used for - # arbitrary protocol buffer messages. For any other protocol buffer type, - # you must serialize your proto message into bytes, and use the - # `binaryData` field instead. - # - # Note: The following fields are mutually exclusive: `proto_data`, `binary_data`, `text_data`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class CloudEvent - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The following abstract data types are available for use in attributes. - # @!attribute [rw] ce_boolean - # @return [::Boolean] - # Boolean value. - # - # Note: The following fields are mutually exclusive: `ce_boolean`, `ce_integer`, `ce_string`, `ce_bytes`, `ce_uri`, `ce_uri_ref`, `ce_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ce_integer - # @return [::Integer] - # Integer value. - # - # Note: The following fields are mutually exclusive: `ce_integer`, `ce_boolean`, `ce_string`, `ce_bytes`, `ce_uri`, `ce_uri_ref`, `ce_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ce_string - # @return [::String] - # String value. - # - # Note: The following fields are mutually exclusive: `ce_string`, `ce_boolean`, `ce_integer`, `ce_bytes`, `ce_uri`, `ce_uri_ref`, `ce_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ce_bytes - # @return [::String] - # Bytes value. - # - # Note: The following fields are mutually exclusive: `ce_bytes`, `ce_boolean`, `ce_integer`, `ce_string`, `ce_uri`, `ce_uri_ref`, `ce_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ce_uri - # @return [::String] - # URI value. - # - # Note: The following fields are mutually exclusive: `ce_uri`, `ce_boolean`, `ce_integer`, `ce_string`, `ce_bytes`, `ce_uri_ref`, `ce_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ce_uri_ref - # @return [::String] - # URI-reference value. - # - # Note: The following fields are mutually exclusive: `ce_uri_ref`, `ce_boolean`, `ce_integer`, `ce_string`, `ce_bytes`, `ce_uri`, `ce_timestamp`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] ce_timestamp - # @return [::Google::Protobuf::Timestamp] - # Timestamp value. - # - # Note: The following fields are mutually exclusive: `ce_timestamp`, `ce_boolean`, `ce_integer`, `ce_string`, `ce_bytes`, `ce_uri`, `ce_uri_ref`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class CloudEventAttributeValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Eventarc::Publishing::V1::CloudEvent::CloudEventAttributeValue] - class AttributesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/publisher.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/publisher.rb deleted file mode 100644 index 5bbbeef93e8a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/cloud/eventarc/publishing/v1/publisher.rb +++ /dev/null @@ -1,119 +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 Eventarc - module Publishing - module V1 - # The request message for the PublishChannelConnectionEvents method. - # @!attribute [rw] channel_connection - # @return [::String] - # The channel_connection that the events are published from. For example: - # `projects/{partner_project_id}/locations/{location}/channelConnections/{channel_connection_id}`. - # @!attribute [rw] events - # @return [::Array<::Google::Protobuf::Any>] - # The CloudEvents v1.0 events to publish. No other types are allowed. - # If this field is set, then the `text_events` fields must not be set. - # @!attribute [rw] text_events - # @return [::Array<::String>] - # The text representation of events to publish. - # CloudEvent v1.0 in JSON format is the only allowed type. Refer to - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - # for specification. - # If this field is set, then the `events` fields must not be set. - class PublishChannelConnectionEventsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for the PublishChannelConnectionEvents method. - class PublishChannelConnectionEventsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the PublishEvents method. - # @!attribute [rw] channel - # @return [::String] - # The full name of the channel to publish to. For example: - # `projects/{project}/locations/{location}/channels/{channel-id}`. - # @!attribute [rw] events - # @return [::Array<::Google::Protobuf::Any>] - # The CloudEvents v1.0 events to publish. No other types are allowed. - # If this field is set, then the `text_events` fields must not be set. - # @!attribute [rw] text_events - # @return [::Array<::String>] - # The text representation of events to publish. - # CloudEvent v1.0 in JSON format is the only allowed type. Refer to - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - # for specification. - # If this field is set, then the `events` fields must not be set. - class PublishEventsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for the PublishEvents method. - class PublishEventsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the Publish method. - # @!attribute [rw] message_bus - # @return [::String] - # Required. The full name of the message bus to publish events to. Format: - # `projects/{project}/locations/{location}/messageBuses/{messageBus}`. - # @!attribute [rw] proto_message - # @return [::Google::Cloud::Eventarc::Publishing::V1::CloudEvent] - # The Protobuf format of the CloudEvent being published. Specification can - # be found here: - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/protobuf-format.md - # - # Note: The following fields are mutually exclusive: `proto_message`, `json_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] json_message - # @return [::String] - # The JSON format of the CloudEvent being published. Specification can be - # found here: - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/json-format.md - # - # Note: The following fields are mutually exclusive: `json_message`, `proto_message`, `avro_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] avro_message - # @return [::String] - # The Avro format of the CloudEvent being published. Specification can - # be found here: - # https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/formats/avro-format.md - # - # Note: The following fields are mutually exclusive: `avro_message`, `proto_message`, `json_message`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class PublishRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for the Publish method. - class PublishResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/Gemfile deleted file mode 100644 index 094311882594..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-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-eventarc-publishing-v1", path: "../" -else - gem "google-cloud-eventarc-publishing-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-eventarc-publishing-v1/snippets/publisher/publish.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish.rb deleted file mode 100644 index af1dc40abb6a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish.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 eventarcpublishing_v1_generated_Publisher_Publish_sync] -require "google/cloud/eventarc/publishing/v1" - -## -# Snippet for the publish call in the Publisher service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish. -# -def publish - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new - - # Call the publish method. - result = client.publish request - - # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishResponse. - p result -end -# [END eventarcpublishing_v1_generated_Publisher_Publish_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_channel_connection_events.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_channel_connection_events.rb deleted file mode 100644 index 616772e6ed28..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_channel_connection_events.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 eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_sync] -require "google/cloud/eventarc/publishing/v1" - -## -# Snippet for the publish_channel_connection_events call in the Publisher service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish_channel_connection_events. -# -def publish_channel_connection_events - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new - - # Call the publish_channel_connection_events method. - result = client.publish_channel_connection_events request - - # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse. - p result -end -# [END eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_events.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_events.rb deleted file mode 100644 index 1b36485da486..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/publisher/publish_events.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 eventarcpublishing_v1_generated_Publisher_PublishEvents_sync] -require "google/cloud/eventarc/publishing/v1" - -## -# Snippet for the publish_events call in the Publisher service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish_events. -# -def publish_events - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new - - # Call the publish_events method. - result = client.publish_events request - - # The returned object is of type Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse. - p result -end -# [END eventarcpublishing_v1_generated_Publisher_PublishEvents_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/snippet_metadata_google.cloud.eventarc.publishing.v1.json b/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/snippet_metadata_google.cloud.eventarc.publishing.v1.json deleted file mode 100644 index 4ce4f1ed5454..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/snippets/snippet_metadata_google.cloud.eventarc.publishing.v1.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-eventarc-publishing-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.eventarc.publishing.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "eventarcpublishing_v1_generated_Publisher_PublishChannelConnectionEvents_sync", - "title": "Snippet for the publish_channel_connection_events call in the Publisher service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish_channel_connection_events.", - "file": "publisher/publish_channel_connection_events.rb", - "language": "RUBY", - "client_method": { - "short_name": "publish_channel_connection_events", - "full_name": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish_channel_connection_events", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse", - "client": { - "short_name": "Publisher::Client", - "full_name": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client" - }, - "method": { - "short_name": "PublishChannelConnectionEvents", - "full_name": "google.cloud.eventarc.publishing.v1.Publisher.PublishChannelConnectionEvents", - "service": { - "short_name": "Publisher", - "full_name": "google.cloud.eventarc.publishing.v1.Publisher" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarcpublishing_v1_generated_Publisher_PublishEvents_sync", - "title": "Snippet for the publish_events call in the Publisher service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish_events.", - "file": "publisher/publish_events.rb", - "language": "RUBY", - "client_method": { - "short_name": "publish_events", - "full_name": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish_events", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse", - "client": { - "short_name": "Publisher::Client", - "full_name": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client" - }, - "method": { - "short_name": "PublishEvents", - "full_name": "google.cloud.eventarc.publishing.v1.Publisher.PublishEvents", - "service": { - "short_name": "Publisher", - "full_name": "google.cloud.eventarc.publishing.v1.Publisher" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarcpublishing_v1_generated_Publisher_Publish_sync", - "title": "Snippet for the publish call in the Publisher service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish.", - "file": "publisher/publish.rb", - "language": "RUBY", - "client_method": { - "short_name": "publish", - "full_name": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client#publish", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::Publishing::V1::PublishRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::Publishing::V1::PublishResponse", - "client": { - "short_name": "Publisher::Client", - "full_name": "::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client" - }, - "method": { - "short_name": "Publish", - "full_name": "google.cloud.eventarc.publishing.v1.Publisher.Publish", - "service": { - "short_name": "Publisher", - "full_name": "google.cloud.eventarc.publishing.v1.Publisher" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_rest_test.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_rest_test.rb deleted file mode 100644 index 11ee4f46f7e6..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_rest_test.rb +++ /dev/null @@ -1,266 +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/eventarc/publishing/v1/publisher_pb" -require "google/cloud/eventarc/publishing/v1/publisher/rest" - - -class ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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_publish_channel_connection_events - # Create test objects. - client_result = ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - channel_connection = "hello world" - events = [{}] - text_events = ["hello world"] - - publish_channel_connection_events_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::ServiceStub.stub :transcode_publish_channel_connection_events_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, publish_channel_connection_events_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.publish_channel_connection_events({ channel_connection: channel_connection, events: events, text_events: text_events }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.publish_channel_connection_events channel_connection: channel_connection, events: events, text_events: text_events do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.publish_channel_connection_events ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new(channel_connection: channel_connection, events: events, text_events: text_events) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.publish_channel_connection_events({ channel_connection: channel_connection, events: events, text_events: text_events }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.publish_channel_connection_events(::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new(channel_connection: channel_connection, events: events, text_events: text_events), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, publish_channel_connection_events_client_stub.call_count - end - end - end - - def test_publish_events - # Create test objects. - client_result = ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - channel = "hello world" - events = [{}] - text_events = ["hello world"] - - publish_events_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::ServiceStub.stub :transcode_publish_events_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, publish_events_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.publish_events({ channel: channel, events: events, text_events: text_events }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.publish_events channel: channel, events: events, text_events: text_events do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.publish_events ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new(channel: channel, events: events, text_events: text_events) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.publish_events({ channel: channel, events: events, text_events: text_events }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.publish_events(::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new(channel: channel, events: events, text_events: text_events), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, publish_events_client_stub.call_count - end - end - end - - def test_publish - # Create test objects. - client_result = ::Google::Cloud::Eventarc::Publishing::V1::PublishResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - message_bus = "hello world" - proto_message = {} - - publish_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::ServiceStub.stub :transcode_publish_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, publish_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.publish({ message_bus: message_bus, proto_message: proto_message }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.publish message_bus: message_bus, proto_message: proto_message do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.publish ::Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new(message_bus: message_bus, proto_message: proto_message) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.publish({ message_bus: message_bus, proto_message: proto_message }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.publish(::Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new(message_bus: message_bus, proto_message: proto_message), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, publish_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::Eventarc::Publishing::V1::Publisher::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::Eventarc::Publishing::V1::Publisher::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_test.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_test.rb deleted file mode 100644 index 0220d369112d..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/google/cloud/eventarc/publishing/v1/publisher_test.rb +++ /dev/null @@ -1,289 +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/eventarc/publishing/v1/publisher_pb" -require "google/cloud/eventarc/publishing/v1/publisher" - -class ::Google::Cloud::Eventarc::Publishing::V1::Publisher::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_publish_channel_connection_events - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - channel_connection = "hello world" - events = [{}] - text_events = ["hello world"] - - publish_channel_connection_events_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :publish_channel_connection_events, name - assert_kind_of ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest, request - assert_equal "hello world", request["channel_connection"] - assert_kind_of ::Google::Protobuf::Any, request["events"].first - assert_equal ["hello world"], request["text_events"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, publish_channel_connection_events_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.publish_channel_connection_events({ channel_connection: channel_connection, events: events, text_events: text_events }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.publish_channel_connection_events channel_connection: channel_connection, events: events, text_events: text_events do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.publish_channel_connection_events ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new(channel_connection: channel_connection, events: events, text_events: text_events) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.publish_channel_connection_events({ channel_connection: channel_connection, events: events, text_events: text_events }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.publish_channel_connection_events(::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new(channel_connection: channel_connection, events: events, text_events: text_events), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, publish_channel_connection_events_client_stub.call_rpc_count - end - end - - def test_publish_events - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - channel = "hello world" - events = [{}] - text_events = ["hello world"] - - publish_events_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :publish_events, name - assert_kind_of ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest, request - assert_equal "hello world", request["channel"] - assert_kind_of ::Google::Protobuf::Any, request["events"].first - assert_equal ["hello world"], request["text_events"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, publish_events_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.publish_events({ channel: channel, events: events, text_events: text_events }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.publish_events channel: channel, events: events, text_events: text_events do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.publish_events ::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new(channel: channel, events: events, text_events: text_events) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.publish_events({ channel: channel, events: events, text_events: text_events }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.publish_events(::Google::Cloud::Eventarc::Publishing::V1::PublishEventsRequest.new(channel: channel, events: events, text_events: text_events), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, publish_events_client_stub.call_rpc_count - end - end - - def test_publish - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::Publishing::V1::PublishResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - message_bus = "hello world" - proto_message = {} - - publish_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :publish, name - assert_kind_of ::Google::Cloud::Eventarc::Publishing::V1::PublishRequest, request - assert_equal "hello world", request["message_bus"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::Publishing::V1::CloudEvent), request["proto_message"] - assert_equal :proto_message, request.format - refute_nil options - end - - Gapic::ServiceStub.stub :new, publish_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.publish({ message_bus: message_bus, proto_message: proto_message }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.publish message_bus: message_bus, proto_message: proto_message do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.publish ::Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new(message_bus: message_bus, proto_message: proto_message) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.publish({ message_bus: message_bus, proto_message: proto_message }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.publish(::Google::Cloud::Eventarc::Publishing::V1::PublishRequest.new(message_bus: message_bus, proto_message: proto_message), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, publish_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::Eventarc::Publishing::V1::Publisher::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::Eventarc::Publishing::V1::Publisher::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::Eventarc::Publishing::V1::Publisher::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/helper.rb b/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing-v1/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/.gitignore b/owl-bot-staging/google-cloud-eventarc-publishing/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/.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-eventarc-publishing/.repo-metadata.json b/owl-bot-staging/google-cloud-eventarc-publishing/.repo-metadata.json deleted file mode 100644 index 2432ef244b9f..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "eventarcpublishing.googleapis.com", - "api_shortname": "eventarcpublishing", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing/latest", - "distribution_name": "google-cloud-eventarc-publishing", - "is_cloud": true, - "language": "ruby", - "name": "eventarcpublishing", - "name_pretty": "Eventarc Publishing API", - "product_documentation": "https://cloud.google.com/eventarc/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution.", - "ruby-cloud-env-prefix": "EVENTARC", - "ruby-cloud-product-url": "https://cloud.google.com/eventarc/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/.rubocop.yml b/owl-bot-staging/google-cloud-eventarc-publishing/.rubocop.yml deleted file mode 100644 index a0d4941c7060..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-eventarc-publishing.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-eventarc-publishing.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/.toys.rb b/owl-bot-staging/google-cloud-eventarc-publishing/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/.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-eventarc-publishing/.yardopts b/owl-bot-staging/google-cloud-eventarc-publishing/.yardopts deleted file mode 100644 index 35a2141fbd42..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Eventarc Publishing API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/AUTHENTICATION.md b/owl-bot-staging/google-cloud-eventarc-publishing/AUTHENTICATION.md deleted file mode 100644 index 03c28d6b5626..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-eventarc-publishing 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-eventarc-publishing 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/eventarc/publishing" - -client = Google::Cloud::Eventarc::Publishing.publisher do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/eventarc/publishing" - -Google::Cloud::Eventarc::Publishing.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Eventarc::Publishing.publisher -``` - -### 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-eventarc-publishing -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/eventarc/publishing" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Eventarc::Publishing.publisher -``` - -### 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-eventarc-publishing/CHANGELOG.md b/owl-bot-staging/google-cloud-eventarc-publishing/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/Gemfile b/owl-bot-staging/google-cloud-eventarc-publishing/Gemfile deleted file mode 100644 index 6b70c9a75da2..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-eventarc-publishing-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-eventarc-publishing.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/LICENSE.md b/owl-bot-staging/google-cloud-eventarc-publishing/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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-eventarc-publishing/README.md b/owl-bot-staging/google-cloud-eventarc-publishing/README.md deleted file mode 100644 index 799c323688b8..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Eventarc Publishing API - -API Client library for the Eventarc Publishing API - -Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-eventarc-publishing-v*`. -The gem `google-cloud-eventarc-publishing` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing/latest) -for this library, google-cloud-eventarc-publishing, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-eventarc-publishing-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/eventarc/) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-eventarc-publishing -``` - -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/eventarcpublishing.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/eventarc/publishing" - -client = Google::Cloud::Eventarc::Publishing.publisher -request = ::Google::Cloud::Eventarc::Publishing::V1::PublishChannelConnectionEventsRequest.new # (request fields as keyword arguments...) -response = client.publish_channel_connection_events request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-eventarc-publishing-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest). - -## 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-eventarc-publishing`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-eventarc-publishing-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-eventarc-publishing`. -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-eventarc-publishing-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-eventarc-publishing/Rakefile b/owl-bot-staging/google-cloud-eventarc-publishing/Rakefile deleted file mode 100644 index 1f41914e913a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/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 = true -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-eventarc-publishing acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["EVENTARC_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["EVENTARC_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["EVENTARC_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 EVENTARC_TEST_PROJECT=test123 EVENTARC_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/eventarc/publishing/v1/publisher/credentials" - ::Google::Cloud::Eventarc::Publishing::V1::Publisher::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["EVENTARC_PROJECT"] = project - ENV["EVENTARC_TEST_PROJECT"] = project - ENV["EVENTARC_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-eventarc-publishing 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-eventarc-publishing 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-eventarc-publishing 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-eventarc-publishing gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-eventarc-publishing" - header "google-cloud-eventarc-publishing rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-eventarc-publishing yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-eventarc-publishing 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-eventarc-publishing 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-eventarc-publishing 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-eventarc-publishing/google-cloud-eventarc-publishing.gemspec b/owl-bot-staging/google-cloud-eventarc-publishing/google-cloud-eventarc-publishing.gemspec deleted file mode 100644 index 8bb1beb85efe..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/google-cloud-eventarc-publishing.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/eventarc/publishing/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-eventarc-publishing" - gem.version = Google::Cloud::Eventarc::Publishing::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution." - gem.summary = "API Client library for the Eventarc Publishing API" - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-eventarc-publishing-v1", ">= 0.8", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/lib/google-cloud-eventarc-publishing.rb b/owl-bot-staging/google-cloud-eventarc-publishing/lib/google-cloud-eventarc-publishing.rb deleted file mode 100644 index 39c492129bda..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/lib/google-cloud-eventarc-publishing.rb +++ /dev/null @@ -1,19 +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/eventarc/publishing" unless defined? Google::Cloud::Eventarc::Publishing::VERSION diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing.rb b/owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing.rb deleted file mode 100644 index 82acf3414b8e..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing.rb +++ /dev/null @@ -1,186 +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 this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/eventarc/publishing/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :eventarc_publishing do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Eventarc - module Publishing - ## - # Create a new client object for Publisher. - # - # By default, this returns an instance of - # [Google::Cloud::Eventarc::Publishing::V1::Publisher::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-publishing-v1/latest/Google-Cloud-Eventarc-Publishing-V1-Publisher-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Publisher service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Publisher service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Eventarc::Publishing.publisher_available?}. - # - # ## About Publisher - # - # Eventarc processes events generated by an event provider and delivers them to - # a subscriber. - # - # An event provider is a software-as-a-service (SaaS) system or - # product that can generate and deliver events through Eventarc. - # - # A third-party event provider is an event provider from outside of Google. - # - # A partner is a third-party event provider that is integrated with Eventarc. - # - # A subscriber is a Google Cloud customer interested in receiving events. - # - # Channel is a first-class Eventarc resource that is created and managed - # by the subscriber in their Google Cloud project. A Channel represents a - # subscriber's intent to receive events from an event provider. A Channel is - # associated with exactly one event provider. - # - # ChannelConnection is a first-class Eventarc resource that - # is created and managed by the partner in their Google Cloud project. A - # ChannelConnection represents a connection between a partner and a - # subscriber's Channel. A ChannelConnection has a one-to-one mapping with a - # Channel. - # - # Bus is a first-class Eventarc resource that is created and managed in a - # Google Cloud project. A Bus provides a discoverable endpoint for events and - # is a router that receives all events published by event providers and - # delivers them to zero or more subscribers. - # - # Publisher allows an event provider to publish events to Eventarc. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.publisher version: :v1, transport: :grpc, &block - require "google/cloud/eventarc/publishing/#{version.to_s.downcase}" - - package_name = Google::Cloud::Eventarc::Publishing - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Eventarc::Publishing.const_get(package_name).const_get(:Publisher) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Publisher service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Eventarc::Publishing.publisher}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Publisher service, - # or if the versioned client gem needs an update to support the Publisher service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.publisher_available? version: :v1, transport: :grpc - require "google/cloud/eventarc/publishing/#{version.to_s.downcase}" - package_name = Google::Cloud::Eventarc::Publishing - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Eventarc::Publishing.const_get package_name - return false unless service_module.const_defined? :Publisher - service_module = service_module.const_get :Publisher - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-eventarc-publishing library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # 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 [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.eventarc_publishing if block_given? - - ::Google::Cloud.configure.eventarc_publishing - end - end - end - end -end - -helper_path = ::File.join __dir__, "publishing", "helpers.rb" -require "google/cloud/eventarc/publishing/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing/version.rb b/owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing/version.rb deleted file mode 100644 index 3a5906949348..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/lib/google/cloud/eventarc/publishing/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 Eventarc - module Publishing - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/client_test.rb b/owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/client_test.rb deleted file mode 100644 index ba529f89a494..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/client_test.rb +++ /dev/null @@ -1,64 +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 "google/cloud/eventarc/publishing" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Eventarc::Publishing::ClientConstructionMinitest < 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_publisher_grpc - skip unless Google::Cloud::Eventarc::Publishing.publisher_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Eventarc::Publishing.publisher transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Eventarc::Publishing::V1::Publisher::Client, client - end - end - - def test_publisher_rest - skip unless Google::Cloud::Eventarc::Publishing.publisher_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Eventarc::Publishing.publisher transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Eventarc::Publishing::V1::Publisher::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/version_test.rb b/owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/version_test.rb deleted file mode 100644 index 12c6dda057e2..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/test/google/cloud/eventarc/publishing/version_test.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 "helper" -require "google/cloud/eventarc/publishing/version" - -class Google::Cloud::Eventarc::Publishing::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Eventarc::Publishing::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-publishing/test/helper.rb b/owl-bot-staging/google-cloud-eventarc-publishing/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-publishing/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-eventarc-v1/.gitignore b/owl-bot-staging/google-cloud-eventarc-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-eventarc-v1/.repo-metadata.json deleted file mode 100644 index 565e97a76258..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "eventarc.googleapis.com", - "api_shortname": "eventarc", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest", - "distribution_name": "google-cloud-eventarc-v1", - "is_cloud": true, - "language": "ruby", - "name": "eventarc", - "name_pretty": "Eventarc V1 API", - "product_documentation": "https://cloud.google.com/eventarc/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. Note that google-cloud-eventarc-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-eventarc instead. See the readme for more details.", - "ruby-cloud-env-prefix": "EVENTARC", - "ruby-cloud-product-url": "https://cloud.google.com/eventarc/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-eventarc-v1/.rubocop.yml b/owl-bot-staging/google-cloud-eventarc-v1/.rubocop.yml deleted file mode 100644 index abf9cb09ce60..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-eventarc-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-eventarc-v1.rb" diff --git a/owl-bot-staging/google-cloud-eventarc-v1/.toys.rb b/owl-bot-staging/google-cloud-eventarc-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/.yardopts b/owl-bot-staging/google-cloud-eventarc-v1/.yardopts deleted file mode 100644 index e550b53fbd6f..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Eventarc 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-eventarc-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-eventarc-v1/AUTHENTICATION.md deleted file mode 100644 index 935ba2836622..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-eventarc-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-eventarc-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/eventarc/v1" - -client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/eventarc/v1" - -::Google::Cloud::Eventarc::V1::Eventarc::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Eventarc::V1::Eventarc::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-eventarc-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/eventarc/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Eventarc::V1::Eventarc::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-eventarc-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-eventarc-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-eventarc-v1/Gemfile b/owl-bot-staging/google-cloud-eventarc-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-eventarc-v1/LICENSE.md b/owl-bot-staging/google-cloud-eventarc-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/README.md b/owl-bot-staging/google-cloud-eventarc-v1/README.md deleted file mode 100644 index 7f75e675cf2c..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Eventarc V1 API - -Build event-driven applications on Google Cloud Platform. - -Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Eventarc V1 API. Most users should consider using -the main client gem, -[google-cloud-eventarc](https://rubygems.org/gems/google-cloud-eventarc). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-eventarc-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/eventarc.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/eventarc/v1" - -client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new -request = ::Google::Cloud::Eventarc::V1::GetTriggerRequest.new # (request fields as keyword arguments...) -response = client.get_trigger request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/eventarc/) -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/eventarc/v1" -require "logger" - -client = ::Google::Cloud::Eventarc::V1::Eventarc::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-eventarc`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-eventarc-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-eventarc`. -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-eventarc-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-eventarc-v1/Rakefile b/owl-bot-staging/google-cloud-eventarc-v1/Rakefile deleted file mode 100644 index bc448a6aad9f..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["EVENTARC_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["EVENTARC_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["EVENTARC_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 EVENTARC_TEST_PROJECT=test123 EVENTARC_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/eventarc/v1/eventarc/credentials" - ::Google::Cloud::Eventarc::V1::Eventarc::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["EVENTARC_PROJECT"] = project - ENV["EVENTARC_TEST_PROJECT"] = project - ENV["EVENTARC_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-eventarc-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-eventarc-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-eventarc-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-eventarc-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-eventarc-v1" - header "google-cloud-eventarc-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-eventarc-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-eventarc-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-eventarc-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-eventarc-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-eventarc-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-eventarc-v1/gapic_metadata.json deleted file mode 100644 index 759cf8203b1f..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/gapic_metadata.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.eventarc.v1", - "libraryPackage": "::Google::Cloud::Eventarc::V1", - "services": { - "Eventarc": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Eventarc::V1::Eventarc::Client", - "rpcs": { - "GetTrigger": { - "methods": [ - "get_trigger" - ] - }, - "ListTriggers": { - "methods": [ - "list_triggers" - ] - }, - "CreateTrigger": { - "methods": [ - "create_trigger" - ] - }, - "UpdateTrigger": { - "methods": [ - "update_trigger" - ] - }, - "DeleteTrigger": { - "methods": [ - "delete_trigger" - ] - }, - "GetChannel": { - "methods": [ - "get_channel" - ] - }, - "ListChannels": { - "methods": [ - "list_channels" - ] - }, - "CreateChannel": { - "methods": [ - "create_channel" - ] - }, - "UpdateChannel": { - "methods": [ - "update_channel" - ] - }, - "DeleteChannel": { - "methods": [ - "delete_channel" - ] - }, - "GetProvider": { - "methods": [ - "get_provider" - ] - }, - "ListProviders": { - "methods": [ - "list_providers" - ] - }, - "GetChannelConnection": { - "methods": [ - "get_channel_connection" - ] - }, - "ListChannelConnections": { - "methods": [ - "list_channel_connections" - ] - }, - "CreateChannelConnection": { - "methods": [ - "create_channel_connection" - ] - }, - "DeleteChannelConnection": { - "methods": [ - "delete_channel_connection" - ] - }, - "GetGoogleChannelConfig": { - "methods": [ - "get_google_channel_config" - ] - }, - "UpdateGoogleChannelConfig": { - "methods": [ - "update_google_channel_config" - ] - }, - "GetMessageBus": { - "methods": [ - "get_message_bus" - ] - }, - "ListMessageBuses": { - "methods": [ - "list_message_buses" - ] - }, - "ListMessageBusEnrollments": { - "methods": [ - "list_message_bus_enrollments" - ] - }, - "CreateMessageBus": { - "methods": [ - "create_message_bus" - ] - }, - "UpdateMessageBus": { - "methods": [ - "update_message_bus" - ] - }, - "DeleteMessageBus": { - "methods": [ - "delete_message_bus" - ] - }, - "GetEnrollment": { - "methods": [ - "get_enrollment" - ] - }, - "ListEnrollments": { - "methods": [ - "list_enrollments" - ] - }, - "CreateEnrollment": { - "methods": [ - "create_enrollment" - ] - }, - "UpdateEnrollment": { - "methods": [ - "update_enrollment" - ] - }, - "DeleteEnrollment": { - "methods": [ - "delete_enrollment" - ] - }, - "GetPipeline": { - "methods": [ - "get_pipeline" - ] - }, - "ListPipelines": { - "methods": [ - "list_pipelines" - ] - }, - "CreatePipeline": { - "methods": [ - "create_pipeline" - ] - }, - "UpdatePipeline": { - "methods": [ - "update_pipeline" - ] - }, - "DeletePipeline": { - "methods": [ - "delete_pipeline" - ] - }, - "GetGoogleApiSource": { - "methods": [ - "get_google_api_source" - ] - }, - "ListGoogleApiSources": { - "methods": [ - "list_google_api_sources" - ] - }, - "CreateGoogleApiSource": { - "methods": [ - "create_google_api_source" - ] - }, - "UpdateGoogleApiSource": { - "methods": [ - "update_google_api_source" - ] - }, - "DeleteGoogleApiSource": { - "methods": [ - "delete_google_api_source" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-eventarc-v1/google-cloud-eventarc-v1.gemspec b/owl-bot-staging/google-cloud-eventarc-v1/google-cloud-eventarc-v1.gemspec deleted file mode 100644 index 88e91d7a851a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/google-cloud-eventarc-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/eventarc/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-eventarc-v1" - gem.version = Google::Cloud::Eventarc::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. Note that google-cloud-eventarc-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-eventarc instead. See the readme for more details." - gem.summary = "Build event-driven applications on Google Cloud Platform." - 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.1" - - 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-eventarc-v1/lib/google-cloud-eventarc-v1.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google-cloud-eventarc-v1.rb deleted file mode 100644 index 865ac816d268..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google-cloud-eventarc-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/eventarc/v1" diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1.rb deleted file mode 100644 index c10cd884460d..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1.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/eventarc/v1/eventarc" -require "google/cloud/eventarc/v1/version" - -module Google - module Cloud - module Eventarc - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/eventarc/v1" - # client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/eventarc/v1" - # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/eventarc/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/bindings_override.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/bindings_override.rb deleted file mode 100644 index 955210ffd48a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/bindings_override.rb +++ /dev/null @@ -1,276 +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 Eventarc - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/eventarc/v1/rest" - # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Eventarc"] - 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/[^/]+/triggers/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/kafkaSources/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, 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/[^/]+/triggers/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/kafkaSources/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, 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/[^/]+/triggers/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/kafkaSources/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_connection_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_connection_pb.rb deleted file mode 100644 index 3ba7d0551de8..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_connection_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/eventarc/v1/channel_connection.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n1google/cloud/eventarc/v1/channel_connection.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa4\x04\n\x11\x43hannelConnection\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x38\n\x07\x63hannel\x18\x05 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Channel\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\x12\x1d\n\x10\x61\x63tivation_token\x18\x08 \x01(\tB\x03\xe0\x41\x04\x12L\n\x06labels\x18\t \x03(\x0b\x32\x37.google.cloud.eventarc.v1.ChannelConnection.LabelsEntryB\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:\xa7\x01\xea\x41\xa3\x01\n)eventarc.googleapis.com/ChannelConnection\x12Oprojects/{project}/locations/{location}/channelConnections/{channel_connection}*\x12\x63hannelConnections2\x11\x63hannelConnectionB\xc6\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x16\x43hannelConnectionProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Eventarc - module V1 - ChannelConnection = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ChannelConnection").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_pb.rb deleted file mode 100644 index 1f27d9bc928e..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/channel_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/eventarc/v1/channel.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/eventarc/v1/channel.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xc1\x05\n\x07\x43hannel\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\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\x10\n\x08provider\x18\x07 \x01(\t\x12\x1b\n\x0cpubsub_topic\x18\x08 \x01(\tB\x03\xe0\x41\x03H\x00\x12;\n\x05state\x18\t \x01(\x0e\x32\'.google.cloud.eventarc.v1.Channel.StateB\x03\xe0\x41\x03\x12\x1d\n\x10\x61\x63tivation_token\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x42\n\x0f\x63rypto_key_name\x18\x0b \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x1a\n\rsatisfies_pzs\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03\x12\x42\n\x06labels\x18\r \x03(\x0b\x32-.google.cloud.eventarc.v1.Channel.LabelsEntryB\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\"E\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07PENDING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x0c\n\x08INACTIVE\x10\x03:s\xea\x41p\n\x1f\x65ventarc.googleapis.com/Channel\x12:projects/{project}/locations/{location}/channels/{channel}*\x08\x63hannels2\x07\x63hannelB\x0b\n\ttransportB\xbc\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x0c\x43hannelProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Eventarc - module V1 - Channel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.Channel").msgclass - Channel::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.Channel.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/discovery_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/discovery_pb.rb deleted file mode 100644 index 8392d17fa96e..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/discovery_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/eventarc/v1/discovery.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n(google/cloud/eventarc/v1/discovery.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xf1\x01\n\x08Provider\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0c\x64isplay_name\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12=\n\x0b\x65vent_types\x18\x03 \x03(\x0b\x32#.google.cloud.eventarc.v1.EventTypeB\x03\xe0\x41\x03:x\xea\x41u\n eventarc.googleapis.com/Provider\x12 e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # List triggers. - # - # @overload list_triggers(request, options = nil) - # Pass arguments to `list_triggers` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListTriggersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListTriggersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_triggers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_triggers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection to list triggers on. - # @param page_size [::Integer] - # The maximum number of triggers to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # The page token; provide the value from the `next_page_token` field in a - # previous `ListTriggers` call to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListTriggers` must match - # the call that provided the page token. - # @param order_by [::String] - # The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, trigger_id`. - # @param filter [::String] - # Filter field. Used to filter the Triggers to be listed. Possible filters - # are described in https://google.aip.dev/160. For example, using - # "?filter=destination:gke" would list only Triggers with a gke destination. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Trigger>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Trigger>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListTriggersRequest.new - # - # # Call the list_triggers method. - # result = client.list_triggers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::Trigger. - # p item - # end - # - def list_triggers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListTriggersRequest - - # Converts hash and nil to 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_triggers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_triggers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_triggers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :list_triggers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_triggers, 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 new trigger in a particular project and location. - # - # @overload create_trigger(request, options = nil) - # Pass arguments to `create_trigger` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreateTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreateTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trigger(parent: nil, trigger: nil, trigger_id: nil, validate_only: nil) - # Pass arguments to `create_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this trigger. - # @param trigger [::Google::Cloud::Eventarc::V1::Trigger, ::Hash] - # Required. The trigger to create. - # @param trigger_id [::String] - # Required. The user-provided ID to be assigned to the trigger. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreateTriggerRequest.new - # - # # Call the create_trigger method. - # result = client.create_trigger request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateTriggerRequest - - # Converts hash and nil to 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_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :create_trigger, 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 a single trigger. - # - # @overload update_trigger(request, options = nil) - # Pass arguments to `update_trigger` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdateTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdateTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trigger(trigger: nil, update_mask: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param trigger [::Google::Cloud::Eventarc::V1::Trigger, ::Hash] - # The trigger to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The fields to be updated; only fields explicitly provided are updated. - # If no field mask is provided, all provided fields in the request are - # updated. To update all fields, provide a field mask of "*". - # @param allow_missing [::Boolean] - # If set to true, and the trigger is not found, a new trigger will be - # created. In this situation, `update_mask` is ignored. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new - # - # # Call the update_trigger method. - # result = client.update_trigger request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateTriggerRequest - - # Converts hash and nil to 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_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.trigger&.name - header_params["trigger.name"] = request.trigger.name - end - - request_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_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :update_trigger, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single trigger. - # - # @overload delete_trigger(request, options = nil) - # Pass arguments to `delete_trigger` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeleteTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeleteTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_trigger(name: nil, etag: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `delete_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 trigger to be deleted. - # @param etag [::String] - # If provided, the trigger will only be deleted if the etag matches the - # current etag on the resource. - # @param allow_missing [::Boolean] - # If set to true, and the trigger is not found, the request will succeed - # but no action will be taken on the server. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new - # - # # Call the delete_trigger method. - # result = client.delete_trigger request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteTriggerRequest - - # Converts hash and nil to 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_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_trigger.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :delete_trigger, 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 - - ## - # Get a single Channel. - # - # @overload get_channel(request, options = nil) - # Pass arguments to `get_channel` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_channel(name: nil) - # Pass arguments to `get_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 channel to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Eventarc::V1::Channel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Eventarc::V1::Channel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetChannelRequest.new - # - # # Call the get_channel method. - # result = client.get_channel request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::Channel. - # p result - # - def get_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetChannelRequest - - # Converts hash and nil to 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_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :get_channel, 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 channels. - # - # @overload list_channels(request, options = nil) - # Pass arguments to `list_channels` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListChannelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListChannelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_channels(parent: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_channels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection to list channels on. - # @param page_size [::Integer] - # The maximum number of channels to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # The page token; provide the value from the `next_page_token` field in a - # previous `ListChannels` call to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChannels` must - # match the call that provided the page token. - # @param order_by [::String] - # The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, channel_id`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListChannelsRequest.new - # - # # Call the list_channels method. - # result = client.list_channels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::Channel. - # p item - # end - # - def list_channels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListChannelsRequest - - # Converts hash and nil to 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_channels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_channels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_channels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :list_channels, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_channels, 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 new channel in a particular project and location. - # - # @overload create_channel(request, options = nil) - # Pass arguments to `create_channel` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreateChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreateChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_channel(parent: nil, channel: nil, channel_id: nil, validate_only: nil) - # Pass arguments to `create_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this channel. - # @param channel [::Google::Cloud::Eventarc::V1::Channel, ::Hash] - # Required. The channel to create. - # @param channel_id [::String] - # Required. The user-provided ID to be assigned to the channel. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreateChannelRequest.new - # - # # Call the create_channel method. - # result = client.create_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateChannelRequest - - # Converts hash and nil to 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_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :create_channel, 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 a single channel. - # - # @overload update_channel(request, options = nil) - # Pass arguments to `update_channel` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdateChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdateChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_channel(channel: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param channel [::Google::Cloud::Eventarc::V1::Channel, ::Hash] - # The channel to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The fields to be updated; only fields explicitly provided are updated. - # If no field mask is provided, all provided fields in the request are - # updated. To update all fields, provide a field mask of "*". - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdateChannelRequest.new - # - # # Call the update_channel method. - # result = client.update_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateChannelRequest - - # Converts hash and nil to 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_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.channel&.name - header_params["channel.name"] = request.channel.name - end - - request_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_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :update_channel, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single channel. - # - # @overload delete_channel(request, options = nil) - # Pass arguments to `delete_channel` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeleteChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeleteChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_channel(name: nil, validate_only: nil) - # Pass arguments to `delete_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 channel to be deleted. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeleteChannelRequest.new - # - # # Call the delete_channel method. - # result = client.delete_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteChannelRequest - - # Converts hash and nil to 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_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :delete_channel, 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 - - ## - # Get a single Provider. - # - # @overload get_provider(request, options = nil) - # Pass arguments to `get_provider` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetProviderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetProviderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_provider(name: nil) - # Pass arguments to `get_provider` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 provider to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Eventarc::V1::Provider] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Eventarc::V1::Provider] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetProviderRequest.new - # - # # Call the get_provider method. - # result = client.get_provider request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::Provider. - # p result - # - def get_provider request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetProviderRequest - - # Converts hash and nil to 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_provider.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_provider.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_provider.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :get_provider, 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 providers. - # - # @overload list_providers(request, options = nil) - # Pass arguments to `list_providers` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListProvidersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListProvidersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_providers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_providers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the provider to get. - # @param page_size [::Integer] - # The maximum number of providers to return on each page. - # @param page_token [::String] - # The page token; provide the value from the `next_page_token` field in a - # previous `ListProviders` call to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProviders` must - # match the call that provided the page token. - # @param order_by [::String] - # The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting oder is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, _id`. - # @param filter [::String] - # The filter field that the list request will filter on. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Provider>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Provider>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListProvidersRequest.new - # - # # Call the list_providers method. - # result = client.list_providers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::Provider. - # p item - # end - # - def list_providers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListProvidersRequest - - # Converts hash and nil to 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_providers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_providers.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_providers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :list_providers, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_providers, 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 a single ChannelConnection. - # - # @overload get_channel_connection(request, options = nil) - # Pass arguments to `get_channel_connection` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_channel_connection(name: nil) - # Pass arguments to `get_channel_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 channel connection to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Eventarc::V1::ChannelConnection] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Eventarc::V1::ChannelConnection] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new - # - # # Call the get_channel_connection method. - # result = client.get_channel_connection request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::ChannelConnection. - # p result - # - def get_channel_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest - - # Converts hash and nil to 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_channel_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_channel_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_channel_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :get_channel_connection, 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 channel connections. - # - # @overload list_channel_connections(request, options = nil) - # Pass arguments to `list_channel_connections` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_channel_connections(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_channel_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection from which to list channel connections. - # @param page_size [::Integer] - # The maximum number of channel connections to return on each page. - # - # Note: The service may send fewer responses. - # @param page_token [::String] - # The page token; provide the value from the `next_page_token` field in a - # previous `ListChannelConnections` call to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChannelConnetions` - # 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::Eventarc::V1::ChannelConnection>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::ChannelConnection>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.new - # - # # Call the list_channel_connections method. - # result = client.list_channel_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::ChannelConnection. - # p item - # end - # - def list_channel_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest - - # Converts hash and nil to 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_channel_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_channel_connections.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_channel_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :list_channel_connections, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_channel_connections, 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 new ChannelConnection in a particular project and location. - # - # @overload create_channel_connection(request, options = nil) - # Pass arguments to `create_channel_connection` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_channel_connection(parent: nil, channel_connection: nil, channel_connection_id: nil) - # Pass arguments to `create_channel_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this channel connection. - # @param channel_connection [::Google::Cloud::Eventarc::V1::ChannelConnection, ::Hash] - # Required. Channel connection to create. - # @param channel_connection_id [::String] - # Required. The user-provided ID to be assigned to the channel connection. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new - # - # # Call the create_channel_connection method. - # result = client.create_channel_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_channel_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest - - # Converts hash and nil to 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_channel_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_channel_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_channel_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :create_channel_connection, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single ChannelConnection. - # - # @overload delete_channel_connection(request, options = nil) - # Pass arguments to `delete_channel_connection` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_channel_connection(name: nil) - # Pass arguments to `delete_channel_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 channel connection to delete. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.new - # - # # Call the delete_channel_connection method. - # result = client.delete_channel_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_channel_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest - - # Converts hash and nil to 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_channel_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_channel_connection.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_channel_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :delete_channel_connection, 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 - - ## - # Get a GoogleChannelConfig. - # The name of the GoogleChannelConfig in the response is ALWAYS coded with - # projectID. - # - # @overload get_google_channel_config(request, options = nil) - # Pass arguments to `get_google_channel_config` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_google_channel_config(name: nil) - # Pass arguments to `get_google_channel_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 config to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new - # - # # Call the get_google_channel_config method. - # result = client.get_google_channel_config request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig. - # p result - # - def get_google_channel_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest - - # Converts hash and nil to 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_google_channel_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::Eventarc::V1::VERSION - metadata[:"x-goog-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_google_channel_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_google_channel_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :get_google_channel_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 - - ## - # Update a single GoogleChannelConfig - # - # @overload update_google_channel_config(request, options = nil) - # Pass arguments to `update_google_channel_config` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_google_channel_config(google_channel_config: nil, update_mask: nil) - # Pass arguments to `update_google_channel_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 google_channel_config [::Google::Cloud::Eventarc::V1::GoogleChannelConfig, ::Hash] - # Required. The config to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The fields to be updated; only fields explicitly provided are updated. - # If no field mask is provided, all provided fields in the request are - # updated. To update all fields, provide a field mask of "*". - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new - # - # # Call the update_google_channel_config method. - # result = client.update_google_channel_config request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig. - # p result - # - def update_google_channel_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest - - # Converts hash and nil to 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_google_channel_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::Eventarc::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.google_channel_config&.name - header_params["google_channel_config.name"] = request.google_channel_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_google_channel_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_google_channel_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :update_google_channel_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 - - ## - # Get a single MessageBus. - # - # @overload get_message_bus(request, options = nil) - # Pass arguments to `get_message_bus` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetMessageBusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetMessageBusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_message_bus(name: nil) - # Pass arguments to `get_message_bus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 message bus to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Eventarc::V1::MessageBus] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Eventarc::V1::MessageBus] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetMessageBusRequest.new - # - # # Call the get_message_bus method. - # result = client.get_message_bus request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::MessageBus. - # p result - # - def get_message_bus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetMessageBusRequest - - # Converts hash and nil to 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_message_bus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_message_bus.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_message_bus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :get_message_bus, 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 message buses. - # - # @overload list_message_buses(request, options = nil) - # Pass arguments to `list_message_buses` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListMessageBusesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListMessageBusesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_message_buses(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_message_buses` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection to list message buses on. - # @param page_size [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # @param order_by [::String] - # Optional. The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, update_time`. - # @param filter [::String] - # Optional. The filter field that the list request will filter on. - # Possible filtersare described in https://google.aip.dev/160. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new - # - # # Call the list_message_buses method. - # result = client.list_message_buses request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::MessageBus. - # p item - # end - # - def list_message_buses request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest - - # Converts hash and nil to 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_message_buses.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_message_buses.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_message_buses.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :list_message_buses, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_message_buses, 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 - - ## - # List message bus enrollments. - # - # @overload list_message_bus_enrollments(request, options = nil) - # Pass arguments to `list_message_bus_enrollments` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_message_bus_enrollments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_message_bus_enrollments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 message bus to list enrollments on. - # @param page_size [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.new - # - # # Call the list_message_bus_enrollments method. - # result = client.list_message_bus_enrollments request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse. - # p result - # - def list_message_bus_enrollments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest - - # Converts hash and nil to 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_message_bus_enrollments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_message_bus_enrollments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_message_bus_enrollments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :list_message_bus_enrollments, 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 new MessageBus in a particular project and location. - # - # @overload create_message_bus(request, options = nil) - # Pass arguments to `create_message_bus` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreateMessageBusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreateMessageBusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_message_bus(parent: nil, message_bus: nil, message_bus_id: nil, validate_only: nil) - # Pass arguments to `create_message_bus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this message bus. - # @param message_bus [::Google::Cloud::Eventarc::V1::MessageBus, ::Hash] - # Required. The message bus to create. - # @param message_bus_id [::String] - # Required. The user-provided ID to be assigned to the MessageBus. It should - # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new - # - # # Call the create_message_bus method. - # result = client.create_message_bus request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_message_bus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest - - # Converts hash and nil to 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_message_bus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_message_bus.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_message_bus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :create_message_bus, 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 a single message bus. - # - # @overload update_message_bus(request, options = nil) - # Pass arguments to `update_message_bus` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_message_bus(message_bus: nil, update_mask: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_message_bus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param message_bus [::Google::Cloud::Eventarc::V1::MessageBus, ::Hash] - # Required. The MessageBus to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The fields to be updated; only fields explicitly provided are - # updated. If no field mask is provided, all provided fields in the request - # are updated. To update all fields, provide a field mask of "*". - # @param allow_missing [::Boolean] - # Optional. If set to true, and the MessageBus is not found, a new MessageBus - # will be created. In this situation, `update_mask` is ignored. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new - # - # # Call the update_message_bus method. - # result = client.update_message_bus request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_message_bus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest - - # Converts hash and nil to 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_message_bus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.message_bus&.name - header_params["message_bus.name"] = request.message_bus.name - end - - request_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_message_bus.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_message_bus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :update_message_bus, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single message bus. - # - # @overload delete_message_bus(request, options = nil) - # Pass arguments to `delete_message_bus` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_message_bus(name: nil, etag: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `delete_message_bus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 MessageBus to be deleted. - # @param etag [::String] - # Optional. If provided, the MessageBus will only be deleted if the etag - # matches the current etag on the resource. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the MessageBus is not found, the request will - # succeed but no action will be taken on the server. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new - # - # # Call the delete_message_bus method. - # result = client.delete_message_bus request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_message_bus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest - - # Converts hash and nil to 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_message_bus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_message_bus.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_message_bus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :delete_message_bus, 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 - - ## - # Get a single Enrollment. - # - # @overload get_enrollment(request, options = nil) - # Pass arguments to `get_enrollment` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetEnrollmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetEnrollmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_enrollment(name: nil) - # Pass arguments to `get_enrollment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Enrollment to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Eventarc::V1::Enrollment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Eventarc::V1::Enrollment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new - # - # # Call the get_enrollment method. - # result = client.get_enrollment request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::Enrollment. - # p result - # - def get_enrollment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest - - # Converts hash and nil to 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_enrollment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_enrollment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_enrollment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :get_enrollment, 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 Enrollments. - # - # @overload list_enrollments(request, options = nil) - # Pass arguments to `list_enrollments` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_enrollments(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_enrollments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection to list triggers on. - # @param page_size [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # @param order_by [::String] - # Optional. The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, update_time`. - # @param filter [::String] - # Optional. The filter field that the list request will filter on. - # Possible filtersare described in https://google.aip.dev/160. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new - # - # # Call the list_enrollments method. - # result = client.list_enrollments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::Enrollment. - # p item - # end - # - def list_enrollments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest - - # Converts hash and nil to 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_enrollments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_enrollments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_enrollments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :list_enrollments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_enrollments, 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 new Enrollment in a particular project and location. - # - # @overload create_enrollment(request, options = nil) - # Pass arguments to `create_enrollment` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_enrollment(parent: nil, enrollment: nil, enrollment_id: nil, validate_only: nil) - # Pass arguments to `create_enrollment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this enrollment. - # @param enrollment [::Google::Cloud::Eventarc::V1::Enrollment, ::Hash] - # Required. The enrollment to create. - # @param enrollment_id [::String] - # Required. The user-provided ID to be assigned to the Enrollment. It should - # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new - # - # # Call the create_enrollment method. - # result = client.create_enrollment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_enrollment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest - - # Converts hash and nil to 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_enrollment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_enrollment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_enrollment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :create_enrollment, 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 a single Enrollment. - # - # @overload update_enrollment(request, options = nil) - # Pass arguments to `update_enrollment` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_enrollment(enrollment: nil, update_mask: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_enrollment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param enrollment [::Google::Cloud::Eventarc::V1::Enrollment, ::Hash] - # Required. The Enrollment to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The fields to be updated; only fields explicitly provided are - # updated. If no field mask is provided, all provided fields in the request - # are updated. To update all fields, provide a field mask of "*". - # @param allow_missing [::Boolean] - # Optional. If set to true, and the Enrollment is not found, a new Enrollment - # will be created. In this situation, `update_mask` is ignored. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new - # - # # Call the update_enrollment method. - # result = client.update_enrollment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_enrollment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest - - # Converts hash and nil to 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_enrollment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.enrollment&.name - header_params["enrollment.name"] = request.enrollment.name - end - - request_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_enrollment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_enrollment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :update_enrollment, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single Enrollment. - # - # @overload delete_enrollment(request, options = nil) - # Pass arguments to `delete_enrollment` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_enrollment(name: nil, etag: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `delete_enrollment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Enrollment to be deleted. - # @param etag [::String] - # Optional. If provided, the Enrollment will only be deleted if the etag - # matches the current etag on the resource. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the Enrollment is not found, the request will - # succeed but no action will be taken on the server. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new - # - # # Call the delete_enrollment method. - # result = client.delete_enrollment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_enrollment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest - - # Converts hash and nil to 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_enrollment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_enrollment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_enrollment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :delete_enrollment, 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 - - ## - # Get a single Pipeline. - # - # @overload get_pipeline(request, options = nil) - # Pass arguments to `get_pipeline` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetPipelineRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetPipelineRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_pipeline(name: nil) - # Pass arguments to `get_pipeline` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 pipeline to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Eventarc::V1::Pipeline] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Eventarc::V1::Pipeline] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetPipelineRequest.new - # - # # Call the get_pipeline method. - # result = client.get_pipeline request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::Pipeline. - # p result - # - def get_pipeline request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetPipelineRequest - - # Converts hash and nil to 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_pipeline.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_pipeline.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_pipeline.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :get_pipeline, 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 pipelines. - # - # @overload list_pipelines(request, options = nil) - # Pass arguments to `list_pipelines` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListPipelinesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListPipelinesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_pipelines(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_pipelines` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection to list pipelines on. - # @param page_size [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # @param order_by [::String] - # Optional. The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, update_time`. - # @param filter [::String] - # Optional. The filter field that the list request will filter on. - # Possible filters are described in https://google.aip.dev/160. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListPipelinesRequest.new - # - # # Call the list_pipelines method. - # result = client.list_pipelines request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::Pipeline. - # p item - # end - # - def list_pipelines request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListPipelinesRequest - - # Converts hash and nil to 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_pipelines.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_pipelines.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_pipelines.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :list_pipelines, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_pipelines, 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 new Pipeline in a particular project and location. - # - # @overload create_pipeline(request, options = nil) - # Pass arguments to `create_pipeline` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreatePipelineRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreatePipelineRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_pipeline(parent: nil, pipeline: nil, pipeline_id: nil, validate_only: nil) - # Pass arguments to `create_pipeline` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this pipeline. - # @param pipeline [::Google::Cloud::Eventarc::V1::Pipeline, ::Hash] - # Required. The pipeline to create. - # @param pipeline_id [::String] - # Required. The user-provided ID to be assigned to the Pipeline. It should - # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreatePipelineRequest.new - # - # # Call the create_pipeline method. - # result = client.create_pipeline request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_pipeline request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreatePipelineRequest - - # Converts hash and nil to 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_pipeline.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_pipeline.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_pipeline.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :create_pipeline, 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 a single pipeline. - # - # @overload update_pipeline(request, options = nil) - # Pass arguments to `update_pipeline` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdatePipelineRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdatePipelineRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_pipeline(pipeline: nil, update_mask: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_pipeline` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param pipeline [::Google::Cloud::Eventarc::V1::Pipeline, ::Hash] - # Required. The Pipeline to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The fields to be updated; only fields explicitly provided are - # updated. If no field mask is provided, all provided fields in the request - # are updated. To update all fields, provide a field mask of "*". - # @param allow_missing [::Boolean] - # Optional. If set to true, and the Pipeline is not found, a new Pipeline - # will be created. In this situation, `update_mask` is ignored. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new - # - # # Call the update_pipeline method. - # result = client.update_pipeline request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_pipeline request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest - - # Converts hash and nil to 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_pipeline.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.pipeline&.name - header_params["pipeline.name"] = request.pipeline.name - end - - request_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_pipeline.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_pipeline.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :update_pipeline, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single pipeline. - # - # @overload delete_pipeline(request, options = nil) - # Pass arguments to `delete_pipeline` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeletePipelineRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeletePipelineRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_pipeline(name: nil, etag: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `delete_pipeline` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Pipeline to be deleted. - # @param etag [::String] - # Optional. If provided, the Pipeline will only be deleted if the etag - # matches the current etag on the resource. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the Pipeline is not found, the request will - # succeed but no action will be taken on the server. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeletePipelineRequest.new - # - # # Call the delete_pipeline method. - # result = client.delete_pipeline request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_pipeline request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeletePipelineRequest - - # Converts hash and nil to 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_pipeline.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_pipeline.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_pipeline.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :delete_pipeline, 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 - - ## - # Get a single GoogleApiSource. - # - # @overload get_google_api_source(request, options = nil) - # Pass arguments to `get_google_api_source` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_google_api_source(name: nil) - # Pass arguments to `get_google_api_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 google api source to get. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Eventarc::V1::GoogleApiSource] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new - # - # # Call the get_google_api_source method. - # result = client.get_google_api_source request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleApiSource. - # p result - # - def get_google_api_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest - - # Converts hash and nil to 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_google_api_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_google_api_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_google_api_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :get_google_api_source, 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 GoogleApiSources. - # - # @overload list_google_api_sources(request, options = nil) - # Pass arguments to `list_google_api_sources` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_google_api_sources(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_google_api_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection to list GoogleApiSources on. - # @param page_size [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # @param order_by [::String] - # Optional. The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, update_time`. - # @param filter [::String] - # Optional. The filter field that the list request will filter on. - # Possible filtersare described in https://google.aip.dev/160. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new - # - # # Call the list_google_api_sources method. - # result = client.list_google_api_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::GoogleApiSource. - # p item - # end - # - def list_google_api_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest - - # Converts hash and nil to 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_google_api_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_google_api_sources.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_google_api_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :list_google_api_sources, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @eventarc_stub, :list_google_api_sources, 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 new GoogleApiSource in a particular project and location. - # - # @overload create_google_api_source(request, options = nil) - # Pass arguments to `create_google_api_source` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_google_api_source(parent: nil, google_api_source: nil, google_api_source_id: nil, validate_only: nil) - # Pass arguments to `create_google_api_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this google api source. - # @param google_api_source [::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash] - # Required. The google api source to create. - # @param google_api_source_id [::String] - # Required. The user-provided ID to be assigned to the GoogleApiSource. It - # should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new - # - # # Call the create_google_api_source method. - # result = client.create_google_api_source request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_google_api_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest - - # Converts hash and nil to 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_google_api_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_google_api_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_google_api_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :create_google_api_source, 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 a single GoogleApiSource. - # - # @overload update_google_api_source(request, options = nil) - # Pass arguments to `update_google_api_source` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_google_api_source(google_api_source: nil, update_mask: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_google_api_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param google_api_source [::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash] - # Required. The GoogleApiSource to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The fields to be updated; only fields explicitly provided are - # updated. If no field mask is provided, all provided fields in the request - # are updated. To update all fields, provide a field mask of "*". - # @param allow_missing [::Boolean] - # Optional. If set to true, and the GoogleApiSource is not found, a new - # GoogleApiSource will be created. In this situation, `update_mask` is - # ignored. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new - # - # # Call the update_google_api_source method. - # result = client.update_google_api_source request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_google_api_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest - - # Converts hash and nil to 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_google_api_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.google_api_source&.name - header_params["google_api_source.name"] = request.google_api_source.name - end - - request_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_google_api_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_google_api_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :update_google_api_source, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single GoogleApiSource. - # - # @overload delete_google_api_source(request, options = nil) - # Pass arguments to `delete_google_api_source` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_google_api_source(name: nil, etag: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `delete_google_api_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 GoogleApiSource to be deleted. - # @param etag [::String] - # Optional. If provided, the MessageBus will only be deleted if the etag - # matches the current etag on the resource. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the MessageBus is not found, the request will - # succeed but no action will be taken on the server. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new - # - # # Call the delete_google_api_source method. - # result = client.delete_google_api_source request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_google_api_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest - - # Converts hash and nil to 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_google_api_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION - metadata[:"x-goog-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_google_api_source.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_google_api_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.call_rpc :delete_google_api_source, 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 Eventarc API. - # - # This class represents the configuration for Eventarc, - # 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::Eventarc::V1::Eventarc::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 - # # get_trigger to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Eventarc::V1::Eventarc::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_trigger.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_trigger.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::Eventarc::V1::Eventarc::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 = "eventarc.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 Eventarc 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 `get_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :get_trigger - ## - # RPC-specific configuration for `list_triggers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_triggers - ## - # RPC-specific configuration for `create_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :create_trigger - ## - # RPC-specific configuration for `update_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :update_trigger - ## - # RPC-specific configuration for `delete_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_trigger - ## - # RPC-specific configuration for `get_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :get_channel - ## - # RPC-specific configuration for `list_channels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_channels - ## - # RPC-specific configuration for `create_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :create_channel - ## - # RPC-specific configuration for `update_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :update_channel - ## - # RPC-specific configuration for `delete_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_channel - ## - # RPC-specific configuration for `get_provider` - # @return [::Gapic::Config::Method] - # - attr_reader :get_provider - ## - # RPC-specific configuration for `list_providers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_providers - ## - # RPC-specific configuration for `get_channel_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :get_channel_connection - ## - # RPC-specific configuration for `list_channel_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_channel_connections - ## - # RPC-specific configuration for `create_channel_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :create_channel_connection - ## - # RPC-specific configuration for `delete_channel_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_channel_connection - ## - # RPC-specific configuration for `get_google_channel_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_google_channel_config - ## - # RPC-specific configuration for `update_google_channel_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_google_channel_config - ## - # RPC-specific configuration for `get_message_bus` - # @return [::Gapic::Config::Method] - # - attr_reader :get_message_bus - ## - # RPC-specific configuration for `list_message_buses` - # @return [::Gapic::Config::Method] - # - attr_reader :list_message_buses - ## - # RPC-specific configuration for `list_message_bus_enrollments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_message_bus_enrollments - ## - # RPC-specific configuration for `create_message_bus` - # @return [::Gapic::Config::Method] - # - attr_reader :create_message_bus - ## - # RPC-specific configuration for `update_message_bus` - # @return [::Gapic::Config::Method] - # - attr_reader :update_message_bus - ## - # RPC-specific configuration for `delete_message_bus` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_message_bus - ## - # RPC-specific configuration for `get_enrollment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_enrollment - ## - # RPC-specific configuration for `list_enrollments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_enrollments - ## - # RPC-specific configuration for `create_enrollment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_enrollment - ## - # RPC-specific configuration for `update_enrollment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_enrollment - ## - # RPC-specific configuration for `delete_enrollment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_enrollment - ## - # RPC-specific configuration for `get_pipeline` - # @return [::Gapic::Config::Method] - # - attr_reader :get_pipeline - ## - # RPC-specific configuration for `list_pipelines` - # @return [::Gapic::Config::Method] - # - attr_reader :list_pipelines - ## - # RPC-specific configuration for `create_pipeline` - # @return [::Gapic::Config::Method] - # - attr_reader :create_pipeline - ## - # RPC-specific configuration for `update_pipeline` - # @return [::Gapic::Config::Method] - # - attr_reader :update_pipeline - ## - # RPC-specific configuration for `delete_pipeline` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_pipeline - ## - # RPC-specific configuration for `get_google_api_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_google_api_source - ## - # RPC-specific configuration for `list_google_api_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_google_api_sources - ## - # RPC-specific configuration for `create_google_api_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_google_api_source - ## - # RPC-specific configuration for `update_google_api_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_google_api_source - ## - # RPC-specific configuration for `delete_google_api_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_google_api_source - - # @private - def initialize parent_rpcs = nil - get_trigger_config = parent_rpcs.get_trigger if parent_rpcs.respond_to? :get_trigger - @get_trigger = ::Gapic::Config::Method.new get_trigger_config - list_triggers_config = parent_rpcs.list_triggers if parent_rpcs.respond_to? :list_triggers - @list_triggers = ::Gapic::Config::Method.new list_triggers_config - create_trigger_config = parent_rpcs.create_trigger if parent_rpcs.respond_to? :create_trigger - @create_trigger = ::Gapic::Config::Method.new create_trigger_config - update_trigger_config = parent_rpcs.update_trigger if parent_rpcs.respond_to? :update_trigger - @update_trigger = ::Gapic::Config::Method.new update_trigger_config - delete_trigger_config = parent_rpcs.delete_trigger if parent_rpcs.respond_to? :delete_trigger - @delete_trigger = ::Gapic::Config::Method.new delete_trigger_config - get_channel_config = parent_rpcs.get_channel if parent_rpcs.respond_to? :get_channel - @get_channel = ::Gapic::Config::Method.new get_channel_config - list_channels_config = parent_rpcs.list_channels if parent_rpcs.respond_to? :list_channels - @list_channels = ::Gapic::Config::Method.new list_channels_config - create_channel_config = parent_rpcs.create_channel if parent_rpcs.respond_to? :create_channel - @create_channel = ::Gapic::Config::Method.new create_channel_config - update_channel_config = parent_rpcs.update_channel if parent_rpcs.respond_to? :update_channel - @update_channel = ::Gapic::Config::Method.new update_channel_config - delete_channel_config = parent_rpcs.delete_channel if parent_rpcs.respond_to? :delete_channel - @delete_channel = ::Gapic::Config::Method.new delete_channel_config - get_provider_config = parent_rpcs.get_provider if parent_rpcs.respond_to? :get_provider - @get_provider = ::Gapic::Config::Method.new get_provider_config - list_providers_config = parent_rpcs.list_providers if parent_rpcs.respond_to? :list_providers - @list_providers = ::Gapic::Config::Method.new list_providers_config - get_channel_connection_config = parent_rpcs.get_channel_connection if parent_rpcs.respond_to? :get_channel_connection - @get_channel_connection = ::Gapic::Config::Method.new get_channel_connection_config - list_channel_connections_config = parent_rpcs.list_channel_connections if parent_rpcs.respond_to? :list_channel_connections - @list_channel_connections = ::Gapic::Config::Method.new list_channel_connections_config - create_channel_connection_config = parent_rpcs.create_channel_connection if parent_rpcs.respond_to? :create_channel_connection - @create_channel_connection = ::Gapic::Config::Method.new create_channel_connection_config - delete_channel_connection_config = parent_rpcs.delete_channel_connection if parent_rpcs.respond_to? :delete_channel_connection - @delete_channel_connection = ::Gapic::Config::Method.new delete_channel_connection_config - get_google_channel_config_config = parent_rpcs.get_google_channel_config if parent_rpcs.respond_to? :get_google_channel_config - @get_google_channel_config = ::Gapic::Config::Method.new get_google_channel_config_config - update_google_channel_config_config = parent_rpcs.update_google_channel_config if parent_rpcs.respond_to? :update_google_channel_config - @update_google_channel_config = ::Gapic::Config::Method.new update_google_channel_config_config - get_message_bus_config = parent_rpcs.get_message_bus if parent_rpcs.respond_to? :get_message_bus - @get_message_bus = ::Gapic::Config::Method.new get_message_bus_config - list_message_buses_config = parent_rpcs.list_message_buses if parent_rpcs.respond_to? :list_message_buses - @list_message_buses = ::Gapic::Config::Method.new list_message_buses_config - list_message_bus_enrollments_config = parent_rpcs.list_message_bus_enrollments if parent_rpcs.respond_to? :list_message_bus_enrollments - @list_message_bus_enrollments = ::Gapic::Config::Method.new list_message_bus_enrollments_config - create_message_bus_config = parent_rpcs.create_message_bus if parent_rpcs.respond_to? :create_message_bus - @create_message_bus = ::Gapic::Config::Method.new create_message_bus_config - update_message_bus_config = parent_rpcs.update_message_bus if parent_rpcs.respond_to? :update_message_bus - @update_message_bus = ::Gapic::Config::Method.new update_message_bus_config - delete_message_bus_config = parent_rpcs.delete_message_bus if parent_rpcs.respond_to? :delete_message_bus - @delete_message_bus = ::Gapic::Config::Method.new delete_message_bus_config - get_enrollment_config = parent_rpcs.get_enrollment if parent_rpcs.respond_to? :get_enrollment - @get_enrollment = ::Gapic::Config::Method.new get_enrollment_config - list_enrollments_config = parent_rpcs.list_enrollments if parent_rpcs.respond_to? :list_enrollments - @list_enrollments = ::Gapic::Config::Method.new list_enrollments_config - create_enrollment_config = parent_rpcs.create_enrollment if parent_rpcs.respond_to? :create_enrollment - @create_enrollment = ::Gapic::Config::Method.new create_enrollment_config - update_enrollment_config = parent_rpcs.update_enrollment if parent_rpcs.respond_to? :update_enrollment - @update_enrollment = ::Gapic::Config::Method.new update_enrollment_config - delete_enrollment_config = parent_rpcs.delete_enrollment if parent_rpcs.respond_to? :delete_enrollment - @delete_enrollment = ::Gapic::Config::Method.new delete_enrollment_config - get_pipeline_config = parent_rpcs.get_pipeline if parent_rpcs.respond_to? :get_pipeline - @get_pipeline = ::Gapic::Config::Method.new get_pipeline_config - list_pipelines_config = parent_rpcs.list_pipelines if parent_rpcs.respond_to? :list_pipelines - @list_pipelines = ::Gapic::Config::Method.new list_pipelines_config - create_pipeline_config = parent_rpcs.create_pipeline if parent_rpcs.respond_to? :create_pipeline - @create_pipeline = ::Gapic::Config::Method.new create_pipeline_config - update_pipeline_config = parent_rpcs.update_pipeline if parent_rpcs.respond_to? :update_pipeline - @update_pipeline = ::Gapic::Config::Method.new update_pipeline_config - delete_pipeline_config = parent_rpcs.delete_pipeline if parent_rpcs.respond_to? :delete_pipeline - @delete_pipeline = ::Gapic::Config::Method.new delete_pipeline_config - get_google_api_source_config = parent_rpcs.get_google_api_source if parent_rpcs.respond_to? :get_google_api_source - @get_google_api_source = ::Gapic::Config::Method.new get_google_api_source_config - list_google_api_sources_config = parent_rpcs.list_google_api_sources if parent_rpcs.respond_to? :list_google_api_sources - @list_google_api_sources = ::Gapic::Config::Method.new list_google_api_sources_config - create_google_api_source_config = parent_rpcs.create_google_api_source if parent_rpcs.respond_to? :create_google_api_source - @create_google_api_source = ::Gapic::Config::Method.new create_google_api_source_config - update_google_api_source_config = parent_rpcs.update_google_api_source if parent_rpcs.respond_to? :update_google_api_source - @update_google_api_source = ::Gapic::Config::Method.new update_google_api_source_config - delete_google_api_source_config = parent_rpcs.delete_google_api_source if parent_rpcs.respond_to? :delete_google_api_source - @delete_google_api_source = ::Gapic::Config::Method.new delete_google_api_source_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/credentials.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/credentials.rb deleted file mode 100644 index 7a26ab2f1527..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Eventarc - module V1 - module Eventarc - # Credentials for the Eventarc API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "EVENTARC_CREDENTIALS", - "EVENTARC_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "EVENTARC_CREDENTIALS_JSON", - "EVENTARC_KEYFILE_JSON", - "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-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/operations.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/operations.rb deleted file mode 100644 index 3a911a6858ec..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/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 Eventarc - module V1 - module Eventarc - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "eventarc.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Eventarc 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 Eventarc 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::Eventarc::V1::VERSION - metadata[:"x-goog-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::Eventarc::V1::VERSION - metadata[:"x-goog-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::Eventarc::V1::VERSION - metadata[:"x-goog-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::Eventarc::V1::VERSION - metadata[:"x-goog-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::Eventarc::V1::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 = "eventarc.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-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/paths.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/paths.rb deleted file mode 100644 index 5c3ff82df756..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/paths.rb +++ /dev/null @@ -1,331 +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 Eventarc - module V1 - module Eventarc - # Path helper methods for the Eventarc API. - module Paths - ## - # Create a fully-qualified Channel resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/channels/{channel}` - # - # @param project [String] - # @param location [String] - # @param channel [String] - # - # @return [::String] - def channel_path project:, location:, channel: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/channels/#{channel}" - end - - ## - # Create a fully-qualified ChannelConnection resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/channelConnections/{channel_connection}` - # - # @param project [String] - # @param location [String] - # @param channel_connection [String] - # - # @return [::String] - def channel_connection_path project:, location:, channel_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}/channelConnections/#{channel_connection}" - end - - ## - # Create a fully-qualified CloudFunction resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/functions/{function}` - # - # @param project [String] - # @param location [String] - # @param function [String] - # - # @return [::String] - def cloud_function_path project:, location:, function: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/functions/#{function}" - end - - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # - # @return [::String] - def crypto_key_path project:, location:, key_ring:, crypto_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" - end - - ## - # Create a fully-qualified Enrollment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/enrollments/{enrollment}` - # - # @param project [String] - # @param location [String] - # @param enrollment [String] - # - # @return [::String] - def enrollment_path project:, location:, enrollment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/enrollments/#{enrollment}" - end - - ## - # Create a fully-qualified GoogleApiSource resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/googleApiSources/{google_api_source}` - # - # @param project [String] - # @param location [String] - # @param google_api_source [String] - # - # @return [::String] - def google_api_source_path project:, location:, google_api_source: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/googleApiSources/#{google_api_source}" - end - - ## - # Create a fully-qualified GoogleChannelConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/googleChannelConfig` - # - # @param project [String] - # @param location [String] - # - # @return [::String] - def google_channel_config_path project:, location: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/locations/#{location}/googleChannelConfig" - 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 MessageBus resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/messageBuses/{message_bus}` - # - # @param project [String] - # @param location [String] - # @param message_bus [String] - # - # @return [::String] - def message_bus_path project:, location:, message_bus: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/messageBuses/#{message_bus}" - end - - ## - # Create a fully-qualified NetworkAttachment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/regions/{region}/networkAttachments/{networkattachment}` - # - # @param project [String] - # @param region [String] - # @param networkattachment [String] - # - # @return [::String] - def network_attachment_path project:, region:, networkattachment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "region cannot contain /" if region.to_s.include? "/" - - "projects/#{project}/regions/#{region}/networkAttachments/#{networkattachment}" - end - - ## - # Create a fully-qualified Pipeline resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/pipelines/{pipeline}` - # - # @param project [String] - # @param location [String] - # @param pipeline [String] - # - # @return [::String] - def pipeline_path project:, location:, pipeline: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/pipelines/#{pipeline}" - end - - ## - # Create a fully-qualified Provider resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/providers/{provider}` - # - # @param project [String] - # @param location [String] - # @param provider [String] - # - # @return [::String] - def provider_path project:, location:, provider: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/providers/#{provider}" - end - - ## - # Create a fully-qualified ServiceAccount resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/serviceAccounts/{service_account}` - # - # @param project [String] - # @param service_account [String] - # - # @return [::String] - def service_account_path project:, service_account: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/serviceAccounts/#{service_account}" - end - - ## - # Create a fully-qualified Topic resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/topics/{topic}` - # - # @param project [String] - # @param topic [String] - # - # @return [::String] - def topic_path project:, topic: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/topics/#{topic}" - end - - ## - # Create a fully-qualified Trigger resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/triggers/{trigger}` - # - # @param project [String] - # @param location [String] - # @param trigger [String] - # - # @return [::String] - def trigger_path project:, location:, trigger: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/triggers/#{trigger}" - end - - ## - # Create a fully-qualified Workflow resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workflows/{workflow}` - # - # @param project [String] - # @param location [String] - # @param workflow [String] - # - # @return [::String] - def workflow_path project:, location:, workflow: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workflows/#{workflow}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest.rb deleted file mode 100644 index 28d926c87698..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/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/eventarc/v1/version" -require "google/cloud/eventarc/v1/bindings_override" - -require "google/cloud/eventarc/v1/eventarc/credentials" -require "google/cloud/eventarc/v1/eventarc/paths" -require "google/cloud/eventarc/v1/eventarc/rest/operations" -require "google/cloud/eventarc/v1/eventarc/rest/client" - -module Google - module Cloud - module Eventarc - module V1 - ## - # Eventarc allows users to subscribe to various events that are provided by - # Google Cloud services and forward them to supported destinations. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/eventarc/v1/eventarc/rest" - # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - module Eventarc - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/eventarc/v1/eventarc/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb deleted file mode 100644 index 638c1674b6e6..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/client.rb +++ /dev/null @@ -1,4373 +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/eventarc/v1/eventarc_pb" -require "google/cloud/eventarc/v1/eventarc/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Eventarc - module V1 - module Eventarc - module Rest - ## - # REST client for the Eventarc service. - # - # Eventarc allows users to subscribe to various events that are provided by - # Google Cloud services and forward them to supported destinations. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "eventarc.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :eventarc_stub - - ## - # Configure the Eventarc Client class. - # - # See {::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Eventarc clients - # ::Google::Cloud::Eventarc::V1::Eventarc::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", "Eventarc", "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.get_trigger.timeout = 60.0 - default_config.rpcs.get_trigger.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.list_triggers.timeout = 60.0 - default_config.rpcs.list_triggers.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.create_trigger.timeout = 60.0 - - default_config.rpcs.update_trigger.timeout = 60.0 - - default_config.rpcs.delete_trigger.timeout = 60.0 - - default_config.rpcs.get_channel.timeout = 60.0 - default_config.rpcs.get_channel.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.list_channels.timeout = 60.0 - default_config.rpcs.list_channels.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.create_channel.timeout = 60.0 - - default_config.rpcs.update_channel.timeout = 60.0 - - default_config.rpcs.delete_channel.timeout = 60.0 - - default_config.rpcs.get_provider.timeout = 60.0 - default_config.rpcs.get_provider.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.list_providers.timeout = 60.0 - default_config.rpcs.list_providers.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.get_channel_connection.timeout = 60.0 - default_config.rpcs.get_channel_connection.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.list_channel_connections.timeout = 60.0 - default_config.rpcs.list_channel_connections.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.create_channel_connection.timeout = 60.0 - - default_config.rpcs.delete_channel_connection.timeout = 60.0 - - default_config.rpcs.get_google_channel_config.timeout = 60.0 - default_config.rpcs.get_google_channel_config.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.update_google_channel_config.timeout = 60.0 - - default_config.rpcs.get_message_bus.timeout = 60.0 - default_config.rpcs.get_message_bus.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.list_message_buses.timeout = 60.0 - default_config.rpcs.list_message_buses.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.list_message_bus_enrollments.timeout = 60.0 - default_config.rpcs.list_message_bus_enrollments.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.create_message_bus.timeout = 60.0 - - default_config.rpcs.update_message_bus.timeout = 60.0 - - default_config.rpcs.delete_message_bus.timeout = 60.0 - - default_config.rpcs.get_enrollment.timeout = 60.0 - default_config.rpcs.get_enrollment.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.list_enrollments.timeout = 60.0 - default_config.rpcs.list_enrollments.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.create_enrollment.timeout = 60.0 - - default_config.rpcs.update_enrollment.timeout = 60.0 - - default_config.rpcs.delete_enrollment.timeout = 60.0 - - default_config.rpcs.get_pipeline.timeout = 60.0 - default_config.rpcs.get_pipeline.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.list_pipelines.timeout = 60.0 - default_config.rpcs.list_pipelines.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.create_pipeline.timeout = 60.0 - - default_config.rpcs.update_pipeline.timeout = 60.0 - - default_config.rpcs.delete_pipeline.timeout = 60.0 - - default_config.rpcs.get_google_api_source.timeout = 60.0 - default_config.rpcs.get_google_api_source.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.list_google_api_sources.timeout = 60.0 - default_config.rpcs.list_google_api_sources.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 2] - } - - default_config.rpcs.create_google_api_source.timeout = 60.0 - - default_config.rpcs.update_google_api_source.timeout = 60.0 - - default_config.rpcs.delete_google_api_source.timeout = 60.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Eventarc 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::Eventarc::V1::Eventarc::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 - @eventarc_stub.universe_domain - end - - ## - # Create a new Eventarc REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Eventarc 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::Eventarc::V1::Eventarc::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 - - @eventarc_stub = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @eventarc_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 = @eventarc_stub.endpoint - config.universe_domain = @eventarc_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @eventarc_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 = @eventarc_stub.endpoint - config.universe_domain = @eventarc_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @eventarc_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Eventarc::V1::Eventarc::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 - @eventarc_stub.logger - end - - # Service calls - - ## - # Get a single trigger. - # - # @overload get_trigger(request, options = nil) - # Pass arguments to `get_trigger` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_trigger(name: nil) - # Pass arguments to `get_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 trigger to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::Trigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::Trigger] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetTriggerRequest.new - # - # # Call the get_trigger method. - # result = client.get_trigger request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::Trigger. - # p result - # - def get_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetTriggerRequest - - # Converts hash and nil to an 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_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.get_trigger 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 triggers. - # - # @overload list_triggers(request, options = nil) - # Pass arguments to `list_triggers` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListTriggersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListTriggersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_triggers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_triggers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection to list triggers on. - # @param page_size [::Integer] - # The maximum number of triggers to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # The page token; provide the value from the `next_page_token` field in a - # previous `ListTriggers` call to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListTriggers` must match - # the call that provided the page token. - # @param order_by [::String] - # The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, trigger_id`. - # @param filter [::String] - # Filter field. Used to filter the Triggers to be listed. Possible filters - # are described in https://google.aip.dev/160. For example, using - # "?filter=destination:gke" would list only Triggers with a gke destination. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Trigger>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Trigger>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListTriggersRequest.new - # - # # Call the list_triggers method. - # result = client.list_triggers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::Trigger. - # p item - # end - # - def list_triggers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListTriggersRequest - - # Converts hash and nil to an 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_triggers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_triggers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_triggers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.list_triggers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_triggers, "triggers", 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 new trigger in a particular project and location. - # - # @overload create_trigger(request, options = nil) - # Pass arguments to `create_trigger` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreateTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreateTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trigger(parent: nil, trigger: nil, trigger_id: nil, validate_only: nil) - # Pass arguments to `create_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this trigger. - # @param trigger [::Google::Cloud::Eventarc::V1::Trigger, ::Hash] - # Required. The trigger to create. - # @param trigger_id [::String] - # Required. The user-provided ID to be assigned to the trigger. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreateTriggerRequest.new - # - # # Call the create_trigger method. - # result = client.create_trigger request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateTriggerRequest - - # Converts hash and nil to an 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_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.create_trigger request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a single trigger. - # - # @overload update_trigger(request, options = nil) - # Pass arguments to `update_trigger` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdateTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdateTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_trigger(trigger: nil, update_mask: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param trigger [::Google::Cloud::Eventarc::V1::Trigger, ::Hash] - # The trigger to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The fields to be updated; only fields explicitly provided are updated. - # If no field mask is provided, all provided fields in the request are - # updated. To update all fields, provide a field mask of "*". - # @param allow_missing [::Boolean] - # If set to true, and the trigger is not found, a new trigger will be - # created. In this situation, `update_mask` is ignored. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new - # - # # Call the update_trigger method. - # result = client.update_trigger request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateTriggerRequest - - # Converts hash and nil to an 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_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.update_trigger request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single trigger. - # - # @overload delete_trigger(request, options = nil) - # Pass arguments to `delete_trigger` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeleteTriggerRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeleteTriggerRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_trigger(name: nil, etag: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `delete_trigger` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 trigger to be deleted. - # @param etag [::String] - # If provided, the trigger will only be deleted if the etag matches the - # current etag on the resource. - # @param allow_missing [::Boolean] - # If set to true, and the trigger is not found, the request will succeed - # but no action will be taken on the server. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new - # - # # Call the delete_trigger method. - # result = client.delete_trigger request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_trigger request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteTriggerRequest - - # Converts hash and nil to an 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_trigger.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_trigger.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_trigger.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.delete_trigger 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 - - ## - # Get a single Channel. - # - # @overload get_channel(request, options = nil) - # Pass arguments to `get_channel` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_channel(name: nil) - # Pass arguments to `get_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 channel to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::Channel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::Channel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetChannelRequest.new - # - # # Call the get_channel method. - # result = client.get_channel request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::Channel. - # p result - # - def get_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetChannelRequest - - # Converts hash and nil to an 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_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.get_channel 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 channels. - # - # @overload list_channels(request, options = nil) - # Pass arguments to `list_channels` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListChannelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListChannelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_channels(parent: nil, page_size: nil, page_token: nil, order_by: nil) - # Pass arguments to `list_channels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection to list channels on. - # @param page_size [::Integer] - # The maximum number of channels to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # The page token; provide the value from the `next_page_token` field in a - # previous `ListChannels` call to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChannels` must - # match the call that provided the page token. - # @param order_by [::String] - # The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, channel_id`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Channel>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListChannelsRequest.new - # - # # Call the list_channels method. - # result = client.list_channels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::Channel. - # p item - # end - # - def list_channels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListChannelsRequest - - # Converts hash and nil to an 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_channels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_channels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_channels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.list_channels request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_channels, "channels", 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 new channel in a particular project and location. - # - # @overload create_channel(request, options = nil) - # Pass arguments to `create_channel` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreateChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreateChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_channel(parent: nil, channel: nil, channel_id: nil, validate_only: nil) - # Pass arguments to `create_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this channel. - # @param channel [::Google::Cloud::Eventarc::V1::Channel, ::Hash] - # Required. The channel to create. - # @param channel_id [::String] - # Required. The user-provided ID to be assigned to the channel. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreateChannelRequest.new - # - # # Call the create_channel method. - # result = client.create_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateChannelRequest - - # Converts hash and nil to an 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_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.create_channel request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a single channel. - # - # @overload update_channel(request, options = nil) - # Pass arguments to `update_channel` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdateChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdateChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_channel(channel: nil, update_mask: nil, validate_only: nil) - # Pass arguments to `update_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param channel [::Google::Cloud::Eventarc::V1::Channel, ::Hash] - # The channel to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The fields to be updated; only fields explicitly provided are updated. - # If no field mask is provided, all provided fields in the request are - # updated. To update all fields, provide a field mask of "*". - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdateChannelRequest.new - # - # # Call the update_channel method. - # result = client.update_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateChannelRequest - - # Converts hash and nil to an 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_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.update_channel request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single channel. - # - # @overload delete_channel(request, options = nil) - # Pass arguments to `delete_channel` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeleteChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeleteChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_channel(name: nil, validate_only: nil) - # Pass arguments to `delete_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 channel to be deleted. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeleteChannelRequest.new - # - # # Call the delete_channel method. - # result = client.delete_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteChannelRequest - - # Converts hash and nil to an 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_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.delete_channel 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 - - ## - # Get a single Provider. - # - # @overload get_provider(request, options = nil) - # Pass arguments to `get_provider` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetProviderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetProviderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_provider(name: nil) - # Pass arguments to `get_provider` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 provider to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::Provider] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::Provider] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetProviderRequest.new - # - # # Call the get_provider method. - # result = client.get_provider request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::Provider. - # p result - # - def get_provider request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetProviderRequest - - # Converts hash and nil to an 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_provider.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_provider.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_provider.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.get_provider 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 providers. - # - # @overload list_providers(request, options = nil) - # Pass arguments to `list_providers` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListProvidersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListProvidersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_providers(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_providers` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the provider to get. - # @param page_size [::Integer] - # The maximum number of providers to return on each page. - # @param page_token [::String] - # The page token; provide the value from the `next_page_token` field in a - # previous `ListProviders` call to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProviders` must - # match the call that provided the page token. - # @param order_by [::String] - # The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting oder is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, _id`. - # @param filter [::String] - # The filter field that the list request will filter on. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Provider>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Provider>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListProvidersRequest.new - # - # # Call the list_providers method. - # result = client.list_providers request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::Provider. - # p item - # end - # - def list_providers request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListProvidersRequest - - # Converts hash and nil to an 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_providers.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_providers.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_providers.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.list_providers request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_providers, "providers", 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 a single ChannelConnection. - # - # @overload get_channel_connection(request, options = nil) - # Pass arguments to `get_channel_connection` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_channel_connection(name: nil) - # Pass arguments to `get_channel_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 channel connection to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::ChannelConnection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::ChannelConnection] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new - # - # # Call the get_channel_connection method. - # result = client.get_channel_connection request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::ChannelConnection. - # p result - # - def get_channel_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest - - # Converts hash and nil to an 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_channel_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_channel_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_channel_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.get_channel_connection 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 channel connections. - # - # @overload list_channel_connections(request, options = nil) - # Pass arguments to `list_channel_connections` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_channel_connections(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_channel_connections` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection from which to list channel connections. - # @param page_size [::Integer] - # The maximum number of channel connections to return on each page. - # - # Note: The service may send fewer responses. - # @param page_token [::String] - # The page token; provide the value from the `next_page_token` field in a - # previous `ListChannelConnections` call to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChannelConnetions` - # 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::Eventarc::V1::ChannelConnection>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::ChannelConnection>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.new - # - # # Call the list_channel_connections method. - # result = client.list_channel_connections request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::ChannelConnection. - # p item - # end - # - def list_channel_connections request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest - - # Converts hash and nil to an 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_channel_connections.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_channel_connections.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_channel_connections.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.list_channel_connections request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_channel_connections, "channel_connections", 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 new ChannelConnection in a particular project and location. - # - # @overload create_channel_connection(request, options = nil) - # Pass arguments to `create_channel_connection` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_channel_connection(parent: nil, channel_connection: nil, channel_connection_id: nil) - # Pass arguments to `create_channel_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this channel connection. - # @param channel_connection [::Google::Cloud::Eventarc::V1::ChannelConnection, ::Hash] - # Required. Channel connection to create. - # @param channel_connection_id [::String] - # Required. The user-provided ID to be assigned to the channel connection. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new - # - # # Call the create_channel_connection method. - # result = client.create_channel_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_channel_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest - - # Converts hash and nil to an 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_channel_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_channel_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_channel_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.create_channel_connection request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single ChannelConnection. - # - # @overload delete_channel_connection(request, options = nil) - # Pass arguments to `delete_channel_connection` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_channel_connection(name: nil) - # Pass arguments to `delete_channel_connection` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 channel connection to delete. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.new - # - # # Call the delete_channel_connection method. - # result = client.delete_channel_connection request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_channel_connection request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest - - # Converts hash and nil to an 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_channel_connection.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_channel_connection.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_channel_connection.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.delete_channel_connection 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 - - ## - # Get a GoogleChannelConfig. - # The name of the GoogleChannelConfig in the response is ALWAYS coded with - # projectID. - # - # @overload get_google_channel_config(request, options = nil) - # Pass arguments to `get_google_channel_config` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_google_channel_config(name: nil) - # Pass arguments to `get_google_channel_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 config to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new - # - # # Call the get_google_channel_config method. - # result = client.get_google_channel_config request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig. - # p result - # - def get_google_channel_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest - - # Converts hash and nil to an 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_google_channel_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::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_google_channel_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_google_channel_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.get_google_channel_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 - - ## - # Update a single GoogleChannelConfig - # - # @overload update_google_channel_config(request, options = nil) - # Pass arguments to `update_google_channel_config` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_google_channel_config(google_channel_config: nil, update_mask: nil) - # Pass arguments to `update_google_channel_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 google_channel_config [::Google::Cloud::Eventarc::V1::GoogleChannelConfig, ::Hash] - # Required. The config to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The fields to be updated; only fields explicitly provided are updated. - # If no field mask is provided, all provided fields in the request are - # updated. To update all fields, provide a field mask of "*". - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new - # - # # Call the update_google_channel_config method. - # result = client.update_google_channel_config request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig. - # p result - # - def update_google_channel_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest - - # Converts hash and nil to an 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_google_channel_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::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_google_channel_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_google_channel_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.update_google_channel_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 - - ## - # Get a single MessageBus. - # - # @overload get_message_bus(request, options = nil) - # Pass arguments to `get_message_bus` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetMessageBusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetMessageBusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_message_bus(name: nil) - # Pass arguments to `get_message_bus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 message bus to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::MessageBus] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::MessageBus] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetMessageBusRequest.new - # - # # Call the get_message_bus method. - # result = client.get_message_bus request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::MessageBus. - # p result - # - def get_message_bus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetMessageBusRequest - - # Converts hash and nil to an 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_message_bus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_message_bus.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_message_bus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.get_message_bus 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 message buses. - # - # @overload list_message_buses(request, options = nil) - # Pass arguments to `list_message_buses` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListMessageBusesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListMessageBusesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_message_buses(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_message_buses` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection to list message buses on. - # @param page_size [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # @param order_by [::String] - # Optional. The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, update_time`. - # @param filter [::String] - # Optional. The filter field that the list request will filter on. - # Possible filtersare described in https://google.aip.dev/160. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::MessageBus>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new - # - # # Call the list_message_buses method. - # result = client.list_message_buses request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::MessageBus. - # p item - # end - # - def list_message_buses request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest - - # Converts hash and nil to an 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_message_buses.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_message_buses.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_message_buses.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.list_message_buses request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_message_buses, "message_buses", 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 - - ## - # List message bus enrollments. - # - # @overload list_message_bus_enrollments(request, options = nil) - # Pass arguments to `list_message_bus_enrollments` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_message_bus_enrollments(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_message_bus_enrollments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 message bus to list enrollments on. - # @param page_size [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.new - # - # # Call the list_message_bus_enrollments method. - # result = client.list_message_bus_enrollments request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse. - # p result - # - def list_message_bus_enrollments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest - - # Converts hash and nil to an 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_message_bus_enrollments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_message_bus_enrollments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_message_bus_enrollments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.list_message_bus_enrollments 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 new MessageBus in a particular project and location. - # - # @overload create_message_bus(request, options = nil) - # Pass arguments to `create_message_bus` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreateMessageBusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreateMessageBusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_message_bus(parent: nil, message_bus: nil, message_bus_id: nil, validate_only: nil) - # Pass arguments to `create_message_bus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this message bus. - # @param message_bus [::Google::Cloud::Eventarc::V1::MessageBus, ::Hash] - # Required. The message bus to create. - # @param message_bus_id [::String] - # Required. The user-provided ID to be assigned to the MessageBus. It should - # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new - # - # # Call the create_message_bus method. - # result = client.create_message_bus request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_message_bus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest - - # Converts hash and nil to an 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_message_bus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_message_bus.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_message_bus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.create_message_bus request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a single message bus. - # - # @overload update_message_bus(request, options = nil) - # Pass arguments to `update_message_bus` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_message_bus(message_bus: nil, update_mask: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_message_bus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param message_bus [::Google::Cloud::Eventarc::V1::MessageBus, ::Hash] - # Required. The MessageBus to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The fields to be updated; only fields explicitly provided are - # updated. If no field mask is provided, all provided fields in the request - # are updated. To update all fields, provide a field mask of "*". - # @param allow_missing [::Boolean] - # Optional. If set to true, and the MessageBus is not found, a new MessageBus - # will be created. In this situation, `update_mask` is ignored. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new - # - # # Call the update_message_bus method. - # result = client.update_message_bus request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_message_bus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest - - # Converts hash and nil to an 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_message_bus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_message_bus.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_message_bus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.update_message_bus request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single message bus. - # - # @overload delete_message_bus(request, options = nil) - # Pass arguments to `delete_message_bus` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_message_bus(name: nil, etag: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `delete_message_bus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 MessageBus to be deleted. - # @param etag [::String] - # Optional. If provided, the MessageBus will only be deleted if the etag - # matches the current etag on the resource. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the MessageBus is not found, the request will - # succeed but no action will be taken on the server. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new - # - # # Call the delete_message_bus method. - # result = client.delete_message_bus request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_message_bus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest - - # Converts hash and nil to an 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_message_bus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_message_bus.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_message_bus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.delete_message_bus 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 - - ## - # Get a single Enrollment. - # - # @overload get_enrollment(request, options = nil) - # Pass arguments to `get_enrollment` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetEnrollmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetEnrollmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_enrollment(name: nil) - # Pass arguments to `get_enrollment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Enrollment to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::Enrollment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::Enrollment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new - # - # # Call the get_enrollment method. - # result = client.get_enrollment request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::Enrollment. - # p result - # - def get_enrollment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest - - # Converts hash and nil to an 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_enrollment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_enrollment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_enrollment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.get_enrollment 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 Enrollments. - # - # @overload list_enrollments(request, options = nil) - # Pass arguments to `list_enrollments` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_enrollments(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_enrollments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection to list triggers on. - # @param page_size [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # @param order_by [::String] - # Optional. The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, update_time`. - # @param filter [::String] - # Optional. The filter field that the list request will filter on. - # Possible filtersare described in https://google.aip.dev/160. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Enrollment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new - # - # # Call the list_enrollments method. - # result = client.list_enrollments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::Enrollment. - # p item - # end - # - def list_enrollments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest - - # Converts hash and nil to an 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_enrollments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_enrollments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_enrollments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.list_enrollments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_enrollments, "enrollments", 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 new Enrollment in a particular project and location. - # - # @overload create_enrollment(request, options = nil) - # Pass arguments to `create_enrollment` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_enrollment(parent: nil, enrollment: nil, enrollment_id: nil, validate_only: nil) - # Pass arguments to `create_enrollment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this enrollment. - # @param enrollment [::Google::Cloud::Eventarc::V1::Enrollment, ::Hash] - # Required. The enrollment to create. - # @param enrollment_id [::String] - # Required. The user-provided ID to be assigned to the Enrollment. It should - # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new - # - # # Call the create_enrollment method. - # result = client.create_enrollment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_enrollment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest - - # Converts hash and nil to an 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_enrollment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_enrollment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_enrollment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.create_enrollment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a single Enrollment. - # - # @overload update_enrollment(request, options = nil) - # Pass arguments to `update_enrollment` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_enrollment(enrollment: nil, update_mask: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_enrollment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param enrollment [::Google::Cloud::Eventarc::V1::Enrollment, ::Hash] - # Required. The Enrollment to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The fields to be updated; only fields explicitly provided are - # updated. If no field mask is provided, all provided fields in the request - # are updated. To update all fields, provide a field mask of "*". - # @param allow_missing [::Boolean] - # Optional. If set to true, and the Enrollment is not found, a new Enrollment - # will be created. In this situation, `update_mask` is ignored. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new - # - # # Call the update_enrollment method. - # result = client.update_enrollment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_enrollment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest - - # Converts hash and nil to an 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_enrollment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_enrollment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_enrollment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.update_enrollment request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single Enrollment. - # - # @overload delete_enrollment(request, options = nil) - # Pass arguments to `delete_enrollment` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_enrollment(name: nil, etag: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `delete_enrollment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Enrollment to be deleted. - # @param etag [::String] - # Optional. If provided, the Enrollment will only be deleted if the etag - # matches the current etag on the resource. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the Enrollment is not found, the request will - # succeed but no action will be taken on the server. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new - # - # # Call the delete_enrollment method. - # result = client.delete_enrollment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_enrollment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest - - # Converts hash and nil to an 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_enrollment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_enrollment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_enrollment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.delete_enrollment 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 - - ## - # Get a single Pipeline. - # - # @overload get_pipeline(request, options = nil) - # Pass arguments to `get_pipeline` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetPipelineRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetPipelineRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_pipeline(name: nil) - # Pass arguments to `get_pipeline` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 pipeline to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::Pipeline] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::Pipeline] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetPipelineRequest.new - # - # # Call the get_pipeline method. - # result = client.get_pipeline request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::Pipeline. - # p result - # - def get_pipeline request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetPipelineRequest - - # Converts hash and nil to an 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_pipeline.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_pipeline.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_pipeline.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.get_pipeline 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 pipelines. - # - # @overload list_pipelines(request, options = nil) - # Pass arguments to `list_pipelines` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListPipelinesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListPipelinesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_pipelines(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_pipelines` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection to list pipelines on. - # @param page_size [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # @param order_by [::String] - # Optional. The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, update_time`. - # @param filter [::String] - # Optional. The filter field that the list request will filter on. - # Possible filters are described in https://google.aip.dev/160. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::Pipeline>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListPipelinesRequest.new - # - # # Call the list_pipelines method. - # result = client.list_pipelines request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::Pipeline. - # p item - # end - # - def list_pipelines request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListPipelinesRequest - - # Converts hash and nil to an 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_pipelines.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_pipelines.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_pipelines.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.list_pipelines request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_pipelines, "pipelines", 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 new Pipeline in a particular project and location. - # - # @overload create_pipeline(request, options = nil) - # Pass arguments to `create_pipeline` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreatePipelineRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreatePipelineRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_pipeline(parent: nil, pipeline: nil, pipeline_id: nil, validate_only: nil) - # Pass arguments to `create_pipeline` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this pipeline. - # @param pipeline [::Google::Cloud::Eventarc::V1::Pipeline, ::Hash] - # Required. The pipeline to create. - # @param pipeline_id [::String] - # Required. The user-provided ID to be assigned to the Pipeline. It should - # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreatePipelineRequest.new - # - # # Call the create_pipeline method. - # result = client.create_pipeline request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_pipeline request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreatePipelineRequest - - # Converts hash and nil to an 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_pipeline.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_pipeline.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_pipeline.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.create_pipeline request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a single pipeline. - # - # @overload update_pipeline(request, options = nil) - # Pass arguments to `update_pipeline` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdatePipelineRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdatePipelineRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_pipeline(pipeline: nil, update_mask: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_pipeline` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param pipeline [::Google::Cloud::Eventarc::V1::Pipeline, ::Hash] - # Required. The Pipeline to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The fields to be updated; only fields explicitly provided are - # updated. If no field mask is provided, all provided fields in the request - # are updated. To update all fields, provide a field mask of "*". - # @param allow_missing [::Boolean] - # Optional. If set to true, and the Pipeline is not found, a new Pipeline - # will be created. In this situation, `update_mask` is ignored. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new - # - # # Call the update_pipeline method. - # result = client.update_pipeline request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_pipeline request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest - - # Converts hash and nil to an 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_pipeline.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_pipeline.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_pipeline.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.update_pipeline request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single pipeline. - # - # @overload delete_pipeline(request, options = nil) - # Pass arguments to `delete_pipeline` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeletePipelineRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeletePipelineRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_pipeline(name: nil, etag: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `delete_pipeline` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 Pipeline to be deleted. - # @param etag [::String] - # Optional. If provided, the Pipeline will only be deleted if the etag - # matches the current etag on the resource. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the Pipeline is not found, the request will - # succeed but no action will be taken on the server. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeletePipelineRequest.new - # - # # Call the delete_pipeline method. - # result = client.delete_pipeline request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_pipeline request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeletePipelineRequest - - # Converts hash and nil to an 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_pipeline.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_pipeline.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_pipeline.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.delete_pipeline 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 - - ## - # Get a single GoogleApiSource. - # - # @overload get_google_api_source(request, options = nil) - # Pass arguments to `get_google_api_source` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_google_api_source(name: nil) - # Pass arguments to `get_google_api_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 google api source to get. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::GoogleApiSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new - # - # # Call the get_google_api_source method. - # result = client.get_google_api_source request - # - # # The returned object is of type Google::Cloud::Eventarc::V1::GoogleApiSource. - # p result - # - def get_google_api_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest - - # Converts hash and nil to an 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_google_api_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_google_api_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_google_api_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.get_google_api_source 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 GoogleApiSources. - # - # @overload list_google_api_sources(request, options = nil) - # Pass arguments to `list_google_api_sources` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_google_api_sources(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_google_api_sources` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection to list GoogleApiSources on. - # @param page_size [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @param page_token [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # @param order_by [::String] - # Optional. The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, update_time`. - # @param filter [::String] - # Optional. The filter field that the list request will filter on. - # Possible filtersare described in https://google.aip.dev/160. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Eventarc::V1::GoogleApiSource>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new - # - # # Call the list_google_api_sources method. - # result = client.list_google_api_sources request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Eventarc::V1::GoogleApiSource. - # p item - # end - # - def list_google_api_sources request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest - - # Converts hash and nil to an 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_google_api_sources.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_google_api_sources.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_google_api_sources.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.list_google_api_sources request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @eventarc_stub, :list_google_api_sources, "google_api_sources", 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 new GoogleApiSource in a particular project and location. - # - # @overload create_google_api_source(request, options = nil) - # Pass arguments to `create_google_api_source` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_google_api_source(parent: nil, google_api_source: nil, google_api_source_id: nil, validate_only: nil) - # Pass arguments to `create_google_api_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 collection in which to add this google api source. - # @param google_api_source [::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash] - # Required. The google api source to create. - # @param google_api_source_id [::String] - # Required. The user-provided ID to be assigned to the GoogleApiSource. It - # should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new - # - # # Call the create_google_api_source method. - # result = client.create_google_api_source request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_google_api_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest - - # Converts hash and nil to an 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_google_api_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_google_api_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_google_api_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.create_google_api_source request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Update a single GoogleApiSource. - # - # @overload update_google_api_source(request, options = nil) - # Pass arguments to `update_google_api_source` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_google_api_source(google_api_source: nil, update_mask: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `update_google_api_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param google_api_source [::Google::Cloud::Eventarc::V1::GoogleApiSource, ::Hash] - # Required. The GoogleApiSource to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. The fields to be updated; only fields explicitly provided are - # updated. If no field mask is provided, all provided fields in the request - # are updated. To update all fields, provide a field mask of "*". - # @param allow_missing [::Boolean] - # Optional. If set to true, and the GoogleApiSource is not found, a new - # GoogleApiSource will be created. In this situation, `update_mask` is - # ignored. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new - # - # # Call the update_google_api_source method. - # result = client.update_google_api_source request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_google_api_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest - - # Converts hash and nil to an 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_google_api_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_google_api_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_google_api_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.update_google_api_source request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Delete a single GoogleApiSource. - # - # @overload delete_google_api_source(request, options = nil) - # Pass arguments to `delete_google_api_source` via a request object, either of type - # {::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_google_api_source(name: nil, etag: nil, allow_missing: nil, validate_only: nil) - # Pass arguments to `delete_google_api_source` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 GoogleApiSource to be deleted. - # @param etag [::String] - # Optional. If provided, the MessageBus will only be deleted if the etag - # matches the current etag on the resource. - # @param allow_missing [::Boolean] - # Optional. If set to true, and the MessageBus is not found, the request will - # succeed but no action will be taken on the server. - # @param validate_only [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/eventarc/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new - # - # # Call the delete_google_api_source method. - # result = client.delete_google_api_source request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_google_api_source request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest - - # Converts hash and nil to an 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_google_api_source.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_google_api_source.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_google_api_source.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @eventarc_stub.delete_google_api_source 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 Eventarc REST API. - # - # This class represents the configuration for Eventarc 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::Eventarc::V1::Eventarc::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 - # # get_trigger to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_trigger.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_trigger.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 = "eventarc.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 Eventarc 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 `get_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :get_trigger - ## - # RPC-specific configuration for `list_triggers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_triggers - ## - # RPC-specific configuration for `create_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :create_trigger - ## - # RPC-specific configuration for `update_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :update_trigger - ## - # RPC-specific configuration for `delete_trigger` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_trigger - ## - # RPC-specific configuration for `get_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :get_channel - ## - # RPC-specific configuration for `list_channels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_channels - ## - # RPC-specific configuration for `create_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :create_channel - ## - # RPC-specific configuration for `update_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :update_channel - ## - # RPC-specific configuration for `delete_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_channel - ## - # RPC-specific configuration for `get_provider` - # @return [::Gapic::Config::Method] - # - attr_reader :get_provider - ## - # RPC-specific configuration for `list_providers` - # @return [::Gapic::Config::Method] - # - attr_reader :list_providers - ## - # RPC-specific configuration for `get_channel_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :get_channel_connection - ## - # RPC-specific configuration for `list_channel_connections` - # @return [::Gapic::Config::Method] - # - attr_reader :list_channel_connections - ## - # RPC-specific configuration for `create_channel_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :create_channel_connection - ## - # RPC-specific configuration for `delete_channel_connection` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_channel_connection - ## - # RPC-specific configuration for `get_google_channel_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_google_channel_config - ## - # RPC-specific configuration for `update_google_channel_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_google_channel_config - ## - # RPC-specific configuration for `get_message_bus` - # @return [::Gapic::Config::Method] - # - attr_reader :get_message_bus - ## - # RPC-specific configuration for `list_message_buses` - # @return [::Gapic::Config::Method] - # - attr_reader :list_message_buses - ## - # RPC-specific configuration for `list_message_bus_enrollments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_message_bus_enrollments - ## - # RPC-specific configuration for `create_message_bus` - # @return [::Gapic::Config::Method] - # - attr_reader :create_message_bus - ## - # RPC-specific configuration for `update_message_bus` - # @return [::Gapic::Config::Method] - # - attr_reader :update_message_bus - ## - # RPC-specific configuration for `delete_message_bus` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_message_bus - ## - # RPC-specific configuration for `get_enrollment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_enrollment - ## - # RPC-specific configuration for `list_enrollments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_enrollments - ## - # RPC-specific configuration for `create_enrollment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_enrollment - ## - # RPC-specific configuration for `update_enrollment` - # @return [::Gapic::Config::Method] - # - attr_reader :update_enrollment - ## - # RPC-specific configuration for `delete_enrollment` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_enrollment - ## - # RPC-specific configuration for `get_pipeline` - # @return [::Gapic::Config::Method] - # - attr_reader :get_pipeline - ## - # RPC-specific configuration for `list_pipelines` - # @return [::Gapic::Config::Method] - # - attr_reader :list_pipelines - ## - # RPC-specific configuration for `create_pipeline` - # @return [::Gapic::Config::Method] - # - attr_reader :create_pipeline - ## - # RPC-specific configuration for `update_pipeline` - # @return [::Gapic::Config::Method] - # - attr_reader :update_pipeline - ## - # RPC-specific configuration for `delete_pipeline` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_pipeline - ## - # RPC-specific configuration for `get_google_api_source` - # @return [::Gapic::Config::Method] - # - attr_reader :get_google_api_source - ## - # RPC-specific configuration for `list_google_api_sources` - # @return [::Gapic::Config::Method] - # - attr_reader :list_google_api_sources - ## - # RPC-specific configuration for `create_google_api_source` - # @return [::Gapic::Config::Method] - # - attr_reader :create_google_api_source - ## - # RPC-specific configuration for `update_google_api_source` - # @return [::Gapic::Config::Method] - # - attr_reader :update_google_api_source - ## - # RPC-specific configuration for `delete_google_api_source` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_google_api_source - - # @private - def initialize parent_rpcs = nil - get_trigger_config = parent_rpcs.get_trigger if parent_rpcs.respond_to? :get_trigger - @get_trigger = ::Gapic::Config::Method.new get_trigger_config - list_triggers_config = parent_rpcs.list_triggers if parent_rpcs.respond_to? :list_triggers - @list_triggers = ::Gapic::Config::Method.new list_triggers_config - create_trigger_config = parent_rpcs.create_trigger if parent_rpcs.respond_to? :create_trigger - @create_trigger = ::Gapic::Config::Method.new create_trigger_config - update_trigger_config = parent_rpcs.update_trigger if parent_rpcs.respond_to? :update_trigger - @update_trigger = ::Gapic::Config::Method.new update_trigger_config - delete_trigger_config = parent_rpcs.delete_trigger if parent_rpcs.respond_to? :delete_trigger - @delete_trigger = ::Gapic::Config::Method.new delete_trigger_config - get_channel_config = parent_rpcs.get_channel if parent_rpcs.respond_to? :get_channel - @get_channel = ::Gapic::Config::Method.new get_channel_config - list_channels_config = parent_rpcs.list_channels if parent_rpcs.respond_to? :list_channels - @list_channels = ::Gapic::Config::Method.new list_channels_config - create_channel_config = parent_rpcs.create_channel if parent_rpcs.respond_to? :create_channel - @create_channel = ::Gapic::Config::Method.new create_channel_config - update_channel_config = parent_rpcs.update_channel if parent_rpcs.respond_to? :update_channel - @update_channel = ::Gapic::Config::Method.new update_channel_config - delete_channel_config = parent_rpcs.delete_channel if parent_rpcs.respond_to? :delete_channel - @delete_channel = ::Gapic::Config::Method.new delete_channel_config - get_provider_config = parent_rpcs.get_provider if parent_rpcs.respond_to? :get_provider - @get_provider = ::Gapic::Config::Method.new get_provider_config - list_providers_config = parent_rpcs.list_providers if parent_rpcs.respond_to? :list_providers - @list_providers = ::Gapic::Config::Method.new list_providers_config - get_channel_connection_config = parent_rpcs.get_channel_connection if parent_rpcs.respond_to? :get_channel_connection - @get_channel_connection = ::Gapic::Config::Method.new get_channel_connection_config - list_channel_connections_config = parent_rpcs.list_channel_connections if parent_rpcs.respond_to? :list_channel_connections - @list_channel_connections = ::Gapic::Config::Method.new list_channel_connections_config - create_channel_connection_config = parent_rpcs.create_channel_connection if parent_rpcs.respond_to? :create_channel_connection - @create_channel_connection = ::Gapic::Config::Method.new create_channel_connection_config - delete_channel_connection_config = parent_rpcs.delete_channel_connection if parent_rpcs.respond_to? :delete_channel_connection - @delete_channel_connection = ::Gapic::Config::Method.new delete_channel_connection_config - get_google_channel_config_config = parent_rpcs.get_google_channel_config if parent_rpcs.respond_to? :get_google_channel_config - @get_google_channel_config = ::Gapic::Config::Method.new get_google_channel_config_config - update_google_channel_config_config = parent_rpcs.update_google_channel_config if parent_rpcs.respond_to? :update_google_channel_config - @update_google_channel_config = ::Gapic::Config::Method.new update_google_channel_config_config - get_message_bus_config = parent_rpcs.get_message_bus if parent_rpcs.respond_to? :get_message_bus - @get_message_bus = ::Gapic::Config::Method.new get_message_bus_config - list_message_buses_config = parent_rpcs.list_message_buses if parent_rpcs.respond_to? :list_message_buses - @list_message_buses = ::Gapic::Config::Method.new list_message_buses_config - list_message_bus_enrollments_config = parent_rpcs.list_message_bus_enrollments if parent_rpcs.respond_to? :list_message_bus_enrollments - @list_message_bus_enrollments = ::Gapic::Config::Method.new list_message_bus_enrollments_config - create_message_bus_config = parent_rpcs.create_message_bus if parent_rpcs.respond_to? :create_message_bus - @create_message_bus = ::Gapic::Config::Method.new create_message_bus_config - update_message_bus_config = parent_rpcs.update_message_bus if parent_rpcs.respond_to? :update_message_bus - @update_message_bus = ::Gapic::Config::Method.new update_message_bus_config - delete_message_bus_config = parent_rpcs.delete_message_bus if parent_rpcs.respond_to? :delete_message_bus - @delete_message_bus = ::Gapic::Config::Method.new delete_message_bus_config - get_enrollment_config = parent_rpcs.get_enrollment if parent_rpcs.respond_to? :get_enrollment - @get_enrollment = ::Gapic::Config::Method.new get_enrollment_config - list_enrollments_config = parent_rpcs.list_enrollments if parent_rpcs.respond_to? :list_enrollments - @list_enrollments = ::Gapic::Config::Method.new list_enrollments_config - create_enrollment_config = parent_rpcs.create_enrollment if parent_rpcs.respond_to? :create_enrollment - @create_enrollment = ::Gapic::Config::Method.new create_enrollment_config - update_enrollment_config = parent_rpcs.update_enrollment if parent_rpcs.respond_to? :update_enrollment - @update_enrollment = ::Gapic::Config::Method.new update_enrollment_config - delete_enrollment_config = parent_rpcs.delete_enrollment if parent_rpcs.respond_to? :delete_enrollment - @delete_enrollment = ::Gapic::Config::Method.new delete_enrollment_config - get_pipeline_config = parent_rpcs.get_pipeline if parent_rpcs.respond_to? :get_pipeline - @get_pipeline = ::Gapic::Config::Method.new get_pipeline_config - list_pipelines_config = parent_rpcs.list_pipelines if parent_rpcs.respond_to? :list_pipelines - @list_pipelines = ::Gapic::Config::Method.new list_pipelines_config - create_pipeline_config = parent_rpcs.create_pipeline if parent_rpcs.respond_to? :create_pipeline - @create_pipeline = ::Gapic::Config::Method.new create_pipeline_config - update_pipeline_config = parent_rpcs.update_pipeline if parent_rpcs.respond_to? :update_pipeline - @update_pipeline = ::Gapic::Config::Method.new update_pipeline_config - delete_pipeline_config = parent_rpcs.delete_pipeline if parent_rpcs.respond_to? :delete_pipeline - @delete_pipeline = ::Gapic::Config::Method.new delete_pipeline_config - get_google_api_source_config = parent_rpcs.get_google_api_source if parent_rpcs.respond_to? :get_google_api_source - @get_google_api_source = ::Gapic::Config::Method.new get_google_api_source_config - list_google_api_sources_config = parent_rpcs.list_google_api_sources if parent_rpcs.respond_to? :list_google_api_sources - @list_google_api_sources = ::Gapic::Config::Method.new list_google_api_sources_config - create_google_api_source_config = parent_rpcs.create_google_api_source if parent_rpcs.respond_to? :create_google_api_source - @create_google_api_source = ::Gapic::Config::Method.new create_google_api_source_config - update_google_api_source_config = parent_rpcs.update_google_api_source if parent_rpcs.respond_to? :update_google_api_source - @update_google_api_source = ::Gapic::Config::Method.new update_google_api_source_config - delete_google_api_source_config = parent_rpcs.delete_google_api_source if parent_rpcs.respond_to? :delete_google_api_source - @delete_google_api_source = ::Gapic::Config::Method.new delete_google_api_source_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb deleted file mode 100644 index c614b3676ac4..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/operations.rb +++ /dev/null @@ -1,925 +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 Eventarc - module V1 - module Eventarc - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "eventarc.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the Eventarc 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 Eventarc 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::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Eventarc::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "eventarc.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] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/service_stub.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/service_stub.rb deleted file mode 100644 index f2628aad0e57..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc/rest/service_stub.rb +++ /dev/null @@ -1,2474 +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/eventarc/v1/eventarc_pb" - -module Google - module Cloud - module Eventarc - module V1 - module Eventarc - module Rest - ## - # REST service stub for the Eventarc 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 get_trigger REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetTriggerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::Trigger] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::Trigger] - # A result object deserialized from the server's reply - def get_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_trigger_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_trigger", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::Trigger.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_triggers REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListTriggersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::ListTriggersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::ListTriggersResponse] - # A result object deserialized from the server's reply - def list_triggers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_triggers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_triggers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::ListTriggersResponse.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_trigger REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreateTriggerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_trigger_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_trigger", - 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_trigger REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateTriggerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_trigger_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_trigger", - 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_trigger REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteTriggerRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_trigger request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_trigger_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_trigger", - 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_channel REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::Channel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::Channel] - # A result object deserialized from the server's reply - def get_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_channel_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_channel", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::Channel.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_channels REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListChannelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::ListChannelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::ListChannelsResponse] - # A result object deserialized from the server's reply - def list_channels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_channels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_channels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::ListChannelsResponse.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_channel REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreateChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_channel_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_channel", - 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_channel REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_channel_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_channel", - 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_channel REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_channel_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_channel", - 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_provider REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetProviderRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::Provider] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::Provider] - # A result object deserialized from the server's reply - def get_provider request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_provider_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_provider", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::Provider.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_providers REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListProvidersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::ListProvidersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::ListProvidersResponse] - # A result object deserialized from the server's reply - def list_providers request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_providers_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_providers", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::ListProvidersResponse.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_channel_connection REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::ChannelConnection] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::ChannelConnection] - # A result object deserialized from the server's reply - def get_channel_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_channel_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_channel_connection", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::ChannelConnection.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_channel_connections REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse] - # A result object deserialized from the server's reply - def list_channel_connections request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_channel_connections_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_channel_connections", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse.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_channel_connection REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_channel_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_channel_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_channel_connection", - 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_channel_connection REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_channel_connection request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_channel_connection_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_channel_connection", - 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_google_channel_config REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] - # A result object deserialized from the server's reply - def get_google_channel_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_google_channel_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_google_channel_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::GoogleChannelConfig.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_google_channel_config REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] - # A result object deserialized from the server's reply - def update_google_channel_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_google_channel_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_google_channel_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::GoogleChannelConfig.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_message_bus REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetMessageBusRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::MessageBus] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::MessageBus] - # A result object deserialized from the server's reply - def get_message_bus request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_message_bus_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_message_bus", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::MessageBus.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_message_buses REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListMessageBusesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::ListMessageBusesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::ListMessageBusesResponse] - # A result object deserialized from the server's reply - def list_message_buses request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_message_buses_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_message_buses", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::ListMessageBusesResponse.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_message_bus_enrollments REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse] - # A result object deserialized from the server's reply - def list_message_bus_enrollments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_message_bus_enrollments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_message_bus_enrollments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse.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_message_bus REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreateMessageBusRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_message_bus request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_message_bus_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_message_bus", - 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_message_bus REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_message_bus request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_message_bus_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_message_bus", - 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_message_bus REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_message_bus request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_message_bus_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_message_bus", - 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_enrollment REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetEnrollmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::Enrollment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::Enrollment] - # A result object deserialized from the server's reply - def get_enrollment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_enrollment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_enrollment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::Enrollment.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_enrollments REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse] - # A result object deserialized from the server's reply - def list_enrollments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_enrollments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_enrollments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse.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_enrollment REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_enrollment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_enrollment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_enrollment", - 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_enrollment REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_enrollment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_enrollment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_enrollment", - 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_enrollment REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_enrollment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_enrollment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_enrollment", - 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_pipeline REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetPipelineRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::Pipeline] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::Pipeline] - # A result object deserialized from the server's reply - def get_pipeline request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_pipeline_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_pipeline", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::Pipeline.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_pipelines REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListPipelinesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::ListPipelinesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::ListPipelinesResponse] - # A result object deserialized from the server's reply - def list_pipelines request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_pipelines_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_pipelines", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::ListPipelinesResponse.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_pipeline REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreatePipelineRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_pipeline request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_pipeline_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_pipeline", - 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_pipeline REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdatePipelineRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_pipeline request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_pipeline_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_pipeline", - 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_pipeline REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeletePipelineRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_pipeline request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_pipeline_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_pipeline", - 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_google_api_source REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::GoogleApiSource] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource] - # A result object deserialized from the server's reply - def get_google_api_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_google_api_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_google_api_source", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::GoogleApiSource.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_google_api_sources REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse] - # A result object deserialized from the server's reply - def list_google_api_sources request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_google_api_sources_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_google_api_sources", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse.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_google_api_source REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_google_api_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_google_api_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_google_api_source", - 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_google_api_source REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_google_api_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_google_api_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_google_api_source", - 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_google_api_source REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_google_api_source request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_google_api_source_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_google_api_source", - 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 get_trigger REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetTriggerRequest] - # 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_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_triggers REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListTriggersRequest] - # 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_triggers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/triggers", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_trigger REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreateTriggerRequest] - # 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_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/triggers", - body: "trigger", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_trigger REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateTriggerRequest] - # 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_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{trigger.name}", - body: "trigger", - matches: [ - ["trigger.name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_trigger REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteTriggerRequest] - # 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_trigger_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/triggers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_channel REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetChannelRequest] - # 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_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_channels REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListChannelsRequest] - # 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_channels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/channels", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_channel REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreateChannelRequest] - # 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_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/channels", - body: "channel", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_channel REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateChannelRequest] - # 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_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{channel.name}", - body: "channel", - matches: [ - ["channel.name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_channel REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteChannelRequest] - # 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_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_provider REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetProviderRequest] - # 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_provider_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/providers/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_providers REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListProvidersRequest] - # 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_providers_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/providers", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_channel_connection REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest] - # 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_channel_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_channel_connections REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest] - # 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_channel_connections_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/channelConnections", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_channel_connection REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest] - # 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_channel_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/channelConnections", - body: "channel_connection", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_channel_connection REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest] - # 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_channel_connection_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/channelConnections/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_google_channel_config REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest] - # 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_google_channel_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/googleChannelConfig/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_google_channel_config REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest] - # 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_google_channel_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{google_channel_config.name}", - body: "google_channel_config", - matches: [ - ["google_channel_config.name", %r{^projects/[^/]+/locations/[^/]+/googleChannelConfig/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_message_bus REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetMessageBusRequest] - # 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_message_bus_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_message_buses REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListMessageBusesRequest] - # 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_message_buses_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/messageBuses", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_message_bus_enrollments REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest] - # 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_message_bus_enrollments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}:listEnrollments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_message_bus REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreateMessageBusRequest] - # 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_message_bus_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/messageBuses", - body: "message_bus", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_message_bus REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest] - # 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_message_bus_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{message_bus.name}", - body: "message_bus", - matches: [ - ["message_bus.name", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_message_bus REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest] - # 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_message_bus_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/messageBuses/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_enrollment REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetEnrollmentRequest] - # 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_enrollment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_enrollments REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest] - # 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_enrollments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/enrollments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_enrollment REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest] - # 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_enrollment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/enrollments", - body: "enrollment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_enrollment REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest] - # 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_enrollment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{enrollment.name}", - body: "enrollment", - matches: [ - ["enrollment.name", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_enrollment REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest] - # 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_enrollment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/enrollments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_pipeline REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetPipelineRequest] - # 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_pipeline_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_pipelines REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListPipelinesRequest] - # 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_pipelines_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/pipelines", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_pipeline REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreatePipelineRequest] - # 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_pipeline_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/pipelines", - body: "pipeline", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_pipeline REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdatePipelineRequest] - # 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_pipeline_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{pipeline.name}", - body: "pipeline", - matches: [ - ["pipeline.name", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_pipeline REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeletePipelineRequest] - # 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_pipeline_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/pipelines/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_google_api_source REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest] - # 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_google_api_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_google_api_sources REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest] - # 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_google_api_sources_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/googleApiSources", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_google_api_source REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest] - # 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_google_api_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/googleApiSources", - body: "google_api_source", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_google_api_source REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest] - # 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_google_api_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{google_api_source.name}", - body: "google_api_source", - matches: [ - ["google_api_source.name", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_google_api_source REST call - # - # @param request_pb [::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest] - # 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_google_api_source_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/googleApiSources/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_pb.rb deleted file mode 100644 index aec41989c61a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_pb.rb +++ /dev/null @@ -1,118 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/eventarc/v1/eventarc.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/eventarc/v1/channel_pb' -require 'google/cloud/eventarc/v1/channel_connection_pb' -require 'google/cloud/eventarc/v1/discovery_pb' -require 'google/cloud/eventarc/v1/enrollment_pb' -require 'google/cloud/eventarc/v1/google_api_source_pb' -require 'google/cloud/eventarc/v1/google_channel_config_pb' -require 'google/cloud/eventarc/v1/message_bus_pb' -require 'google/cloud/eventarc/v1/pipeline_pb' -require 'google/cloud/eventarc/v1/trigger_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\'google/cloud/eventarc/v1/eventarc.proto\x12\x18google.cloud.eventarc.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/eventarc/v1/channel.proto\x1a\x31google/cloud/eventarc/v1/channel_connection.proto\x1a(google/cloud/eventarc/v1/discovery.proto\x1a)google/cloud/eventarc/v1/enrollment.proto\x1a\x30google/cloud/eventarc/v1/google_api_source.proto\x1a\x34google/cloud/eventarc/v1/google_channel_config.proto\x1a*google/cloud/eventarc/v1/message_bus.proto\x1a\'google/cloud/eventarc/v1/pipeline.proto\x1a&google/cloud/eventarc/v1/trigger.proto\x1a#google/longrunning/operations.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"J\n\x11GetTriggerRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Trigger\"\x97\x01\n\x13ListTriggersRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x65ventarc.googleapis.com/Trigger\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"y\n\x14ListTriggersResponse\x12\x33\n\x08triggers\x18\x01 \x03(\x0b\x32!.google.cloud.eventarc.v1.Trigger\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbd\x01\n\x14\x43reateTriggerRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x65ventarc.googleapis.com/Trigger\x12\x37\n\x07trigger\x18\x02 \x01(\x0b\x32!.google.cloud.eventarc.v1.TriggerB\x03\xe0\x41\x02\x12\x17\n\ntrigger_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xae\x01\n\x14UpdateTriggerRequest\x12\x32\n\x07trigger\x18\x01 \x01(\x0b\x32!.google.cloud.eventarc.v1.Trigger\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x8e\x01\n\x14\x44\x65leteTriggerRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Trigger\x12\x0c\n\x04\x65tag\x18\x02 \x01(\t\x12\x15\n\rallow_missing\x18\x03 \x01(\x08\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"J\n\x11GetChannelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Channel\"\x87\x01\n\x13ListChannelsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x65ventarc.googleapis.com/Channel\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x04 \x01(\t\"y\n\x14ListChannelsResponse\x12\x33\n\x08\x63hannels\x18\x01 \x03(\x0b\x32!.google.cloud.eventarc.v1.Channel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xbd\x01\n\x14\x43reateChannelRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\x12\x1f\x65ventarc.googleapis.com/Channel\x12\x37\n\x07\x63hannel\x18\x02 \x01(\x0b\x32!.google.cloud.eventarc.v1.ChannelB\x03\xe0\x41\x02\x12\x17\n\nchannel_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x97\x01\n\x14UpdateChannelRequest\x12\x32\n\x07\x63hannel\x18\x01 \x01(\x0b\x32!.google.cloud.eventarc.v1.Channel\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\x12\x1a\n\rvalidate_only\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"i\n\x14\x44\x65leteChannelRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Channel\x12\x1a\n\rvalidate_only\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\"L\n\x12GetProviderRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n eventarc.googleapis.com/Provider\"\x99\x01\n\x14ListProvidersRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 eventarc.googleapis.com/Provider\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x10\n\x08order_by\x18\x04 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x05 \x01(\t\"|\n\x15ListProvidersResponse\x12\x35\n\tproviders\x18\x01 \x03(\x0b\x32\".google.cloud.eventarc.v1.Provider\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"^\n\x1bGetChannelConnectionRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)eventarc.googleapis.com/ChannelConnection\"\x89\x01\n\x1dListChannelConnectionsRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)eventarc.googleapis.com/ChannelConnection\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\"\x98\x01\n\x1eListChannelConnectionsResponse\x12H\n\x13\x63hannel_connections\x18\x01 \x03(\x0b\x32+.google.cloud.eventarc.v1.ChannelConnection\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xd5\x01\n\x1e\x43reateChannelConnectionRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)eventarc.googleapis.com/ChannelConnection\x12L\n\x12\x63hannel_connection\x18\x02 \x01(\x0b\x32+.google.cloud.eventarc.v1.ChannelConnectionB\x03\xe0\x41\x02\x12\"\n\x15\x63hannel_connection_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"a\n\x1e\x44\x65leteChannelConnectionRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)eventarc.googleapis.com/ChannelConnection\"\xa6\x01\n UpdateGoogleChannelConfigRequest\x12Q\n\x15google_channel_config\x18\x01 \x01(\x0b\x32-.google.cloud.eventarc.v1.GoogleChannelConfigB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"b\n\x1dGetGoogleChannelConfigRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+eventarc.googleapis.com/GoogleChannelConfig\"P\n\x14GetMessageBusRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"eventarc.googleapis.com/MessageBus\"\xb2\x01\n\x17ListMessageBusesRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"eventarc.googleapis.com/MessageBus\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\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x85\x01\n\x18ListMessageBusesResponse\x12;\n\rmessage_buses\x18\x01 \x03(\x0b\x32$.google.cloud.eventarc.v1.MessageBus\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\x8f\x01\n ListMessageBusEnrollmentsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"eventarc.googleapis.com/MessageBus\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!ListMessageBusEnrollmentsResponse\x12\x13\n\x0b\x65nrollments\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xce\x01\n\x17\x43reateMessageBusRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"eventarc.googleapis.com/MessageBus\x12>\n\x0bmessage_bus\x18\x02 \x01(\x0b\x32$.google.cloud.eventarc.v1.MessageBusB\x03\xe0\x41\x02\x12\x1b\n\x0emessage_bus_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xc7\x01\n\x17UpdateMessageBusRequest\x12>\n\x0bmessage_bus\x18\x01 \x01(\x0b\x32$.google.cloud.eventarc.v1.MessageBusB\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\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x9e\x01\n\x17\x44\x65leteMessageBusRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"eventarc.googleapis.com/MessageBus\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"P\n\x14GetEnrollmentRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"eventarc.googleapis.com/Enrollment\"\xb1\x01\n\x16ListEnrollmentsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"eventarc.googleapis.com/Enrollment\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\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x82\x01\n\x17ListEnrollmentsResponse\x12\x39\n\x0b\x65nrollments\x18\x01 \x03(\x0b\x32$.google.cloud.eventarc.v1.Enrollment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xcc\x01\n\x17\x43reateEnrollmentRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"eventarc.googleapis.com/Enrollment\x12=\n\nenrollment\x18\x02 \x01(\x0b\x32$.google.cloud.eventarc.v1.EnrollmentB\x03\xe0\x41\x02\x12\x1a\n\renrollment_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xc6\x01\n\x17UpdateEnrollmentRequest\x12=\n\nenrollment\x18\x01 \x01(\x0b\x32$.google.cloud.eventarc.v1.EnrollmentB\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\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x9e\x01\n\x17\x44\x65leteEnrollmentRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"eventarc.googleapis.com/Enrollment\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"L\n\x12GetPipelineRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n eventarc.googleapis.com/Pipeline\"\xad\x01\n\x14ListPipelinesRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 eventarc.googleapis.com/Pipeline\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\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"|\n\x15ListPipelinesResponse\x12\x35\n\tpipelines\x18\x01 \x03(\x0b\x32\".google.cloud.eventarc.v1.Pipeline\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xc2\x01\n\x15\x43reatePipelineRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\x12 eventarc.googleapis.com/Pipeline\x12\x39\n\x08pipeline\x18\x02 \x01(\x0b\x32\".google.cloud.eventarc.v1.PipelineB\x03\xe0\x41\x02\x12\x18\n\x0bpipeline_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xc0\x01\n\x15UpdatePipelineRequest\x12\x39\n\x08pipeline\x18\x01 \x01(\x0b\x32\".google.cloud.eventarc.v1.PipelineB\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\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\x9a\x01\n\x15\x44\x65letePipelineRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n eventarc.googleapis.com/Pipeline\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"Z\n\x19GetGoogleApiSourceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'eventarc.googleapis.com/GoogleApiSource\"\xbb\x01\n\x1bListGoogleApiSourcesRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'eventarc.googleapis.com/GoogleApiSource\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\x15\n\x08order_by\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06\x66ilter\x18\x05 \x01(\tB\x03\xe0\x41\x01\"\x93\x01\n\x1cListGoogleApiSourcesResponse\x12\x45\n\x12google_api_sources\x18\x01 \x03(\x0b\x32).google.cloud.eventarc.v1.GoogleApiSource\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xe9\x01\n\x1c\x43reateGoogleApiSourceRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\x12\'eventarc.googleapis.com/GoogleApiSource\x12I\n\x11google_api_source\x18\x02 \x01(\x0b\x32).google.cloud.eventarc.v1.GoogleApiSourceB\x03\xe0\x41\x02\x12!\n\x14google_api_source_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xd7\x01\n\x1cUpdateGoogleApiSourceRequest\x12I\n\x11google_api_source\x18\x01 \x01(\x0b\x32).google.cloud.eventarc.v1.GoogleApiSourceB\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\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\xa8\x01\n\x1c\x44\x65leteGoogleApiSourceRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'eventarc.googleapis.com/GoogleApiSource\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rallow_missing\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\"\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\x32\xf5@\n\x08\x45ventarc\x12\x99\x01\n\nGetTrigger\x12+.google.cloud.eventarc.v1.GetTriggerRequest\x1a!.google.cloud.eventarc.v1.Trigger\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/triggers/*}\x12\xac\x01\n\x0cListTriggers\x12-.google.cloud.eventarc.v1.ListTriggersRequest\x1a..google.cloud.eventarc.v1.ListTriggersResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/triggers\x12\xd8\x01\n\rCreateTrigger\x12..google.cloud.eventarc.v1.CreateTriggerRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x1c\n\x07Trigger\x12\x11OperationMetadata\xda\x41\x19parent,trigger,trigger_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/triggers:\x07trigger\x12\xe9\x01\n\rUpdateTrigger\x12..google.cloud.eventarc.v1.UpdateTriggerRequest\x1a\x1d.google.longrunning.Operation\"\x88\x01\xca\x41\x1c\n\x07Trigger\x12\x11OperationMetadata\xda\x41!trigger,update_mask,allow_missing\x82\xd3\xe4\x93\x02?24/v1/{trigger.name=projects/*/locations/*/triggers/*}:\x07trigger\x12\xc8\x01\n\rDeleteTrigger\x12..google.cloud.eventarc.v1.DeleteTriggerRequest\x1a\x1d.google.longrunning.Operation\"h\xca\x41\x1c\n\x07Trigger\x12\x11OperationMetadata\xda\x41\x12name,allow_missing\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/triggers/*}\x12\x99\x01\n\nGetChannel\x12+.google.cloud.eventarc.v1.GetChannelRequest\x1a!.google.cloud.eventarc.v1.Channel\";\xda\x41\x04name\x82\xd3\xe4\x93\x02.\x12,/v1/{name=projects/*/locations/*/channels/*}\x12\xac\x01\n\x0cListChannels\x12-.google.cloud.eventarc.v1.ListChannelsRequest\x1a..google.cloud.eventarc.v1.ListChannelsResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v1/{parent=projects/*/locations/*}/channels\x12\xd8\x01\n\rCreateChannel\x12..google.cloud.eventarc.v1.CreateChannelRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x1c\n\x07\x43hannel\x12\x11OperationMetadata\xda\x41\x19parent,channel,channel_id\x82\xd3\xe4\x93\x02\x37\",/v1/{parent=projects/*/locations/*}/channels:\x07\x63hannel\x12\xda\x01\n\rUpdateChannel\x12..google.cloud.eventarc.v1.UpdateChannelRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1c\n\x07\x43hannel\x12\x11OperationMetadata\xda\x41\x13\x63hannel,update_mask\x82\xd3\xe4\x93\x02?24/v1/{channel.name=projects/*/locations/*/channels/*}:\x07\x63hannel\x12\xba\x01\n\rDeleteChannel\x12..google.cloud.eventarc.v1.DeleteChannelRequest\x1a\x1d.google.longrunning.Operation\"Z\xca\x41\x1c\n\x07\x43hannel\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02.*,/v1/{name=projects/*/locations/*/channels/*}\x12\x9d\x01\n\x0bGetProvider\x12,.google.cloud.eventarc.v1.GetProviderRequest\x1a\".google.cloud.eventarc.v1.Provider\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/providers/*}\x12\xb0\x01\n\rListProviders\x12..google.cloud.eventarc.v1.ListProvidersRequest\x1a/.google.cloud.eventarc.v1.ListProvidersResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/providers\x12\xc1\x01\n\x14GetChannelConnection\x12\x35.google.cloud.eventarc.v1.GetChannelConnectionRequest\x1a+.google.cloud.eventarc.v1.ChannelConnection\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/channelConnections/*}\x12\xd4\x01\n\x16ListChannelConnections\x12\x37.google.cloud.eventarc.v1.ListChannelConnectionsRequest\x1a\x38.google.cloud.eventarc.v1.ListChannelConnectionsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*}/channelConnections\x12\xa2\x02\n\x17\x43reateChannelConnection\x12\x38.google.cloud.eventarc.v1.CreateChannelConnectionRequest\x1a\x1d.google.longrunning.Operation\"\xad\x01\xca\x41&\n\x11\x43hannelConnection\x12\x11OperationMetadata\xda\x41/parent,channel_connection,channel_connection_id\x82\xd3\xe4\x93\x02L\"6/v1/{parent=projects/*/locations/*}/channelConnections:\x12\x63hannel_connection\x12\xe2\x01\n\x17\x44\x65leteChannelConnection\x12\x38.google.cloud.eventarc.v1.DeleteChannelConnectionRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41&\n\x11\x43hannelConnection\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38*6/v1/{name=projects/*/locations/*/channelConnections/*}\x12\xc6\x01\n\x16GetGoogleChannelConfig\x12\x37.google.cloud.eventarc.v1.GetGoogleChannelConfigRequest\x1a-.google.cloud.eventarc.v1.GoogleChannelConfig\"D\xda\x41\x04name\x82\xd3\xe4\x93\x02\x37\x12\x35/v1/{name=projects/*/locations/*/googleChannelConfig}\x12\x97\x02\n\x19UpdateGoogleChannelConfig\x12:.google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest\x1a-.google.cloud.eventarc.v1.GoogleChannelConfig\"\x8e\x01\xda\x41!google_channel_config,update_mask\x82\xd3\xe4\x93\x02\x64\x32K/v1/{google_channel_config.name=projects/*/locations/*/googleChannelConfig}:\x15google_channel_config\x12\xa6\x01\n\rGetMessageBus\x12..google.cloud.eventarc.v1.GetMessageBusRequest\x1a$.google.cloud.eventarc.v1.MessageBus\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/messageBuses/*}\x12\xbc\x01\n\x10ListMessageBuses\x12\x31.google.cloud.eventarc.v1.ListMessageBusesRequest\x1a\x32.google.cloud.eventarc.v1.ListMessageBusesResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/messageBuses\x12\xe9\x01\n\x19ListMessageBusEnrollments\x12:.google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest\x1a;.google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1/{parent=projects/*/locations/*/messageBuses/*}:listEnrollments\x12\xf2\x01\n\x10\x43reateMessageBus\x12\x31.google.cloud.eventarc.v1.CreateMessageBusRequest\x1a\x1d.google.longrunning.Operation\"\x8b\x01\xca\x41\x1f\n\nMessageBus\x12\x11OperationMetadata\xda\x41!parent,message_bus,message_bus_id\x82\xd3\xe4\x93\x02?\"0/v1/{parent=projects/*/locations/*}/messageBuses:\x0bmessage_bus\x12\xf4\x01\n\x10UpdateMessageBus\x12\x31.google.cloud.eventarc.v1.UpdateMessageBusRequest\x1a\x1d.google.longrunning.Operation\"\x8d\x01\xca\x41\x1f\n\nMessageBus\x12\x11OperationMetadata\xda\x41\x17message_bus,update_mask\x82\xd3\xe4\x93\x02K2\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/enrollments/*}\x12\xb8\x01\n\x0fListEnrollments\x12\x30.google.cloud.eventarc.v1.ListEnrollmentsRequest\x1a\x31.google.cloud.eventarc.v1.ListEnrollmentsResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/enrollments\x12\xee\x01\n\x10\x43reateEnrollment\x12\x31.google.cloud.eventarc.v1.CreateEnrollmentRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1f\n\nEnrollment\x12\x11OperationMetadata\xda\x41\x1fparent,enrollment,enrollment_id\x82\xd3\xe4\x93\x02=\"//v1/{parent=projects/*/locations/*}/enrollments:\nenrollment\x12\xf0\x01\n\x10UpdateEnrollment\x12\x31.google.cloud.eventarc.v1.UpdateEnrollmentRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1f\n\nEnrollment\x12\x11OperationMetadata\xda\x41\x16\x65nrollment,update_mask\x82\xd3\xe4\x93\x02H2:/v1/{enrollment.name=projects/*/locations/*/enrollments/*}:\nenrollment\x12\xcb\x01\n\x10\x44\x65leteEnrollment\x12\x31.google.cloud.eventarc.v1.DeleteEnrollmentRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41\x1f\n\nEnrollment\x12\x11OperationMetadata\xda\x41\tname,etag\x82\xd3\xe4\x93\x02\x31*//v1/{name=projects/*/locations/*/enrollments/*}\x12\x9d\x01\n\x0bGetPipeline\x12,.google.cloud.eventarc.v1.GetPipelineRequest\x1a\".google.cloud.eventarc.v1.Pipeline\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/pipelines/*}\x12\xb0\x01\n\rListPipelines\x12..google.cloud.eventarc.v1.ListPipelinesRequest\x1a/.google.cloud.eventarc.v1.ListPipelinesResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/pipelines\x12\xdf\x01\n\x0e\x43reatePipeline\x12/.google.cloud.eventarc.v1.CreatePipelineRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Pipeline\x12\x11OperationMetadata\xda\x41\x1bparent,pipeline,pipeline_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/pipelines:\x08pipeline\x12\xe1\x01\n\x0eUpdatePipeline\x12/.google.cloud.eventarc.v1.UpdatePipelineRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Pipeline\x12\x11OperationMetadata\xda\x41\x14pipeline,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{pipeline.name=projects/*/locations/*/pipelines/*}:\x08pipeline\x12\xc3\x01\n\x0e\x44\x65letePipeline\x12/.google.cloud.eventarc.v1.DeletePipelineRequest\x1a\x1d.google.longrunning.Operation\"a\xca\x41\x1d\n\x08Pipeline\x12\x11OperationMetadata\xda\x41\tname,etag\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/pipelines/*}\x12\xb9\x01\n\x12GetGoogleApiSource\x12\x33.google.cloud.eventarc.v1.GetGoogleApiSourceRequest\x1a).google.cloud.eventarc.v1.GoogleApiSource\"C\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{name=projects/*/locations/*/googleApiSources/*}\x12\xcc\x01\n\x14ListGoogleApiSources\x12\x35.google.cloud.eventarc.v1.ListGoogleApiSourcesRequest\x1a\x36.google.cloud.eventarc.v1.ListGoogleApiSourcesResponse\"E\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x36\x12\x34/v1/{parent=projects/*/locations/*}/googleApiSources\x12\x97\x02\n\x15\x43reateGoogleApiSource\x12\x36.google.cloud.eventarc.v1.CreateGoogleApiSourceRequest\x1a\x1d.google.longrunning.Operation\"\xa6\x01\xca\x41$\n\x0fGoogleApiSource\x12\x11OperationMetadata\xda\x41-parent,google_api_source,google_api_source_id\x82\xd3\xe4\x93\x02I\"4/v1/{parent=projects/*/locations/*}/googleApiSources:\x11google_api_source\x12\x99\x02\n\x15UpdateGoogleApiSource\x12\x36.google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest\x1a\x1d.google.longrunning.Operation\"\xa8\x01\xca\x41$\n\x0fGoogleApiSource\x12\x11OperationMetadata\xda\x41\x1dgoogle_api_source,update_mask\x82\xd3\xe4\x93\x02[2F/v1/{google_api_source.name=projects/*/locations/*/googleApiSources/*}:\x11google_api_source\x12\xdf\x01\n\x15\x44\x65leteGoogleApiSource\x12\x36.google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41$\n\x0fGoogleApiSource\x12\x11OperationMetadata\xda\x41\tname,etag\x82\xd3\xe4\x93\x02\x36*4/v1/{name=projects/*/locations/*/googleApiSources/*}\x1aK\xca\x41\x17\x65ventarc.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xbd\x01\n\x1c\x63om.google.cloud.eventarc.v1B\rEventarcProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.cloud.eventarc.v1.Trigger", "google/cloud/eventarc/v1/trigger.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.cloud.eventarc.v1.Channel", "google/cloud/eventarc/v1/channel.proto"], - ["google.cloud.eventarc.v1.Provider", "google/cloud/eventarc/v1/discovery.proto"], - ["google.cloud.eventarc.v1.ChannelConnection", "google/cloud/eventarc/v1/channel_connection.proto"], - ["google.cloud.eventarc.v1.GoogleChannelConfig", "google/cloud/eventarc/v1/google_channel_config.proto"], - ["google.cloud.eventarc.v1.MessageBus", "google/cloud/eventarc/v1/message_bus.proto"], - ["google.cloud.eventarc.v1.Enrollment", "google/cloud/eventarc/v1/enrollment.proto"], - ["google.cloud.eventarc.v1.Pipeline", "google/cloud/eventarc/v1/pipeline.proto"], - ["google.cloud.eventarc.v1.GoogleApiSource", "google/cloud/eventarc/v1/google_api_source.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Eventarc - module V1 - GetTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetTriggerRequest").msgclass - ListTriggersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListTriggersRequest").msgclass - ListTriggersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListTriggersResponse").msgclass - CreateTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreateTriggerRequest").msgclass - UpdateTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdateTriggerRequest").msgclass - DeleteTriggerRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeleteTriggerRequest").msgclass - GetChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetChannelRequest").msgclass - ListChannelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListChannelsRequest").msgclass - ListChannelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListChannelsResponse").msgclass - CreateChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreateChannelRequest").msgclass - UpdateChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdateChannelRequest").msgclass - DeleteChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeleteChannelRequest").msgclass - GetProviderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetProviderRequest").msgclass - ListProvidersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListProvidersRequest").msgclass - ListProvidersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListProvidersResponse").msgclass - GetChannelConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetChannelConnectionRequest").msgclass - ListChannelConnectionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListChannelConnectionsRequest").msgclass - ListChannelConnectionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListChannelConnectionsResponse").msgclass - CreateChannelConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreateChannelConnectionRequest").msgclass - DeleteChannelConnectionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeleteChannelConnectionRequest").msgclass - UpdateGoogleChannelConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdateGoogleChannelConfigRequest").msgclass - GetGoogleChannelConfigRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetGoogleChannelConfigRequest").msgclass - GetMessageBusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetMessageBusRequest").msgclass - ListMessageBusesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListMessageBusesRequest").msgclass - ListMessageBusesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListMessageBusesResponse").msgclass - ListMessageBusEnrollmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListMessageBusEnrollmentsRequest").msgclass - ListMessageBusEnrollmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListMessageBusEnrollmentsResponse").msgclass - CreateMessageBusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreateMessageBusRequest").msgclass - UpdateMessageBusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdateMessageBusRequest").msgclass - DeleteMessageBusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeleteMessageBusRequest").msgclass - GetEnrollmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetEnrollmentRequest").msgclass - ListEnrollmentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListEnrollmentsRequest").msgclass - ListEnrollmentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListEnrollmentsResponse").msgclass - CreateEnrollmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreateEnrollmentRequest").msgclass - UpdateEnrollmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdateEnrollmentRequest").msgclass - DeleteEnrollmentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeleteEnrollmentRequest").msgclass - GetPipelineRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetPipelineRequest").msgclass - ListPipelinesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListPipelinesRequest").msgclass - ListPipelinesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListPipelinesResponse").msgclass - CreatePipelineRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreatePipelineRequest").msgclass - UpdatePipelineRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdatePipelineRequest").msgclass - DeletePipelineRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeletePipelineRequest").msgclass - GetGoogleApiSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GetGoogleApiSourceRequest").msgclass - ListGoogleApiSourcesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListGoogleApiSourcesRequest").msgclass - ListGoogleApiSourcesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.ListGoogleApiSourcesResponse").msgclass - CreateGoogleApiSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.CreateGoogleApiSourceRequest").msgclass - UpdateGoogleApiSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.UpdateGoogleApiSourceRequest").msgclass - DeleteGoogleApiSourceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.DeleteGoogleApiSourceRequest").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_services_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_services_pb.rb deleted file mode 100644 index ab08ceb88e7c..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/eventarc_services_pb.rb +++ /dev/null @@ -1,124 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/eventarc/v1/eventarc.proto for package 'Google.Cloud.Eventarc.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/eventarc/v1/eventarc_pb' - -module Google - module Cloud - module Eventarc - module V1 - module Eventarc - # Eventarc allows users to subscribe to various events that are provided by - # Google Cloud services and forward them to supported destinations. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.eventarc.v1.Eventarc' - - # Get a single trigger. - rpc :GetTrigger, ::Google::Cloud::Eventarc::V1::GetTriggerRequest, ::Google::Cloud::Eventarc::V1::Trigger - # List triggers. - rpc :ListTriggers, ::Google::Cloud::Eventarc::V1::ListTriggersRequest, ::Google::Cloud::Eventarc::V1::ListTriggersResponse - # Create a new trigger in a particular project and location. - rpc :CreateTrigger, ::Google::Cloud::Eventarc::V1::CreateTriggerRequest, ::Google::Longrunning::Operation - # Update a single trigger. - rpc :UpdateTrigger, ::Google::Cloud::Eventarc::V1::UpdateTriggerRequest, ::Google::Longrunning::Operation - # Delete a single trigger. - rpc :DeleteTrigger, ::Google::Cloud::Eventarc::V1::DeleteTriggerRequest, ::Google::Longrunning::Operation - # Get a single Channel. - rpc :GetChannel, ::Google::Cloud::Eventarc::V1::GetChannelRequest, ::Google::Cloud::Eventarc::V1::Channel - # List channels. - rpc :ListChannels, ::Google::Cloud::Eventarc::V1::ListChannelsRequest, ::Google::Cloud::Eventarc::V1::ListChannelsResponse - # Create a new channel in a particular project and location. - rpc :CreateChannel, ::Google::Cloud::Eventarc::V1::CreateChannelRequest, ::Google::Longrunning::Operation - # Update a single channel. - rpc :UpdateChannel, ::Google::Cloud::Eventarc::V1::UpdateChannelRequest, ::Google::Longrunning::Operation - # Delete a single channel. - rpc :DeleteChannel, ::Google::Cloud::Eventarc::V1::DeleteChannelRequest, ::Google::Longrunning::Operation - # Get a single Provider. - rpc :GetProvider, ::Google::Cloud::Eventarc::V1::GetProviderRequest, ::Google::Cloud::Eventarc::V1::Provider - # List providers. - rpc :ListProviders, ::Google::Cloud::Eventarc::V1::ListProvidersRequest, ::Google::Cloud::Eventarc::V1::ListProvidersResponse - # Get a single ChannelConnection. - rpc :GetChannelConnection, ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest, ::Google::Cloud::Eventarc::V1::ChannelConnection - # List channel connections. - rpc :ListChannelConnections, ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest, ::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse - # Create a new ChannelConnection in a particular project and location. - rpc :CreateChannelConnection, ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest, ::Google::Longrunning::Operation - # Delete a single ChannelConnection. - rpc :DeleteChannelConnection, ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest, ::Google::Longrunning::Operation - # Get a GoogleChannelConfig. - # The name of the GoogleChannelConfig in the response is ALWAYS coded with - # projectID. - rpc :GetGoogleChannelConfig, ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest, ::Google::Cloud::Eventarc::V1::GoogleChannelConfig - # Update a single GoogleChannelConfig - rpc :UpdateGoogleChannelConfig, ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest, ::Google::Cloud::Eventarc::V1::GoogleChannelConfig - # Get a single MessageBus. - rpc :GetMessageBus, ::Google::Cloud::Eventarc::V1::GetMessageBusRequest, ::Google::Cloud::Eventarc::V1::MessageBus - # List message buses. - rpc :ListMessageBuses, ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest, ::Google::Cloud::Eventarc::V1::ListMessageBusesResponse - # List message bus enrollments. - rpc :ListMessageBusEnrollments, ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest, ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse - # Create a new MessageBus in a particular project and location. - rpc :CreateMessageBus, ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest, ::Google::Longrunning::Operation - # Update a single message bus. - rpc :UpdateMessageBus, ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest, ::Google::Longrunning::Operation - # Delete a single message bus. - rpc :DeleteMessageBus, ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest, ::Google::Longrunning::Operation - # Get a single Enrollment. - rpc :GetEnrollment, ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest, ::Google::Cloud::Eventarc::V1::Enrollment - # List Enrollments. - rpc :ListEnrollments, ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest, ::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse - # Create a new Enrollment in a particular project and location. - rpc :CreateEnrollment, ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest, ::Google::Longrunning::Operation - # Update a single Enrollment. - rpc :UpdateEnrollment, ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest, ::Google::Longrunning::Operation - # Delete a single Enrollment. - rpc :DeleteEnrollment, ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest, ::Google::Longrunning::Operation - # Get a single Pipeline. - rpc :GetPipeline, ::Google::Cloud::Eventarc::V1::GetPipelineRequest, ::Google::Cloud::Eventarc::V1::Pipeline - # List pipelines. - rpc :ListPipelines, ::Google::Cloud::Eventarc::V1::ListPipelinesRequest, ::Google::Cloud::Eventarc::V1::ListPipelinesResponse - # Create a new Pipeline in a particular project and location. - rpc :CreatePipeline, ::Google::Cloud::Eventarc::V1::CreatePipelineRequest, ::Google::Longrunning::Operation - # Update a single pipeline. - rpc :UpdatePipeline, ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest, ::Google::Longrunning::Operation - # Delete a single pipeline. - rpc :DeletePipeline, ::Google::Cloud::Eventarc::V1::DeletePipelineRequest, ::Google::Longrunning::Operation - # Get a single GoogleApiSource. - rpc :GetGoogleApiSource, ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest, ::Google::Cloud::Eventarc::V1::GoogleApiSource - # List GoogleApiSources. - rpc :ListGoogleApiSources, ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest, ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse - # Create a new GoogleApiSource in a particular project and location. - rpc :CreateGoogleApiSource, ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest, ::Google::Longrunning::Operation - # Update a single GoogleApiSource. - rpc :UpdateGoogleApiSource, ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest, ::Google::Longrunning::Operation - # Delete a single GoogleApiSource. - rpc :DeleteGoogleApiSource, ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_api_source_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_api_source_pb.rb deleted file mode 100644 index e3c9e2336923..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_api_source_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/eventarc/v1/google_api_source.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/eventarc/v1/logging_config_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n0google/cloud/eventarc/v1/google_api_source.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/eventarc/v1/logging_config.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x95\t\n\x0fGoogleApiSource\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\x11\n\x04\x65tag\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\x12J\n\x06labels\x18\x06 \x03(\x0b\x32\x35.google.cloud.eventarc.v1.GoogleApiSource.LabelsEntryB\x03\xe0\x41\x01\x12T\n\x0b\x61nnotations\x18\x07 \x03(\x0b\x32:.google.cloud.eventarc.v1.GoogleApiSource.AnnotationsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12?\n\x0b\x64\x65stination\x18\t \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"eventarc.googleapis.com/MessageBus\x12\x42\n\x0f\x63rypto_key_name\x18\n \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x44\n\x0elogging_config\x18\x0b \x01(\x0b\x32\'.google.cloud.eventarc.v1.LoggingConfigB\x03\xe0\x41\x01\x12l\n\x19organization_subscription\x18\x0c \x01(\x0b\x32\x42.google.cloud.eventarc.v1.GoogleApiSource.OrganizationSubscriptionB\x03\xe0\x41\x01H\x00\x12\x64\n\x15project_subscriptions\x18\r \x01(\x0b\x32>.google.cloud.eventarc.v1.GoogleApiSource.ProjectSubscriptionsB\x03\xe0\x41\x01H\x00\x1a)\n\x14ProjectSubscriptions\x12\x11\n\x04list\x18\x01 \x03(\tB\x03\xe0\x41\x02\x1a\x30\n\x18OrganizationSubscription\x12\x14\n\x07\x65nabled\x18\x01 \x01(\x08\x42\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\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x9e\x01\xea\x41\x9a\x01\n\'eventarc.googleapis.com/GoogleApiSource\x12Lprojects/{project}/locations/{location}/googleApiSources/{google_api_source}*\x10googleApiSources2\x0fgoogleApiSourceB\x19\n\x17wide_scope_subscriptionB\xc4\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x14GoogleApiSourceProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.eventarc.v1.LoggingConfig", "google/cloud/eventarc/v1/logging_config.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Eventarc - module V1 - GoogleApiSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GoogleApiSource").msgclass - GoogleApiSource::ProjectSubscriptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GoogleApiSource.ProjectSubscriptions").msgclass - GoogleApiSource::OrganizationSubscription = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GoogleApiSource.OrganizationSubscription").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_channel_config_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_channel_config_pb.rb deleted file mode 100644 index a13ab31abd3f..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/google_channel_config_pb.rb +++ /dev/null @@ -1,47 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/eventarc/v1/google_channel_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/eventarc/v1/google_channel_config.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x03\n\x13GoogleChannelConfig\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x0f\x63rypto_key_name\x18\x07 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12N\n\x06labels\x18\x08 \x03(\x0b\x32\x39.google.cloud.eventarc.v1.GoogleChannelConfig.LabelsEntryB\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:\x99\x01\xea\x41\x95\x01\n+eventarc.googleapis.com/GoogleChannelConfig\x12;projects/{project}/locations/{location}/googleChannelConfig*\x14googleChannelConfigs2\x13googleChannelConfigB\xc3\x02\n\x1c\x63om.google.cloud.eventarc.v1B\x18GoogleChannelConfigProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}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"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Eventarc - module V1 - GoogleChannelConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.GoogleChannelConfig").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/logging_config_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/logging_config_pb.rb deleted file mode 100644 index 0d0339e543e0..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/logging_config_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/eventarc/v1/logging_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' - - -descriptor_data = "\n-google/cloud/eventarc/v1/logging_config.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\"\xf8\x01\n\rLoggingConfig\x12N\n\x0clog_severity\x18\x01 \x01(\x0e\x32\x33.google.cloud.eventarc.v1.LoggingConfig.LogSeverityB\x03\xe0\x41\x01\"\x96\x01\n\x0bLogSeverity\x12\x1c\n\x18LOG_SEVERITY_UNSPECIFIED\x10\x00\x12\x08\n\x04NONE\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02\x12\x08\n\x04INFO\x10\x03\x12\n\n\x06NOTICE\x10\x04\x12\x0b\n\x07WARNING\x10\x05\x12\t\n\x05\x45RROR\x10\x06\x12\x0c\n\x08\x43RITICAL\x10\x07\x12\t\n\x05\x41LERT\x10\x08\x12\r\n\tEMERGENCY\x10\tB\xc2\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x12LoggingConfigProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Eventarc - module V1 - LoggingConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.LoggingConfig").msgclass - LoggingConfig::LogSeverity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.LoggingConfig.LogSeverity").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/message_bus_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/message_bus_pb.rb deleted file mode 100644 index 7eb68a2df02e..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/message_bus_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/eventarc/v1/message_bus.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/eventarc/v1/logging_config_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n*google/cloud/eventarc/v1/message_bus.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/eventarc/v1/logging_config.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xd9\x05\n\nMessageBus\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\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\x45\n\x06labels\x18\x06 \x03(\x0b\x32\x30.google.cloud.eventarc.v1.MessageBus.LabelsEntryB\x03\xe0\x41\x01\x12O\n\x0b\x61nnotations\x18\x07 \x03(\x0b\x32\x35.google.cloud.eventarc.v1.MessageBus.AnnotationsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x08 \x01(\tB\x03\xe0\x41\x01\x12\x42\n\x0f\x63rypto_key_name\x18\n \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x44\n\x0elogging_config\x18\x0b \x01(\x0b\x32\'.google.cloud.eventarc.v1.LoggingConfigB\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\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:\x86\x01\xea\x41\x82\x01\n\"eventarc.googleapis.com/MessageBus\x12\x42projects/{project}/locations/{location}/messageBuses/{message_bus}*\x0cmessageBuses2\nmessageBusB\xbf\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x0fMessageBusProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.eventarc.v1.LoggingConfig", "google/cloud/eventarc/v1/logging_config.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Eventarc - module V1 - MessageBus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.MessageBus").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/network_config_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/network_config_pb.rb deleted file mode 100644 index 3610c18613eb..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/network_config_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/eventarc/v1/network_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n-google/cloud/eventarc/v1/network_config.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"]\n\rNetworkConfig\x12L\n\x12network_attachment\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(compute.googleapis.com/NetworkAttachmentB\xc2\x01\n\x1c\x63om.google.cloud.eventarc.v1B\x12NetworkConfigProtoP\x01Z8cloud.google.com/go/eventarc/apiv1/eventarcpb;eventarcpb\xaa\x02\x18Google.Cloud.Eventarc.V1\xca\x02\x18Google\\Cloud\\Eventarc\\V1\xea\x02\x1bGoogle::Cloud::Eventarc::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Eventarc - module V1 - NetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.eventarc.v1.NetworkConfig").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/pipeline_pb.rb b/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/pipeline_pb.rb deleted file mode 100644 index 30e691747f84..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/lib/google/cloud/eventarc/v1/pipeline_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/eventarc/v1/pipeline.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/eventarc/v1/logging_config_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\'google/cloud/eventarc/v1/pipeline.proto\x12\x18google.cloud.eventarc.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a-google/cloud/eventarc/v1/logging_config.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x82\x18\n\x08Pipeline\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x06labels\x18\x04 \x03(\x0b\x32..google.cloud.eventarc.v1.Pipeline.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x03uid\x18\x05 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12M\n\x0b\x61nnotations\x18\x06 \x03(\x0b\x32\x33.google.cloud.eventarc.v1.Pipeline.AnnotationsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12I\n\x0c\x64\x65stinations\x18\x08 \x03(\x0b\x32..google.cloud.eventarc.v1.Pipeline.DestinationB\x03\xe0\x41\x02\x12\x45\n\nmediations\x18\t \x03(\x0b\x32,.google.cloud.eventarc.v1.Pipeline.MediationB\x03\xe0\x41\x01\x12\x42\n\x0f\x63rypto_key_name\x18\n \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12Z\n\x14input_payload_format\x18\x0b \x01(\x0b\x32\x37.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormatB\x03\xe0\x41\x01\x12\x44\n\x0elogging_config\x18\x0c \x01(\x0b\x32\'.google.cloud.eventarc.v1.LoggingConfigB\x03\xe0\x41\x01\x12I\n\x0cretry_policy\x18\r \x01(\x0b\x32..google.cloud.eventarc.v1.Pipeline.RetryPolicyB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x63 \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\x1a\x9f\x03\n\x14MessagePayloadFormat\x12_\n\x08protobuf\x18\x01 \x01(\x0b\x32\x46.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.ProtobufFormatB\x03\xe0\x41\x01H\x00\x12W\n\x04\x61vro\x18\x02 \x01(\x0b\x32\x42.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.AvroFormatB\x03\xe0\x41\x01H\x00\x12W\n\x04json\x18\x03 \x01(\x0b\x32\x42.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormat.JsonFormatB\x03\xe0\x41\x01H\x00\x1a\x0c\n\nJsonFormat\x1a\x30\n\x0eProtobufFormat\x12\x1e\n\x11schema_definition\x18\x01 \x01(\tB\x03\xe0\x41\x01\x1a,\n\nAvroFormat\x12\x1e\n\x11schema_definition\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x06\n\x04kind\x1a\xe5\t\n\x0b\x44\x65stination\x12Y\n\x0enetwork_config\x18\x01 \x01(\x0b\x32<.google.cloud.eventarc.v1.Pipeline.Destination.NetworkConfigB\x03\xe0\x41\x01\x12Y\n\rhttp_endpoint\x18\x02 \x01(\x0b\x32;.google.cloud.eventarc.v1.Pipeline.Destination.HttpEndpointB\x03\xe0\x41\x01H\x00\x12=\n\x08workflow\x18\x03 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!workflows.googleapis.com/WorkflowH\x00\x12\x41\n\x0bmessage_bus\x18\x04 \x01(\tB*\xe0\x41\x01\xfa\x41$\n\"eventarc.googleapis.com/MessageBusH\x00\x12\x34\n\x05topic\x18\x08 \x01(\tB#\xe0\x41\x01\xfa\x41\x1d\n\x1bpubsub.googleapis.com/TopicH\x00\x12g\n\x15\x61uthentication_config\x18\x05 \x01(\x0b\x32\x43.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfigB\x03\xe0\x41\x01\x12[\n\x15output_payload_format\x18\x06 \x01(\x0b\x32\x37.google.cloud.eventarc.v1.Pipeline.MessagePayloadFormatB\x03\xe0\x41\x01\x1a]\n\rNetworkConfig\x12L\n\x12network_attachment\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(compute.googleapis.com/NetworkAttachment\x1aG\n\x0cHttpEndpoint\x12\x10\n\x03uri\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12%\n\x18message_binding_template\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\xdf\x03\n\x14\x41uthenticationConfig\x12i\n\x0bgoogle_oidc\x18\x01 \x01(\x0b\x32M.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OidcTokenB\x03\xe0\x41\x01H\x00\x12j\n\x0boauth_token\x18\x02 \x01(\x0b\x32N.google.cloud.eventarc.v1.Pipeline.Destination.AuthenticationConfig.OAuthTokenB\x03\xe0\x41\x01H\x00\x1a\x66\n\tOidcToken\x12\x42\n\x0fservice_account\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x15\n\x08\x61udience\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x64\n\nOAuthToken\x12\x42\n\x0fservice_account\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!iam.googleapis.com/ServiceAccount\x12\x12\n\x05scope\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\"\n authentication_method_descriptorB\x18\n\x16\x64\x65stination_descriptor\x1a\xb7\x01\n\tMediation\x12Z\n\x0etransformation\x18\x01 \x01(\x0b\x32;.google.cloud.eventarc.v1.Pipeline.Mediation.TransformationB\x03\xe0\x41\x01H\x00\x1a\x36\n\x0eTransformation\x12$\n\x17transformation_template\x18\x01 \x01(\tB\x03\xe0\x41\x01\x42\x16\n\x14mediation_descriptor\x1a\x9a\x01\n\x0bRetryPolicy\x12\x19\n\x0cmax_attempts\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x37\n\x0fmin_retry_delay\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x01\x12\x37\n\x0fmax_retry_delay\x18\x03 \x01(\x0b\x32\x19.google.protobuf.DurationB\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\x32\n\x10\x41nnotationsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:x\xea\x41u\n eventarc.googleapis.com/Pipeline\x12] - # 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-eventarc-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel.rb deleted file mode 100644 index 17ae7aa5261a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel.rb +++ /dev/null @@ -1,120 +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 Eventarc - module V1 - # A representation of the Channel resource. - # A Channel is a resource on which event providers publish their events. - # The published events are delivered through the transport associated with the - # channel. Note that a channel is associated with exactly one event provider. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the channel. Must be unique within the - # location on the project and must be in - # `projects/{project}/locations/{location}/channels/{channel_id}` format. - # @!attribute [r] uid - # @return [::String] - # Output only. Server assigned unique identifier for the channel. The value - # is a UUID4 string and guaranteed to remain unchanged until the resource is - # deleted. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last-modified time. - # @!attribute [rw] provider - # @return [::String] - # The name of the event provider (e.g. Eventarc SaaS partner) associated - # with the channel. This provider will be granted permissions to publish - # events to the channel. Format: - # `projects/{project}/locations/{location}/providers/{provider_id}`. - # @!attribute [r] pubsub_topic - # @return [::String] - # Output only. The name of the Pub/Sub topic created and managed by - # Eventarc system as a transport for the event delivery. Format: - # `projects/{project}/topics/{topic_id}`. - # @!attribute [r] state - # @return [::Google::Cloud::Eventarc::V1::Channel::State] - # Output only. The state of a Channel. - # @!attribute [r] activation_token - # @return [::String] - # Output only. The activation token for the channel. The token must be used - # by the provider to register the channel for publishing. - # @!attribute [rw] crypto_key_name - # @return [::String] - # Optional. Resource name of a KMS crypto key (managed by the user) used to - # encrypt/decrypt their event data. - # - # It must match the pattern - # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. Whether or not this Channel satisfies the requirements of - # physical zone separation - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels. - class Channel - 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 - - # State lists all the possible states of a Channel - module State - # Default value. This value is unused. - STATE_UNSPECIFIED = 0 - - # The PENDING state indicates that a Channel has been created successfully - # and there is a new activation token available for the subscriber to use - # to convey the Channel to the provider in order to create a Connection. - PENDING = 1 - - # The ACTIVE state indicates that a Channel has been successfully - # connected with the event provider. - # An ACTIVE Channel is ready to receive and route events from the - # event provider. - ACTIVE = 2 - - # The INACTIVE state indicates that the Channel cannot receive events - # permanently. There are two possible cases this state can happen: - # - # 1. The SaaS provider disconnected from this Channel. - # 2. The Channel activation token has expired but the SaaS provider - # wasn't connected. - # - # To re-establish a Connection with a provider, the subscriber - # should create a new Channel and give it to the provider. - INACTIVE = 3 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel_connection.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel_connection.rb deleted file mode 100644 index 33d3e3998d74..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/channel_connection.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 Cloud - module Eventarc - module V1 - # A representation of the ChannelConnection resource. - # A ChannelConnection is a resource which event providers create during the - # activation process to establish a connection between the provider and the - # subscriber channel. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the connection. - # @!attribute [r] uid - # @return [::String] - # Output only. Server assigned ID of the resource. - # The server guarantees uniqueness and immutability until deleted. - # @!attribute [rw] channel - # @return [::String] - # Required. The name of the connected subscriber Channel. - # This is a weak reference to avoid cross project and cross accounts - # references. This must be in - # `projects/{project}/location/{location}/channels/{channel_id}` format. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last-modified time. - # @!attribute [rw] activation_token - # @return [::String] - # Input only. Activation token for the channel. The token will be used - # during the creation of ChannelConnection to bind the channel with the - # provider project. This field will not be stored in the provider resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels. - class ChannelConnection - 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 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/discovery.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/discovery.rb deleted file mode 100644 index e2cbf265b2aa..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/discovery.rb +++ /dev/null @@ -1,90 +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 Eventarc - module V1 - # A representation of the Provider resource. - # @!attribute [r] name - # @return [::String] - # Output only. In - # `projects/{project}/locations/{location}/providers/{provider_id}` format. - # @!attribute [r] display_name - # @return [::String] - # Output only. Human friendly name for the Provider. For example "Cloud - # Storage". - # @!attribute [r] event_types - # @return [::Array<::Google::Cloud::Eventarc::V1::EventType>] - # Output only. Event types for this provider. - class Provider - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A representation of the event type resource. - # @!attribute [r] type - # @return [::String] - # Output only. The full name of the event type (for example, - # "google.cloud.storage.object.v1.finalized"). In the form of - # \\{provider-specific-prefix}.\\{resource}.\\{version}.\\{verb}. Types MUST be - # versioned and event schemas are guaranteed to remain backward compatible - # within one version. Note that event type versions and API versions do not - # need to match. - # @!attribute [r] description - # @return [::String] - # Output only. Human friendly description of what the event type is about. - # For example "Bucket created in Cloud Storage". - # @!attribute [r] filtering_attributes - # @return [::Array<::Google::Cloud::Eventarc::V1::FilteringAttribute>] - # Output only. Filtering attributes for the event type. - # @!attribute [r] event_schema_uri - # @return [::String] - # Output only. URI for the event schema. - # For example - # "https://github.com/googleapis/google-cloudevents/blob/master/proto/google/events/cloud/storage/v1/events.proto" - class EventType - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A representation of the FilteringAttribute resource. - # Filtering attributes are per event type. - # @!attribute [r] attribute - # @return [::String] - # Output only. Attribute used for filtering the event type. - # @!attribute [r] description - # @return [::String] - # Output only. Description of the purpose of the attribute. - # @!attribute [r] required - # @return [::Boolean] - # Output only. If true, the triggers for this provider should always specify - # a filter on these attributes. Trigger creation will fail otherwise. - # @!attribute [r] path_pattern_supported - # @return [::Boolean] - # Output only. If true, the attribute accepts matching expressions in the - # Eventarc PathPattern format. - class FilteringAttribute - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/enrollment.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/enrollment.rb deleted file mode 100644 index 725556282574..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/enrollment.rb +++ /dev/null @@ -1,95 +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 Eventarc - module V1 - # An enrollment represents a subscription for messages on a particular message - # bus. It defines a matching criteria for messages on the bus and the - # subscriber endpoint where matched messages should be delivered. - # @!attribute [rw] name - # @return [::String] - # Identifier. Resource name of the form - # projects/\\{project}/locations/\\{location}/enrollments/\\{enrollment} - # @!attribute [r] uid - # @return [::String] - # Output only. Server assigned unique identifier for the channel. The value - # is a UUID4 string and guaranteed to remain unchanged until the resource is - # deleted. - # @!attribute [r] etag - # @return [::String] - # Output only. This checksum is computed by the server based on the value of - # other fields, and might be sent only on update and delete requests to - # ensure that the client has an up-to-date value before proceeding. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last-modified time. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource annotations. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Resource display name. - # @!attribute [rw] cel_match - # @return [::String] - # Required. A CEL expression identifying which messages this enrollment - # applies to. - # @!attribute [rw] message_bus - # @return [::String] - # Required. Immutable. Resource name of the message bus identifying the - # source of the messages. It matches the form - # projects/\\{project}/locations/\\{location}/messageBuses/\\{messageBus}. - # @!attribute [rw] destination - # @return [::String] - # Required. Destination is the Pipeline that the Enrollment is delivering to. - # It must point to the full resource name of a Pipeline. Format: - # "projects/\\{PROJECT_ID}/locations/\\{region}/pipelines/{PIPELINE_ID)" - class Enrollment - 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 AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/eventarc.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/eventarc.rb deleted file mode 100644 index 6e89415f7a0a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/eventarc.rb +++ /dev/null @@ -1,940 +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 Eventarc - module V1 - # The request message for the GetTrigger method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the trigger to get. - class GetTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the ListTriggers method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection to list triggers on. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of triggers to return on each page. - # - # Note: The service may send fewer. - # @!attribute [rw] page_token - # @return [::String] - # The page token; provide the value from the `next_page_token` field in a - # previous `ListTriggers` call to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListTriggers` must match - # the call that provided the page token. - # @!attribute [rw] order_by - # @return [::String] - # The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, trigger_id`. - # @!attribute [rw] filter - # @return [::String] - # Filter field. Used to filter the Triggers to be listed. Possible filters - # are described in https://google.aip.dev/160. For example, using - # "?filter=destination:gke" would list only Triggers with a gke destination. - class ListTriggersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for the `ListTriggers` method. - # @!attribute [rw] triggers - # @return [::Array<::Google::Cloud::Eventarc::V1::Trigger>] - # The requested triggers, up to the number specified in `page_size`. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that can be sent to `ListTriggers` to request the next page. - # If this is empty, then there are no more pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources, if any. - class ListTriggersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the CreateTrigger method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection in which to add this trigger. - # @!attribute [rw] trigger - # @return [::Google::Cloud::Eventarc::V1::Trigger] - # Required. The trigger to create. - # @!attribute [rw] trigger_id - # @return [::String] - # Required. The user-provided ID to be assigned to the trigger. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class CreateTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the UpdateTrigger method. - # @!attribute [rw] trigger - # @return [::Google::Cloud::Eventarc::V1::Trigger] - # The trigger to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The fields to be updated; only fields explicitly provided are updated. - # If no field mask is provided, all provided fields in the request are - # updated. To update all fields, provide a field mask of "*". - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the trigger is not found, a new trigger will be - # created. In this situation, `update_mask` is ignored. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class UpdateTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the DeleteTrigger method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the trigger to be deleted. - # @!attribute [rw] etag - # @return [::String] - # If provided, the trigger will only be deleted if the etag matches the - # current etag on the resource. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # If set to true, and the trigger is not found, the request will succeed - # but no action will be taken on the server. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class DeleteTriggerRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the GetChannel method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the channel to get. - class GetChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the ListChannels method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection to list channels on. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of channels to return on each page. - # - # Note: The service may send fewer. - # @!attribute [rw] page_token - # @return [::String] - # The page token; provide the value from the `next_page_token` field in a - # previous `ListChannels` call to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChannels` must - # match the call that provided the page token. - # @!attribute [rw] order_by - # @return [::String] - # The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, channel_id`. - class ListChannelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for the `ListChannels` method. - # @!attribute [rw] channels - # @return [::Array<::Google::Cloud::Eventarc::V1::Channel>] - # The requested channels, up to the number specified in `page_size`. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that can be sent to `ListChannels` to request the next page. - # If this is empty, then there are no more pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources, if any. - class ListChannelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the CreateChannel method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection in which to add this channel. - # @!attribute [rw] channel - # @return [::Google::Cloud::Eventarc::V1::Channel] - # Required. The channel to create. - # @!attribute [rw] channel_id - # @return [::String] - # Required. The user-provided ID to be assigned to the channel. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class CreateChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the UpdateChannel method. - # @!attribute [rw] channel - # @return [::Google::Cloud::Eventarc::V1::Channel] - # The channel to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The fields to be updated; only fields explicitly provided are updated. - # If no field mask is provided, all provided fields in the request are - # updated. To update all fields, provide a field mask of "*". - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class UpdateChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the DeleteChannel method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the channel to be deleted. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class DeleteChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the GetProvider method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the provider to get. - class GetProviderRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the ListProviders method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the provider to get. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of providers to return on each page. - # @!attribute [rw] page_token - # @return [::String] - # The page token; provide the value from the `next_page_token` field in a - # previous `ListProviders` call to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListProviders` must - # match the call that provided the page token. - # @!attribute [rw] order_by - # @return [::String] - # The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting oder is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, _id`. - # @!attribute [rw] filter - # @return [::String] - # The filter field that the list request will filter on. - class ListProvidersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for the `ListProviders` method. - # @!attribute [rw] providers - # @return [::Array<::Google::Cloud::Eventarc::V1::Provider>] - # The requested providers, up to the number specified in `page_size`. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that can be sent to `ListProviders` to request the next page. - # If this is empty, then there are no more pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources, if any. - class ListProvidersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the GetChannelConnection method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the channel connection to get. - class GetChannelConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the ListChannelConnections method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection from which to list channel connections. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of channel connections to return on each page. - # - # Note: The service may send fewer responses. - # @!attribute [rw] page_token - # @return [::String] - # The page token; provide the value from the `next_page_token` field in a - # previous `ListChannelConnections` call to retrieve the subsequent page. - # - # When paginating, all other parameters provided to `ListChannelConnetions` - # match the call that provided the page token. - class ListChannelConnectionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for the `ListChannelConnections` method. - # @!attribute [rw] channel_connections - # @return [::Array<::Google::Cloud::Eventarc::V1::ChannelConnection>] - # The requested channel connections, up to the number specified in - # `page_size`. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that can be sent to `ListChannelConnections` to request the - # next page. - # If this is empty, then there are no more pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources, if any. - class ListChannelConnectionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the CreateChannelConnection method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection in which to add this channel connection. - # @!attribute [rw] channel_connection - # @return [::Google::Cloud::Eventarc::V1::ChannelConnection] - # Required. Channel connection to create. - # @!attribute [rw] channel_connection_id - # @return [::String] - # Required. The user-provided ID to be assigned to the channel connection. - class CreateChannelConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the DeleteChannelConnection method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the channel connection to delete. - class DeleteChannelConnectionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the UpdateGoogleChannelConfig method. - # @!attribute [rw] google_channel_config - # @return [::Google::Cloud::Eventarc::V1::GoogleChannelConfig] - # Required. The config to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The fields to be updated; only fields explicitly provided are updated. - # If no field mask is provided, all provided fields in the request are - # updated. To update all fields, provide a field mask of "*". - class UpdateGoogleChannelConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the GetGoogleChannelConfig method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the config to get. - class GetGoogleChannelConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the GetMessageBus method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the message bus to get. - class GetMessageBusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the ListMessageBuses method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection to list message buses on. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # @!attribute [rw] order_by - # @return [::String] - # Optional. The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, update_time`. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter field that the list request will filter on. - # Possible filtersare described in https://google.aip.dev/160. - class ListMessageBusesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for the `ListMessageBuses` method. - # @!attribute [rw] message_buses - # @return [::Array<::Google::Cloud::Eventarc::V1::MessageBus>] - # The requested message buses, up to the number specified in `page_size`. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that can be sent to `ListMessageBuses` to request the next - # page. If this is empty, then there are no more pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources, if any. - class ListMessageBusesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the `ListMessageBusEnrollments` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent message bus to list enrollments on. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - class ListMessageBusEnrollmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for the `ListMessageBusEnrollments` method.` - # @!attribute [rw] enrollments - # @return [::Array<::String>] - # The requested enrollments, up to the number specified in `page_size`. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that can be sent to `ListMessageBusEnrollments` to request the - # next page. If this is empty, then there are no more pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources, if any. - class ListMessageBusEnrollmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the CreateMessageBus method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection in which to add this message bus. - # @!attribute [rw] message_bus - # @return [::Google::Cloud::Eventarc::V1::MessageBus] - # Required. The message bus to create. - # @!attribute [rw] message_bus_id - # @return [::String] - # Required. The user-provided ID to be assigned to the MessageBus. It should - # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class CreateMessageBusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the UpdateMessageBus method. - # @!attribute [rw] message_bus - # @return [::Google::Cloud::Eventarc::V1::MessageBus] - # Required. The MessageBus to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The fields to be updated; only fields explicitly provided are - # updated. If no field mask is provided, all provided fields in the request - # are updated. To update all fields, provide a field mask of "*". - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the MessageBus is not found, a new MessageBus - # will be created. In this situation, `update_mask` is ignored. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class UpdateMessageBusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the DeleteMessageBus method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the MessageBus to be deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. If provided, the MessageBus will only be deleted if the etag - # matches the current etag on the resource. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the MessageBus is not found, the request will - # succeed but no action will be taken on the server. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class DeleteMessageBusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the GetEnrollment method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Enrollment to get. - class GetEnrollmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the ListEnrollments method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection to list triggers on. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # @!attribute [rw] order_by - # @return [::String] - # Optional. The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, update_time`. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter field that the list request will filter on. - # Possible filtersare described in https://google.aip.dev/160. - class ListEnrollmentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for the `ListEnrollments` method. - # @!attribute [rw] enrollments - # @return [::Array<::Google::Cloud::Eventarc::V1::Enrollment>] - # The requested Enrollments, up to the number specified in `page_size`. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that can be sent to `ListEnrollments` to request the next - # page. If this is empty, then there are no more pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources, if any. - class ListEnrollmentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the CreateEnrollment method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection in which to add this enrollment. - # @!attribute [rw] enrollment - # @return [::Google::Cloud::Eventarc::V1::Enrollment] - # Required. The enrollment to create. - # @!attribute [rw] enrollment_id - # @return [::String] - # Required. The user-provided ID to be assigned to the Enrollment. It should - # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class CreateEnrollmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the UpdateEnrollment method. - # @!attribute [rw] enrollment - # @return [::Google::Cloud::Eventarc::V1::Enrollment] - # Required. The Enrollment to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The fields to be updated; only fields explicitly provided are - # updated. If no field mask is provided, all provided fields in the request - # are updated. To update all fields, provide a field mask of "*". - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the Enrollment is not found, a new Enrollment - # will be created. In this situation, `update_mask` is ignored. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class UpdateEnrollmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the DeleteEnrollment method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Enrollment to be deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. If provided, the Enrollment will only be deleted if the etag - # matches the current etag on the resource. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the Enrollment is not found, the request will - # succeed but no action will be taken on the server. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class DeleteEnrollmentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the GetPipeline method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the pipeline to get. - class GetPipelineRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the ListPipelines method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection to list pipelines on. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # @!attribute [rw] order_by - # @return [::String] - # Optional. The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, update_time`. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter field that the list request will filter on. - # Possible filters are described in https://google.aip.dev/160. - class ListPipelinesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for the ListPipelines method. - # @!attribute [rw] pipelines - # @return [::Array<::Google::Cloud::Eventarc::V1::Pipeline>] - # The requested pipelines, up to the number specified in `page_size`. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that can be sent to `ListPipelines` to request the next - # page. If this is empty, then there are no more pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources, if any. - class ListPipelinesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the CreatePipeline method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection in which to add this pipeline. - # @!attribute [rw] pipeline - # @return [::Google::Cloud::Eventarc::V1::Pipeline] - # Required. The pipeline to create. - # @!attribute [rw] pipeline_id - # @return [::String] - # Required. The user-provided ID to be assigned to the Pipeline. It should - # match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class CreatePipelineRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the UpdatePipeline method. - # @!attribute [rw] pipeline - # @return [::Google::Cloud::Eventarc::V1::Pipeline] - # Required. The Pipeline to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The fields to be updated; only fields explicitly provided are - # updated. If no field mask is provided, all provided fields in the request - # are updated. To update all fields, provide a field mask of "*". - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the Pipeline is not found, a new Pipeline - # will be created. In this situation, `update_mask` is ignored. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class UpdatePipelineRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the DeletePipeline method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the Pipeline to be deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. If provided, the Pipeline will only be deleted if the etag - # matches the current etag on the resource. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the Pipeline is not found, the request will - # succeed but no action will be taken on the server. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class DeletePipelineRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the GetGoogleApiSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the google api source to get. - class GetGoogleApiSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the ListGoogleApiSources method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection to list GoogleApiSources on. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of results to return on each page. - # - # Note: The service may send fewer. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The page token; provide the value from the `next_page_token` - # field in a previous call to retrieve the subsequent page. - # - # When paginating, all other parameters provided must match - # the previous call that provided the page token. - # @!attribute [rw] order_by - # @return [::String] - # Optional. The sorting order of the resources returned. Value should be a - # comma-separated list of fields. The default sorting order is ascending. To - # specify descending order for a field, append a `desc` suffix; for example: - # `name desc, update_time`. - # @!attribute [rw] filter - # @return [::String] - # Optional. The filter field that the list request will filter on. - # Possible filtersare described in https://google.aip.dev/160. - class ListGoogleApiSourcesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response message for the `ListGoogleApiSources` method. - # @!attribute [rw] google_api_sources - # @return [::Array<::Google::Cloud::Eventarc::V1::GoogleApiSource>] - # The requested GoogleApiSources, up to the number specified in `page_size`. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that can be sent to `ListMessageBusEnrollments` to request the - # next page. If this is empty, then there are no more pages. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unreachable resources, if any. - class ListGoogleApiSourcesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the CreateGoogleApiSource method. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent collection in which to add this google api source. - # @!attribute [rw] google_api_source - # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource] - # Required. The google api source to create. - # @!attribute [rw] google_api_source_id - # @return [::String] - # Required. The user-provided ID to be assigned to the GoogleApiSource. It - # should match the format `^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$`. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class CreateGoogleApiSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the UpdateGoogleApiSource method. - # @!attribute [rw] google_api_source - # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource] - # Required. The GoogleApiSource to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. The fields to be updated; only fields explicitly provided are - # updated. If no field mask is provided, all provided fields in the request - # are updated. To update all fields, provide a field mask of "*". - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the GoogleApiSource is not found, a new - # GoogleApiSource will be created. In this situation, `update_mask` is - # ignored. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class UpdateGoogleApiSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for the DeleteGoogleApiSource method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the GoogleApiSource to be deleted. - # @!attribute [rw] etag - # @return [::String] - # Optional. If provided, the MessageBus will only be deleted if the etag - # matches the current etag on the resource. - # @!attribute [rw] allow_missing - # @return [::Boolean] - # Optional. If set to true, and the MessageBus is not found, the request will - # succeed but no action will be taken on the server. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If set, validate the request and preview the review, but do not - # post it. - class DeleteGoogleApiSourceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the 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 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_api_source.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_api_source.rb deleted file mode 100644 index 4a833af465b7..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_api_source.rb +++ /dev/null @@ -1,132 +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 Eventarc - module V1 - # A GoogleApiSource represents a subscription of 1P events from a MessageBus. - # @!attribute [rw] name - # @return [::String] - # Identifier. Resource name of the form - # projects/\\{project}/locations/\\{location}/googleApiSources/\\{google_api_source} - # @!attribute [r] uid - # @return [::String] - # Output only. Server assigned unique identifier for the channel. The value - # is a UUID4 string and guaranteed to remain unchanged until the resource is - # deleted. - # @!attribute [r] etag - # @return [::String] - # Output only. This checksum is computed by the server based on the value of - # other fields, and might be sent only on update and delete requests to - # ensure that the client has an up-to-date value before proceeding. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last-modified time. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource annotations. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Resource display name. - # @!attribute [rw] destination - # @return [::String] - # Required. Destination is the message bus that the GoogleApiSource is - # delivering to. It must be point to the full resource name of a MessageBus. - # Format: - # "projects/\\{PROJECT_ID}/locations/\\{region}/messagesBuses/{MESSAGE_BUS_ID) - # @!attribute [rw] crypto_key_name - # @return [::String] - # Optional. Resource name of a KMS crypto key (managed by the user) used to - # encrypt/decrypt their event data. - # - # It must match the pattern - # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - # @!attribute [rw] logging_config - # @return [::Google::Cloud::Eventarc::V1::LoggingConfig] - # Optional. Config to control Platform logging for the GoogleApiSource. - # @!attribute [rw] organization_subscription - # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource::OrganizationSubscription] - # Optional. Config to enable subscribing to events from all projects in the - # GoogleApiSource's org. - # - # Note: The following fields are mutually exclusive: `organization_subscription`, `project_subscriptions`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] project_subscriptions - # @return [::Google::Cloud::Eventarc::V1::GoogleApiSource::ProjectSubscriptions] - # Optional. Config to enable subscribing to all events from a list of - # projects. - # - # All the projects must be in the same org as the GoogleApiSource. - # - # Note: The following fields are mutually exclusive: `project_subscriptions`, `organization_subscription`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class GoogleApiSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Config to enable subscribing to all events from a list of projects. - # @!attribute [rw] list - # @return [::Array<::String>] - # Required. A list of projects to receive events from. - # - # All the projects must be in the same org. The listed projects should have - # the format project/\\{identifier} where identifier can be either the - # project id for project number. A single list may contain both formats. At - # most 100 projects can be listed. - class ProjectSubscriptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Config to enabled subscribing to events from other projects in the org. - # @!attribute [rw] enabled - # @return [::Boolean] - # Required. Enable org level subscription. - class OrganizationSubscription - 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 [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_channel_config.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_channel_config.rb deleted file mode 100644 index ce8f19576d7c..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/google_channel_config.rb +++ /dev/null @@ -1,64 +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 Eventarc - module V1 - # A GoogleChannelConfig is a resource that stores the custom settings - # respected by Eventarc first-party triggers in the matching region. - # Once configured, first-party event data will be protected - # using the specified custom managed encryption key instead of Google-managed - # encryption keys. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the config. Must be in the format of, - # `projects/{project}/locations/{location}/googleChannelConfig`. - # In API responses, the config name always includes the projectID, regardless - # of whether the projectID or projectNumber was provided. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last-modified time. - # @!attribute [rw] crypto_key_name - # @return [::String] - # Optional. Resource name of a KMS crypto key (managed by the user) used to - # encrypt/decrypt their event data. - # - # It must match the pattern - # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels. - class GoogleChannelConfig - 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 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/logging_config.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/logging_config.rb deleted file mode 100644 index 214240e10f90..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/logging_config.rb +++ /dev/null @@ -1,78 +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 Eventarc - module V1 - # The configuration for Platform Telemetry logging for Eventarc Advanced - # resources. - # @!attribute [rw] log_severity - # @return [::Google::Cloud::Eventarc::V1::LoggingConfig::LogSeverity] - # Optional. The minimum severity of logs that will be sent to - # Stackdriver/Platform Telemetry. Logs at severitiy ≥ this value will be - # sent, unless it is NONE. - class LoggingConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The different severities for logging supported by Eventarc Advanced - # resources. - # This enum is an exhaustive list of log severities and is FROZEN. Do not - # expect new values to be added. - module LogSeverity - # Log severity is not specified. This value is treated the same as NONE, - # but is used to distinguish between no update and update to NONE in - # update_masks. - LOG_SEVERITY_UNSPECIFIED = 0 - - # Default value at resource creation, presence of this value must be - # treated as no logging/disable logging. - NONE = 1 - - # Debug or trace level logging. - DEBUG = 2 - - # Routine information, such as ongoing status or performance. - INFO = 3 - - # Normal but significant events, such as start up, shut down, or a - # configuration change. - NOTICE = 4 - - # Warning events might cause problems. - WARNING = 5 - - # Error events are likely to cause problems. - ERROR = 6 - - # Critical events cause more severe problems or outages. - CRITICAL = 7 - - # A person must take action immediately. - ALERT = 8 - - # One or more systems are unusable. - EMERGENCY = 9 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/message_bus.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/message_bus.rb deleted file mode 100644 index af2653a373ba..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/message_bus.rb +++ /dev/null @@ -1,94 +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 Eventarc - module V1 - # MessageBus for the messages flowing through the system. The admin has - # visibility and control over the messages being published and consumed and can - # restrict publishers and subscribers to only a subset of data available in the - # system by defining authorization policies. - # @!attribute [rw] name - # @return [::String] - # Identifier. Resource name of the form - # projects/\\{project}/locations/\\{location}/messageBuses/\\{message_bus} - # @!attribute [r] uid - # @return [::String] - # Output only. Server assigned unique identifier for the channel. The value - # is a UUID4 string and guaranteed to remain unchanged until the resource is - # deleted. - # @!attribute [r] etag - # @return [::String] - # Output only. This checksum is computed by the server based on the value of - # other fields, and might be sent only on update and delete requests to - # ensure that the client has an up-to-date value before proceeding. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last-modified time. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource labels. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Resource annotations. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Resource display name. - # @!attribute [rw] crypto_key_name - # @return [::String] - # Optional. Resource name of a KMS crypto key (managed by the user) used to - # encrypt/decrypt their event data. - # - # It must match the pattern - # `projects/*/locations/*/keyRings/*/cryptoKeys/*`. - # @!attribute [rw] logging_config - # @return [::Google::Cloud::Eventarc::V1::LoggingConfig] - # Optional. Config to control Platform logging for the Message Bus. This log - # configuration is applied to the Message Bus itself, and all the Enrollments - # attached to it. - class MessageBus - 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 AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/network_config.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/network_config.rb deleted file mode 100644 index 3fbdfc0f7b41..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/network_config.rb +++ /dev/null @@ -1,37 +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 Eventarc - module V1 - # Network Configuration that can be inherited by other protos. - # @!attribute [rw] network_attachment - # @return [::String] - # Required. Name of the NetworkAttachment that allows access to the - # customer's VPC. Format: - # `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}` - class NetworkConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/pipeline.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/pipeline.rb deleted file mode 100644 index e81e95c6c07c..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/pipeline.rb +++ /dev/null @@ -1,606 +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 Eventarc - module V1 - # A representation of the Pipeline resource. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the Pipeline. Must be unique within the - # location of the project and must be in - # `projects/{project}/locations/{location}/pipelines/{pipeline}` format. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up - # to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and - # "2014-10-02T15:01:23.045123456Z". - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last-modified time. - # A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up - # to nine fractional digits. Examples: "2014-10-02T15:01:23Z" and - # "2014-10-02T15:01:23.045123456Z". - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User labels attached to the Pipeline that can be used to group - # resources. An object containing a list of "key": value pairs. Example: { - # "name": "wrench", "mass": "1.3kg", "count": "3" }. - # @!attribute [r] uid - # @return [::String] - # Output only. Server-assigned unique identifier for the Pipeline. The value - # is a UUID4 string and guaranteed to remain unchanged until the resource is - # deleted. - # @!attribute [rw] annotations - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User-defined annotations. See - # https://google.aip.dev/128#annotations. - # @!attribute [rw] display_name - # @return [::String] - # Optional. Display name of resource. - # @!attribute [rw] destinations - # @return [::Array<::Google::Cloud::Eventarc::V1::Pipeline::Destination>] - # Required. List of destinations to which messages will be forwarded. - # Currently, exactly one destination is supported per Pipeline. - # @!attribute [rw] mediations - # @return [::Array<::Google::Cloud::Eventarc::V1::Pipeline::Mediation>] - # Optional. List of mediation operations to be performed on the message. - # Currently, only one Transformation operation is allowed in each Pipeline. - # @!attribute [rw] crypto_key_name - # @return [::String] - # Optional. Resource name of a KMS crypto key (managed by the user) used to - # encrypt/decrypt the event data. If not set, an internal Google-owned key - # will be used to encrypt messages. It must match the pattern - # "projects/\\{project}/locations/\\{location}/keyRings/\\{keyring}/cryptoKeys/\\{key}". - # @!attribute [rw] input_payload_format - # @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat] - # Optional. The payload format expected for the messages received by the - # Pipeline. If input_payload_format is set then any messages not matching - # this format will be treated as persistent errors. If input_payload_format - # is not set, then the message data will be treated as an opaque binary and - # no output format can be set on the Pipeline through the - # Pipeline.Destination.output_payload_format field. Any Mediations on the - # Pipeline that involve access to the data field will fail as persistent - # errors. - # @!attribute [rw] logging_config - # @return [::Google::Cloud::Eventarc::V1::LoggingConfig] - # Optional. Config to control Platform Logging for Pipelines. - # @!attribute [rw] retry_policy - # @return [::Google::Cloud::Eventarc::V1::Pipeline::RetryPolicy] - # Optional. The retry policy to use in the pipeline. - # @!attribute [r] etag - # @return [::String] - # Output only. This checksum is computed by the server based on the value of - # other fields, and might be sent only on create requests to ensure that the - # client has an up-to-date value before proceeding. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. Whether or not this Pipeline satisfies the requirements of - # physical zone separation - class Pipeline - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents the format of message data. - # @!attribute [rw] protobuf - # @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat::ProtobufFormat] - # Optional. Protobuf format. - # - # Note: The following fields are mutually exclusive: `protobuf`, `avro`, `json`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] avro - # @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat::AvroFormat] - # Optional. Avro format. - # - # Note: The following fields are mutually exclusive: `avro`, `protobuf`, `json`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] json - # @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat::JsonFormat] - # Optional. JSON format. - # - # Note: The following fields are mutually exclusive: `json`, `protobuf`, `avro`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class MessagePayloadFormat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The format of a JSON message payload. - class JsonFormat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The format of a Protobuf message payload. - # @!attribute [rw] schema_definition - # @return [::String] - # Optional. The entire schema definition is stored in this field. - class ProtobufFormat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The format of an AVRO message payload. - # @!attribute [rw] schema_definition - # @return [::String] - # Optional. The entire schema definition is stored in this field. - class AvroFormat - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents a target of an invocation over HTTP. - # @!attribute [rw] network_config - # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::NetworkConfig] - # Optional. Network config is used to configure how Pipeline resolves and - # connects to a destination. - # @!attribute [rw] http_endpoint - # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::HttpEndpoint] - # Optional. An HTTP endpoint destination described by an URI. - # If a DNS FQDN is provided as the endpoint, Pipeline will create a - # peering zone to the consumer VPC and forward DNS requests to the VPC - # specified by network config to resolve the service endpoint. See: - # https://cloud.google.com/dns/docs/zones/zones-overview#peering_zones - # - # Note: The following fields are mutually exclusive: `http_endpoint`, `workflow`, `message_bus`, `topic`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] workflow - # @return [::String] - # Optional. The resource name of the Workflow whose Executions are - # triggered by the events. The Workflow resource should be deployed in - # the same project as the Pipeline. Format: - # `projects/{project}/locations/{location}/workflows/{workflow}` - # - # Note: The following fields are mutually exclusive: `workflow`, `http_endpoint`, `message_bus`, `topic`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] message_bus - # @return [::String] - # Optional. The resource name of the Message Bus to which events should - # be published. The Message Bus resource should exist in the same project - # as the Pipeline. Format: - # `projects/{project}/locations/{location}/messageBuses/{message_bus}` - # - # Note: The following fields are mutually exclusive: `message_bus`, `http_endpoint`, `workflow`, `topic`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] topic - # @return [::String] - # Optional. The resource name of the Pub/Sub topic to which events should - # be published. Format: - # `projects/{project}/locations/{location}/topics/{topic}` - # - # Note: The following fields are mutually exclusive: `topic`, `http_endpoint`, `workflow`, `message_bus`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] authentication_config - # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig] - # Optional. An authentication config used to authenticate message requests, - # such that destinations can verify the source. For example, this can be - # used with private Google Cloud destinations that require Google Cloud - # credentials for access like Cloud Run. This field is optional and should - # be set only by users interested in authenticated push. - # @!attribute [rw] output_payload_format - # @return [::Google::Cloud::Eventarc::V1::Pipeline::MessagePayloadFormat] - # Optional. The message format before it is delivered to the destination. - # If not set, the message will be delivered in the format it was originally - # delivered to the Pipeline. This field can only be set if - # Pipeline.input_payload_format is also set. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a network config to be used for destination resolution and - # connectivity. - # @!attribute [rw] network_attachment - # @return [::String] - # Required. Name of the NetworkAttachment that allows access to the - # consumer VPC. Format: - # `projects/{PROJECT_ID}/regions/{REGION}/networkAttachments/{NETWORK_ATTACHMENT_NAME}` - class NetworkConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a HTTP endpoint destination. - # @!attribute [rw] uri - # @return [::String] - # Required. The URI of the HTTP endpoint. - # - # The value must be a RFC2396 URI string. - # Examples: `https://svc.us-central1.p.local:8080/route`. - # Only the HTTPS protocol is supported. - # @!attribute [rw] message_binding_template - # @return [::String] - # Optional. The CEL expression used to modify how the destination-bound - # HTTP request is constructed. - # - # If a binding expression is not specified here, the message - # is treated as a CloudEvent and is mapped to the HTTP request according - # to the CloudEvent HTTP Protocol Binding Binary Content Mode - # (https://github.com/cloudevents/spec/blob/main/cloudevents/bindings/http-protocol-binding.md#31-binary-content-mode). - # In this representation, all fields except the `data` and - # `datacontenttype` field on the message are mapped to HTTP request - # headers with a prefix of `ce-`. - # - # To construct the HTTP request payload and the value of the content-type - # HTTP header, the payload format is defined as follows: - # 1) Use the output_payload_format_type on the Pipeline.Destination if it - # is set, else: - # 2) Use the input_payload_format_type on the Pipeline if it is set, - # else: - # 3) Treat the payload as opaque binary data. - # - # The `data` field of the message is converted to the payload format or - # left as-is for case 3) and then attached as the payload of the HTTP - # request. The `content-type` header on the HTTP request is set to the - # payload format type or left empty for case 3). However, if a mediation - # has updated the `datacontenttype` field on the message so that it is - # not the same as the payload format type but it is still a prefix of the - # payload format type, then the `content-type` header on the HTTP request - # is set to this `datacontenttype` value. For example, if the - # `datacontenttype` is "application/json" and the payload format type is - # "application/json; charset=utf-8", then the `content-type` header on - # the HTTP request is set to "application/json; charset=utf-8". - # - # If a non-empty binding expression is specified then this expression is - # used to modify the default CloudEvent HTTP Protocol Binding Binary - # Content representation. - # The result of the CEL expression must be a map of key/value pairs - # which is used as follows: - # - If a map named `headers` exists on the result of the expression, - # then its key/value pairs are directly mapped to the HTTP request - # headers. The headers values are constructed from the corresponding - # value type's canonical representation. If the `headers` field doesn't - # exist then the resulting HTTP request will be the headers of the - # CloudEvent HTTP Binding Binary Content Mode representation of the final - # message. Note: If the specified binding expression, has updated the - # `datacontenttype` field on the message so that it is not the same as - # the payload format type but it is still a prefix of the payload format - # type, then the `content-type` header in the `headers` map is set to - # this `datacontenttype` value. - # - If a field named `body` exists on the result of the expression then - # its value is directly mapped to the body of the request. If the value - # of the `body` field is of type bytes or string then it is used for - # the HTTP request body as-is, with no conversion. If the body field is - # of any other type then it is converted to a JSON string. If the body - # field does not exist then the resulting payload of the HTTP request - # will be data value of the CloudEvent HTTP Binding Binary Content Mode - # representation of the final message as described earlier. - # - Any other fields in the resulting expression will be ignored. - # - # The CEL expression may access the incoming CloudEvent message in its - # definition, as follows: - # - The `data` field of the incoming CloudEvent message can be accessed - # using the `message.data` value. Subfields of `message.data` may also be - # accessed if an input_payload_format has been specified on the Pipeline. - # - Each attribute of the incoming CloudEvent message can be accessed - # using the `message.` value, where is replaced with the - # name of the attribute. - # - Existing headers can be accessed in the CEL expression using the - # `headers` variable. The `headers` variable defines a map of key/value - # pairs corresponding to the HTTP headers of the CloudEvent HTTP Binding - # Binary Content Mode representation of the final message as described - # earlier. For example, the following CEL expression can be used to - # construct an HTTP request by adding an additional header to the HTTP - # headers of the CloudEvent HTTP Binding Binary Content Mode - # representation of the final message and by overwriting the body of the - # request: - # - # ``` - # { - # "headers": headers.merge(\\{"new-header-key": "new-header-value"}), - # "body": "new-body" - # } - # ``` - # - The default binding for the message payload can be accessed using the - # `body` variable. It conatins a string representation of the message - # payload in the format specified by the `output_payload_format` field. - # If the `input_payload_format` field is not set, the `body` - # variable contains the same message payload bytes that were published. - # - # Additionally, the following CEL extension functions are provided for - # use in this CEL expression: - # - toBase64Url: - # map.toBase64Url() -> string - # - Converts a CelValue to a base64url encoded string - # - toJsonString: map.toJsonString() -> string - # - Converts a CelValue to a JSON string - # - merge: - # map1.merge(map2) -> map3 - # - Merges the passed CEL map with the existing CEL map the - # function is applied to. - # - If the same key exists in both maps, if the key's value is type - # map both maps are merged else the value from the passed map is - # used. - # - denormalize: - # map.denormalize() -> map - # - Denormalizes a CEL map such that every value of type map or key - # in the map is expanded to return a single level map. - # - The resulting keys are "." separated indices of the map keys. - # - For example: - # { - # "a": 1, - # "b": { - # "c": 2, - # "d": 3 - # } - # "e": [4, 5] - # } - # .denormalize() - # -> { - # "a": 1, - # "b.c": 2, - # "b.d": 3, - # "e.0": 4, - # "e.1": 5 - # } - # - setField: - # map.setField(key, value) -> message - # - Sets the field of the message with the given key to the - # given value. - # - If the field is not present it will be added. - # - If the field is present it will be overwritten. - # - The key can be a dot separated path to set a field in a nested - # message. - # - Key must be of type string. - # - Value may be any valid type. - # - removeFields: - # map.removeFields([key1, key2, ...]) -> message - # - Removes the fields of the map with the given keys. - # - The keys can be a dot separated path to remove a field in a - # nested message. - # - If a key is not found it will be ignored. - # - Keys must be of type string. - # - toMap: - # [map1, map2, ...].toMap() -> map - # - Converts a CEL list of CEL maps to a single CEL map - # - toCloudEventJsonWithPayloadFormat: - # message.toCloudEventJsonWithPayloadFormat() -> map - # - Converts a message to the corresponding structure of JSON - # format for CloudEvents. - # - It converts `data` to destination payload format - # specified in `output_payload_format`. If `output_payload_format` is - # not set, the data will remain unchanged. - # - It also sets the corresponding datacontenttype of - # the CloudEvent, as indicated by - # `output_payload_format`. If no - # `output_payload_format` is set it will use the value of the - # "datacontenttype" attribute on the CloudEvent if present, else - # remove "datacontenttype" attribute. - # - This function expects that the content of the message will - # adhere to the standard CloudEvent format. If it doesn't then this - # function will fail. - # - The result is a CEL map that corresponds to the JSON - # representation of the CloudEvent. To convert that data to a JSON - # string it can be chained with the toJsonString function. - # - # The Pipeline expects that the message it receives adheres to the - # standard CloudEvent format. If it doesn't then the outgoing message - # request may fail with a persistent error. - class HttpEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a config used to authenticate message requests. - # @!attribute [rw] google_oidc - # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OidcToken] - # Optional. This authenticate method will apply Google OIDC tokens - # signed by a Google Cloud service account to the requests. - # - # Note: The following fields are mutually exclusive: `google_oidc`, `oauth_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] oauth_token - # @return [::Google::Cloud::Eventarc::V1::Pipeline::Destination::AuthenticationConfig::OAuthToken] - # Optional. If specified, an [OAuth - # token](https://developers.google.com/identity/protocols/OAuth2) will - # be generated and attached as an `Authorization` header in the HTTP - # request. - # - # This type of authorization should generally only be used when calling - # Google APIs hosted on *.googleapis.com. - # - # Note: The following fields are mutually exclusive: `oauth_token`, `google_oidc`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class AuthenticationConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Represents a config used to authenticate with a Google OIDC token using - # a Google Cloud service account. Use this authentication method to - # invoke your Cloud Run and Cloud Functions destinations or HTTP - # endpoints that support Google OIDC. - # @!attribute [rw] service_account - # @return [::String] - # Required. Service account email used to generate the OIDC Token. - # The principal who calls this API must have - # iam.serviceAccounts.actAs permission in the service account. See - # https://cloud.google.com/iam/docs/understanding-service-accounts - # for more information. Eventarc service agents must have - # roles/roles/iam.serviceAccountTokenCreator role to allow the - # Pipeline to create OpenID tokens for authenticated requests. - # @!attribute [rw] audience - # @return [::String] - # Optional. Audience to be used to generate the OIDC Token. The - # audience claim identifies the recipient that the JWT is intended for. - # If unspecified, the destination URI will be used. - class OidcToken - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contains information needed for generating an - # [OAuth token](https://developers.google.com/identity/protocols/OAuth2). - # This type of authorization should generally only be used when calling - # Google APIs hosted on *.googleapis.com. - # @!attribute [rw] service_account - # @return [::String] - # Required. Service account email used to generate the [OAuth - # token](https://developers.google.com/identity/protocols/OAuth2). - # The principal who calls this API must have - # iam.serviceAccounts.actAs permission in the service account. See - # https://cloud.google.com/iam/docs/understanding-service-accounts - # for more information. Eventarc service agents must have - # roles/roles/iam.serviceAccountTokenCreator role to allow Pipeline - # to create OAuth2 tokens for authenticated requests. - # @!attribute [rw] scope - # @return [::String] - # Optional. OAuth scope to be used for generating OAuth access token. - # If not specified, "https://www.googleapis.com/auth/cloud-platform" - # will be used. - class OAuthToken - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # Mediation defines different ways to modify the Pipeline. - # @!attribute [rw] transformation - # @return [::Google::Cloud::Eventarc::V1::Pipeline::Mediation::Transformation] - # Optional. How the Pipeline is to transform messages - class Mediation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Transformation defines the way to transform an incoming message. - # @!attribute [rw] transformation_template - # @return [::String] - # Optional. The CEL expression template to apply to transform messages. - # The following CEL extension functions are provided for - # use in this CEL expression: - # - merge: - # map1.merge(map2) -> map3 - # - Merges the passed CEL map with the existing CEL map the - # function is applied to. - # - If the same key exists in both maps, if the key's value is type - # map both maps are merged else the value from the passed map is - # used. - # - denormalize: - # map.denormalize() -> map - # - Denormalizes a CEL map such that every value of type map or key - # in the map is expanded to return a single level map. - # - The resulting keys are "." separated indices of the map keys. - # - For example: - # { - # "a": 1, - # "b": { - # "c": 2, - # "d": 3 - # } - # "e": [4, 5] - # } - # .denormalize() - # -> { - # "a": 1, - # "b.c": 2, - # "b.d": 3, - # "e.0": 4, - # "e.1": 5 - # } - # - setField: - # map.setField(key, value) -> message - # - Sets the field of the message with the given key to the - # given value. - # - If the field is not present it will be added. - # - If the field is present it will be overwritten. - # - The key can be a dot separated path to set a field in a nested - # message. - # - Key must be of type string. - # - Value may be any valid type. - # - removeFields: - # map.removeFields([key1, key2, ...]) -> message - # - Removes the fields of the map with the given keys. - # - The keys can be a dot separated path to remove a field in a - # nested message. - # - If a key is not found it will be ignored. - # - Keys must be of type string. - # - toMap: - # [map1, map2, ...].toMap() -> map - # - Converts a CEL list of CEL maps to a single CEL map - # - toDestinationPayloadFormat(): - # message.data.toDestinationPayloadFormat() -> string or bytes - # - Converts the message data to the destination payload format - # specified in Pipeline.Destination.output_payload_format - # - This function is meant to be applied to the message.data field. - # - If the destination payload format is not set, the function will - # return the message data unchanged. - # - toCloudEventJsonWithPayloadFormat: - # message.toCloudEventJsonWithPayloadFormat() -> map - # - Converts a message to the corresponding structure of JSON - # format for CloudEvents - # - This function applies toDestinationPayloadFormat() to the - # message data. It also sets the corresponding datacontenttype of - # the CloudEvent, as indicated by - # Pipeline.Destination.output_payload_format. If no - # output_payload_format is set it will use the existing - # datacontenttype on the CloudEvent if present, else leave - # datacontenttype absent. - # - This function expects that the content of the message will - # adhere to the standard CloudEvent format. If it doesn't then this - # function will fail. - # - The result is a CEL map that corresponds to the JSON - # representation of the CloudEvent. To convert that data to a JSON - # string it can be chained with the toJsonString function. - class Transformation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The retry policy configuration for the Pipeline. The pipeline - # exponentially backs off in case the destination is non responsive or - # returns a retryable error code. The default semantics are as follows: - # The backoff starts with a 5 second delay and doubles the - # delay after each failed attempt (10 seconds, 20 seconds, 40 seconds, etc.). - # The delay is capped at 60 seconds by default. - # Please note that if you set the min_retry_delay and max_retry_delay fields - # to the same value this will make the duration between retries constant. - # @!attribute [rw] max_attempts - # @return [::Integer] - # Optional. The maximum number of delivery attempts for any message. The - # value must be between 1 and 100. The default value for this field is 5. - # @!attribute [rw] min_retry_delay - # @return [::Google::Protobuf::Duration] - # Optional. The minimum amount of seconds to wait between retry attempts. - # The value must be between 1 and 600. The default value for this field - # is 5. - # @!attribute [rw] max_retry_delay - # @return [::Google::Protobuf::Duration] - # Optional. The maximum amount of seconds to wait between retry attempts. - # The value must be between 1 and 600. The default value for this field - # is 60. - class RetryPolicy - 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 [::String] - class AnnotationsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/trigger.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/trigger.rb deleted file mode 100644 index 18327a1ae092..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/cloud/eventarc/v1/trigger.rb +++ /dev/null @@ -1,316 +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 Eventarc - module V1 - # A representation of the trigger resource. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the trigger. Must be unique within the - # location of the project and must be in - # `projects/{project}/locations/{location}/triggers/{trigger}` format. - # @!attribute [r] uid - # @return [::String] - # Output only. Server-assigned unique identifier for the trigger. The value - # is a UUID4 string and guaranteed to remain unchanged until the resource is - # deleted. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The creation time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last-modified time. - # @!attribute [rw] event_filters - # @return [::Array<::Google::Cloud::Eventarc::V1::EventFilter>] - # Required. Unordered list. The list of filters that applies to event - # attributes. Only events that match all the provided filters are sent to the - # destination. - # @!attribute [rw] service_account - # @return [::String] - # Optional. The IAM service account email associated with the trigger. The - # service account represents the identity of the trigger. - # - # The `iam.serviceAccounts.actAs` permission must be granted on the service - # account to allow a principal to impersonate the service account. For more - # information, see the - # [Roles and permissions](/eventarc/docs/all-roles-permissions) page specific - # to the trigger destination. - # @!attribute [rw] destination - # @return [::Google::Cloud::Eventarc::V1::Destination] - # Required. Destination specifies where the events should be sent to. - # @!attribute [rw] transport - # @return [::Google::Cloud::Eventarc::V1::Transport] - # Optional. To deliver messages, Eventarc might use other Google Cloud - # products as a transport intermediary. This field contains a reference to - # that transport intermediary. This information can be used for debugging - # purposes. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. User labels attached to the triggers that can be used to group - # resources. - # @!attribute [rw] channel - # @return [::String] - # Optional. The name of the channel associated with the trigger in - # `projects/{project}/locations/{location}/channels/{channel}` format. - # You must provide a channel to receive events from Eventarc SaaS partners. - # @!attribute [r] conditions - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Eventarc::V1::StateCondition}] - # Output only. The reason(s) why a trigger is in FAILED state. - # @!attribute [rw] event_data_content_type - # @return [::String] - # Optional. EventDataContentType specifies the type of payload in MIME - # format that is expected from the CloudEvent data field. This is set to - # `application/json` if the value is not defined. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. Whether or not this Trigger satisfies the requirements of - # physical zone separation - # @!attribute [rw] retry_policy - # @return [::Google::Cloud::Eventarc::V1::Trigger::RetryPolicy] - # Optional. The retry policy to use in the Trigger. - # - # If unset, event delivery will be retried for up to 24 hours by default: - # https://cloud.google.com/eventarc/docs/retry-events - # @!attribute [r] etag - # @return [::String] - # Output only. This checksum is computed by the server based on the value of - # other fields, and might be sent only on create requests to ensure that the - # client has an up-to-date value before proceeding. - class Trigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The retry policy configuration for the Trigger. - # - # Can only be set with Cloud Run destinations. - # @!attribute [rw] max_attempts - # @return [::Integer] - # Optional. The maximum number of delivery attempts for any message. The - # only valid value is 1. - class RetryPolicy - 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::Eventarc::V1::StateCondition] - class ConditionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Filters events based on exact matches on the CloudEvents attributes. - # @!attribute [rw] attribute - # @return [::String] - # Required. The name of a CloudEvents attribute. Currently, only a subset of - # attributes are supported for filtering. You can [retrieve a specific - # provider's supported event - # types](/eventarc/docs/list-providers#describe-provider). - # - # All triggers MUST provide a filter for the 'type' attribute. - # @!attribute [rw] value - # @return [::String] - # Required. The value for the attribute. - # @!attribute [rw] operator - # @return [::String] - # Optional. The operator used for matching the events with the value of the - # filter. If not specified, only events that have an exact key-value pair - # specified in the filter are matched. The allowed values are `path_pattern` - # and `match-path-pattern`. `path_pattern` is only allowed for GCFv1 - # triggers. - class EventFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A condition that is part of the trigger state computation. - # @!attribute [rw] code - # @return [::Google::Rpc::Code] - # The canonical code of the condition. - # @!attribute [rw] message - # @return [::String] - # Human-readable message. - class StateCondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a target of an invocation over HTTP. - # @!attribute [rw] cloud_run - # @return [::Google::Cloud::Eventarc::V1::CloudRun] - # Cloud Run fully-managed resource that receives the events. The resource - # should be in the same project as the trigger. - # - # Note: The following fields are mutually exclusive: `cloud_run`, `cloud_function`, `gke`, `workflow`, `http_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] cloud_function - # @return [::String] - # The Cloud Function resource name. Cloud Functions V1 and V2 are - # supported. - # Format: `projects/{project}/locations/{location}/functions/{function}` - # - # This is a read-only field. Creating Cloud Functions V1/V2 triggers is - # only supported via the Cloud Functions product. An error will be returned - # if the user sets this value. - # - # Note: The following fields are mutually exclusive: `cloud_function`, `cloud_run`, `gke`, `workflow`, `http_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] gke - # @return [::Google::Cloud::Eventarc::V1::GKE] - # A GKE service capable of receiving events. The service should be running - # in the same project as the trigger. - # - # Note: The following fields are mutually exclusive: `gke`, `cloud_run`, `cloud_function`, `workflow`, `http_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] workflow - # @return [::String] - # The resource name of the Workflow whose Executions are triggered by - # the events. The Workflow resource should be deployed in the same project - # as the trigger. - # Format: `projects/{project}/locations/{location}/workflows/{workflow}` - # - # Note: The following fields are mutually exclusive: `workflow`, `cloud_run`, `cloud_function`, `gke`, `http_endpoint`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] http_endpoint - # @return [::Google::Cloud::Eventarc::V1::HttpEndpoint] - # An HTTP endpoint destination described by an URI. - # - # Note: The following fields are mutually exclusive: `http_endpoint`, `cloud_run`, `cloud_function`, `gke`, `workflow`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] network_config - # @return [::Google::Cloud::Eventarc::V1::NetworkConfig] - # Optional. Network config is used to configure how Eventarc resolves and - # connect to a destination. - # This should only be used with HttpEndpoint destination type. - class Destination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the transport intermediaries created for the trigger to - # deliver events. - # @!attribute [rw] pubsub - # @return [::Google::Cloud::Eventarc::V1::Pubsub] - # The Pub/Sub topic and subscription used by Eventarc as a transport - # intermediary. - class Transport - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a Cloud Run destination. - # @!attribute [rw] service - # @return [::String] - # Required. The name of the Cloud Run service being addressed. See - # https://cloud.google.com/run/docs/reference/rest/v1/namespaces.services. - # - # Only services located in the same project as the trigger object - # can be addressed. - # @!attribute [rw] path - # @return [::String] - # Optional. The relative path on the Cloud Run service the events should be - # sent to. - # - # The value must conform to the definition of a URI path segment (section 3.3 - # of RFC2396). Examples: "/route", "route", "route/subroute". - # @!attribute [rw] region - # @return [::String] - # Required. The region the Cloud Run service is deployed in. - class CloudRun - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a GKE destination. - # @!attribute [rw] cluster - # @return [::String] - # Required. The name of the cluster the GKE service is running in. The - # cluster must be running in the same project as the trigger being created. - # @!attribute [rw] location - # @return [::String] - # Required. The name of the Google Compute Engine in which the cluster - # resides, which can either be compute zone (for example, us-central1-a) for - # the zonal clusters or region (for example, us-central1) for regional - # clusters. - # @!attribute [rw] namespace - # @return [::String] - # Required. The namespace the GKE service is running in. - # @!attribute [rw] service - # @return [::String] - # Required. Name of the GKE service. - # @!attribute [rw] path - # @return [::String] - # Optional. The relative path on the GKE service the events should be sent - # to. - # - # The value must conform to the definition of a URI path segment (section 3.3 - # of RFC2396). Examples: "/route", "route", "route/subroute". - class GKE - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a Pub/Sub transport. - # @!attribute [rw] topic - # @return [::String] - # Optional. The name of the Pub/Sub topic created and managed by Eventarc as - # a transport for the event delivery. Format: - # `projects/{PROJECT_ID}/topics/{TOPIC_NAME}`. - # - # You can set an existing topic for triggers of the type - # `google.cloud.pubsub.topic.v1.messagePublished`. The topic you provide - # here is not deleted by Eventarc at trigger deletion. - # @!attribute [r] subscription - # @return [::String] - # Output only. The name of the Pub/Sub subscription created and managed by - # Eventarc as a transport for the event delivery. Format: - # `projects/{PROJECT_ID}/subscriptions/{SUBSCRIPTION_NAME}`. - class Pubsub - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a HTTP endpoint destination. - # @!attribute [rw] uri - # @return [::String] - # Required. The URI of the HTTP endpoint. - # - # The value must be a RFC2396 URI string. - # Examples: `http://10.10.10.8:80/route`, - # `http://svc.us-central1.p.local:8080/`. - # Only HTTP and HTTPS protocols are supported. The host can be either a - # static IP addressable from the VPC specified by the network config, or - # an internal DNS hostname of the service resolvable via Cloud DNS. - class HttpEndpoint - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/rpc/code.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/rpc/code.rb deleted file mode 100644 index 8cf36e815510..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/rpc/code.rb +++ /dev/null @@ -1,185 +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 canonical error codes for gRPC APIs. - # - # - # Sometimes multiple error codes may apply. Services should return - # the most specific error code that applies. For example, prefer - # `OUT_OF_RANGE` over `FAILED_PRECONDITION` if both codes apply. - # Similarly prefer `NOT_FOUND` or `ALREADY_EXISTS` over `FAILED_PRECONDITION`. - module Code - # Not an error; returned on success. - # - # HTTP Mapping: 200 OK - OK = 0 - - # The operation was cancelled, typically by the caller. - # - # HTTP Mapping: 499 Client Closed Request - CANCELLED = 1 - - # Unknown error. For example, this error may be returned when - # a `Status` value received from another address space belongs to - # an error space that is not known in this address space. Also - # errors raised by APIs that do not return enough error information - # may be converted to this error. - # - # HTTP Mapping: 500 Internal Server Error - UNKNOWN = 2 - - # The client specified an invalid argument. Note that this differs - # from `FAILED_PRECONDITION`. `INVALID_ARGUMENT` indicates arguments - # that are problematic regardless of the state of the system - # (e.g., a malformed file name). - # - # HTTP Mapping: 400 Bad Request - INVALID_ARGUMENT = 3 - - # The deadline expired before the operation could complete. For operations - # that change the state of the system, this error may be returned - # even if the operation has completed successfully. For example, a - # successful response from a server could have been delayed long - # enough for the deadline to expire. - # - # HTTP Mapping: 504 Gateway Timeout - DEADLINE_EXCEEDED = 4 - - # Some requested entity (e.g., file or directory) was not found. - # - # Note to server developers: if a request is denied for an entire class - # of users, such as gradual feature rollout or undocumented allowlist, - # `NOT_FOUND` may be used. If a request is denied for some users within - # a class of users, such as user-based access control, `PERMISSION_DENIED` - # must be used. - # - # HTTP Mapping: 404 Not Found - NOT_FOUND = 5 - - # The entity that a client attempted to create (e.g., file or directory) - # already exists. - # - # HTTP Mapping: 409 Conflict - ALREADY_EXISTS = 6 - - # The caller does not have permission to execute the specified - # operation. `PERMISSION_DENIED` must not be used for rejections - # caused by exhausting some resource (use `RESOURCE_EXHAUSTED` - # instead for those errors). `PERMISSION_DENIED` must not be - # used if the caller can not be identified (use `UNAUTHENTICATED` - # instead for those errors). This error code does not imply the - # request is valid or the requested entity exists or satisfies - # other pre-conditions. - # - # HTTP Mapping: 403 Forbidden - PERMISSION_DENIED = 7 - - # The request does not have valid authentication credentials for the - # operation. - # - # HTTP Mapping: 401 Unauthorized - UNAUTHENTICATED = 16 - - # Some resource has been exhausted, perhaps a per-user quota, or - # perhaps the entire file system is out of space. - # - # HTTP Mapping: 429 Too Many Requests - RESOURCE_EXHAUSTED = 8 - - # The operation was rejected because the system is not in a state - # required for the operation's execution. For example, the directory - # to be deleted is non-empty, an rmdir operation is applied to - # a non-directory, etc. - # - # Service implementors can use the following guidelines to decide - # between `FAILED_PRECONDITION`, `ABORTED`, and `UNAVAILABLE`: - # (a) Use `UNAVAILABLE` if the client can retry just the failing call. - # (b) Use `ABORTED` if the client should retry at a higher level. For - # example, when a client-specified test-and-set fails, indicating the - # client should restart a read-modify-write sequence. - # (c) Use `FAILED_PRECONDITION` if the client should not retry until - # the system state has been explicitly fixed. For example, if an "rmdir" - # fails because the directory is non-empty, `FAILED_PRECONDITION` - # should be returned since the client should not retry unless - # the files are deleted from the directory. - # - # HTTP Mapping: 400 Bad Request - FAILED_PRECONDITION = 9 - - # The operation was aborted, typically due to a concurrency issue such as - # a sequencer check failure or transaction abort. - # - # See the guidelines above for deciding between `FAILED_PRECONDITION`, - # `ABORTED`, and `UNAVAILABLE`. - # - # HTTP Mapping: 409 Conflict - ABORTED = 10 - - # The operation was attempted past the valid range. E.g., seeking or - # reading past end-of-file. - # - # Unlike `INVALID_ARGUMENT`, this error indicates a problem that may - # be fixed if the system state changes. For example, a 32-bit file - # system will generate `INVALID_ARGUMENT` if asked to read at an - # offset that is not in the range [0,2^32-1], but it will generate - # `OUT_OF_RANGE` if asked to read from an offset past the current - # file size. - # - # There is a fair bit of overlap between `FAILED_PRECONDITION` and - # `OUT_OF_RANGE`. We recommend using `OUT_OF_RANGE` (the more specific - # error) when it applies so that callers who are iterating through - # a space can easily look for an `OUT_OF_RANGE` error to detect when - # they are done. - # - # HTTP Mapping: 400 Bad Request - OUT_OF_RANGE = 11 - - # The operation is not implemented or is not supported/enabled in this - # service. - # - # HTTP Mapping: 501 Not Implemented - UNIMPLEMENTED = 12 - - # Internal errors. This means that some invariants expected by the - # underlying system have been broken. This error code is reserved - # for serious errors. - # - # HTTP Mapping: 500 Internal Server Error - INTERNAL = 13 - - # The service is currently unavailable. This is most likely a - # transient condition, which can be corrected by retrying with - # a backoff. Note that it is not always safe to retry - # non-idempotent operations. - # - # See the guidelines above for deciding between `FAILED_PRECONDITION`, - # `ABORTED`, and `UNAVAILABLE`. - # - # HTTP Mapping: 503 Service Unavailable - UNAVAILABLE = 14 - - # Unrecoverable data loss or corruption. - # - # HTTP Mapping: 500 Internal Server Error - DATA_LOSS = 15 - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index 3c630675d70b..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-eventarc-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-eventarc-v1/snippets/Gemfile deleted file mode 100644 index e143611efab3..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-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-eventarc-v1", path: "../" -else - gem "google-cloud-eventarc-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-eventarc-v1/snippets/eventarc/create_channel.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel.rb deleted file mode 100644 index e52873b445b6..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel.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 eventarc_v1_generated_Eventarc_CreateChannel_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the create_channel call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#create_channel. -# -def create_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::CreateChannelRequest.new - - # Call the create_channel method. - result = client.create_channel request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_CreateChannel_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel_connection.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel_connection.rb deleted file mode 100644 index 1f7879290e07..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_channel_connection.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 eventarc_v1_generated_Eventarc_CreateChannelConnection_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the create_channel_connection call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#create_channel_connection. -# -def create_channel_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new - - # Call the create_channel_connection method. - result = client.create_channel_connection request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_CreateChannelConnection_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_enrollment.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_enrollment.rb deleted file mode 100644 index 56107af79568..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_enrollment.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 eventarc_v1_generated_Eventarc_CreateEnrollment_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the create_enrollment call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#create_enrollment. -# -def create_enrollment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new - - # Call the create_enrollment method. - result = client.create_enrollment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_CreateEnrollment_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_google_api_source.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_google_api_source.rb deleted file mode 100644 index 611a227863f4..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_google_api_source.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 eventarc_v1_generated_Eventarc_CreateGoogleApiSource_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the create_google_api_source call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#create_google_api_source. -# -def create_google_api_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new - - # Call the create_google_api_source method. - result = client.create_google_api_source request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_CreateGoogleApiSource_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_message_bus.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_message_bus.rb deleted file mode 100644 index 1ba98014fae7..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_message_bus.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 eventarc_v1_generated_Eventarc_CreateMessageBus_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the create_message_bus call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#create_message_bus. -# -def create_message_bus - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new - - # Call the create_message_bus method. - result = client.create_message_bus request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_CreateMessageBus_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_pipeline.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_pipeline.rb deleted file mode 100644 index ee5052721991..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_pipeline.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 eventarc_v1_generated_Eventarc_CreatePipeline_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the create_pipeline call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#create_pipeline. -# -def create_pipeline - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::CreatePipelineRequest.new - - # Call the create_pipeline method. - result = client.create_pipeline request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_CreatePipeline_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_trigger.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_trigger.rb deleted file mode 100644 index 1e98f1df6b20..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/create_trigger.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 eventarc_v1_generated_Eventarc_CreateTrigger_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the create_trigger call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#create_trigger. -# -def create_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::CreateTriggerRequest.new - - # Call the create_trigger method. - result = client.create_trigger request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_CreateTrigger_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel.rb deleted file mode 100644 index d186dabba8fe..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel.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 eventarc_v1_generated_Eventarc_DeleteChannel_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the delete_channel call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_channel. -# -def delete_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::DeleteChannelRequest.new - - # Call the delete_channel method. - result = client.delete_channel request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_DeleteChannel_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel_connection.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel_connection.rb deleted file mode 100644 index 59e92852a499..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_channel_connection.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 eventarc_v1_generated_Eventarc_DeleteChannelConnection_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the delete_channel_connection call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_channel_connection. -# -def delete_channel_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.new - - # Call the delete_channel_connection method. - result = client.delete_channel_connection request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_DeleteChannelConnection_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_enrollment.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_enrollment.rb deleted file mode 100644 index c75e68e93057..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_enrollment.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 eventarc_v1_generated_Eventarc_DeleteEnrollment_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the delete_enrollment call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_enrollment. -# -def delete_enrollment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new - - # Call the delete_enrollment method. - result = client.delete_enrollment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_DeleteEnrollment_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_google_api_source.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_google_api_source.rb deleted file mode 100644 index e95796acbd9f..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_google_api_source.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 eventarc_v1_generated_Eventarc_DeleteGoogleApiSource_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the delete_google_api_source call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_google_api_source. -# -def delete_google_api_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new - - # Call the delete_google_api_source method. - result = client.delete_google_api_source request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_DeleteGoogleApiSource_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_message_bus.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_message_bus.rb deleted file mode 100644 index f415da45923f..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_message_bus.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 eventarc_v1_generated_Eventarc_DeleteMessageBus_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the delete_message_bus call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_message_bus. -# -def delete_message_bus - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new - - # Call the delete_message_bus method. - result = client.delete_message_bus request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_DeleteMessageBus_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_pipeline.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_pipeline.rb deleted file mode 100644 index baad77f185a8..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_pipeline.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 eventarc_v1_generated_Eventarc_DeletePipeline_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the delete_pipeline call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_pipeline. -# -def delete_pipeline - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::DeletePipelineRequest.new - - # Call the delete_pipeline method. - result = client.delete_pipeline request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_DeletePipeline_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_trigger.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_trigger.rb deleted file mode 100644 index 6618c2f82d1a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/delete_trigger.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 eventarc_v1_generated_Eventarc_DeleteTrigger_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the delete_trigger call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#delete_trigger. -# -def delete_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new - - # Call the delete_trigger method. - result = client.delete_trigger request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_DeleteTrigger_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel.rb deleted file mode 100644 index 7ee91d10c3ff..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel.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 eventarc_v1_generated_Eventarc_GetChannel_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the get_channel call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#get_channel. -# -def get_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::GetChannelRequest.new - - # Call the get_channel method. - result = client.get_channel request - - # The returned object is of type Google::Cloud::Eventarc::V1::Channel. - p result -end -# [END eventarc_v1_generated_Eventarc_GetChannel_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel_connection.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel_connection.rb deleted file mode 100644 index 0df682daa6ee..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_channel_connection.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 eventarc_v1_generated_Eventarc_GetChannelConnection_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the get_channel_connection call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#get_channel_connection. -# -def get_channel_connection - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new - - # Call the get_channel_connection method. - result = client.get_channel_connection request - - # The returned object is of type Google::Cloud::Eventarc::V1::ChannelConnection. - p result -end -# [END eventarc_v1_generated_Eventarc_GetChannelConnection_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_enrollment.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_enrollment.rb deleted file mode 100644 index cc1f6373caff..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_enrollment.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 eventarc_v1_generated_Eventarc_GetEnrollment_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the get_enrollment call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#get_enrollment. -# -def get_enrollment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new - - # Call the get_enrollment method. - result = client.get_enrollment request - - # The returned object is of type Google::Cloud::Eventarc::V1::Enrollment. - p result -end -# [END eventarc_v1_generated_Eventarc_GetEnrollment_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_api_source.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_api_source.rb deleted file mode 100644 index 6dfba4ea70f7..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_api_source.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 eventarc_v1_generated_Eventarc_GetGoogleApiSource_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the get_google_api_source call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#get_google_api_source. -# -def get_google_api_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new - - # Call the get_google_api_source method. - result = client.get_google_api_source request - - # The returned object is of type Google::Cloud::Eventarc::V1::GoogleApiSource. - p result -end -# [END eventarc_v1_generated_Eventarc_GetGoogleApiSource_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_channel_config.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_channel_config.rb deleted file mode 100644 index ca363afe5769..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_google_channel_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 eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the get_google_channel_config call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#get_google_channel_config. -# -def get_google_channel_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new - - # Call the get_google_channel_config method. - result = client.get_google_channel_config request - - # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig. - p result -end -# [END eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_message_bus.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_message_bus.rb deleted file mode 100644 index 80e2d13a6d8e..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_message_bus.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 eventarc_v1_generated_Eventarc_GetMessageBus_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the get_message_bus call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#get_message_bus. -# -def get_message_bus - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::GetMessageBusRequest.new - - # Call the get_message_bus method. - result = client.get_message_bus request - - # The returned object is of type Google::Cloud::Eventarc::V1::MessageBus. - p result -end -# [END eventarc_v1_generated_Eventarc_GetMessageBus_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_pipeline.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_pipeline.rb deleted file mode 100644 index 3887639b4a04..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_pipeline.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 eventarc_v1_generated_Eventarc_GetPipeline_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the get_pipeline call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#get_pipeline. -# -def get_pipeline - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::GetPipelineRequest.new - - # Call the get_pipeline method. - result = client.get_pipeline request - - # The returned object is of type Google::Cloud::Eventarc::V1::Pipeline. - p result -end -# [END eventarc_v1_generated_Eventarc_GetPipeline_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_provider.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_provider.rb deleted file mode 100644 index a46cfe24c89a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_provider.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 eventarc_v1_generated_Eventarc_GetProvider_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the get_provider call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#get_provider. -# -def get_provider - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::GetProviderRequest.new - - # Call the get_provider method. - result = client.get_provider request - - # The returned object is of type Google::Cloud::Eventarc::V1::Provider. - p result -end -# [END eventarc_v1_generated_Eventarc_GetProvider_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_trigger.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_trigger.rb deleted file mode 100644 index 596557a484d4..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/get_trigger.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 eventarc_v1_generated_Eventarc_GetTrigger_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the get_trigger call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#get_trigger. -# -def get_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::GetTriggerRequest.new - - # Call the get_trigger method. - result = client.get_trigger request - - # The returned object is of type Google::Cloud::Eventarc::V1::Trigger. - p result -end -# [END eventarc_v1_generated_Eventarc_GetTrigger_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channel_connections.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channel_connections.rb deleted file mode 100644 index 79a9f342c07f..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channel_connections.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 eventarc_v1_generated_Eventarc_ListChannelConnections_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the list_channel_connections call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#list_channel_connections. -# -def list_channel_connections - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.new - - # Call the list_channel_connections method. - result = client.list_channel_connections request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Eventarc::V1::ChannelConnection. - p item - end -end -# [END eventarc_v1_generated_Eventarc_ListChannelConnections_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channels.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channels.rb deleted file mode 100644 index 9df7d1a964d9..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_channels.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 eventarc_v1_generated_Eventarc_ListChannels_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the list_channels call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#list_channels. -# -def list_channels - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::ListChannelsRequest.new - - # Call the list_channels method. - result = client.list_channels request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Eventarc::V1::Channel. - p item - end -end -# [END eventarc_v1_generated_Eventarc_ListChannels_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_enrollments.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_enrollments.rb deleted file mode 100644 index 56f1f577c426..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_enrollments.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 eventarc_v1_generated_Eventarc_ListEnrollments_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the list_enrollments call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#list_enrollments. -# -def list_enrollments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new - - # Call the list_enrollments method. - result = client.list_enrollments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Eventarc::V1::Enrollment. - p item - end -end -# [END eventarc_v1_generated_Eventarc_ListEnrollments_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_google_api_sources.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_google_api_sources.rb deleted file mode 100644 index 3343a1dca646..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_google_api_sources.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 eventarc_v1_generated_Eventarc_ListGoogleApiSources_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the list_google_api_sources call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#list_google_api_sources. -# -def list_google_api_sources - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new - - # Call the list_google_api_sources method. - result = client.list_google_api_sources request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Eventarc::V1::GoogleApiSource. - p item - end -end -# [END eventarc_v1_generated_Eventarc_ListGoogleApiSources_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_bus_enrollments.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_bus_enrollments.rb deleted file mode 100644 index e7ce554020b4..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_bus_enrollments.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 eventarc_v1_generated_Eventarc_ListMessageBusEnrollments_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the list_message_bus_enrollments call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#list_message_bus_enrollments. -# -def list_message_bus_enrollments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.new - - # Call the list_message_bus_enrollments method. - result = client.list_message_bus_enrollments request - - # The returned object is of type Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse. - p result -end -# [END eventarc_v1_generated_Eventarc_ListMessageBusEnrollments_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_buses.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_buses.rb deleted file mode 100644 index 381e78f94431..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_message_buses.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 eventarc_v1_generated_Eventarc_ListMessageBuses_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the list_message_buses call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#list_message_buses. -# -def list_message_buses - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new - - # Call the list_message_buses method. - result = client.list_message_buses request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Eventarc::V1::MessageBus. - p item - end -end -# [END eventarc_v1_generated_Eventarc_ListMessageBuses_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_pipelines.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_pipelines.rb deleted file mode 100644 index 3dc38e9cda85..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_pipelines.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 eventarc_v1_generated_Eventarc_ListPipelines_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the list_pipelines call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#list_pipelines. -# -def list_pipelines - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::ListPipelinesRequest.new - - # Call the list_pipelines method. - result = client.list_pipelines request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Eventarc::V1::Pipeline. - p item - end -end -# [END eventarc_v1_generated_Eventarc_ListPipelines_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_providers.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_providers.rb deleted file mode 100644 index 1248afcfa292..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_providers.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 eventarc_v1_generated_Eventarc_ListProviders_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the list_providers call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#list_providers. -# -def list_providers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::ListProvidersRequest.new - - # Call the list_providers method. - result = client.list_providers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Eventarc::V1::Provider. - p item - end -end -# [END eventarc_v1_generated_Eventarc_ListProviders_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_triggers.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_triggers.rb deleted file mode 100644 index 6545b1a107ae..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/list_triggers.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 eventarc_v1_generated_Eventarc_ListTriggers_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the list_triggers call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#list_triggers. -# -def list_triggers - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::ListTriggersRequest.new - - # Call the list_triggers method. - result = client.list_triggers request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Eventarc::V1::Trigger. - p item - end -end -# [END eventarc_v1_generated_Eventarc_ListTriggers_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_channel.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_channel.rb deleted file mode 100644 index e17d061026cb..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_channel.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 eventarc_v1_generated_Eventarc_UpdateChannel_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the update_channel call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#update_channel. -# -def update_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::UpdateChannelRequest.new - - # Call the update_channel method. - result = client.update_channel request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_UpdateChannel_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_enrollment.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_enrollment.rb deleted file mode 100644 index 0dc904109e75..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_enrollment.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 eventarc_v1_generated_Eventarc_UpdateEnrollment_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the update_enrollment call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#update_enrollment. -# -def update_enrollment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new - - # Call the update_enrollment method. - result = client.update_enrollment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_UpdateEnrollment_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_api_source.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_api_source.rb deleted file mode 100644 index 63e113924314..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_api_source.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 eventarc_v1_generated_Eventarc_UpdateGoogleApiSource_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the update_google_api_source call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#update_google_api_source. -# -def update_google_api_source - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new - - # Call the update_google_api_source method. - result = client.update_google_api_source request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_UpdateGoogleApiSource_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_channel_config.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_channel_config.rb deleted file mode 100644 index 2c59db30626d..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_google_channel_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 eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the update_google_channel_config call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#update_google_channel_config. -# -def update_google_channel_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new - - # Call the update_google_channel_config method. - result = client.update_google_channel_config request - - # The returned object is of type Google::Cloud::Eventarc::V1::GoogleChannelConfig. - p result -end -# [END eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_message_bus.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_message_bus.rb deleted file mode 100644 index 11b11952f8ef..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_message_bus.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 eventarc_v1_generated_Eventarc_UpdateMessageBus_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the update_message_bus call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#update_message_bus. -# -def update_message_bus - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new - - # Call the update_message_bus method. - result = client.update_message_bus request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_UpdateMessageBus_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_pipeline.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_pipeline.rb deleted file mode 100644 index 1516700496c1..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_pipeline.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 eventarc_v1_generated_Eventarc_UpdatePipeline_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the update_pipeline call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#update_pipeline. -# -def update_pipeline - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new - - # Call the update_pipeline method. - result = client.update_pipeline request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_UpdatePipeline_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_trigger.rb b/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_trigger.rb deleted file mode 100644 index d2705277387b..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/eventarc/update_trigger.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 eventarc_v1_generated_Eventarc_UpdateTrigger_sync] -require "google/cloud/eventarc/v1" - -## -# Snippet for the update_trigger call in the Eventarc service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Eventarc::V1::Eventarc::Client#update_trigger. -# -def update_trigger - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Eventarc::V1::Eventarc::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new - - # Call the update_trigger method. - result = client.update_trigger request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 eventarc_v1_generated_Eventarc_UpdateTrigger_sync] diff --git a/owl-bot-staging/google-cloud-eventarc-v1/snippets/snippet_metadata_google.cloud.eventarc.v1.json b/owl-bot-staging/google-cloud-eventarc-v1/snippets/snippet_metadata_google.cloud.eventarc.v1.json deleted file mode 100644 index d46127cd2377..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/snippets/snippet_metadata_google.cloud.eventarc.v1.json +++ /dev/null @@ -1,1575 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-eventarc-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.eventarc.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "eventarc_v1_generated_Eventarc_GetTrigger_sync", - "title": "Snippet for the get_trigger call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_trigger.", - "file": "eventarc/get_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_trigger", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::GetTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::Trigger", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "GetTrigger", - "full_name": "google.cloud.eventarc.v1.Eventarc.GetTrigger", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_ListTriggers_sync", - "title": "Snippet for the list_triggers call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_triggers.", - "file": "eventarc/list_triggers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_triggers", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_triggers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::ListTriggersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::ListTriggersResponse", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "ListTriggers", - "full_name": "google.cloud.eventarc.v1.Eventarc.ListTriggers", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_CreateTrigger_sync", - "title": "Snippet for the create_trigger call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_trigger.", - "file": "eventarc/create_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_trigger", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::CreateTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "CreateTrigger", - "full_name": "google.cloud.eventarc.v1.Eventarc.CreateTrigger", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_UpdateTrigger_sync", - "title": "Snippet for the update_trigger call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_trigger.", - "file": "eventarc/update_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_trigger", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::UpdateTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "UpdateTrigger", - "full_name": "google.cloud.eventarc.v1.Eventarc.UpdateTrigger", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_DeleteTrigger_sync", - "title": "Snippet for the delete_trigger call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_trigger.", - "file": "eventarc/delete_trigger.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_trigger", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_trigger", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::DeleteTriggerRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "DeleteTrigger", - "full_name": "google.cloud.eventarc.v1.Eventarc.DeleteTrigger", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_GetChannel_sync", - "title": "Snippet for the get_channel call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_channel.", - "file": "eventarc/get_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_channel", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::GetChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::Channel", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "GetChannel", - "full_name": "google.cloud.eventarc.v1.Eventarc.GetChannel", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_ListChannels_sync", - "title": "Snippet for the list_channels call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_channels.", - "file": "eventarc/list_channels.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_channels", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_channels", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::ListChannelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::ListChannelsResponse", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "ListChannels", - "full_name": "google.cloud.eventarc.v1.Eventarc.ListChannels", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_CreateChannel_sync", - "title": "Snippet for the create_channel call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_channel.", - "file": "eventarc/create_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_channel", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::CreateChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "CreateChannel", - "full_name": "google.cloud.eventarc.v1.Eventarc.CreateChannel", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_UpdateChannel_sync", - "title": "Snippet for the update_channel call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_channel.", - "file": "eventarc/update_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_channel", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::UpdateChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "UpdateChannel", - "full_name": "google.cloud.eventarc.v1.Eventarc.UpdateChannel", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_DeleteChannel_sync", - "title": "Snippet for the delete_channel call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_channel.", - "file": "eventarc/delete_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_channel", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::DeleteChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "DeleteChannel", - "full_name": "google.cloud.eventarc.v1.Eventarc.DeleteChannel", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_GetProvider_sync", - "title": "Snippet for the get_provider call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_provider.", - "file": "eventarc/get_provider.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_provider", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_provider", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::GetProviderRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::Provider", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "GetProvider", - "full_name": "google.cloud.eventarc.v1.Eventarc.GetProvider", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_ListProviders_sync", - "title": "Snippet for the list_providers call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_providers.", - "file": "eventarc/list_providers.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_providers", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_providers", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::ListProvidersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::ListProvidersResponse", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "ListProviders", - "full_name": "google.cloud.eventarc.v1.Eventarc.ListProviders", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_GetChannelConnection_sync", - "title": "Snippet for the get_channel_connection call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_channel_connection.", - "file": "eventarc/get_channel_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_channel_connection", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_channel_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::ChannelConnection", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "GetChannelConnection", - "full_name": "google.cloud.eventarc.v1.Eventarc.GetChannelConnection", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_ListChannelConnections_sync", - "title": "Snippet for the list_channel_connections call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_channel_connections.", - "file": "eventarc/list_channel_connections.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_channel_connections", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_channel_connections", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "ListChannelConnections", - "full_name": "google.cloud.eventarc.v1.Eventarc.ListChannelConnections", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_CreateChannelConnection_sync", - "title": "Snippet for the create_channel_connection call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_channel_connection.", - "file": "eventarc/create_channel_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_channel_connection", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_channel_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "CreateChannelConnection", - "full_name": "google.cloud.eventarc.v1.Eventarc.CreateChannelConnection", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_DeleteChannelConnection_sync", - "title": "Snippet for the delete_channel_connection call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_channel_connection.", - "file": "eventarc/delete_channel_connection.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_channel_connection", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_channel_connection", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "DeleteChannelConnection", - "full_name": "google.cloud.eventarc.v1.Eventarc.DeleteChannelConnection", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_GetGoogleChannelConfig_sync", - "title": "Snippet for the get_google_channel_config call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_google_channel_config.", - "file": "eventarc/get_google_channel_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_google_channel_config", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_google_channel_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::GoogleChannelConfig", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "GetGoogleChannelConfig", - "full_name": "google.cloud.eventarc.v1.Eventarc.GetGoogleChannelConfig", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_UpdateGoogleChannelConfig_sync", - "title": "Snippet for the update_google_channel_config call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_google_channel_config.", - "file": "eventarc/update_google_channel_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_google_channel_config", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_google_channel_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::GoogleChannelConfig", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "UpdateGoogleChannelConfig", - "full_name": "google.cloud.eventarc.v1.Eventarc.UpdateGoogleChannelConfig", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_GetMessageBus_sync", - "title": "Snippet for the get_message_bus call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_message_bus.", - "file": "eventarc/get_message_bus.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_message_bus", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_message_bus", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::GetMessageBusRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::MessageBus", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "GetMessageBus", - "full_name": "google.cloud.eventarc.v1.Eventarc.GetMessageBus", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_ListMessageBuses_sync", - "title": "Snippet for the list_message_buses call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_message_buses.", - "file": "eventarc/list_message_buses.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_message_buses", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_message_buses", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::ListMessageBusesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::ListMessageBusesResponse", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "ListMessageBuses", - "full_name": "google.cloud.eventarc.v1.Eventarc.ListMessageBuses", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_ListMessageBusEnrollments_sync", - "title": "Snippet for the list_message_bus_enrollments call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_message_bus_enrollments.", - "file": "eventarc/list_message_bus_enrollments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_message_bus_enrollments", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_message_bus_enrollments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "ListMessageBusEnrollments", - "full_name": "google.cloud.eventarc.v1.Eventarc.ListMessageBusEnrollments", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_CreateMessageBus_sync", - "title": "Snippet for the create_message_bus call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_message_bus.", - "file": "eventarc/create_message_bus.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_message_bus", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_message_bus", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::CreateMessageBusRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "CreateMessageBus", - "full_name": "google.cloud.eventarc.v1.Eventarc.CreateMessageBus", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_UpdateMessageBus_sync", - "title": "Snippet for the update_message_bus call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_message_bus.", - "file": "eventarc/update_message_bus.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_message_bus", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_message_bus", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "UpdateMessageBus", - "full_name": "google.cloud.eventarc.v1.Eventarc.UpdateMessageBus", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_DeleteMessageBus_sync", - "title": "Snippet for the delete_message_bus call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_message_bus.", - "file": "eventarc/delete_message_bus.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_message_bus", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_message_bus", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "DeleteMessageBus", - "full_name": "google.cloud.eventarc.v1.Eventarc.DeleteMessageBus", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_GetEnrollment_sync", - "title": "Snippet for the get_enrollment call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_enrollment.", - "file": "eventarc/get_enrollment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_enrollment", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_enrollment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::GetEnrollmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::Enrollment", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "GetEnrollment", - "full_name": "google.cloud.eventarc.v1.Eventarc.GetEnrollment", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_ListEnrollments_sync", - "title": "Snippet for the list_enrollments call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_enrollments.", - "file": "eventarc/list_enrollments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_enrollments", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_enrollments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "ListEnrollments", - "full_name": "google.cloud.eventarc.v1.Eventarc.ListEnrollments", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_CreateEnrollment_sync", - "title": "Snippet for the create_enrollment call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_enrollment.", - "file": "eventarc/create_enrollment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_enrollment", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_enrollment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "CreateEnrollment", - "full_name": "google.cloud.eventarc.v1.Eventarc.CreateEnrollment", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_UpdateEnrollment_sync", - "title": "Snippet for the update_enrollment call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_enrollment.", - "file": "eventarc/update_enrollment.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_enrollment", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_enrollment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "UpdateEnrollment", - "full_name": "google.cloud.eventarc.v1.Eventarc.UpdateEnrollment", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_DeleteEnrollment_sync", - "title": "Snippet for the delete_enrollment call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_enrollment.", - "file": "eventarc/delete_enrollment.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_enrollment", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_enrollment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "DeleteEnrollment", - "full_name": "google.cloud.eventarc.v1.Eventarc.DeleteEnrollment", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_GetPipeline_sync", - "title": "Snippet for the get_pipeline call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_pipeline.", - "file": "eventarc/get_pipeline.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_pipeline", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_pipeline", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::GetPipelineRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::Pipeline", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "GetPipeline", - "full_name": "google.cloud.eventarc.v1.Eventarc.GetPipeline", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_ListPipelines_sync", - "title": "Snippet for the list_pipelines call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_pipelines.", - "file": "eventarc/list_pipelines.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_pipelines", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_pipelines", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::ListPipelinesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::ListPipelinesResponse", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "ListPipelines", - "full_name": "google.cloud.eventarc.v1.Eventarc.ListPipelines", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_CreatePipeline_sync", - "title": "Snippet for the create_pipeline call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_pipeline.", - "file": "eventarc/create_pipeline.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_pipeline", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_pipeline", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::CreatePipelineRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "CreatePipeline", - "full_name": "google.cloud.eventarc.v1.Eventarc.CreatePipeline", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_UpdatePipeline_sync", - "title": "Snippet for the update_pipeline call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_pipeline.", - "file": "eventarc/update_pipeline.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_pipeline", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_pipeline", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::UpdatePipelineRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "UpdatePipeline", - "full_name": "google.cloud.eventarc.v1.Eventarc.UpdatePipeline", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_DeletePipeline_sync", - "title": "Snippet for the delete_pipeline call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_pipeline.", - "file": "eventarc/delete_pipeline.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_pipeline", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_pipeline", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::DeletePipelineRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "DeletePipeline", - "full_name": "google.cloud.eventarc.v1.Eventarc.DeletePipeline", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_GetGoogleApiSource_sync", - "title": "Snippet for the get_google_api_source call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#get_google_api_source.", - "file": "eventarc/get_google_api_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_google_api_source", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#get_google_api_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::GoogleApiSource", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "GetGoogleApiSource", - "full_name": "google.cloud.eventarc.v1.Eventarc.GetGoogleApiSource", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_ListGoogleApiSources_sync", - "title": "Snippet for the list_google_api_sources call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#list_google_api_sources.", - "file": "eventarc/list_google_api_sources.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_google_api_sources", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#list_google_api_sources", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "ListGoogleApiSources", - "full_name": "google.cloud.eventarc.v1.Eventarc.ListGoogleApiSources", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_CreateGoogleApiSource_sync", - "title": "Snippet for the create_google_api_source call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#create_google_api_source.", - "file": "eventarc/create_google_api_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_google_api_source", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#create_google_api_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "CreateGoogleApiSource", - "full_name": "google.cloud.eventarc.v1.Eventarc.CreateGoogleApiSource", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_UpdateGoogleApiSource_sync", - "title": "Snippet for the update_google_api_source call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#update_google_api_source.", - "file": "eventarc/update_google_api_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_google_api_source", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#update_google_api_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "UpdateGoogleApiSource", - "full_name": "google.cloud.eventarc.v1.Eventarc.UpdateGoogleApiSource", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "eventarc_v1_generated_Eventarc_DeleteGoogleApiSource_sync", - "title": "Snippet for the delete_google_api_source call in the Eventarc service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Eventarc::V1::Eventarc::Client#delete_google_api_source.", - "file": "eventarc/delete_google_api_source.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_google_api_source", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client#delete_google_api_source", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "Eventarc::Client", - "full_name": "::Google::Cloud::Eventarc::V1::Eventarc::Client" - }, - "method": { - "short_name": "DeleteGoogleApiSource", - "full_name": "google.cloud.eventarc.v1.Eventarc.DeleteGoogleApiSource", - "service": { - "short_name": "Eventarc", - "full_name": "google.cloud.eventarc.v1.Eventarc" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_operations_test.rb b/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_operations_test.rb deleted file mode 100644 index 29b2e4229dca..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_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/eventarc/v1/eventarc_pb" -require "google/cloud/eventarc/v1/eventarc_services_pb" -require "google/cloud/eventarc/v1/eventarc" - -class ::Google::Cloud::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_paths_test.rb b/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_paths_test.rb deleted file mode 100644 index 88e88b635c57..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_paths_test.rb +++ /dev/null @@ -1,244 +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/eventarc/v1/eventarc" - -class ::Google::Cloud::Eventarc::V1::Eventarc::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_channel_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.channel_path project: "value0", location: "value1", channel: "value2" - assert_equal "projects/value0/locations/value1/channels/value2", path - end - end - - def test_channel_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::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.channel_connection_path project: "value0", location: "value1", channel_connection: "value2" - assert_equal "projects/value0/locations/value1/channelConnections/value2", path - end - end - - def test_cloud_function_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.cloud_function_path project: "value0", location: "value1", function: "value2" - assert_equal "projects/value0/locations/value1/functions/value2", path - end - end - - def test_crypto_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path - end - end - - def test_enrollment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.enrollment_path project: "value0", location: "value1", enrollment: "value2" - assert_equal "projects/value0/locations/value1/enrollments/value2", path - end - end - - def test_google_api_source_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.google_api_source_path project: "value0", location: "value1", google_api_source: "value2" - assert_equal "projects/value0/locations/value1/googleApiSources/value2", path - end - end - - def test_google_channel_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::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.google_channel_config_path project: "value0", location: "value1" - assert_equal "projects/value0/locations/value1/googleChannelConfig", 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::Eventarc::V1::Eventarc::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_message_bus_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.message_bus_path project: "value0", location: "value1", message_bus: "value2" - assert_equal "projects/value0/locations/value1/messageBuses/value2", path - end - end - - def test_network_attachment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.network_attachment_path project: "value0", region: "value1", networkattachment: "value2" - assert_equal "projects/value0/regions/value1/networkAttachments/value2", path - end - end - - def test_pipeline_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.pipeline_path project: "value0", location: "value1", pipeline: "value2" - assert_equal "projects/value0/locations/value1/pipelines/value2", path - end - end - - def test_provider_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.provider_path project: "value0", location: "value1", provider: "value2" - assert_equal "projects/value0/locations/value1/providers/value2", path - end - end - - def test_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - end - end - - def test_service_account_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_account_path project: "value0", service_account: "value1" - assert_equal "projects/value0/serviceAccounts/value1", path - end - end - - def test_topic_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.topic_path project: "value0", topic: "value1" - assert_equal "projects/value0/topics/value1", path - end - end - - def test_trigger_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.trigger_path project: "value0", location: "value1", trigger: "value2" - assert_equal "projects/value0/locations/value1/triggers/value2", path - end - end - - def test_workflow_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.workflow_path project: "value0", location: "value1", workflow: "value2" - assert_equal "projects/value0/locations/value1/workflows/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_rest_test.rb b/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_rest_test.rb deleted file mode 100644 index 2123c7230b43..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_rest_test.rb +++ /dev/null @@ -1,2290 +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/eventarc/v1/eventarc_pb" -require "google/cloud/eventarc/v1/eventarc/rest" - - -class ::Google::Cloud::Eventarc::V1::Eventarc::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_get_trigger - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::Trigger.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_trigger_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_trigger({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_trigger name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_trigger ::Google::Cloud::Eventarc::V1::GetTriggerRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_trigger({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_trigger(::Google::Cloud::Eventarc::V1::GetTriggerRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_trigger_client_stub.call_count - end - end - end - - def test_list_triggers - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::ListTriggersResponse.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" - order_by = "hello world" - filter = "hello world" - - list_triggers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_triggers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_triggers_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_triggers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_triggers parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_triggers ::Google::Cloud::Eventarc::V1::ListTriggersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_triggers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_triggers(::Google::Cloud::Eventarc::V1::ListTriggersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_triggers_client_stub.call_count - end - end - end - - def test_create_trigger - # 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" - trigger = {} - trigger_id = "hello world" - validate_only = true - - create_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_trigger_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_trigger({ parent: parent, trigger: trigger, trigger_id: trigger_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_trigger parent: parent, trigger: trigger, trigger_id: trigger_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_trigger ::Google::Cloud::Eventarc::V1::CreateTriggerRequest.new(parent: parent, trigger: trigger, trigger_id: trigger_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_trigger({ parent: parent, trigger: trigger, trigger_id: trigger_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_trigger(::Google::Cloud::Eventarc::V1::CreateTriggerRequest.new(parent: parent, trigger: trigger, trigger_id: trigger_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_trigger_client_stub.call_count - end - end - end - - def test_update_trigger - # 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. - trigger = {} - update_mask = {} - allow_missing = true - validate_only = true - - update_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_trigger_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_trigger({ trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_trigger trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_trigger ::Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new(trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_trigger({ trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_trigger(::Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new(trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_trigger_client_stub.call_count - end - end - end - - def test_delete_trigger - # 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" - allow_missing = true - validate_only = true - - delete_trigger_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_trigger_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_trigger_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_trigger({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_trigger name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_trigger ::Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_trigger({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_trigger(::Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_trigger_client_stub.call_count - end - end - end - - def test_get_channel - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::Channel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_channel_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_channel({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_channel name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_channel ::Google::Cloud::Eventarc::V1::GetChannelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_channel({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_channel(::Google::Cloud::Eventarc::V1::GetChannelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_channel_client_stub.call_count - end - end - end - - def test_list_channels - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::ListChannelsResponse.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" - order_by = "hello world" - - list_channels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_channels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_channels_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_channels({ parent: parent, 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_channels parent: parent, 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_channels ::Google::Cloud::Eventarc::V1::ListChannelsRequest.new(parent: parent, 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_channels({ parent: parent, 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_channels(::Google::Cloud::Eventarc::V1::ListChannelsRequest.new(parent: parent, 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_channels_client_stub.call_count - end - end - end - - def test_create_channel - # 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" - channel = {} - channel_id = "hello world" - validate_only = true - - create_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_channel_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_channel({ parent: parent, channel: channel, channel_id: channel_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_channel parent: parent, channel: channel, channel_id: channel_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_channel ::Google::Cloud::Eventarc::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_channel({ parent: parent, channel: channel, channel_id: channel_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_channel(::Google::Cloud::Eventarc::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_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_channel_client_stub.call_count - end - end - end - - def test_update_channel - # 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. - channel = {} - update_mask = {} - validate_only = true - - update_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_channel_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_channel({ channel: channel, update_mask: update_mask, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_channel channel: channel, update_mask: update_mask, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_channel ::Google::Cloud::Eventarc::V1::UpdateChannelRequest.new(channel: channel, 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_channel({ channel: channel, 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_channel(::Google::Cloud::Eventarc::V1::UpdateChannelRequest.new(channel: channel, 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_channel_client_stub.call_count - end - end - end - - def test_delete_channel - # 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" - validate_only = true - - delete_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_channel_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_channel({ name: name, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_channel name: name, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_channel ::Google::Cloud::Eventarc::V1::DeleteChannelRequest.new(name: name, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_channel({ name: name, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_channel(::Google::Cloud::Eventarc::V1::DeleteChannelRequest.new(name: name, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_channel_client_stub.call_count - end - end - end - - def test_get_provider - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::Provider.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_provider_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_provider_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_provider_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_provider({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_provider name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_provider ::Google::Cloud::Eventarc::V1::GetProviderRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_provider({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_provider(::Google::Cloud::Eventarc::V1::GetProviderRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_provider_client_stub.call_count - end - end - end - - def test_list_providers - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::ListProvidersResponse.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" - order_by = "hello world" - filter = "hello world" - - list_providers_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_providers_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_providers_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_providers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_providers parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_providers ::Google::Cloud::Eventarc::V1::ListProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_providers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_providers(::Google::Cloud::Eventarc::V1::ListProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_providers_client_stub.call_count - end - end - end - - def test_get_channel_connection - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::ChannelConnection.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_channel_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_channel_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_channel_connection_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_channel_connection({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_channel_connection name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_channel_connection ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_channel_connection({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_channel_connection(::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_channel_connection_client_stub.call_count - end - end - end - - def test_list_channel_connections - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse.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_channel_connections_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_channel_connections_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_channel_connections_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_channel_connections({ 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_channel_connections 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_channel_connections ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.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_channel_connections({ 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_channel_connections(::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.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_channel_connections_client_stub.call_count - end - end - end - - def test_create_channel_connection - # 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" - channel_connection = {} - channel_connection_id = "hello world" - - create_channel_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_channel_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_channel_connection_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_channel_connection({ parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_channel_connection parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_channel_connection ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new(parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_channel_connection({ parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_channel_connection(::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new(parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_channel_connection_client_stub.call_count - end - end - end - - def test_delete_channel_connection - # 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_channel_connection_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_channel_connection_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_channel_connection_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_channel_connection({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_channel_connection name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_channel_connection ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_channel_connection({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_channel_connection(::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_channel_connection_client_stub.call_count - end - end - end - - def test_get_google_channel_config - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::GoogleChannelConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_google_channel_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::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_google_channel_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_google_channel_config_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_google_channel_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_google_channel_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_google_channel_config ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_google_channel_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_google_channel_config(::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_google_channel_config_client_stub.call_count - end - end - end - - def test_update_google_channel_config - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::GoogleChannelConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - google_channel_config = {} - update_mask = {} - - update_google_channel_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::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_google_channel_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_google_channel_config_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_google_channel_config({ google_channel_config: google_channel_config, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_google_channel_config google_channel_config: google_channel_config, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_google_channel_config ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new(google_channel_config: google_channel_config, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_google_channel_config({ google_channel_config: google_channel_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_google_channel_config(::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new(google_channel_config: google_channel_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_google_channel_config_client_stub.call_count - end - end - end - - def test_get_message_bus - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::MessageBus.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_message_bus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_message_bus_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_message_bus_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_message_bus({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_message_bus name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_message_bus ::Google::Cloud::Eventarc::V1::GetMessageBusRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_message_bus({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_message_bus(::Google::Cloud::Eventarc::V1::GetMessageBusRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_message_bus_client_stub.call_count - end - end - end - - def test_list_message_buses - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::ListMessageBusesResponse.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" - order_by = "hello world" - filter = "hello world" - - list_message_buses_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_message_buses_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_message_buses_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_message_buses({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_message_buses parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_message_buses ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_message_buses({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_message_buses(::Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_message_buses_client_stub.call_count - end - end - end - - def test_list_message_bus_enrollments - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse.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_message_bus_enrollments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_message_bus_enrollments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_message_bus_enrollments_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_message_bus_enrollments({ 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_message_bus_enrollments 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_message_bus_enrollments ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.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_message_bus_enrollments({ 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_message_bus_enrollments(::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.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_message_bus_enrollments_client_stub.call_count - end - end - end - - def test_create_message_bus - # 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" - message_bus = {} - message_bus_id = "hello world" - validate_only = true - - create_message_bus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_message_bus_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_message_bus_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_message_bus({ parent: parent, message_bus: message_bus, message_bus_id: message_bus_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_message_bus parent: parent, message_bus: message_bus, message_bus_id: message_bus_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_message_bus ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new(parent: parent, message_bus: message_bus, message_bus_id: message_bus_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_message_bus({ parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus(::Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new(parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus_client_stub.call_count - end - end - end - - def test_update_message_bus - # 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. - message_bus = {} - update_mask = {} - allow_missing = true - validate_only = true - - update_message_bus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_message_bus_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_message_bus_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_message_bus({ message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_message_bus message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_message_bus ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new(message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_message_bus({ message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_message_bus(::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new(message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_message_bus_client_stub.call_count - end - end - end - - def test_delete_message_bus - # 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" - allow_missing = true - validate_only = true - - delete_message_bus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_message_bus_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_message_bus_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_message_bus({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_message_bus name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_message_bus ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_message_bus({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_message_bus(::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_message_bus_client_stub.call_count - end - end - end - - def test_get_enrollment - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::Enrollment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_enrollment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_enrollment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_enrollment_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_enrollment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_enrollment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_enrollment ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_enrollment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_enrollment(::Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_enrollment_client_stub.call_count - end - end - end - - def test_list_enrollments - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse.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" - order_by = "hello world" - filter = "hello world" - - list_enrollments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_enrollments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_enrollments_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_enrollments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_enrollments parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_enrollments ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_enrollments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_enrollments(::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_enrollments_client_stub.call_count - end - end - end - - def test_create_enrollment - # 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" - enrollment = {} - enrollment_id = "hello world" - validate_only = true - - create_enrollment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_enrollment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_enrollment_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_enrollment({ parent: parent, enrollment: enrollment, enrollment_id: enrollment_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_enrollment parent: parent, enrollment: enrollment, enrollment_id: enrollment_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_enrollment ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new(parent: parent, enrollment: enrollment, enrollment_id: enrollment_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_enrollment({ parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment(::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new(parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment_client_stub.call_count - end - end - end - - def test_update_enrollment - # 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. - enrollment = {} - update_mask = {} - allow_missing = true - validate_only = true - - update_enrollment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_enrollment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_enrollment_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_enrollment({ enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_enrollment enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_enrollment ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new(enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_enrollment({ enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_enrollment(::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new(enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_enrollment_client_stub.call_count - end - end - end - - def test_delete_enrollment - # 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" - allow_missing = true - validate_only = true - - delete_enrollment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_enrollment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_enrollment_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_enrollment({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_enrollment name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_enrollment ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_enrollment({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_enrollment(::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_enrollment_client_stub.call_count - end - end - end - - def test_get_pipeline - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::Pipeline.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_pipeline_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_pipeline_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_pipeline_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_pipeline({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_pipeline name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_pipeline ::Google::Cloud::Eventarc::V1::GetPipelineRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_pipeline({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_pipeline(::Google::Cloud::Eventarc::V1::GetPipelineRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_pipeline_client_stub.call_count - end - end - end - - def test_list_pipelines - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::ListPipelinesResponse.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" - order_by = "hello world" - filter = "hello world" - - list_pipelines_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_pipelines_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_pipelines_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_pipelines({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_pipelines parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_pipelines ::Google::Cloud::Eventarc::V1::ListPipelinesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_pipelines({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_pipelines(::Google::Cloud::Eventarc::V1::ListPipelinesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_pipelines_client_stub.call_count - end - end - end - - def test_create_pipeline - # 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" - pipeline = {} - pipeline_id = "hello world" - validate_only = true - - create_pipeline_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_pipeline_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_pipeline_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_pipeline({ parent: parent, pipeline: pipeline, pipeline_id: pipeline_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_pipeline parent: parent, pipeline: pipeline, pipeline_id: pipeline_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_pipeline ::Google::Cloud::Eventarc::V1::CreatePipelineRequest.new(parent: parent, pipeline: pipeline, pipeline_id: pipeline_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_pipeline({ parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline(::Google::Cloud::Eventarc::V1::CreatePipelineRequest.new(parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline_client_stub.call_count - end - end - end - - def test_update_pipeline - # 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. - pipeline = {} - update_mask = {} - allow_missing = true - validate_only = true - - update_pipeline_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_pipeline_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_pipeline_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_pipeline({ pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_pipeline pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_pipeline ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new(pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_pipeline({ pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_pipeline(::Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new(pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_pipeline_client_stub.call_count - end - end - end - - def test_delete_pipeline - # 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" - allow_missing = true - validate_only = true - - delete_pipeline_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_pipeline_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_pipeline_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_pipeline({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_pipeline name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_pipeline ::Google::Cloud::Eventarc::V1::DeletePipelineRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_pipeline({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_pipeline(::Google::Cloud::Eventarc::V1::DeletePipelineRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_pipeline_client_stub.call_count - end - end - end - - def test_get_google_api_source - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::GoogleApiSource.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_google_api_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_get_google_api_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_google_api_source_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_google_api_source({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_google_api_source name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_google_api_source ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_google_api_source({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_google_api_source(::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_google_api_source_client_stub.call_count - end - end - end - - def test_list_google_api_sources - # Create test objects. - client_result = ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse.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" - order_by = "hello world" - filter = "hello world" - - list_google_api_sources_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_list_google_api_sources_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_google_api_sources_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_google_api_sources({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_google_api_sources parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_google_api_sources ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_google_api_sources({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_google_api_sources(::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_google_api_sources_client_stub.call_count - end - end - end - - def test_create_google_api_source - # 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" - google_api_source = {} - google_api_source_id = "hello world" - validate_only = true - - create_google_api_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_create_google_api_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_google_api_source_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_google_api_source({ parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_id, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_google_api_source parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_id, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_google_api_source ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new(parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_id, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_google_api_source({ parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source(::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new(parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source_client_stub.call_count - end - end - end - - def test_update_google_api_source - # 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. - google_api_source = {} - update_mask = {} - allow_missing = true - validate_only = true - - update_google_api_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_update_google_api_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_google_api_source_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_google_api_source({ google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_google_api_source google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_google_api_source ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new(google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_google_api_source({ google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_google_api_source(::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new(google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_google_api_source_client_stub.call_count - end - end - end - - def test_delete_google_api_source - # 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" - allow_missing = true - validate_only = true - - delete_google_api_source_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Eventarc::V1::Eventarc::Rest::ServiceStub.stub :transcode_delete_google_api_source_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_google_api_source_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_google_api_source({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_google_api_source name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_google_api_source ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_google_api_source({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_google_api_source(::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_google_api_source_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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_test.rb b/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_test.rb deleted file mode 100644 index 804e79cbaa58..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/test/google/cloud/eventarc/v1/eventarc_test.rb +++ /dev/null @@ -1,2690 +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/eventarc/v1/eventarc_pb" -require "google/cloud/eventarc/v1/eventarc" - -class ::Google::Cloud::Eventarc::V1::Eventarc::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_get_trigger - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::Trigger.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_trigger, name - assert_kind_of ::Google::Cloud::Eventarc::V1::GetTriggerRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_trigger_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_trigger({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_trigger name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_trigger ::Google::Cloud::Eventarc::V1::GetTriggerRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_trigger({ 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_trigger(::Google::Cloud::Eventarc::V1::GetTriggerRequest.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_trigger_client_stub.call_rpc_count - end - end - - def test_list_triggers - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::ListTriggersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - order_by = "hello world" - filter = "hello world" - - list_triggers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_triggers, name - assert_kind_of ::Google::Cloud::Eventarc::V1::ListTriggersRequest, 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["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_triggers_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_triggers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_triggers parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_triggers ::Google::Cloud::Eventarc::V1::ListTriggersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_triggers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_triggers(::Google::Cloud::Eventarc::V1::ListTriggersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_triggers_client_stub.call_rpc_count - end - end - - def test_create_trigger - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - trigger = {} - trigger_id = "hello world" - validate_only = true - - create_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_trigger, name - assert_kind_of ::Google::Cloud::Eventarc::V1::CreateTriggerRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Trigger), request["trigger"] - assert_equal "hello world", request["trigger_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_trigger_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_trigger({ parent: parent, trigger: trigger, trigger_id: trigger_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_trigger parent: parent, trigger: trigger, trigger_id: trigger_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_trigger ::Google::Cloud::Eventarc::V1::CreateTriggerRequest.new(parent: parent, trigger: trigger, trigger_id: trigger_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_trigger({ parent: parent, trigger: trigger, trigger_id: trigger_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_trigger(::Google::Cloud::Eventarc::V1::CreateTriggerRequest.new(parent: parent, trigger: trigger, trigger_id: trigger_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_trigger_client_stub.call_rpc_count - end - end - - def test_update_trigger - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - trigger = {} - update_mask = {} - allow_missing = true - validate_only = true - - update_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_trigger, name - assert_kind_of ::Google::Cloud::Eventarc::V1::UpdateTriggerRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Trigger), request["trigger"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_trigger_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_trigger({ trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_trigger trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_trigger ::Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new(trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_trigger({ trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| - assert_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_trigger(::Google::Cloud::Eventarc::V1::UpdateTriggerRequest.new(trigger: trigger, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| - assert_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_trigger_client_stub.call_rpc_count - end - end - - def test_delete_trigger - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - allow_missing = true - validate_only = true - - delete_trigger_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_trigger, name - assert_kind_of ::Google::Cloud::Eventarc::V1::DeleteTriggerRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_trigger_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_trigger({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_trigger name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_trigger ::Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_trigger({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| - assert_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_trigger(::Google::Cloud::Eventarc::V1::DeleteTriggerRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| - assert_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_trigger_client_stub.call_rpc_count - end - end - - def test_get_channel - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::Channel.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_channel, name - assert_kind_of ::Google::Cloud::Eventarc::V1::GetChannelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_channel_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_channel({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_channel name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_channel ::Google::Cloud::Eventarc::V1::GetChannelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_channel({ 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_channel(::Google::Cloud::Eventarc::V1::GetChannelRequest.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_channel_client_stub.call_rpc_count - end - end - - def test_list_channels - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::ListChannelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - order_by = "hello world" - - list_channels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_channels, name - assert_kind_of ::Google::Cloud::Eventarc::V1::ListChannelsRequest, 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["order_by"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_channels_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_channels({ parent: parent, 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_channels parent: parent, 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_channels ::Google::Cloud::Eventarc::V1::ListChannelsRequest.new(parent: parent, 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_channels({ parent: parent, 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_channels(::Google::Cloud::Eventarc::V1::ListChannelsRequest.new(parent: parent, 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_channels_client_stub.call_rpc_count - end - end - - def test_create_channel - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - channel = {} - channel_id = "hello world" - validate_only = true - - create_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_channel, name - assert_kind_of ::Google::Cloud::Eventarc::V1::CreateChannelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Channel), request["channel"] - assert_equal "hello world", request["channel_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_channel_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_channel({ parent: parent, channel: channel, channel_id: channel_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_channel parent: parent, channel: channel, channel_id: channel_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_channel ::Google::Cloud::Eventarc::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_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_channel({ parent: parent, channel: channel, channel_id: channel_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_channel(::Google::Cloud::Eventarc::V1::CreateChannelRequest.new(parent: parent, channel: channel, channel_id: channel_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_channel_client_stub.call_rpc_count - end - end - - def test_update_channel - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - channel = {} - update_mask = {} - validate_only = true - - update_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_channel, name - assert_kind_of ::Google::Cloud::Eventarc::V1::UpdateChannelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Channel), request["channel"] - 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_channel_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_channel({ channel: channel, 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_channel channel: channel, 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_channel ::Google::Cloud::Eventarc::V1::UpdateChannelRequest.new(channel: channel, 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_channel({ channel: channel, 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_channel(::Google::Cloud::Eventarc::V1::UpdateChannelRequest.new(channel: channel, 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_channel_client_stub.call_rpc_count - end - end - - def test_delete_channel - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - validate_only = true - - delete_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_channel, name - assert_kind_of ::Google::Cloud::Eventarc::V1::DeleteChannelRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_channel_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_channel({ name: name, validate_only: validate_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_channel name: name, validate_only: validate_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_channel ::Google::Cloud::Eventarc::V1::DeleteChannelRequest.new(name: name, validate_only: validate_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_channel({ name: name, validate_only: validate_only }, grpc_options) do |response, operation| - assert_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_channel(::Google::Cloud::Eventarc::V1::DeleteChannelRequest.new(name: name, validate_only: validate_only), grpc_options) do |response, operation| - assert_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_channel_client_stub.call_rpc_count - end - end - - def test_get_provider - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::Provider.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_provider_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_provider, name - assert_kind_of ::Google::Cloud::Eventarc::V1::GetProviderRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_provider_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_provider({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_provider name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_provider ::Google::Cloud::Eventarc::V1::GetProviderRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_provider({ 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_provider(::Google::Cloud::Eventarc::V1::GetProviderRequest.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_provider_client_stub.call_rpc_count - end - end - - def test_list_providers - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::ListProvidersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - order_by = "hello world" - filter = "hello world" - - list_providers_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_providers, name - assert_kind_of ::Google::Cloud::Eventarc::V1::ListProvidersRequest, 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["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_providers_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_providers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_providers parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_providers ::Google::Cloud::Eventarc::V1::ListProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_providers({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_providers(::Google::Cloud::Eventarc::V1::ListProvidersRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_providers_client_stub.call_rpc_count - end - end - - def test_get_channel_connection - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::ChannelConnection.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_channel_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_channel_connection, name - assert_kind_of ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_channel_connection_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_channel_connection({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_channel_connection name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_channel_connection ::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_channel_connection({ 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_channel_connection(::Google::Cloud::Eventarc::V1::GetChannelConnectionRequest.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_channel_connection_client_stub.call_rpc_count - end - end - - def test_list_channel_connections - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::ListChannelConnectionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_channel_connections_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_channel_connections, name - assert_kind_of ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest, 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_channel_connections_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_channel_connections({ 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_channel_connections 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_channel_connections ::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.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_channel_connections({ 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_channel_connections(::Google::Cloud::Eventarc::V1::ListChannelConnectionsRequest.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_channel_connections_client_stub.call_rpc_count - end - end - - def test_create_channel_connection - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - channel_connection = {} - channel_connection_id = "hello world" - - create_channel_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_channel_connection, name - assert_kind_of ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::ChannelConnection), request["channel_connection"] - assert_equal "hello world", request["channel_connection_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_channel_connection_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_channel_connection({ parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id }) do |response, 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_channel_connection parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id do |response, 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_channel_connection ::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new(parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id) do |response, operation| - assert_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_channel_connection({ parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id }, grpc_options) do |response, operation| - assert_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_channel_connection(::Google::Cloud::Eventarc::V1::CreateChannelConnectionRequest.new(parent: parent, channel_connection: channel_connection, channel_connection_id: channel_connection_id), grpc_options) do |response, operation| - assert_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_channel_connection_client_stub.call_rpc_count - end - end - - def test_delete_channel_connection - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_channel_connection_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_channel_connection, name - assert_kind_of ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_channel_connection_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_channel_connection({ 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_channel_connection 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_channel_connection ::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.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_channel_connection({ 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_channel_connection(::Google::Cloud::Eventarc::V1::DeleteChannelConnectionRequest.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_channel_connection_client_stub.call_rpc_count - end - end - - def test_get_google_channel_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::GoogleChannelConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_google_channel_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_google_channel_config, name - assert_kind_of ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_google_channel_config_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_google_channel_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_google_channel_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_google_channel_config ::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_google_channel_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_google_channel_config(::Google::Cloud::Eventarc::V1::GetGoogleChannelConfigRequest.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_google_channel_config_client_stub.call_rpc_count - end - end - - def test_update_google_channel_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::GoogleChannelConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - google_channel_config = {} - update_mask = {} - - update_google_channel_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_google_channel_config, name - assert_kind_of ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::GoogleChannelConfig), request["google_channel_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_google_channel_config_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_google_channel_config({ google_channel_config: google_channel_config, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_google_channel_config google_channel_config: google_channel_config, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_google_channel_config ::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new(google_channel_config: google_channel_config, 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_google_channel_config({ google_channel_config: google_channel_config, 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_google_channel_config(::Google::Cloud::Eventarc::V1::UpdateGoogleChannelConfigRequest.new(google_channel_config: google_channel_config, 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_google_channel_config_client_stub.call_rpc_count - end - end - - def test_get_message_bus - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::MessageBus.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_message_bus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_message_bus, name - assert_kind_of ::Google::Cloud::Eventarc::V1::GetMessageBusRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_message_bus_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_message_bus({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_message_bus name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_message_bus ::Google::Cloud::Eventarc::V1::GetMessageBusRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_message_bus({ 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_message_bus(::Google::Cloud::Eventarc::V1::GetMessageBusRequest.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_message_bus_client_stub.call_rpc_count - end - end - - def test_list_message_buses - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::ListMessageBusesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - order_by = "hello world" - filter = "hello world" - - list_message_buses_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_message_buses, name - assert_kind_of ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest, 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["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_message_buses_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_message_buses({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_message_buses parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_message_buses ::Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_message_buses({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_message_buses(::Google::Cloud::Eventarc::V1::ListMessageBusesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_message_buses_client_stub.call_rpc_count - end - end - - def test_list_message_bus_enrollments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_message_bus_enrollments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_message_bus_enrollments, name - assert_kind_of ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest, 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_message_bus_enrollments_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_message_bus_enrollments({ parent: parent, page_size: page_size, page_token: page_token }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_message_bus_enrollments parent: parent, page_size: page_size, page_token: page_token do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_message_bus_enrollments ::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_message_bus_enrollments({ parent: parent, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_message_bus_enrollments(::Google::Cloud::Eventarc::V1::ListMessageBusEnrollmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_message_bus_enrollments_client_stub.call_rpc_count - end - end - - def test_create_message_bus - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - message_bus = {} - message_bus_id = "hello world" - validate_only = true - - create_message_bus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_message_bus, name - assert_kind_of ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::MessageBus), request["message_bus"] - assert_equal "hello world", request["message_bus_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_message_bus_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_message_bus({ parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus ::Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new(parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus({ parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus(::Google::Cloud::Eventarc::V1::CreateMessageBusRequest.new(parent: parent, message_bus: message_bus, message_bus_id: message_bus_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_message_bus_client_stub.call_rpc_count - end - end - - def test_update_message_bus - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - message_bus = {} - update_mask = {} - allow_missing = true - validate_only = true - - update_message_bus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_message_bus, name - assert_kind_of ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::MessageBus), request["message_bus"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_message_bus_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_message_bus({ message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_message_bus message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_message_bus ::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new(message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_message_bus({ message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| - assert_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_message_bus(::Google::Cloud::Eventarc::V1::UpdateMessageBusRequest.new(message_bus: message_bus, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| - assert_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_message_bus_client_stub.call_rpc_count - end - end - - def test_delete_message_bus - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - allow_missing = true - validate_only = true - - delete_message_bus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_message_bus, name - assert_kind_of ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_message_bus_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_message_bus({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_message_bus name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_message_bus ::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_message_bus({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| - assert_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_message_bus(::Google::Cloud::Eventarc::V1::DeleteMessageBusRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| - assert_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_message_bus_client_stub.call_rpc_count - end - end - - def test_get_enrollment - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::Enrollment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_enrollment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_enrollment, name - assert_kind_of ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_enrollment_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_enrollment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_enrollment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_enrollment ::Google::Cloud::Eventarc::V1::GetEnrollmentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_enrollment({ 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_enrollment(::Google::Cloud::Eventarc::V1::GetEnrollmentRequest.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_enrollment_client_stub.call_rpc_count - end - end - - def test_list_enrollments - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::ListEnrollmentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - order_by = "hello world" - filter = "hello world" - - list_enrollments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_enrollments, name - assert_kind_of ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest, 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["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_enrollments_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_enrollments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_enrollments parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_enrollments ::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_enrollments({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_enrollments(::Google::Cloud::Eventarc::V1::ListEnrollmentsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_enrollments_client_stub.call_rpc_count - end - end - - def test_create_enrollment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - enrollment = {} - enrollment_id = "hello world" - validate_only = true - - create_enrollment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_enrollment, name - assert_kind_of ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Enrollment), request["enrollment"] - assert_equal "hello world", request["enrollment_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_enrollment_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_enrollment({ parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment ::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new(parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment({ parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment(::Google::Cloud::Eventarc::V1::CreateEnrollmentRequest.new(parent: parent, enrollment: enrollment, enrollment_id: enrollment_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_enrollment_client_stub.call_rpc_count - end - end - - def test_update_enrollment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - enrollment = {} - update_mask = {} - allow_missing = true - validate_only = true - - update_enrollment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_enrollment, name - assert_kind_of ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Enrollment), request["enrollment"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_enrollment_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_enrollment({ enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_enrollment enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_enrollment ::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new(enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_enrollment({ enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| - assert_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_enrollment(::Google::Cloud::Eventarc::V1::UpdateEnrollmentRequest.new(enrollment: enrollment, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| - assert_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_enrollment_client_stub.call_rpc_count - end - end - - def test_delete_enrollment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - allow_missing = true - validate_only = true - - delete_enrollment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_enrollment, name - assert_kind_of ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_enrollment_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_enrollment({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_enrollment name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_enrollment ::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_enrollment({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| - assert_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_enrollment(::Google::Cloud::Eventarc::V1::DeleteEnrollmentRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| - assert_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_enrollment_client_stub.call_rpc_count - end - end - - def test_get_pipeline - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::Pipeline.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_pipeline_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_pipeline, name - assert_kind_of ::Google::Cloud::Eventarc::V1::GetPipelineRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_pipeline_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_pipeline({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_pipeline name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_pipeline ::Google::Cloud::Eventarc::V1::GetPipelineRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_pipeline({ 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_pipeline(::Google::Cloud::Eventarc::V1::GetPipelineRequest.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_pipeline_client_stub.call_rpc_count - end - end - - def test_list_pipelines - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::ListPipelinesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - order_by = "hello world" - filter = "hello world" - - list_pipelines_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_pipelines, name - assert_kind_of ::Google::Cloud::Eventarc::V1::ListPipelinesRequest, 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["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_pipelines_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_pipelines({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_pipelines parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_pipelines ::Google::Cloud::Eventarc::V1::ListPipelinesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_pipelines({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_pipelines(::Google::Cloud::Eventarc::V1::ListPipelinesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_pipelines_client_stub.call_rpc_count - end - end - - def test_create_pipeline - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - pipeline = {} - pipeline_id = "hello world" - validate_only = true - - create_pipeline_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_pipeline, name - assert_kind_of ::Google::Cloud::Eventarc::V1::CreatePipelineRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Pipeline), request["pipeline"] - assert_equal "hello world", request["pipeline_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_pipeline_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_pipeline({ parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline ::Google::Cloud::Eventarc::V1::CreatePipelineRequest.new(parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline({ parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline(::Google::Cloud::Eventarc::V1::CreatePipelineRequest.new(parent: parent, pipeline: pipeline, pipeline_id: pipeline_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_pipeline_client_stub.call_rpc_count - end - end - - def test_update_pipeline - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - pipeline = {} - update_mask = {} - allow_missing = true - validate_only = true - - update_pipeline_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_pipeline, name - assert_kind_of ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::Pipeline), request["pipeline"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_pipeline_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_pipeline({ pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_pipeline pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_pipeline ::Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new(pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_pipeline({ pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| - assert_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_pipeline(::Google::Cloud::Eventarc::V1::UpdatePipelineRequest.new(pipeline: pipeline, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| - assert_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_pipeline_client_stub.call_rpc_count - end - end - - def test_delete_pipeline - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - allow_missing = true - validate_only = true - - delete_pipeline_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_pipeline, name - assert_kind_of ::Google::Cloud::Eventarc::V1::DeletePipelineRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_pipeline_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_pipeline({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_pipeline name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_pipeline ::Google::Cloud::Eventarc::V1::DeletePipelineRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_pipeline({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| - assert_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_pipeline(::Google::Cloud::Eventarc::V1::DeletePipelineRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| - assert_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_pipeline_client_stub.call_rpc_count - end - end - - def test_get_google_api_source - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::GoogleApiSource.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_google_api_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_google_api_source, name - assert_kind_of ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_google_api_source_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_google_api_source({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_google_api_source name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_google_api_source ::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_google_api_source({ 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_google_api_source(::Google::Cloud::Eventarc::V1::GetGoogleApiSourceRequest.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_google_api_source_client_stub.call_rpc_count - end - end - - def test_list_google_api_sources - # Create GRPC objects. - grpc_response = ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - order_by = "hello world" - filter = "hello world" - - list_google_api_sources_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_google_api_sources, name - assert_kind_of ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest, 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["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_google_api_sources_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_google_api_sources({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_google_api_sources parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_google_api_sources ::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_google_api_sources({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_google_api_sources(::Google::Cloud::Eventarc::V1::ListGoogleApiSourcesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_google_api_sources_client_stub.call_rpc_count - end - end - - def test_create_google_api_source - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - google_api_source = {} - google_api_source_id = "hello world" - validate_only = true - - create_google_api_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_google_api_source, name - assert_kind_of ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::GoogleApiSource), request["google_api_source"] - assert_equal "hello world", request["google_api_source_id"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_google_api_source_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_google_api_source({ parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source ::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new(parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source({ parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source(::Google::Cloud::Eventarc::V1::CreateGoogleApiSourceRequest.new(parent: parent, google_api_source: google_api_source, google_api_source_id: google_api_source_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_google_api_source_client_stub.call_rpc_count - end - end - - def test_update_google_api_source - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - google_api_source = {} - update_mask = {} - allow_missing = true - validate_only = true - - update_google_api_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_google_api_source, name - assert_kind_of ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Eventarc::V1::GoogleApiSource), request["google_api_source"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_google_api_source_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_google_api_source({ google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_google_api_source google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_google_api_source ::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new(google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_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_google_api_source({ google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| - assert_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_google_api_source(::Google::Cloud::Eventarc::V1::UpdateGoogleApiSourceRequest.new(google_api_source: google_api_source, update_mask: update_mask, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| - assert_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_google_api_source_client_stub.call_rpc_count - end - end - - def test_delete_google_api_source - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - allow_missing = true - validate_only = true - - delete_google_api_source_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_google_api_source, name - assert_kind_of ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["allow_missing"] - assert_equal true, request["validate_only"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_google_api_source_client_stub do - # Create client - client = ::Google::Cloud::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_google_api_source({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_google_api_source name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_google_api_source ::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_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_google_api_source({ name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only }, grpc_options) do |response, operation| - assert_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_google_api_source(::Google::Cloud::Eventarc::V1::DeleteGoogleApiSourceRequest.new(name: name, etag: etag, allow_missing: allow_missing, validate_only: validate_only), grpc_options) do |response, operation| - assert_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_google_api_source_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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Eventarc::V1::Eventarc::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::Eventarc::V1::Eventarc::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Eventarc::V1::Eventarc::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-eventarc-v1/test/helper.rb b/owl-bot-staging/google-cloud-eventarc-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-eventarc-v1/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-eventarc/.gitignore b/owl-bot-staging/google-cloud-eventarc/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/.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-eventarc/.repo-metadata.json b/owl-bot-staging/google-cloud-eventarc/.repo-metadata.json deleted file mode 100644 index 8e1620ff3e29..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "eventarc.googleapis.com", - "api_shortname": "eventarc", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc/latest", - "distribution_name": "google-cloud-eventarc", - "is_cloud": true, - "language": "ruby", - "name": "eventarc", - "name_pretty": "Eventarc API", - "product_documentation": "https://cloud.google.com/eventarc/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution.", - "ruby-cloud-env-prefix": "EVENTARC", - "ruby-cloud-product-url": "https://cloud.google.com/eventarc/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-eventarc/.rubocop.yml b/owl-bot-staging/google-cloud-eventarc/.rubocop.yml deleted file mode 100644 index 2ea1eb29dd8e..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-eventarc.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-eventarc.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-eventarc/.toys.rb b/owl-bot-staging/google-cloud-eventarc/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/.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-eventarc/.yardopts b/owl-bot-staging/google-cloud-eventarc/.yardopts deleted file mode 100644 index ccda875d4e7f..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Eventarc API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-eventarc/AUTHENTICATION.md b/owl-bot-staging/google-cloud-eventarc/AUTHENTICATION.md deleted file mode 100644 index 00ef6b0b71d4..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-eventarc 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-eventarc 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/eventarc" - -client = Google::Cloud::Eventarc.eventarc do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/eventarc" - -Google::Cloud::Eventarc.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Eventarc.eventarc -``` - -### 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-eventarc -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/eventarc" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Eventarc.eventarc -``` - -### 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-eventarc/CHANGELOG.md b/owl-bot-staging/google-cloud-eventarc/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-eventarc/Gemfile b/owl-bot-staging/google-cloud-eventarc/Gemfile deleted file mode 100644 index fb28bedf019d..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-eventarc-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-eventarc.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-eventarc/LICENSE.md b/owl-bot-staging/google-cloud-eventarc/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/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-eventarc/README.md b/owl-bot-staging/google-cloud-eventarc/README.md deleted file mode 100644 index b86a86443f9b..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Eventarc API - -API Client library for the Eventarc API - -Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-eventarc-v*`. -The gem `google-cloud-eventarc` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc/latest) -for this library, google-cloud-eventarc, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-eventarc-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/eventarc/) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-eventarc -``` - -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/eventarc.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/eventarc" - -client = Google::Cloud::Eventarc.eventarc -request = ::Google::Cloud::Eventarc::V1::GetTriggerRequest.new # (request fields as keyword arguments...) -response = client.get_trigger request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-eventarc-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest). - -## 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-eventarc`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-eventarc-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-eventarc`. -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-eventarc-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-eventarc/Rakefile b/owl-bot-staging/google-cloud-eventarc/Rakefile deleted file mode 100644 index 5297ff200fb6..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/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 = true -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-eventarc acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["EVENTARC_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["EVENTARC_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["EVENTARC_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 EVENTARC_TEST_PROJECT=test123 EVENTARC_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/eventarc/v1/eventarc/credentials" - ::Google::Cloud::Eventarc::V1::Eventarc::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["EVENTARC_PROJECT"] = project - ENV["EVENTARC_TEST_PROJECT"] = project - ENV["EVENTARC_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-eventarc 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-eventarc 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-eventarc 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-eventarc gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-eventarc" - header "google-cloud-eventarc rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-eventarc yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-eventarc 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-eventarc 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-eventarc 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-eventarc/google-cloud-eventarc.gemspec b/owl-bot-staging/google-cloud-eventarc/google-cloud-eventarc.gemspec deleted file mode 100644 index 8d08faf6aa80..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/google-cloud-eventarc.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/eventarc/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-eventarc" - gem.version = Google::Cloud::Eventarc::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Eventarc lets you asynchronously deliver events from Google services, SaaS, and your own apps using loosely coupled services that react to state changes. Eventarc requires no infrastructure management — you can optimize productivity and costs while building a modern, event-driven solution." - gem.summary = "API Client library for the Eventarc API" - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-eventarc-v1", "~> 2.0" -end diff --git a/owl-bot-staging/google-cloud-eventarc/lib/google-cloud-eventarc.rb b/owl-bot-staging/google-cloud-eventarc/lib/google-cloud-eventarc.rb deleted file mode 100644 index fdd3280ec5db..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/lib/google-cloud-eventarc.rb +++ /dev/null @@ -1,19 +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/eventarc" unless defined? Google::Cloud::Eventarc::VERSION diff --git a/owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc.rb b/owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc.rb deleted file mode 100644 index 61e274cfafe7..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc.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! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/eventarc/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :eventarc do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Eventarc - ## - # Create a new client object for Eventarc. - # - # By default, this returns an instance of - # [Google::Cloud::Eventarc::V1::Eventarc::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-eventarc-v1/latest/Google-Cloud-Eventarc-V1-Eventarc-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the Eventarc service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the Eventarc service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Eventarc.eventarc_available?}. - # - # ## About Eventarc - # - # Eventarc allows users to subscribe to various events that are provided by - # Google Cloud services and forward them to supported destinations. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.eventarc version: :v1, transport: :grpc, &block - require "google/cloud/eventarc/#{version.to_s.downcase}" - - package_name = Google::Cloud::Eventarc - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Eventarc.const_get(package_name).const_get(:Eventarc) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the Eventarc service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Eventarc.eventarc}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the Eventarc service, - # or if the versioned client gem needs an update to support the Eventarc service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.eventarc_available? version: :v1, transport: :grpc - require "google/cloud/eventarc/#{version.to_s.downcase}" - package_name = Google::Cloud::Eventarc - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Eventarc.const_get package_name - return false unless service_module.const_defined? :Eventarc - service_module = service_module.const_get :Eventarc - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-eventarc library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # 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 [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.eventarc if block_given? - - ::Google::Cloud.configure.eventarc - end - end - end -end - -helper_path = ::File.join __dir__, "eventarc", "helpers.rb" -require "google/cloud/eventarc/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc/version.rb b/owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc/version.rb deleted file mode 100644 index 874e8afab7ee..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/lib/google/cloud/eventarc/version.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! - - -module Google - module Cloud - module Eventarc - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/client_test.rb b/owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/client_test.rb deleted file mode 100644 index 34da15f12546..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/client_test.rb +++ /dev/null @@ -1,64 +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 "google/cloud/eventarc" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Eventarc::ClientConstructionMinitest < 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_eventarc_grpc - skip unless Google::Cloud::Eventarc.eventarc_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Eventarc.eventarc transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Eventarc::V1::Eventarc::Client, client - end - end - - def test_eventarc_rest - skip unless Google::Cloud::Eventarc.eventarc_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Eventarc.eventarc transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Eventarc::V1::Eventarc::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/version_test.rb b/owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/version_test.rb deleted file mode 100644 index 450891c59514..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/test/google/cloud/eventarc/version_test.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 "helper" -require "google/cloud/eventarc/version" - -class Google::Cloud::Eventarc::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Eventarc::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-eventarc/test/helper.rb b/owl-bot-staging/google-cloud-eventarc/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-eventarc/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-filestore-v1/.gitignore b/owl-bot-staging/google-cloud-filestore-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-filestore-v1/.repo-metadata.json deleted file mode 100644 index 243280341247..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "file.googleapis.com", - "api_shortname": "file", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-filestore-v1/latest", - "distribution_name": "google-cloud-filestore-v1", - "is_cloud": true, - "language": "ruby", - "name": "file", - "name_pretty": "Filestore V1 API", - "product_documentation": "https://cloud.google.com/filestore/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Filestore instances are fully managed NFS file servers on Google Cloud for use with applications running on Compute Engine virtual machine (VM) instances, Google Kubernetes Engine clusters, external datastores such as Google Cloud VMware Engine, or your on-premises machines. Note that google-cloud-filestore-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-filestore instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/filestore/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-filestore-v1/.rubocop.yml b/owl-bot-staging/google-cloud-filestore-v1/.rubocop.yml deleted file mode 100644 index b050e479d838..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-filestore-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-filestore-v1.rb" diff --git a/owl-bot-staging/google-cloud-filestore-v1/.toys.rb b/owl-bot-staging/google-cloud-filestore-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1/.yardopts b/owl-bot-staging/google-cloud-filestore-v1/.yardopts deleted file mode 100644 index b31e8f0b92ae..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Filestore 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-filestore-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-filestore-v1/AUTHENTICATION.md deleted file mode 100644 index 3a7eefb2a452..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-filestore-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-filestore-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/filestore/v1" - -client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/filestore/v1" - -::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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-filestore-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/filestore/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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-filestore-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-filestore-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-filestore-v1/Gemfile b/owl-bot-staging/google-cloud-filestore-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-filestore-v1/LICENSE.md b/owl-bot-staging/google-cloud-filestore-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1/README.md b/owl-bot-staging/google-cloud-filestore-v1/README.md deleted file mode 100644 index 8b13d4363d75..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Filestore V1 API - -The Cloud Filestore API is used for creating and managing cloud file servers. - -Filestore instances are fully managed NFS file servers on Google Cloud for use with applications running on Compute Engine virtual machine (VM) instances, Google Kubernetes Engine clusters, external datastores such as Google Cloud VMware Engine, or your on-premises machines. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Filestore V1 API. Most users should consider using -the main client gem, -[google-cloud-filestore](https://rubygems.org/gems/google-cloud-filestore). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-filestore-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/file.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/filestore/v1" - -client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new -request = ::Google::Cloud::Filestore::V1::ListInstancesRequest.new # (request fields as keyword arguments...) -response = client.list_instances request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-filestore-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/filestore/) -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/filestore/v1" -require "logger" - -client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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-filestore`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-filestore-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-filestore`. -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-filestore-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-filestore-v1/Rakefile b/owl-bot-staging/google-cloud-filestore-v1/Rakefile deleted file mode 100644 index f1944707be9c..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-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/filestore/v1/cloud_filestore_manager/credentials" - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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-filestore-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-filestore-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-filestore-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-filestore-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-filestore-v1" - header "google-cloud-filestore-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-filestore-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-filestore-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-filestore-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-filestore-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-filestore-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-filestore-v1/gapic_metadata.json deleted file mode 100644 index f92d517e1ccf..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/gapic_metadata.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.filestore.v1", - "libraryPackage": "::Google::Cloud::Filestore::V1", - "services": { - "CloudFilestoreManager": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client", - "rpcs": { - "ListInstances": { - "methods": [ - "list_instances" - ] - }, - "GetInstance": { - "methods": [ - "get_instance" - ] - }, - "CreateInstance": { - "methods": [ - "create_instance" - ] - }, - "UpdateInstance": { - "methods": [ - "update_instance" - ] - }, - "RestoreInstance": { - "methods": [ - "restore_instance" - ] - }, - "RevertInstance": { - "methods": [ - "revert_instance" - ] - }, - "DeleteInstance": { - "methods": [ - "delete_instance" - ] - }, - "ListSnapshots": { - "methods": [ - "list_snapshots" - ] - }, - "GetSnapshot": { - "methods": [ - "get_snapshot" - ] - }, - "CreateSnapshot": { - "methods": [ - "create_snapshot" - ] - }, - "DeleteSnapshot": { - "methods": [ - "delete_snapshot" - ] - }, - "UpdateSnapshot": { - "methods": [ - "update_snapshot" - ] - }, - "ListBackups": { - "methods": [ - "list_backups" - ] - }, - "GetBackup": { - "methods": [ - "get_backup" - ] - }, - "CreateBackup": { - "methods": [ - "create_backup" - ] - }, - "DeleteBackup": { - "methods": [ - "delete_backup" - ] - }, - "UpdateBackup": { - "methods": [ - "update_backup" - ] - }, - "PromoteReplica": { - "methods": [ - "promote_replica" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-filestore-v1/google-cloud-filestore-v1.gemspec b/owl-bot-staging/google-cloud-filestore-v1/google-cloud-filestore-v1.gemspec deleted file mode 100644 index e2d8f36173d9..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/google-cloud-filestore-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/filestore/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-filestore-v1" - gem.version = Google::Cloud::Filestore::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Filestore instances are fully managed NFS file servers on Google Cloud for use with applications running on Compute Engine virtual machine (VM) instances, Google Kubernetes Engine clusters, external datastores such as Google Cloud VMware Engine, or your on-premises machines. Note that google-cloud-filestore-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-filestore instead. See the readme for more details." - gem.summary = "The Cloud Filestore API is used for creating and managing cloud file servers." - 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.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-common", "~> 1.0" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google-cloud-filestore-v1.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google-cloud-filestore-v1.rb deleted file mode 100644 index 5fd86d8c1673..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/lib/google-cloud-filestore-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/filestore/v1" diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1.rb deleted file mode 100644 index 1f249415fa15..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1.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/filestore/v1/cloud_filestore_manager" -require "google/cloud/filestore/v1/version" - -module Google - module Cloud - module Filestore - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/filestore/v1" - # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/filestore/v1" - # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/filestore/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/bindings_override.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/bindings_override.rb deleted file mode 100644 index 40e678f62b3a..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/bindings_override.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! - -require "gapic/rest" - -module Google - module Cloud - module Filestore - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/filestore/v1/rest" - # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Filestore"] - 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 - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager.rb deleted file mode 100644 index 6f062a0ff291..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager.rb +++ /dev/null @@ -1,74 +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/filestore/v1/version" - -require "google/cloud/filestore/v1/cloud_filestore_manager/credentials" -require "google/cloud/filestore/v1/cloud_filestore_manager/paths" -require "google/cloud/filestore/v1/cloud_filestore_manager/operations" -require "google/cloud/filestore/v1/cloud_filestore_manager/client" -require "google/cloud/filestore/v1/cloud_filestore_manager/rest" - -module Google - module Cloud - module Filestore - module V1 - ## - # Configures and manages Filestore resources. - # - # Filestore Manager v1. - # - # The `file.googleapis.com` service implements the Filestore API and - # defines the following resource model for managing instances: - # * The service works with a collection of cloud projects, named: `/projects/*` - # * Each project has a collection of available locations, named: `/locations/*` - # * Each location has a collection of instances and backups, named: - # `/instances/*` and `/backups/*` respectively. - # * As such, Filestore instances are resources of the form: - # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}` - # and backups are resources of the form: - # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}` - # - # Note that location_id must be a Google Cloud `zone` for instances, but - # a Google Cloud `region` for backups; for example: - # * `projects/12345/locations/us-central1-c/instances/my-filestore` - # * `projects/12345/locations/us-central1/backups/my-backup` - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/filestore/v1/cloud_filestore_manager" - # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/filestore/v1/cloud_filestore_manager/rest" - # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - module CloudFilestoreManager - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_filestore_manager", "helpers.rb" -require "google/cloud/filestore/v1/cloud_filestore_manager/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb deleted file mode 100644 index 55786589ef8d..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/client.rb +++ /dev/null @@ -1,2370 +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/filestore/v1/cloud_filestore_service_pb" -require "google/cloud/location" - -module Google - module Cloud - module Filestore - module V1 - module CloudFilestoreManager - ## - # Client for the CloudFilestoreManager service. - # - # Configures and manages Filestore resources. - # - # Filestore Manager v1. - # - # The `file.googleapis.com` service implements the Filestore API and - # defines the following resource model for managing instances: - # * The service works with a collection of cloud projects, named: `/projects/*` - # * Each project has a collection of available locations, named: `/locations/*` - # * Each location has a collection of instances and backups, named: - # `/instances/*` and `/backups/*` respectively. - # * As such, Filestore instances are resources of the form: - # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}` - # and backups are resources of the form: - # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}` - # - # Note that location_id must be a Google Cloud `zone` for instances, but - # a Google Cloud `region` for backups; for example: - # * `projects/12345/locations/us-central1-c/instances/my-filestore` - # * `projects/12345/locations/us-central1/backups/my-backup` - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "file.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_filestore_manager_stub - - ## - # Configure the CloudFilestoreManager Client class. - # - # See {::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudFilestoreManager clients - # ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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", "Filestore", "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.list_instances.timeout = 60.0 - default_config.rpcs.list_instances.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_instance.timeout = 60.0 - default_config.rpcs.get_instance.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_instance.timeout = 60_000.0 - - default_config.rpcs.update_instance.timeout = 14_400.0 - - default_config.rpcs.restore_instance.timeout = 60_000.0 - - default_config.rpcs.delete_instance.timeout = 600.0 - - default_config.rpcs.list_backups.timeout = 60.0 - default_config.rpcs.list_backups.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup.timeout = 60.0 - default_config.rpcs.get_backup.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_backup.timeout = 60_000.0 - - default_config.rpcs.delete_backup.timeout = 600.0 - - default_config.rpcs.update_backup.timeout = 600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudFilestoreManager 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::Filestore::V1::CloudFilestoreManager::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 - @cloud_filestore_manager_stub.universe_domain - end - - ## - # Create a new CloudFilestoreManager client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudFilestoreManager 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/filestore/v1/cloud_filestore_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 - - @cloud_filestore_manager_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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 - ) - - @cloud_filestore_manager_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 = @cloud_filestore_manager_stub.endpoint - config.universe_domain = @cloud_filestore_manager_stub.universe_domain - config.logger = @cloud_filestore_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Filestore::V1::CloudFilestoreManager::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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_filestore_manager_stub.logger - end - - # Service calls - - ## - # Lists all instances in a project for either a specified location - # or for all locations. - # - # @overload list_instances(request, options = nil) - # Pass arguments to `list_instances` via a request object, either of type - # {::Google::Cloud::Filestore::V1::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::ListInstancesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_instances(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_instances` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve instance - # information, in the format `projects/{project_id}/locations/{location}`. In - # Cloud Filestore, locations map to Google Cloud zones, for example - # **us-west1-b**. To retrieve instance information for all locations, use "-" - # for the - # `{location}` value. - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value to use if there are additional - # results to retrieve for this list request. - # @param order_by [::String] - # Sort results. Supported values are "name", "name desc" or "" (unsorted). - # @param filter [::String] - # List filter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Filestore::V1::Instance>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Filestore::V1::Instance>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::ListInstancesRequest.new - # - # # Call the list_instances method. - # result = client.list_instances request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Filestore::V1::Instance. - # p item - # end - # - def list_instances request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListInstancesRequest - - # Converts hash and nil to 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_instances.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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_instances.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_instances.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :list_instances, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_filestore_manager_stub, :list_instances, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a specific instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::Filestore::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The instance resource name, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Filestore::V1::Instance] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Filestore::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::Filestore::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetInstanceRequest - - # Converts hash and nil to 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :get_instance, 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 instance. - # When creating from a backup, the capacity of the new instance needs to be - # equal to or larger than the capacity of the backup (and also equal to or - # larger than the minimum capacity of the tier). - # - # @overload create_instance(request, options = nil) - # Pass arguments to `create_instance` via a request object, either of type - # {::Google::Cloud::Filestore::V1::CreateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::CreateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_instance(parent: nil, instance_id: nil, instance: nil) - # Pass arguments to `create_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance's project and location, in the format - # `projects/{project_id}/locations/{location}`. In Filestore, - # locations map to Google Cloud zones, for example **us-west1-b**. - # @param instance_id [::String] - # Required. The name of the instance to create. - # The name must be unique for the specified project and location. - # @param instance [::Google::Cloud::Filestore::V1::Instance, ::Hash] - # Required. An {::Google::Cloud::Filestore::V1::Instance instance 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/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::CreateInstanceRequest.new - # - # # Call the create_instance method. - # result = client.create_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateInstanceRequest - - # Converts hash and nil to 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :create_instance, 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 the settings of a specific instance. - # - # @overload update_instance(request, options = nil) - # Pass arguments to `update_instance` via a request object, either of type - # {::Google::Cloud::Filestore::V1::UpdateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::UpdateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_instance(update_mask: nil, instance: nil) - # Pass arguments to `update_instance` via keyword arguments. Note that at - # least one keyword argument is 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] - # Mask of fields to update. At least one path must be supplied in this - # field. The elements of the repeated paths field may only include these - # fields: - # - # * "description" - # * "file_shares" - # * "labels" - # * "performance_config" - # * "deletion_protection_enabled" - # * "deletion_protection_reason" - # @param instance [::Google::Cloud::Filestore::V1::Instance, ::Hash] - # Only fields specified in update_mask are updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::UpdateInstanceRequest.new - # - # # Call the update_instance method. - # result = client.update_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateInstanceRequest - - # Converts hash and nil to 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.instance&.name - header_params["instance.name"] = request.instance.name - end - - request_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_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :update_instance, 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 - - ## - # Restores an existing instance's file share from a backup. - # - # The capacity of the instance needs to be equal to or larger than the - # capacity of the backup (and also equal to or larger than the minimum - # capacity of the tier). - # - # @overload restore_instance(request, options = nil) - # Pass arguments to `restore_instance` via a request object, either of type - # {::Google::Cloud::Filestore::V1::RestoreInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::RestoreInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload restore_instance(name: nil, file_share: nil, source_backup: nil) - # Pass arguments to `restore_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the instance, in the format - # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - # @param file_share [::String] - # Required. Name of the file share in the Filestore instance that the backup - # is being restored to. - # @param source_backup [::String] - # The resource name of the backup, in the format - # `projects/{project_number}/locations/{location_id}/backups/{backup_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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::RestoreInstanceRequest.new - # - # # Call the restore_instance method. - # result = client.restore_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::RestoreInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.restore_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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.restore_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restore_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :restore_instance, 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 - - ## - # Revert an existing instance's file system to a specified snapshot. - # - # @overload revert_instance(request, options = nil) - # Pass arguments to `revert_instance` via a request object, either of type - # {::Google::Cloud::Filestore::V1::RevertInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::RevertInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload revert_instance(name: nil, target_snapshot_id: nil) - # Pass arguments to `revert_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the instance, in the format - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - # @param target_snapshot_id [::String] - # Required. The snapshot resource ID, in the format 'my-snapshot', where the - # specified ID is the \\{snapshot_id} of the fully qualified name like - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::RevertInstanceRequest.new - # - # # Call the revert_instance method. - # result = client.revert_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def revert_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::RevertInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.revert_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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.revert_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.revert_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :revert_instance, 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 instance. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::Filestore::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_instance(name: nil, force: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The instance resource name, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}` - # @param force [::Boolean] - # If set to true, all snapshots of the instance will also be deleted. - # (Otherwise, the request will only work if the instance has no snapshots.) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteInstanceRequest - - # Converts hash and nil to 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :delete_instance, 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 all snapshots in a project for either a specified location - # or for all locations. - # - # @overload list_snapshots(request, options = nil) - # Pass arguments to `list_snapshots` via a request object, either of type - # {::Google::Cloud::Filestore::V1::ListSnapshotsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::ListSnapshotsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_snapshots(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil, return_partial_success: nil) - # Pass arguments to `list_snapshots` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance for which to retrieve snapshot information, - # in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}`. - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value to use if there are additional - # results to retrieve for this list request. - # @param order_by [::String] - # Sort results. Supported values are "name", "name desc" or "" (unsorted). - # @param filter [::String] - # List filter. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Filestore::V1::Snapshot>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Filestore::V1::Snapshot>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::ListSnapshotsRequest.new - # - # # Call the list_snapshots method. - # result = client.list_snapshots request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Filestore::V1::Snapshot. - # p item - # end - # - def list_snapshots request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListSnapshotsRequest - - # Converts hash and nil to 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_snapshots.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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_snapshots.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_snapshots.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :list_snapshots, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_filestore_manager_stub, :list_snapshots, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a specific snapshot. - # - # @overload get_snapshot(request, options = nil) - # Pass arguments to `get_snapshot` via a request object, either of type - # {::Google::Cloud::Filestore::V1::GetSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::GetSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_snapshot(name: nil) - # Pass arguments to `get_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The snapshot resource name, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Filestore::V1::Snapshot] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Filestore::V1::Snapshot] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::GetSnapshotRequest.new - # - # # Call the get_snapshot method. - # result = client.get_snapshot request - # - # # The returned object is of type Google::Cloud::Filestore::V1::Snapshot. - # p result - # - def get_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetSnapshotRequest - - # Converts hash and nil to 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_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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_snapshot.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :get_snapshot, 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 snapshot. - # - # @overload create_snapshot(request, options = nil) - # Pass arguments to `create_snapshot` via a request object, either of type - # {::Google::Cloud::Filestore::V1::CreateSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::CreateSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_snapshot(parent: nil, snapshot_id: nil, snapshot: nil) - # Pass arguments to `create_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The Filestore Instance to create the snapshots of, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}` - # @param snapshot_id [::String] - # Required. The ID to use for the snapshot. - # The ID must be unique within the specified instance. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - # @param snapshot [::Google::Cloud::Filestore::V1::Snapshot, ::Hash] - # Required. A snapshot 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/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::CreateSnapshotRequest.new - # - # # Call the create_snapshot method. - # result = client.create_snapshot request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateSnapshotRequest - - # Converts hash and nil to 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_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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_snapshot.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :create_snapshot, 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 snapshot. - # - # @overload delete_snapshot(request, options = nil) - # Pass arguments to `delete_snapshot` via a request object, either of type - # {::Google::Cloud::Filestore::V1::DeleteSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::DeleteSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_snapshot(name: nil) - # Pass arguments to `delete_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The snapshot resource name, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::DeleteSnapshotRequest.new - # - # # Call the delete_snapshot method. - # result = client.delete_snapshot request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteSnapshotRequest - - # Converts hash and nil to 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_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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_snapshot.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :delete_snapshot, 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 the settings of a specific snapshot. - # - # @overload update_snapshot(request, options = nil) - # Pass arguments to `update_snapshot` via a request object, either of type - # {::Google::Cloud::Filestore::V1::UpdateSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::UpdateSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_snapshot(update_mask: nil, snapshot: nil) - # Pass arguments to `update_snapshot` via keyword arguments. Note that at - # least one keyword argument is 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. At least one path must be supplied in - # this field. - # @param snapshot [::Google::Cloud::Filestore::V1::Snapshot, ::Hash] - # Required. A snapshot 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/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new - # - # # Call the update_snapshot method. - # result = client.update_snapshot request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateSnapshotRequest - - # Converts hash and nil to 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_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.snapshot&.name - header_params["snapshot.name"] = request.snapshot.name - end - - request_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_snapshot.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :update_snapshot, 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 all backups in a project for either a specified location or for all - # locations. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::Filestore::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::ListBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backups(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backup - # information, in the format - # `projects/{project_number}/locations/{location}`. In Filestore, backup - # locations map to Google Cloud regions, for example **us-west1**. To - # retrieve backup information for all locations, use "-" for the - # `{location}` value. - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value to use if there are additional - # results to retrieve for this list request. - # @param order_by [::String] - # Sort results. Supported values are "name", "name desc" or "" (unsorted). - # @param filter [::String] - # List filter. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Filestore::V1::Backup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Filestore::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::ListBackupsRequest.new - # - # # Call the list_backups method. - # result = client.list_backups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Filestore::V1::Backup. - # p item - # end - # - def list_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListBackupsRequest - - # Converts hash and nil to 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_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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_backups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :list_backups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_filestore_manager_stub, :list_backups, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the details of a specific backup. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::Filestore::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::GetBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup(name: nil) - # Pass arguments to `get_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The backup resource name, in the format - # `projects/{project_number}/locations/{location}/backups/{backup_id}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Filestore::V1::Backup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Filestore::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::Filestore::V1::Backup. - # p result - # - def get_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetBackupRequest - - # Converts hash and nil to 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :get_backup, 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 backup. - # - # @overload create_backup(request, options = nil) - # Pass arguments to `create_backup` via a request object, either of type - # {::Google::Cloud::Filestore::V1::CreateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::CreateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup(parent: nil, backup: nil, backup_id: nil) - # Pass arguments to `create_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The backup's project and location, in the format - # `projects/{project_number}/locations/{location}`. In Filestore, - # backup locations map to Google Cloud regions, for example **us-west1**. - # @param backup [::Google::Cloud::Filestore::V1::Backup, ::Hash] - # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource} - # @param backup_id [::String] - # Required. The ID to use for the backup. - # The ID must be unique within the specified project and location. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - # Values that do not match this pattern will trigger an INVALID_ARGUMENT - # 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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::CreateBackupRequest.new - # - # # Call the create_backup method. - # result = client.create_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateBackupRequest - - # Converts hash and nil to 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :create_backup, 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 backup. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::Filestore::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::DeleteBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup(name: nil) - # Pass arguments to `delete_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The backup resource name, in the format - # `projects/{project_number}/locations/{location}/backups/{backup_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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteBackupRequest - - # Converts hash and nil to 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :delete_backup, 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 the settings of a specific backup. - # - # @overload update_backup(request, options = nil) - # Pass arguments to `update_backup` via a request object, either of type - # {::Google::Cloud::Filestore::V1::UpdateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::UpdateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup(backup: nil, update_mask: nil) - # Pass arguments to `update_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup [::Google::Cloud::Filestore::V1::Backup, ::Hash] - # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::UpdateBackupRequest.new - # - # # Call the update_backup method. - # result = client.update_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateBackupRequest - - # Converts hash and nil to 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup&.name - header_params["backup.name"] = request.backup.name - end - - request_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_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :update_backup, 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 - - ## - # Promote the standby instance (replica). - # - # @overload promote_replica(request, options = nil) - # Pass arguments to `promote_replica` via a request object, either of type - # {::Google::Cloud::Filestore::V1::PromoteReplicaRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::PromoteReplicaRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload promote_replica(name: nil, peer_instance: nil) - # Pass arguments to `promote_replica` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the instance, in the format - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - # @param peer_instance [::String] - # Optional. The resource name of the peer instance to promote, in the format - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - # The peer instance is required if the operation is called on an active - # instance. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::PromoteReplicaRequest.new - # - # # Call the promote_replica method. - # result = client.promote_replica request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def promote_replica request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::PromoteReplicaRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.promote_replica.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION - metadata[:"x-goog-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.promote_replica.timeout, - metadata: metadata, - retry_policy: @config.rpcs.promote_replica.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.call_rpc :promote_replica, 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 CloudFilestoreManager API. - # - # This class represents the configuration for CloudFilestoreManager, - # 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::Filestore::V1::CloudFilestoreManager::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_instances to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.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::Filestore::V1::CloudFilestoreManager::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 = "file.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 CloudFilestoreManager 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_instances` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instances - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - ## - # RPC-specific configuration for `create_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance - ## - # RPC-specific configuration for `update_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance - ## - # RPC-specific configuration for `restore_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_instance - ## - # RPC-specific configuration for `revert_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :revert_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `list_snapshots` - # @return [::Gapic::Config::Method] - # - attr_reader :list_snapshots - ## - # RPC-specific configuration for `get_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :get_snapshot - ## - # RPC-specific configuration for `create_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :create_snapshot - ## - # RPC-specific configuration for `delete_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_snapshot - ## - # RPC-specific configuration for `update_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :update_snapshot - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `get_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup - ## - # RPC-specific configuration for `create_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup - ## - # RPC-specific configuration for `delete_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup - ## - # RPC-specific configuration for `update_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup - ## - # RPC-specific configuration for `promote_replica` - # @return [::Gapic::Config::Method] - # - attr_reader :promote_replica - - # @private - def initialize parent_rpcs = nil - list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances - @list_instances = ::Gapic::Config::Method.new list_instances_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance - @create_instance = ::Gapic::Config::Method.new create_instance_config - update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance - @update_instance = ::Gapic::Config::Method.new update_instance_config - restore_instance_config = parent_rpcs.restore_instance if parent_rpcs.respond_to? :restore_instance - @restore_instance = ::Gapic::Config::Method.new restore_instance_config - revert_instance_config = parent_rpcs.revert_instance if parent_rpcs.respond_to? :revert_instance - @revert_instance = ::Gapic::Config::Method.new revert_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - list_snapshots_config = parent_rpcs.list_snapshots if parent_rpcs.respond_to? :list_snapshots - @list_snapshots = ::Gapic::Config::Method.new list_snapshots_config - get_snapshot_config = parent_rpcs.get_snapshot if parent_rpcs.respond_to? :get_snapshot - @get_snapshot = ::Gapic::Config::Method.new get_snapshot_config - create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot - @create_snapshot = ::Gapic::Config::Method.new create_snapshot_config - delete_snapshot_config = parent_rpcs.delete_snapshot if parent_rpcs.respond_to? :delete_snapshot - @delete_snapshot = ::Gapic::Config::Method.new delete_snapshot_config - update_snapshot_config = parent_rpcs.update_snapshot if parent_rpcs.respond_to? :update_snapshot - @update_snapshot = ::Gapic::Config::Method.new update_snapshot_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup - @get_backup = ::Gapic::Config::Method.new get_backup_config - create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup - @create_backup = ::Gapic::Config::Method.new create_backup_config - delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup - @delete_backup = ::Gapic::Config::Method.new delete_backup_config - update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup - @update_backup = ::Gapic::Config::Method.new update_backup_config - promote_replica_config = parent_rpcs.promote_replica if parent_rpcs.respond_to? :promote_replica - @promote_replica = ::Gapic::Config::Method.new promote_replica_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/credentials.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/credentials.rb deleted file mode 100644 index e61817cc4f70..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/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 Filestore - module V1 - module CloudFilestoreManager - # Credentials for the CloudFilestoreManager 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-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/operations.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/operations.rb deleted file mode 100644 index 120b5f2b7b64..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/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 Filestore - module V1 - module CloudFilestoreManager - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "file.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CloudFilestoreManager 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 CloudFilestoreManager 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::Filestore::V1::VERSION - metadata[:"x-goog-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::Filestore::V1::VERSION - metadata[:"x-goog-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::Filestore::V1::VERSION - metadata[:"x-goog-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::Filestore::V1::VERSION - metadata[:"x-goog-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::Filestore::V1::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 = "file.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-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/paths.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/paths.rb deleted file mode 100644 index 0dcc7297d477..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/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 Filestore - module V1 - module CloudFilestoreManager - # Path helper methods for the CloudFilestoreManager API. - module Paths - ## - # Create a fully-qualified Backup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backups/{backup}` - # - # @param project [String] - # @param location [String] - # @param backup [String] - # - # @return [::String] - def backup_path project:, location:, backup: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backups/#{backup}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - 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 Snapshot resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}/snapshots/{snapshot}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # @param snapshot [String] - # - # @return [::String] - def snapshot_path project:, location:, instance:, snapshot: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}/snapshots/#{snapshot}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest.rb deleted file mode 100644 index eb63a8c99ffe..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest.rb +++ /dev/null @@ -1,72 +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/filestore/v1/version" -require "google/cloud/filestore/v1/bindings_override" - -require "google/cloud/filestore/v1/cloud_filestore_manager/credentials" -require "google/cloud/filestore/v1/cloud_filestore_manager/paths" -require "google/cloud/filestore/v1/cloud_filestore_manager/rest/operations" -require "google/cloud/filestore/v1/cloud_filestore_manager/rest/client" - -module Google - module Cloud - module Filestore - module V1 - ## - # Configures and manages Filestore resources. - # - # Filestore Manager v1. - # - # The `file.googleapis.com` service implements the Filestore API and - # defines the following resource model for managing instances: - # * The service works with a collection of cloud projects, named: `/projects/*` - # * Each project has a collection of available locations, named: `/locations/*` - # * Each location has a collection of instances and backups, named: - # `/instances/*` and `/backups/*` respectively. - # * As such, Filestore instances are resources of the form: - # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}` - # and backups are resources of the form: - # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}` - # - # Note that location_id must be a Google Cloud `zone` for instances, but - # a Google Cloud `region` for backups; for example: - # * `projects/12345/locations/us-central1-c/instances/my-filestore` - # * `projects/12345/locations/us-central1/backups/my-backup` - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/filestore/v1/cloud_filestore_manager/rest" - # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - module CloudFilestoreManager - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/filestore/v1/cloud_filestore_manager/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb deleted file mode 100644 index 6f7581359108..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/client.rb +++ /dev/null @@ -1,2209 +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/filestore/v1/cloud_filestore_service_pb" -require "google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Filestore - module V1 - module CloudFilestoreManager - module Rest - ## - # REST client for the CloudFilestoreManager service. - # - # Configures and manages Filestore resources. - # - # Filestore Manager v1. - # - # The `file.googleapis.com` service implements the Filestore API and - # defines the following resource model for managing instances: - # * The service works with a collection of cloud projects, named: `/projects/*` - # * Each project has a collection of available locations, named: `/locations/*` - # * Each location has a collection of instances and backups, named: - # `/instances/*` and `/backups/*` respectively. - # * As such, Filestore instances are resources of the form: - # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}` - # and backups are resources of the form: - # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}` - # - # Note that location_id must be a Google Cloud `zone` for instances, but - # a Google Cloud `region` for backups; for example: - # * `projects/12345/locations/us-central1-c/instances/my-filestore` - # * `projects/12345/locations/us-central1/backups/my-backup` - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "file.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_filestore_manager_stub - - ## - # Configure the CloudFilestoreManager Client class. - # - # See {::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudFilestoreManager clients - # ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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", "Filestore", "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.list_instances.timeout = 60.0 - default_config.rpcs.list_instances.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_instance.timeout = 60.0 - default_config.rpcs.get_instance.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_instance.timeout = 60_000.0 - - default_config.rpcs.update_instance.timeout = 14_400.0 - - default_config.rpcs.restore_instance.timeout = 60_000.0 - - default_config.rpcs.delete_instance.timeout = 600.0 - - default_config.rpcs.list_backups.timeout = 60.0 - default_config.rpcs.list_backups.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup.timeout = 60.0 - default_config.rpcs.get_backup.retry_policy = { - initial_delay: 0.25, max_delay: 32.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_backup.timeout = 60_000.0 - - default_config.rpcs.delete_backup.timeout = 600.0 - - default_config.rpcs.update_backup.timeout = 600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudFilestoreManager 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::Filestore::V1::CloudFilestoreManager::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 - @cloud_filestore_manager_stub.universe_domain - end - - ## - # Create a new CloudFilestoreManager REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudFilestoreManager 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::Filestore::V1::CloudFilestoreManager::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 - - @cloud_filestore_manager_stub = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_filestore_manager_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 = @cloud_filestore_manager_stub.endpoint - config.universe_domain = @cloud_filestore_manager_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @cloud_filestore_manager_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Filestore::V1::CloudFilestoreManager::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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @cloud_filestore_manager_stub.logger - end - - # Service calls - - ## - # Lists all instances in a project for either a specified location - # or for all locations. - # - # @overload list_instances(request, options = nil) - # Pass arguments to `list_instances` via a request object, either of type - # {::Google::Cloud::Filestore::V1::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::ListInstancesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_instances(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_instances` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve instance - # information, in the format `projects/{project_id}/locations/{location}`. In - # Cloud Filestore, locations map to Google Cloud zones, for example - # **us-west1-b**. To retrieve instance information for all locations, use "-" - # for the - # `{location}` value. - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value to use if there are additional - # results to retrieve for this list request. - # @param order_by [::String] - # Sort results. Supported values are "name", "name desc" or "" (unsorted). - # @param filter [::String] - # List filter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Instance>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Instance>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::ListInstancesRequest.new - # - # # Call the list_instances method. - # result = client.list_instances request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Filestore::V1::Instance. - # p item - # end - # - def list_instances request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListInstancesRequest - - # Converts hash and nil to an 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_instances.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_instances.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_instances.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.list_instances request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_filestore_manager_stub, :list_instances, "instances", 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 details of a specific instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::Filestore::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The instance resource name, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Filestore::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Filestore::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::Filestore::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetInstanceRequest - - # Converts hash and nil to an 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.get_instance 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 instance. - # When creating from a backup, the capacity of the new instance needs to be - # equal to or larger than the capacity of the backup (and also equal to or - # larger than the minimum capacity of the tier). - # - # @overload create_instance(request, options = nil) - # Pass arguments to `create_instance` via a request object, either of type - # {::Google::Cloud::Filestore::V1::CreateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::CreateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_instance(parent: nil, instance_id: nil, instance: nil) - # Pass arguments to `create_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance's project and location, in the format - # `projects/{project_id}/locations/{location}`. In Filestore, - # locations map to Google Cloud zones, for example **us-west1-b**. - # @param instance_id [::String] - # Required. The name of the instance to create. - # The name must be unique for the specified project and location. - # @param instance [::Google::Cloud::Filestore::V1::Instance, ::Hash] - # Required. An {::Google::Cloud::Filestore::V1::Instance instance 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/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::CreateInstanceRequest.new - # - # # Call the create_instance method. - # result = client.create_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateInstanceRequest - - # Converts hash and nil to an 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.create_instance 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 the settings of a specific instance. - # - # @overload update_instance(request, options = nil) - # Pass arguments to `update_instance` via a request object, either of type - # {::Google::Cloud::Filestore::V1::UpdateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::UpdateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_instance(update_mask: nil, instance: nil) - # Pass arguments to `update_instance` via keyword arguments. Note that at - # least one keyword argument is 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] - # Mask of fields to update. At least one path must be supplied in this - # field. The elements of the repeated paths field may only include these - # fields: - # - # * "description" - # * "file_shares" - # * "labels" - # * "performance_config" - # * "deletion_protection_enabled" - # * "deletion_protection_reason" - # @param instance [::Google::Cloud::Filestore::V1::Instance, ::Hash] - # Only fields specified in update_mask are updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::UpdateInstanceRequest.new - # - # # Call the update_instance method. - # result = client.update_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateInstanceRequest - - # Converts hash and nil to an 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.update_instance 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 - - ## - # Restores an existing instance's file share from a backup. - # - # The capacity of the instance needs to be equal to or larger than the - # capacity of the backup (and also equal to or larger than the minimum - # capacity of the tier). - # - # @overload restore_instance(request, options = nil) - # Pass arguments to `restore_instance` via a request object, either of type - # {::Google::Cloud::Filestore::V1::RestoreInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::RestoreInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload restore_instance(name: nil, file_share: nil, source_backup: nil) - # Pass arguments to `restore_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the instance, in the format - # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - # @param file_share [::String] - # Required. Name of the file share in the Filestore instance that the backup - # is being restored to. - # @param source_backup [::String] - # The resource name of the backup, in the format - # `projects/{project_number}/locations/{location_id}/backups/{backup_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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::RestoreInstanceRequest.new - # - # # Call the restore_instance method. - # result = client.restore_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::RestoreInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.restore_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.restore_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restore_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.restore_instance 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 - - ## - # Revert an existing instance's file system to a specified snapshot. - # - # @overload revert_instance(request, options = nil) - # Pass arguments to `revert_instance` via a request object, either of type - # {::Google::Cloud::Filestore::V1::RevertInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::RevertInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload revert_instance(name: nil, target_snapshot_id: nil) - # Pass arguments to `revert_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the instance, in the format - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - # @param target_snapshot_id [::String] - # Required. The snapshot resource ID, in the format 'my-snapshot', where the - # specified ID is the \\{snapshot_id} of the fully qualified name like - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::RevertInstanceRequest.new - # - # # Call the revert_instance method. - # result = client.revert_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def revert_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::RevertInstanceRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.revert_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.revert_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.revert_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.revert_instance 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 instance. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::Filestore::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_instance(name: nil, force: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The instance resource name, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}` - # @param force [::Boolean] - # If set to true, all snapshots of the instance will also be deleted. - # (Otherwise, the request will only work if the instance has no snapshots.) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteInstanceRequest - - # Converts hash and nil to an 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.delete_instance 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 all snapshots in a project for either a specified location - # or for all locations. - # - # @overload list_snapshots(request, options = nil) - # Pass arguments to `list_snapshots` via a request object, either of type - # {::Google::Cloud::Filestore::V1::ListSnapshotsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::ListSnapshotsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_snapshots(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil, return_partial_success: nil) - # Pass arguments to `list_snapshots` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The instance for which to retrieve snapshot information, - # in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}`. - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value to use if there are additional - # results to retrieve for this list request. - # @param order_by [::String] - # Sort results. Supported values are "name", "name desc" or "" (unsorted). - # @param filter [::String] - # List filter. - # @param return_partial_success [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Snapshot>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Snapshot>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::ListSnapshotsRequest.new - # - # # Call the list_snapshots method. - # result = client.list_snapshots request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Filestore::V1::Snapshot. - # p item - # end - # - def list_snapshots request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListSnapshotsRequest - - # Converts hash and nil to an 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_snapshots.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_snapshots.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_snapshots.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.list_snapshots request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_filestore_manager_stub, :list_snapshots, "snapshots", 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 details of a specific snapshot. - # - # @overload get_snapshot(request, options = nil) - # Pass arguments to `get_snapshot` via a request object, either of type - # {::Google::Cloud::Filestore::V1::GetSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::GetSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_snapshot(name: nil) - # Pass arguments to `get_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The snapshot resource name, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Filestore::V1::Snapshot] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Filestore::V1::Snapshot] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::GetSnapshotRequest.new - # - # # Call the get_snapshot method. - # result = client.get_snapshot request - # - # # The returned object is of type Google::Cloud::Filestore::V1::Snapshot. - # p result - # - def get_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetSnapshotRequest - - # Converts hash and nil to an 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_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_snapshot.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.get_snapshot 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 snapshot. - # - # @overload create_snapshot(request, options = nil) - # Pass arguments to `create_snapshot` via a request object, either of type - # {::Google::Cloud::Filestore::V1::CreateSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::CreateSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_snapshot(parent: nil, snapshot_id: nil, snapshot: nil) - # Pass arguments to `create_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The Filestore Instance to create the snapshots of, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}` - # @param snapshot_id [::String] - # Required. The ID to use for the snapshot. - # The ID must be unique within the specified instance. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - # @param snapshot [::Google::Cloud::Filestore::V1::Snapshot, ::Hash] - # Required. A snapshot 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/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::CreateSnapshotRequest.new - # - # # Call the create_snapshot method. - # result = client.create_snapshot request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateSnapshotRequest - - # Converts hash and nil to an 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_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_snapshot.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.create_snapshot 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 snapshot. - # - # @overload delete_snapshot(request, options = nil) - # Pass arguments to `delete_snapshot` via a request object, either of type - # {::Google::Cloud::Filestore::V1::DeleteSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::DeleteSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_snapshot(name: nil) - # Pass arguments to `delete_snapshot` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The snapshot resource name, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::DeleteSnapshotRequest.new - # - # # Call the delete_snapshot method. - # result = client.delete_snapshot request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteSnapshotRequest - - # Converts hash and nil to an 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_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_snapshot.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.delete_snapshot 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 the settings of a specific snapshot. - # - # @overload update_snapshot(request, options = nil) - # Pass arguments to `update_snapshot` via a request object, either of type - # {::Google::Cloud::Filestore::V1::UpdateSnapshotRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::UpdateSnapshotRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_snapshot(update_mask: nil, snapshot: nil) - # Pass arguments to `update_snapshot` via keyword arguments. Note that at - # least one keyword argument is 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. At least one path must be supplied in - # this field. - # @param snapshot [::Google::Cloud::Filestore::V1::Snapshot, ::Hash] - # Required. A snapshot 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/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new - # - # # Call the update_snapshot method. - # result = client.update_snapshot request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_snapshot request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateSnapshotRequest - - # Converts hash and nil to an 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_snapshot.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_snapshot.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_snapshot.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.update_snapshot 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 all backups in a project for either a specified location or for all - # locations. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::Filestore::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::ListBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backups(parent: nil, page_size: nil, page_token: nil, order_by: nil, filter: nil) - # Pass arguments to `list_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location for which to retrieve backup - # information, in the format - # `projects/{project_number}/locations/{location}`. In Filestore, backup - # locations map to Google Cloud regions, for example **us-west1**. To - # retrieve backup information for all locations, use "-" for the - # `{location}` value. - # @param page_size [::Integer] - # The maximum number of items to return. - # @param page_token [::String] - # The next_page_token value to use if there are additional - # results to retrieve for this list request. - # @param order_by [::String] - # Sort results. Supported values are "name", "name desc" or "" (unsorted). - # @param filter [::String] - # List filter. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Backup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Filestore::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::ListBackupsRequest.new - # - # # Call the list_backups method. - # result = client.list_backups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Filestore::V1::Backup. - # p item - # end - # - def list_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::ListBackupsRequest - - # Converts hash and nil to an 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_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.list_backups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_filestore_manager_stub, :list_backups, "backups", 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 details of a specific backup. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::Filestore::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::GetBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup(name: nil) - # Pass arguments to `get_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The backup resource name, in the format - # `projects/{project_number}/locations/{location}/backups/{backup_id}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Filestore::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Filestore::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::Filestore::V1::Backup. - # p result - # - def get_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::GetBackupRequest - - # Converts hash and nil to an 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.get_backup 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 backup. - # - # @overload create_backup(request, options = nil) - # Pass arguments to `create_backup` via a request object, either of type - # {::Google::Cloud::Filestore::V1::CreateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::CreateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup(parent: nil, backup: nil, backup_id: nil) - # Pass arguments to `create_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The backup's project and location, in the format - # `projects/{project_number}/locations/{location}`. In Filestore, - # backup locations map to Google Cloud regions, for example **us-west1**. - # @param backup [::Google::Cloud::Filestore::V1::Backup, ::Hash] - # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource} - # @param backup_id [::String] - # Required. The ID to use for the backup. - # The ID must be unique within the specified project and location. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - # Values that do not match this pattern will trigger an INVALID_ARGUMENT - # 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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::CreateBackupRequest.new - # - # # Call the create_backup method. - # result = client.create_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::CreateBackupRequest - - # Converts hash and nil to an 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.create_backup 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 backup. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::Filestore::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::DeleteBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup(name: nil) - # Pass arguments to `delete_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The backup resource name, in the format - # `projects/{project_number}/locations/{location}/backups/{backup_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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::DeleteBackupRequest - - # Converts hash and nil to an 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.delete_backup 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 the settings of a specific backup. - # - # @overload update_backup(request, options = nil) - # Pass arguments to `update_backup` via a request object, either of type - # {::Google::Cloud::Filestore::V1::UpdateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::UpdateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup(backup: nil, update_mask: nil) - # Pass arguments to `update_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup [::Google::Cloud::Filestore::V1::Backup, ::Hash] - # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource} - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::UpdateBackupRequest.new - # - # # Call the update_backup method. - # result = client.update_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::UpdateBackupRequest - - # Converts hash and nil to an 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.update_backup 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 - - ## - # Promote the standby instance (replica). - # - # @overload promote_replica(request, options = nil) - # Pass arguments to `promote_replica` via a request object, either of type - # {::Google::Cloud::Filestore::V1::PromoteReplicaRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Filestore::V1::PromoteReplicaRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload promote_replica(name: nil, peer_instance: nil) - # Pass arguments to `promote_replica` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the instance, in the format - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - # @param peer_instance [::String] - # Optional. The resource name of the peer instance to promote, in the format - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - # The peer instance is required if the operation is called on an active - # instance. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/filestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Filestore::V1::PromoteReplicaRequest.new - # - # # Call the promote_replica method. - # result = client.promote_replica request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def promote_replica request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Filestore::V1::PromoteReplicaRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.promote_replica.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.promote_replica.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.promote_replica.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_filestore_manager_stub.promote_replica 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 CloudFilestoreManager REST API. - # - # This class represents the configuration for CloudFilestoreManager 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::Filestore::V1::CloudFilestoreManager::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_instances to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.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 = "file.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 CloudFilestoreManager 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_instances` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instances - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - ## - # RPC-specific configuration for `create_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance - ## - # RPC-specific configuration for `update_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance - ## - # RPC-specific configuration for `restore_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_instance - ## - # RPC-specific configuration for `revert_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :revert_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `list_snapshots` - # @return [::Gapic::Config::Method] - # - attr_reader :list_snapshots - ## - # RPC-specific configuration for `get_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :get_snapshot - ## - # RPC-specific configuration for `create_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :create_snapshot - ## - # RPC-specific configuration for `delete_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_snapshot - ## - # RPC-specific configuration for `update_snapshot` - # @return [::Gapic::Config::Method] - # - attr_reader :update_snapshot - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `get_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup - ## - # RPC-specific configuration for `create_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup - ## - # RPC-specific configuration for `delete_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup - ## - # RPC-specific configuration for `update_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup - ## - # RPC-specific configuration for `promote_replica` - # @return [::Gapic::Config::Method] - # - attr_reader :promote_replica - - # @private - def initialize parent_rpcs = nil - list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances - @list_instances = ::Gapic::Config::Method.new list_instances_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance - @create_instance = ::Gapic::Config::Method.new create_instance_config - update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance - @update_instance = ::Gapic::Config::Method.new update_instance_config - restore_instance_config = parent_rpcs.restore_instance if parent_rpcs.respond_to? :restore_instance - @restore_instance = ::Gapic::Config::Method.new restore_instance_config - revert_instance_config = parent_rpcs.revert_instance if parent_rpcs.respond_to? :revert_instance - @revert_instance = ::Gapic::Config::Method.new revert_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - list_snapshots_config = parent_rpcs.list_snapshots if parent_rpcs.respond_to? :list_snapshots - @list_snapshots = ::Gapic::Config::Method.new list_snapshots_config - get_snapshot_config = parent_rpcs.get_snapshot if parent_rpcs.respond_to? :get_snapshot - @get_snapshot = ::Gapic::Config::Method.new get_snapshot_config - create_snapshot_config = parent_rpcs.create_snapshot if parent_rpcs.respond_to? :create_snapshot - @create_snapshot = ::Gapic::Config::Method.new create_snapshot_config - delete_snapshot_config = parent_rpcs.delete_snapshot if parent_rpcs.respond_to? :delete_snapshot - @delete_snapshot = ::Gapic::Config::Method.new delete_snapshot_config - update_snapshot_config = parent_rpcs.update_snapshot if parent_rpcs.respond_to? :update_snapshot - @update_snapshot = ::Gapic::Config::Method.new update_snapshot_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup - @get_backup = ::Gapic::Config::Method.new get_backup_config - create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup - @create_backup = ::Gapic::Config::Method.new create_backup_config - delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup - @delete_backup = ::Gapic::Config::Method.new delete_backup_config - update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup - @update_backup = ::Gapic::Config::Method.new update_backup_config - promote_replica_config = parent_rpcs.promote_replica if parent_rpcs.respond_to? :promote_replica - @promote_replica = ::Gapic::Config::Method.new promote_replica_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb deleted file mode 100644 index 41d713ea2f87..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/operations.rb +++ /dev/null @@ -1,925 +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 Filestore - module V1 - module CloudFilestoreManager - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "file.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CloudFilestoreManager 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 CloudFilestoreManager 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::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Filestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "file.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] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub.rb deleted file mode 100644 index 657d34323a55..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_manager/rest/service_stub.rb +++ /dev/null @@ -1,1188 +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/filestore/v1/cloud_filestore_service_pb" - -module Google - module Cloud - module Filestore - module V1 - module CloudFilestoreManager - module Rest - ## - # REST service stub for the CloudFilestoreManager 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 list_instances REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::ListInstancesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Filestore::V1::ListInstancesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Filestore::V1::ListInstancesResponse] - # A result object deserialized from the server's reply - def list_instances request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_instances", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Filestore::V1::ListInstancesResponse.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_instance REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Filestore::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Filestore::V1::Instance] - # A result object deserialized from the server's reply - def get_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Filestore::V1::Instance.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_instance REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::CreateInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_instance", - 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_instance REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::UpdateInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_instance", - 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 restore_instance REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::RestoreInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def restore_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restore_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "restore_instance", - 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 revert_instance REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::RevertInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def revert_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_revert_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "revert_instance", - 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_instance REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::DeleteInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_instance", - 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_snapshots REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::ListSnapshotsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Filestore::V1::ListSnapshotsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Filestore::V1::ListSnapshotsResponse] - # A result object deserialized from the server's reply - def list_snapshots request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_snapshots_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_snapshots", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Filestore::V1::ListSnapshotsResponse.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_snapshot REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::GetSnapshotRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Filestore::V1::Snapshot] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Filestore::V1::Snapshot] - # A result object deserialized from the server's reply - def get_snapshot request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_snapshot_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_snapshot", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Filestore::V1::Snapshot.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_snapshot REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::CreateSnapshotRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_snapshot request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_snapshot_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_snapshot", - 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_snapshot REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::DeleteSnapshotRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_snapshot request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_snapshot_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_snapshot", - 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_snapshot REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::UpdateSnapshotRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_snapshot request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_snapshot_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_snapshot", - 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_backups REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::ListBackupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Filestore::V1::ListBackupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Filestore::V1::ListBackupsResponse] - # A result object deserialized from the server's reply - def list_backups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Filestore::V1::ListBackupsResponse.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_backup REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::GetBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Filestore::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Filestore::V1::Backup] - # A result object deserialized from the server's reply - def get_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Filestore::V1::Backup.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_backup REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::CreateBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup", - 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_backup REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::DeleteBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup", - 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_backup REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::UpdateBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup", - 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 promote_replica REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::PromoteReplicaRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def promote_replica request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_promote_replica_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "promote_replica", - 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 list_instances REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::ListInstancesRequest] - # 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_instances_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/instances", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_instance REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::GetInstanceRequest] - # 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_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_instance REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::CreateInstanceRequest] - # 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_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/instances", - body: "instance", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_instance REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::UpdateInstanceRequest] - # 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_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{instance.name}", - body: "instance", - matches: [ - ["instance.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restore_instance REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::RestoreInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_restore_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:restore", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the revert_instance REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::RevertInstanceRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_revert_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:revert", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_instance REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::DeleteInstanceRequest] - # 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_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_snapshots REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::ListSnapshotsRequest] - # 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_snapshots_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/snapshots", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_snapshot REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::GetSnapshotRequest] - # 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_snapshot_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/snapshots/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_snapshot REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::CreateSnapshotRequest] - # 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_snapshot_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/snapshots", - body: "snapshot", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_snapshot REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::DeleteSnapshotRequest] - # 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_snapshot_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/snapshots/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_snapshot REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::UpdateSnapshotRequest] - # 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_snapshot_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{snapshot.name}", - body: "snapshot", - matches: [ - ["snapshot.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/snapshots/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backups REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::ListBackupsRequest] - # 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_backups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::GetBackupRequest] - # 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_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::CreateBackupRequest] - # 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_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backups", - body: "backup", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::DeleteBackupRequest] - # 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_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::UpdateBackupRequest] - # 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_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup.name}", - body: "backup", - matches: [ - ["backup.name", %r{^projects/[^/]+/locations/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the promote_replica REST call - # - # @param request_pb [::Google::Cloud::Filestore::V1::PromoteReplicaRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_promote_replica_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:promoteReplica", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_service_pb.rb b/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_service_pb.rb deleted file mode 100644 index d1ac74b616b4..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/lib/google/cloud/filestore/v1/cloud_filestore_service_pb.rb +++ /dev/null @@ -1,101 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/filestore/v1/cloud_filestore_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/common/operation_metadata_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' - - -descriptor_data = "\n7google/cloud/filestore/v1/cloud_filestore_service.proto\x12\x19google.cloud.filestore.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/common/operation_metadata.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\"\x80\x03\n\rNetworkConfig\x12\x0f\n\x07network\x18\x01 \x01(\t\x12\x43\n\x05modes\x18\x03 \x03(\x0e\x32\x34.google.cloud.filestore.v1.NetworkConfig.AddressMode\x12\x19\n\x11reserved_ip_range\x18\x04 \x01(\t\x12\x19\n\x0cip_addresses\x18\x05 \x03(\tB\x03\xe0\x41\x03\x12J\n\x0c\x63onnect_mode\x18\x06 \x01(\x0e\x32\x34.google.cloud.filestore.v1.NetworkConfig.ConnectMode\":\n\x0b\x41\x64\x64ressMode\x12\x1c\n\x18\x41\x44\x44RESS_MODE_UNSPECIFIED\x10\x00\x12\r\n\tMODE_IPV4\x10\x01\"[\n\x0b\x43onnectMode\x12\x1c\n\x18\x43ONNECT_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x44IRECT_PEERING\x10\x01\x12\x1a\n\x16PRIVATE_SERVICE_ACCESS\x10\x02\"\xc1\x01\n\x0f\x46ileShareConfig\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x63\x61pacity_gb\x18\x02 \x01(\x03\x12\x38\n\rsource_backup\x18\x08 \x01(\tB\x1f\xfa\x41\x1c\n\x1a\x66ile.googleapis.com/BackupH\x00\x12G\n\x12nfs_export_options\x18\x07 \x03(\x0b\x32+.google.cloud.filestore.v1.NfsExportOptionsB\x08\n\x06source\"\xfd\x02\n\x10NfsExportOptions\x12\x11\n\tip_ranges\x18\x01 \x03(\t\x12K\n\x0b\x61\x63\x63\x65ss_mode\x18\x02 \x01(\x0e\x32\x36.google.cloud.filestore.v1.NfsExportOptions.AccessMode\x12K\n\x0bsquash_mode\x18\x03 \x01(\x0e\x32\x36.google.cloud.filestore.v1.NfsExportOptions.SquashMode\x12\x10\n\x08\x61non_uid\x18\x04 \x01(\x03\x12\x10\n\x08\x61non_gid\x18\x05 \x01(\x03\"H\n\nAccessMode\x12\x1b\n\x17\x41\x43\x43\x45SS_MODE_UNSPECIFIED\x10\x00\x12\r\n\tREAD_ONLY\x10\x01\x12\x0e\n\nREAD_WRITE\x10\x02\"N\n\nSquashMode\x12\x1b\n\x17SQUASH_MODE_UNSPECIFIED\x10\x00\x12\x12\n\x0eNO_ROOT_SQUASH\x10\x01\x12\x0f\n\x0bROOT_SQUASH\x10\x02\"\xd4\x03\n\rReplicaConfig\x12\x42\n\x05state\x18\x01 \x01(\x0e\x32..google.cloud.filestore.v1.ReplicaConfig.StateB\x03\xe0\x41\x03\x12P\n\rstate_reasons\x18\x02 \x03(\x0e\x32\x34.google.cloud.filestore.v1.ReplicaConfig.StateReasonB\x03\xe0\x41\x03\x12;\n\rpeer_instance\x18\x03 \x01(\tB$\xe0\x41\x01\xfa\x41\x1e\n\x1c\x66ile.googleapis.com/Instance\x12>\n\x15last_active_sync_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\"Q\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x03\x12\x0c\n\x08REMOVING\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\"]\n\x0bStateReason\x12\x1c\n\x18STATE_REASON_UNSPECIFIED\x10\x00\x12\x1d\n\x19PEER_INSTANCE_UNREACHABLE\x10\x01\x12\x11\n\rREMOVE_FAILED\x10\x02\"\xc5\x01\n\x0bReplication\x12>\n\x04role\x18\x01 \x01(\x0e\x32+.google.cloud.filestore.v1.Replication.RoleB\x03\xe0\x41\x01\x12?\n\x08replicas\x18\x02 \x03(\x0b\x32(.google.cloud.filestore.v1.ReplicaConfigB\x03\xe0\x41\x01\"5\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07STANDBY\x10\x02\"\xd6\x11\n\x08Instance\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12=\n\x05state\x18\x05 \x01(\x0e\x32).google.cloud.filestore.v1.Instance.StateB\x03\xe0\x41\x03\x12\x1b\n\x0estatus_message\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x36\n\x04tier\x18\x08 \x01(\x0e\x32(.google.cloud.filestore.v1.Instance.Tier\x12?\n\x06labels\x18\t \x03(\x0b\x32/.google.cloud.filestore.v1.Instance.LabelsEntry\x12?\n\x0b\x66ile_shares\x18\n \x03(\x0b\x32*.google.cloud.filestore.v1.FileShareConfig\x12:\n\x08networks\x18\x0b \x03(\x0b\x32(.google.cloud.filestore.v1.NetworkConfig\x12\x0c\n\x04\x65tag\x18\x0c \x01(\t\x12\x36\n\rsatisfies_pzs\x18\r \x01(\x0b\x32\x1a.google.protobuf.BoolValueB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x12 \x01(\x08\x42\x03\xe0\x41\x03\x12\x14\n\x0ckms_key_name\x18\x0e \x01(\t\x12U\n\x12suspension_reasons\x18\x0f \x03(\x0e\x32\x34.google.cloud.filestore.v1.Instance.SuspensionReasonB\x03\xe0\x41\x03\x12@\n\x0breplication\x18\x13 \x01(\x0b\x32&.google.cloud.filestore.v1.ReplicationB\x03\xe0\x41\x01\x12\x46\n\x04tags\x18\x14 \x03(\x0b\x32-.google.cloud.filestore.v1.Instance.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x12G\n\x08protocol\x18\x15 \x01(\x0e\x32\x30.google.cloud.filestore.v1.Instance.FileProtocolB\x03\xe0\x41\x05\x12)\n\x1c\x63ustom_performance_supported\x18\x17 \x01(\x08\x42\x03\xe0\x41\x03\x12V\n\x12performance_config\x18\x18 \x01(\x0b\x32\x35.google.cloud.filestore.v1.Instance.PerformanceConfigB\x03\xe0\x41\x01\x12V\n\x12performance_limits\x18\x19 \x01(\x0b\x32\x35.google.cloud.filestore.v1.Instance.PerformanceLimitsB\x03\xe0\x41\x03\x12(\n\x1b\x64\x65letion_protection_enabled\x18\x1a \x01(\x08\x42\x03\xe0\x41\x01\x12\'\n\x1a\x64\x65letion_protection_reason\x18\x1b \x01(\tB\x03\xe0\x41\x01\x1a)\n\tIOPSPerTB\x12\x1c\n\x0fmax_iops_per_tb\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x1a\"\n\tFixedIOPS\x12\x15\n\x08max_iops\x18\x02 \x01(\x03\x42\x03\xe0\x41\x02\x1a\xa6\x01\n\x11PerformanceConfig\x12\x44\n\x0biops_per_tb\x18\x04 \x01(\x0b\x32-.google.cloud.filestore.v1.Instance.IOPSPerTBH\x00\x12\x43\n\nfixed_iops\x18\x02 \x01(\x0b\x32-.google.cloud.filestore.v1.Instance.FixedIOPSH\x00\x42\x06\n\x04mode\x1a\xb0\x01\n\x11PerformanceLimits\x12\x15\n\x08max_iops\x18\x07 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1a\n\rmax_read_iops\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0emax_write_iops\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12$\n\x17max_read_throughput_bps\x18\x05 \x01(\x03\x42\x03\xe0\x41\x03\x12%\n\x18max_write_throughput_bps\x18\x06 \x01(\x03\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\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xb9\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\r\n\tREPAIRING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\t\n\x05\x45RROR\x10\x06\x12\r\n\tRESTORING\x10\x07\x12\r\n\tSUSPENDED\x10\x08\x12\x0e\n\nSUSPENDING\x10\t\x12\x0c\n\x08RESUMING\x10\n\x12\r\n\tREVERTING\x10\x0c\x12\r\n\tPROMOTING\x10\r\"\x92\x01\n\x04Tier\x12\x14\n\x10TIER_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0b\n\x07PREMIUM\x10\x02\x12\r\n\tBASIC_HDD\x10\x03\x12\r\n\tBASIC_SSD\x10\x04\x12\x12\n\x0eHIGH_SCALE_SSD\x10\x05\x12\x0e\n\nENTERPRISE\x10\x06\x12\t\n\x05ZONAL\x10\x07\x12\x0c\n\x08REGIONAL\x10\x08\"H\n\x10SuspensionReason\x12!\n\x1dSUSPENSION_REASON_UNSPECIFIED\x10\x00\x12\x11\n\rKMS_KEY_ISSUE\x10\x01\"G\n\x0c\x46ileProtocol\x12\x1d\n\x19\x46ILE_PROTOCOL_UNSPECIFIED\x10\x00\x12\n\n\x06NFS_V3\x10\x01\x12\x0c\n\x08NFS_V4_1\x10\x02:_\xea\x41\\\n\x1c\x66ile.googleapis.com/Instance\x12\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\x9f\x01\n\x0bGetInstance\x12-.google.cloud.filestore.v1.GetInstanceRequest\x1a#.google.cloud.filestore.v1.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xf5\x01\n\x0e\x43reateInstance\x12\x30.google.cloud.filestore.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41\x31\n\x08Instance\x12%google.cloud.common.OperationMetadata\xda\x41\x1bparent,instance,instance_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xf7\x01\n\x0eUpdateInstance\x12\x30.google.cloud.filestore.v1.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x93\x01\xca\x41\x31\n\x08Instance\x12%google.cloud.common.OperationMetadata\xda\x41\x14instance,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xd9\x01\n\x0fRestoreInstance\x12\x31.google.cloud.filestore.v1.RestoreInstanceRequest\x1a\x1d.google.longrunning.Operation\"t\xca\x41\x31\n\x08Instance\x12%google.cloud.common.OperationMetadata\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/locations/*/instances/*}:restore:\x01*\x12\xd6\x01\n\x0eRevertInstance\x12\x30.google.cloud.filestore.v1.RevertInstanceRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x31\n\x08Instance\x12%google.cloud.common.OperationMetadata\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/locations/*/instances/*}:revert:\x01*\x12\xe0\x01\n\x0e\x44\x65leteInstance\x12\x30.google.cloud.filestore.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41>\n\x15google.protobuf.Empty\x12%google.cloud.common.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xbe\x01\n\rListSnapshots\x12/.google.cloud.filestore.v1.ListSnapshotsRequest\x1a\x30.google.cloud.filestore.v1.ListSnapshotsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/instances/*}/snapshots\x12\xab\x01\n\x0bGetSnapshot\x12-.google.cloud.filestore.v1.GetSnapshotRequest\x1a#.google.cloud.filestore.v1.Snapshot\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/instances/*/snapshots/*}\x12\x81\x02\n\x0e\x43reateSnapshot\x12\x30.google.cloud.filestore.v1.CreateSnapshotRequest\x1a\x1d.google.longrunning.Operation\"\x9d\x01\xca\x41\x31\n\x08Snapshot\x12%google.cloud.common.OperationMetadata\xda\x41\x1bparent,snapshot,snapshot_id\x82\xd3\xe4\x93\x02\x45\"9/v1/{parent=projects/*/locations/*/instances/*}/snapshots:\x08snapshot\x12\xed\x01\n\x0e\x44\x65leteSnapshot\x12\x30.google.cloud.filestore.v1.DeleteSnapshotRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41>\n\x15google.protobuf.Empty\x12%google.cloud.common.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/instances/*/snapshots/*}\x12\x83\x02\n\x0eUpdateSnapshot\x12\x30.google.cloud.filestore.v1.UpdateSnapshotRequest\x1a\x1d.google.longrunning.Operation\"\x9f\x01\xca\x41\x31\n\x08Snapshot\x12%google.cloud.common.OperationMetadata\xda\x41\x14snapshot,update_mask\x82\xd3\xe4\x93\x02N2B/v1/{snapshot.name=projects/*/locations/*/instances/*/snapshots/*}:\x08snapshot\x12\xaa\x01\n\x0bListBackups\x12-.google.cloud.filestore.v1.ListBackupsRequest\x1a..google.cloud.filestore.v1.ListBackupsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/backups\x12\x97\x01\n\tGetBackup\x12+.google.cloud.filestore.v1.GetBackupRequest\x1a!.google.cloud.filestore.v1.Backup\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/backups/*}\x12\xe7\x01\n\x0c\x43reateBackup\x12..google.cloud.filestore.v1.CreateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41/\n\x06\x42\x61\x63kup\x12%google.cloud.common.OperationMetadata\xda\x41\x17parent,backup,backup_id\x82\xd3\xe4\x93\x02\x35\"+/v1/{parent=projects/*/locations/*}/backups:\x06\x62\x61\x63kup\x12\xda\x01\n\x0c\x44\x65leteBackup\x12..google.cloud.filestore.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41>\n\x15google.protobuf.Empty\x12%google.cloud.common.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/backups/*}\x12\xe9\x01\n\x0cUpdateBackup\x12..google.cloud.filestore.v1.UpdateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41/\n\x06\x42\x61\x63kup\x12%google.cloud.common.OperationMetadata\xda\x41\x12\x62\x61\x63kup,update_mask\x82\xd3\xe4\x93\x02<22/v1/{backup.name=projects/*/locations/*/backups/*}:\x06\x62\x61\x63kup\x12\xde\x01\n\x0ePromoteReplica\x12\x30.google.cloud.filestore.v1.PromoteReplicaRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41\x31\n\x08Instance\x12%google.cloud.common.OperationMetadata\x82\xd3\xe4\x93\x02\x41\"] - # 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-filestore-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/cloud/common/operation_metadata.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/common/operation_metadata.rb deleted file mode 100644 index 83480730321c..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/common/operation_metadata.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! - - -module Google - module Cloud - module Common - # Represents the metadata of the 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_detail - # @return [::String] - # Output only. Human-readable status of the operation, if any. - # @!attribute [r] cancel_requested - # @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][] 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 - end - end -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/filestore/v1/cloud_filestore_service.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/filestore/v1/cloud_filestore_service.rb deleted file mode 100644 index a67165ecf833..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/cloud/filestore/v1/cloud_filestore_service.rb +++ /dev/null @@ -1,1103 +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 Filestore - module V1 - # Network configuration for the instance. - # @!attribute [rw] network - # @return [::String] - # The name of the Google Compute Engine - # [VPC network](https://cloud.google.com/vpc/docs/vpc) to which the - # instance is connected. - # @!attribute [rw] modes - # @return [::Array<::Google::Cloud::Filestore::V1::NetworkConfig::AddressMode>] - # Internet protocol versions for which the instance has IP addresses - # assigned. For this version, only MODE_IPV4 is supported. - # @!attribute [rw] reserved_ip_range - # @return [::String] - # Optional, reserved_ip_range can have one of the following two types of - # values. - # - # * CIDR range value when using DIRECT_PEERING connect mode. - # * [Allocated IP address - # range](https://cloud.google.com/compute/docs/ip-addresses/reserve-static-internal-ip-address) - # when using PRIVATE_SERVICE_ACCESS connect mode. - # - # When the name of an allocated IP address range is specified, it must be one - # of the ranges associated with the private service access connection. - # When specified as a direct CIDR value, it must be a /29 CIDR block for - # Basic tier, a /24 CIDR block for High Scale tier, or a /26 CIDR block for - # Enterprise tier in one of the [internal IP address - # ranges](https://www.arin.net/reference/research/statistics/address_filters/) - # that identifies the range of IP addresses reserved for this instance. For - # example, 10.0.0.0/29, 192.168.0.0/24 or 192.168.0.0/26, respectively. The - # range you specify can't overlap with either existing subnets or assigned IP - # address ranges for other Filestore instances in the selected VPC - # network. - # @!attribute [r] ip_addresses - # @return [::Array<::String>] - # Output only. IPv4 addresses in the format - # `{octet1}.{octet2}.{octet3}.{octet4}` or IPv6 addresses in the format - # `{block1}:{block2}:{block3}:{block4}:{block5}:{block6}:{block7}:{block8}`. - # @!attribute [rw] connect_mode - # @return [::Google::Cloud::Filestore::V1::NetworkConfig::ConnectMode] - # The network connect mode of the Filestore instance. - # If not provided, the connect mode defaults to DIRECT_PEERING. - class NetworkConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Internet protocol versions supported by Filestore. - module AddressMode - # Internet protocol not set. - ADDRESS_MODE_UNSPECIFIED = 0 - - # Use the IPv4 internet protocol. - MODE_IPV4 = 1 - end - - # Available connection modes. - module ConnectMode - # Not set. - CONNECT_MODE_UNSPECIFIED = 0 - - # Connect via direct peering to the Filestore service. - DIRECT_PEERING = 1 - - # Connect to your Filestore instance using Private Service - # Access. Private services access provides an IP address range for multiple - # Google Cloud services, including Filestore. - PRIVATE_SERVICE_ACCESS = 2 - end - end - - # File share configuration for the instance. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the file share. Must use 1-16 characters for the - # basic service tier and 1-63 characters for all other service tiers. - # Must use lowercase letters, numbers, or underscores `[a-z0-9_]`. Must - # start with a letter. Immutable. - # @!attribute [rw] capacity_gb - # @return [::Integer] - # File share capacity in gigabytes (GB). - # Filestore defines 1 GB as 1024^3 bytes. - # @!attribute [rw] source_backup - # @return [::String] - # The resource name of the backup, in the format - # `projects/{project_number}/locations/{location_id}/backups/{backup_id}`, - # that this file share has been restored from. - # @!attribute [rw] nfs_export_options - # @return [::Array<::Google::Cloud::Filestore::V1::NfsExportOptions>] - # Nfs Export Options. - # There is a limit of 10 export options per file share. - class FileShareConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # NFS export options specifications. - # @!attribute [rw] ip_ranges - # @return [::Array<::String>] - # List of either an IPv4 addresses in the format - # `{octet1}.{octet2}.{octet3}.{octet4}` or CIDR ranges in the format - # `{octet1}.{octet2}.{octet3}.{octet4}/{mask size}` which may mount the - # file share. - # Overlapping IP ranges are not allowed, both within and across - # NfsExportOptions. An error will be returned. - # The limit is 64 IP ranges/addresses for each FileShareConfig among all - # NfsExportOptions. - # @!attribute [rw] access_mode - # @return [::Google::Cloud::Filestore::V1::NfsExportOptions::AccessMode] - # Either READ_ONLY, for allowing only read requests on the exported - # directory, or READ_WRITE, for allowing both read and write requests. - # The default is READ_WRITE. - # @!attribute [rw] squash_mode - # @return [::Google::Cloud::Filestore::V1::NfsExportOptions::SquashMode] - # Either NO_ROOT_SQUASH, for allowing root access on the exported directory, - # or ROOT_SQUASH, for not allowing root access. The default is - # NO_ROOT_SQUASH. - # @!attribute [rw] anon_uid - # @return [::Integer] - # An integer representing the anonymous user id with a default value of - # 65534. - # Anon_uid may only be set with squash_mode of ROOT_SQUASH. An error will be - # returned if this field is specified for other squash_mode settings. - # @!attribute [rw] anon_gid - # @return [::Integer] - # An integer representing the anonymous group id with a default value of - # 65534. - # Anon_gid may only be set with squash_mode of ROOT_SQUASH. An error will be - # returned if this field is specified for other squash_mode settings. - class NfsExportOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The access mode. - module AccessMode - # AccessMode not set. - ACCESS_MODE_UNSPECIFIED = 0 - - # The client can only read the file share. - READ_ONLY = 1 - - # The client can read and write the file share (default). - READ_WRITE = 2 - end - - # The squash mode. - module SquashMode - # SquashMode not set. - SQUASH_MODE_UNSPECIFIED = 0 - - # The Root user has root access to the file share (default). - NO_ROOT_SQUASH = 1 - - # The Root user has squashed access to the anonymous uid/gid. - ROOT_SQUASH = 2 - end - end - - # Replica configuration for the instance. - # @!attribute [r] state - # @return [::Google::Cloud::Filestore::V1::ReplicaConfig::State] - # Output only. The replica state. - # @!attribute [r] state_reasons - # @return [::Array<::Google::Cloud::Filestore::V1::ReplicaConfig::StateReason>] - # Output only. Additional information about the replication state, if - # available. - # @!attribute [rw] peer_instance - # @return [::String] - # Optional. The peer instance. - # @!attribute [r] last_active_sync_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of the latest replication snapshot taken on the - # active instance and is already replicated safely. - class ReplicaConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The replica state. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The replica is being created. - CREATING = 1 - - # The replica is ready. - READY = 3 - - # The replica is being removed. - REMOVING = 4 - - # The replica is experiencing an issue and might be unusable. You can get - # further details from the `stateReasons` field of the `ReplicaConfig` - # object. - FAILED = 5 - end - - # Additional information about the replication state, if available. - module StateReason - # Reason not specified. - STATE_REASON_UNSPECIFIED = 0 - - # The peer instance is unreachable. - PEER_INSTANCE_UNREACHABLE = 1 - - # The remove replica peer instance operation failed. - REMOVE_FAILED = 2 - end - end - - # Replication specifications. - # @!attribute [rw] role - # @return [::Google::Cloud::Filestore::V1::Replication::Role] - # Optional. The replication role. - # @!attribute [rw] replicas - # @return [::Array<::Google::Cloud::Filestore::V1::ReplicaConfig>] - # Optional. Replication configuration for the replica instance associated - # with this instance. Only a single replica is supported. - class Replication - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Replication role. - module Role - # Role not set. - ROLE_UNSPECIFIED = 0 - - # The instance is the `ACTIVE` replication member, functions as - # the replication source instance. - ACTIVE = 1 - - # The instance is the `STANDBY` replication member, functions as - # the replication destination instance. - STANDBY = 2 - end - end - - # A Filestore instance. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the instance, in the format - # `projects/{project}/locations/{location}/instances/{instance}`. - # @!attribute [rw] description - # @return [::String] - # The description of the instance (2048 characters or less). - # @!attribute [r] state - # @return [::Google::Cloud::Filestore::V1::Instance::State] - # Output only. The instance state. - # @!attribute [r] status_message - # @return [::String] - # Output only. Additional information about the instance state, if available. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the instance was created. - # @!attribute [rw] tier - # @return [::Google::Cloud::Filestore::V1::Instance::Tier] - # The service tier of the instance. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Resource labels to represent user provided metadata. - # @!attribute [rw] file_shares - # @return [::Array<::Google::Cloud::Filestore::V1::FileShareConfig>] - # File system shares on the instance. - # For this version, only a single file share is supported. - # @!attribute [rw] networks - # @return [::Array<::Google::Cloud::Filestore::V1::NetworkConfig>] - # VPC networks to which the instance is connected. - # For this version, only a single network is supported. - # @!attribute [rw] etag - # @return [::String] - # Server-specified ETag for the instance resource to prevent simultaneous - # updates from overwriting each other. - # @!attribute [r] satisfies_pzs - # @return [::Google::Protobuf::BoolValue] - # Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [rw] kms_key_name - # @return [::String] - # KMS key name used for data encryption. - # @!attribute [r] suspension_reasons - # @return [::Array<::Google::Cloud::Filestore::V1::Instance::SuspensionReason>] - # Output only. Field indicates all the reasons the instance is in "SUSPENDED" - # state. - # @!attribute [rw] replication - # @return [::Google::Cloud::Filestore::V1::Replication] - # Optional. Replication configuration. - # @!attribute [rw] tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Input only. Immutable. Tag key-value pairs bound to this - # resource. Each key must be a namespaced name and each value a short name. - # Example: - # "123456789012/environment" : "production", - # "123456789013/costCenter" : "marketing" - # See the documentation for more information: - # - Namespaced name: - # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key - # - Short name: - # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value - # @!attribute [rw] protocol - # @return [::Google::Cloud::Filestore::V1::Instance::FileProtocol] - # Immutable. The protocol indicates the access protocol for all shares in the - # instance. This field is immutable and it cannot be changed after the - # instance has been created. Default value: `NFS_V3`. - # @!attribute [r] custom_performance_supported - # @return [::Boolean] - # Output only. Indicates whether this instance supports configuring its - # performance. If true, the user can configure the instance's performance by - # using the 'performance_config' field. - # @!attribute [rw] performance_config - # @return [::Google::Cloud::Filestore::V1::Instance::PerformanceConfig] - # Optional. Used to configure performance. - # @!attribute [r] performance_limits - # @return [::Google::Cloud::Filestore::V1::Instance::PerformanceLimits] - # Output only. Used for getting performance limits. - # @!attribute [rw] deletion_protection_enabled - # @return [::Boolean] - # Optional. Indicates whether the instance is protected against deletion. - # @!attribute [rw] deletion_protection_reason - # @return [::String] - # Optional. The reason for enabling deletion protection. - class Instance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # IOPS per TB. - # Filestore defines TB as 1024^4 bytes (TiB). - # @!attribute [rw] max_iops_per_tb - # @return [::Integer] - # Required. Maximum IOPS per TiB. - class IOPSPerTB - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Fixed IOPS (input/output operations per second) parameters. - # @!attribute [rw] max_iops - # @return [::Integer] - # Required. Maximum IOPS. - class FixedIOPS - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Used for setting the performance configuration. - # If the user doesn't specify PerformanceConfig, automatically provision - # the default performance settings as described in - # https://cloud.google.com/filestore/docs/performance. Larger instances will - # be linearly set to more IOPS. If the instance's capacity is increased or - # decreased, its performance will be automatically adjusted upwards or - # downwards accordingly (respectively). - # @!attribute [rw] iops_per_tb - # @return [::Google::Cloud::Filestore::V1::Instance::IOPSPerTB] - # Provision IOPS dynamically based on the capacity of the instance. - # Provisioned IOPS will be calculated by multiplying the capacity of the - # instance in TiB by the `iops_per_tb` value. For example, for a 2 TiB - # instance with an `iops_per_tb` value of 17000 the provisioned IOPS will - # be 34000. - # - # If the calculated value is outside the supported range for the - # instance's capacity during instance creation, instance creation will - # fail with an `InvalidArgument` error. Similarly, if an instance - # capacity update would result in a value outside the supported range, - # the update will fail with an `InvalidArgument` error. - # - # Note: The following fields are mutually exclusive: `iops_per_tb`, `fixed_iops`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] fixed_iops - # @return [::Google::Cloud::Filestore::V1::Instance::FixedIOPS] - # Choose a fixed provisioned IOPS value for the instance, which will - # remain constant regardless of instance capacity. Value must be a - # multiple of 1000. - # - # If the chosen value is outside the supported range for the instance's - # capacity during instance creation, instance creation will fail with an - # `InvalidArgument` error. Similarly, if an instance capacity update - # would result in a value outside the supported range, the update will - # fail with an `InvalidArgument` error. - # - # Note: The following fields are mutually exclusive: `fixed_iops`, `iops_per_tb`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class PerformanceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The enforced performance limits, calculated from the instance's performance - # configuration. - # @!attribute [r] max_iops - # @return [::Integer] - # Output only. The max IOPS. - # @!attribute [r] max_read_iops - # @return [::Integer] - # Output only. The max read IOPS. - # @!attribute [r] max_write_iops - # @return [::Integer] - # Output only. The max write IOPS. - # @!attribute [r] max_read_throughput_bps - # @return [::Integer] - # Output only. The max read throughput in bytes per second. - # @!attribute [r] max_write_throughput_bps - # @return [::Integer] - # Output only. The max write throughput in bytes per second. - class PerformanceLimits - 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 [::String] - class TagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The instance state. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # The instance is being created. - CREATING = 1 - - # The instance is available for use. - READY = 2 - - # Work is being done on the instance. You can get further details from the - # `statusMessage` field of the `Instance` resource. - REPAIRING = 3 - - # The instance is shutting down. - DELETING = 4 - - # The instance is experiencing an issue and might be unusable. You can get - # further details from the `statusMessage` field of the `Instance` - # resource. - ERROR = 6 - - # The instance is restoring a backup to an existing file share and may be - # unusable during this time. - RESTORING = 7 - - # The instance is suspended. You can get further details from - # the `suspension_reasons` field of the `Instance` resource. - SUSPENDED = 8 - - # The instance is in the process of becoming suspended. - SUSPENDING = 9 - - # The instance is in the process of becoming active. - RESUMING = 10 - - # The instance is reverting to a snapshot. - REVERTING = 12 - - # The replica instance is being promoted. - PROMOTING = 13 - end - - # Available service tiers. - module Tier - # Not set. - TIER_UNSPECIFIED = 0 - - # STANDARD tier. BASIC_HDD is the preferred term for this tier. - STANDARD = 1 - - # PREMIUM tier. BASIC_SSD is the preferred term for this tier. - PREMIUM = 2 - - # BASIC instances offer a maximum capacity of 63.9 TB. - # BASIC_HDD is an alias for STANDARD Tier, offering economical - # performance backed by HDD. - BASIC_HDD = 3 - - # BASIC instances offer a maximum capacity of 63.9 TB. - # BASIC_SSD is an alias for PREMIUM Tier, and offers improved - # performance backed by SSD. - BASIC_SSD = 4 - - # HIGH_SCALE instances offer expanded capacity and performance scaling - # capabilities. - HIGH_SCALE_SSD = 5 - - # ENTERPRISE instances offer the features and availability needed for - # mission-critical workloads. - ENTERPRISE = 6 - - # ZONAL instances offer expanded capacity and performance scaling - # capabilities. - ZONAL = 7 - - # REGIONAL instances offer the features and availability needed for - # mission-critical workloads. - REGIONAL = 8 - end - - # SuspensionReason contains the possible reasons for a suspension. - module SuspensionReason - # Not set. - SUSPENSION_REASON_UNSPECIFIED = 0 - - # The KMS key used by the instance is either revoked or denied access to. - KMS_KEY_ISSUE = 1 - end - - # File access protocol. - module FileProtocol - # FILE_PROTOCOL_UNSPECIFIED serves a "not set" default value when - # a FileProtocol is a separate field in a message. - FILE_PROTOCOL_UNSPECIFIED = 0 - - # NFS 3.0. - NFS_V3 = 1 - - # NFS 4.1. - NFS_V4_1 = 2 - end - end - - # CreateInstanceRequest creates an instance. - # @!attribute [rw] parent - # @return [::String] - # Required. The instance's project and location, in the format - # `projects/{project_id}/locations/{location}`. In Filestore, - # locations map to Google Cloud zones, for example **us-west1-b**. - # @!attribute [rw] instance_id - # @return [::String] - # Required. The name of the instance to create. - # The name must be unique for the specified project and location. - # @!attribute [rw] instance - # @return [::Google::Cloud::Filestore::V1::Instance] - # Required. An {::Google::Cloud::Filestore::V1::Instance instance resource} - class CreateInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GetInstanceRequest gets the state of an instance. - # @!attribute [rw] name - # @return [::String] - # Required. The instance resource name, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}`. - class GetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # UpdateInstanceRequest updates the settings of an instance. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Mask of fields to update. At least one path must be supplied in this - # field. The elements of the repeated paths field may only include these - # fields: - # - # * "description" - # * "file_shares" - # * "labels" - # * "performance_config" - # * "deletion_protection_enabled" - # * "deletion_protection_reason" - # @!attribute [rw] instance - # @return [::Google::Cloud::Filestore::V1::Instance] - # Only fields specified in update_mask are updated. - class UpdateInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RestoreInstanceRequest restores an existing instance's file share from a - # backup. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the instance, in the format - # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`. - # @!attribute [rw] file_share - # @return [::String] - # Required. Name of the file share in the Filestore instance that the backup - # is being restored to. - # @!attribute [rw] source_backup - # @return [::String] - # The resource name of the backup, in the format - # `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - class RestoreInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RevertInstanceRequest reverts the given instance's file share to the - # specified snapshot. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the instance, in the format - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - # @!attribute [rw] target_snapshot_id - # @return [::String] - # Required. The snapshot resource ID, in the format 'my-snapshot', where the - # specified ID is the \\{snapshot_id} of the fully qualified name like - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}` - class RevertInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteInstanceRequest deletes an instance. - # @!attribute [rw] name - # @return [::String] - # Required. The instance resource name, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}` - # @!attribute [rw] force - # @return [::Boolean] - # If set to true, all snapshots of the instance will also be deleted. - # (Otherwise, the request will only work if the instance has no snapshots.) - class DeleteInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListInstancesRequest lists instances. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve instance - # information, in the format `projects/{project_id}/locations/{location}`. In - # Cloud Filestore, locations map to Google Cloud zones, for example - # **us-west1-b**. To retrieve instance information for all locations, use "-" - # for the - # `{location}` value. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value to use if there are additional - # results to retrieve for this list request. - # @!attribute [rw] order_by - # @return [::String] - # Sort results. Supported values are "name", "name desc" or "" (unsorted). - # @!attribute [rw] filter - # @return [::String] - # List filter. - class ListInstancesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListInstancesResponse is the result of ListInstancesRequest. - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::Filestore::V1::Instance>] - # A list of instances in the project for the specified location. - # - # If the `{location}` value in the request is "-", the response contains a - # list of instances from all locations. If any location is unreachable, the - # response will only return instances in reachable locations and the - # "unreachable" field will be populated with a list of unreachable locations. - # @!attribute [rw] next_page_token - # @return [::String] - # The token you can use to retrieve the next page of results. Not returned - # if there are no more results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Locations that could not be reached. - class ListInstancesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Filestore snapshot. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the snapshot, in the format - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}/snapshots/{snapshot_id}`. - # @!attribute [rw] description - # @return [::String] - # A description of the snapshot with 2048 characters or less. - # Requests with longer descriptions will be rejected. - # @!attribute [r] state - # @return [::Google::Cloud::Filestore::V1::Snapshot::State] - # Output only. The snapshot state. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the snapshot was created. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Resource labels to represent user provided metadata. - # @!attribute [r] filesystem_used_bytes - # @return [::Integer] - # Output only. The amount of bytes needed to allocate a full copy of the - # snapshot content - # @!attribute [rw] tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Input only. Immutable. Tag key-value pairs bound to this - # resource. Each key must be a namespaced name and each value a short name. - # Example: - # "123456789012/environment" : "production", - # "123456789013/costCenter" : "marketing" - # See the documentation for more information: - # - Namespaced name: - # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key - # - Short name: - # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value - class Snapshot - 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 TagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The snapshot state. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # Snapshot is being created. - CREATING = 1 - - # Snapshot is available for use. - READY = 2 - - # Snapshot is being deleted. - DELETING = 3 - end - end - - # CreateSnapshotRequest creates a snapshot. - # @!attribute [rw] parent - # @return [::String] - # Required. The Filestore Instance to create the snapshots of, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}` - # @!attribute [rw] snapshot_id - # @return [::String] - # Required. The ID to use for the snapshot. - # The ID must be unique within the specified instance. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - # @!attribute [rw] snapshot - # @return [::Google::Cloud::Filestore::V1::Snapshot] - # Required. A snapshot resource. - class CreateSnapshotRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GetSnapshotRequest gets the state of a snapshot. - # @!attribute [rw] name - # @return [::String] - # Required. The snapshot resource name, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` - class GetSnapshotRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteSnapshotRequest deletes a snapshot. - # @!attribute [rw] name - # @return [::String] - # Required. The snapshot resource name, in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}/snapshots/{snapshot_id}` - class DeleteSnapshotRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # UpdateSnapshotRequest updates description and/or labels for a snapshot. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. - # @!attribute [rw] snapshot - # @return [::Google::Cloud::Filestore::V1::Snapshot] - # Required. A snapshot resource. - class UpdateSnapshotRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListSnapshotsRequest lists snapshots. - # @!attribute [rw] parent - # @return [::String] - # Required. The instance for which to retrieve snapshot information, - # in the format - # `projects/{project_id}/locations/{location}/instances/{instance_id}`. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value to use if there are additional - # results to retrieve for this list request. - # @!attribute [rw] order_by - # @return [::String] - # Sort results. Supported values are "name", "name desc" or "" (unsorted). - # @!attribute [rw] filter - # @return [::String] - # List filter. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If true, allow partial responses for multi-regional Aggregated - # List requests. - class ListSnapshotsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListSnapshotsResponse is the result of ListSnapshotsRequest. - # @!attribute [rw] snapshots - # @return [::Array<::Google::Cloud::Filestore::V1::Snapshot>] - # A list of snapshots in the project for the specified instance. - # @!attribute [rw] next_page_token - # @return [::String] - # The token you can use to retrieve the next page of results. Not returned - # if there are no more results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Locations that could not be reached. - class ListSnapshotsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A Filestore backup. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the backup, in the format - # `projects/{project_number}/locations/{location_id}/backups/{backup_id}`. - # @!attribute [rw] description - # @return [::String] - # A description of the backup with 2048 characters or less. - # Requests with longer descriptions will be rejected. - # @!attribute [r] state - # @return [::Google::Cloud::Filestore::V1::Backup::State] - # Output only. The backup state. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the backup was created. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Resource labels to represent user provided metadata. - # @!attribute [r] capacity_gb - # @return [::Integer] - # Output only. Capacity of the source file share when the backup was created. - # @!attribute [r] storage_bytes - # @return [::Integer] - # Output only. The size of the storage used by the backup. As backups share - # storage, this number is expected to change with backup creation/deletion. - # @!attribute [rw] source_instance - # @return [::String] - # The resource name of the source Filestore instance, in the format - # `projects/{project_number}/locations/{location_id}/instances/{instance_id}`, - # used to create this backup. - # @!attribute [rw] source_file_share - # @return [::String] - # Name of the file share in the source Filestore instance that the - # backup is created from. - # @!attribute [r] source_instance_tier - # @return [::Google::Cloud::Filestore::V1::Instance::Tier] - # Output only. The service tier of the source Filestore instance that this - # backup is created from. - # @!attribute [r] download_bytes - # @return [::Integer] - # Output only. Amount of bytes that will be downloaded if the backup is - # restored. This may be different than storage bytes, since sequential - # backups of the same disk will share storage. - # @!attribute [r] satisfies_pzs - # @return [::Google::Protobuf::BoolValue] - # Output only. Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [rw] kms_key - # @return [::String] - # Immutable. KMS key name used for data encryption. - # @!attribute [rw] tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Input only. Immutable. Tag key-value pairs bound to this - # resource. Each key must be a namespaced name and each value a short name. - # Example: - # "123456789012/environment" : "production", - # "123456789013/costCenter" : "marketing" - # See the documentation for more information: - # - Namespaced name: - # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_key - # - Short name: - # https://cloud.google.com/resource-manager/docs/tags/tags-creating-and-managing#retrieving_tag_value - # @!attribute [r] file_system_protocol - # @return [::Google::Cloud::Filestore::V1::Instance::FileProtocol] - # Output only. The file system protocol of the source Filestore instance that - # this backup is created from. - class Backup - 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 TagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The backup state. - module State - # State not set. - STATE_UNSPECIFIED = 0 - - # Backup is being created. - CREATING = 1 - - # Backup has been taken and the operation is being finalized. At this - # point, changes to the file share will not be reflected in the backup. - FINALIZING = 2 - - # Backup is available for use. - READY = 3 - - # Backup is being deleted. - DELETING = 4 - - # Backup is not valid and cannot be used for creating new instances or - # restoring existing instances. - INVALID = 5 - end - end - - # CreateBackupRequest creates a backup. - # @!attribute [rw] parent - # @return [::String] - # Required. The backup's project and location, in the format - # `projects/{project_number}/locations/{location}`. In Filestore, - # backup locations map to Google Cloud regions, for example **us-west1**. - # @!attribute [rw] backup - # @return [::Google::Cloud::Filestore::V1::Backup] - # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource} - # @!attribute [rw] backup_id - # @return [::String] - # Required. The ID to use for the backup. - # The ID must be unique within the specified project and location. - # - # This value must start with a lowercase letter followed by up to 62 - # lowercase letters, numbers, or hyphens, and cannot end with a hyphen. - # Values that do not match this pattern will trigger an INVALID_ARGUMENT - # error. - class CreateBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # DeleteBackupRequest deletes a backup. - # @!attribute [rw] name - # @return [::String] - # Required. The backup resource name, in the format - # `projects/{project_number}/locations/{location}/backups/{backup_id}` - class DeleteBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # UpdateBackupRequest updates description and/or labels for a backup. - # @!attribute [rw] backup - # @return [::Google::Cloud::Filestore::V1::Backup] - # Required. A {::Google::Cloud::Filestore::V1::Backup backup resource} - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. Mask of fields to update. At least one path must be supplied in - # this field. - class UpdateBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # PromoteReplicaRequest promotes a Filestore standby instance (replica). - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the instance, in the format - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - # @!attribute [rw] peer_instance - # @return [::String] - # Optional. The resource name of the peer instance to promote, in the format - # `projects/{project_id}/locations/{location_id}/instances/{instance_id}`. - # The peer instance is required if the operation is called on an active - # instance. - class PromoteReplicaRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # GetBackupRequest gets the state of a backup. - # @!attribute [rw] name - # @return [::String] - # Required. The backup resource name, in the format - # `projects/{project_number}/locations/{location}/backups/{backup_id}`. - class GetBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListBackupsRequest lists backups. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location for which to retrieve backup - # information, in the format - # `projects/{project_number}/locations/{location}`. In Filestore, backup - # locations map to Google Cloud regions, for example **us-west1**. To - # retrieve backup information for all locations, use "-" for the - # `{location}` value. - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of items to return. - # @!attribute [rw] page_token - # @return [::String] - # The next_page_token value to use if there are additional - # results to retrieve for this list request. - # @!attribute [rw] order_by - # @return [::String] - # Sort results. Supported values are "name", "name desc" or "" (unsorted). - # @!attribute [rw] filter - # @return [::String] - # List filter. - class ListBackupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # ListBackupsResponse is the result of ListBackupsRequest. - # @!attribute [rw] backups - # @return [::Array<::Google::Cloud::Filestore::V1::Backup>] - # A list of backups in the project for the specified location. - # - # If the `{location}` value in the request is "-", the response contains a - # list of backups from all locations. If any location is unreachable, the - # response will only return backups in reachable locations and the - # "unreachable" field will be populated with a list of unreachable - # locations. - # @!attribute [rw] next_page_token - # @return [::String] - # The token you can use to retrieve the next page of results. Not returned - # if there are no more results in the list. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Locations that could not be reached. - class ListBackupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 1b485b0c3456..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,121 +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 - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-filestore-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-filestore-v1/snippets/Gemfile deleted file mode 100644 index 61ffa1bbd3f9..000000000000 --- a/owl-bot-staging/google-cloud-filestore-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-filestore-v1", path: "../" -else - gem "google-cloud-filestore-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-filestore-v1/snippets/cloud_filestore_manager/create_backup.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_backup.rb deleted file mode 100644 index 7aacd3a36e8c..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_backup.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 file_v1_generated_CloudFilestoreManager_CreateBackup_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the create_backup call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_backup. -# -def create_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::CreateBackupRequest.new - - # Call the create_backup method. - result = client.create_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 file_v1_generated_CloudFilestoreManager_CreateBackup_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_instance.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_instance.rb deleted file mode 100644 index 83121c6eb4da..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_instance.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 file_v1_generated_CloudFilestoreManager_CreateInstance_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the create_instance call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_instance. -# -def create_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::CreateInstanceRequest.new - - # Call the create_instance method. - result = client.create_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 file_v1_generated_CloudFilestoreManager_CreateInstance_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_snapshot.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_snapshot.rb deleted file mode 100644 index 88dbda268ef0..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/create_snapshot.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 file_v1_generated_CloudFilestoreManager_CreateSnapshot_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the create_snapshot call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_snapshot. -# -def create_snapshot - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::CreateSnapshotRequest.new - - # Call the create_snapshot method. - result = client.create_snapshot request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 file_v1_generated_CloudFilestoreManager_CreateSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_backup.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_backup.rb deleted file mode 100644 index e4a4ef1bef31..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_backup.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 file_v1_generated_CloudFilestoreManager_DeleteBackup_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the delete_backup call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_backup. -# -def delete_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::DeleteBackupRequest.new - - # Call the delete_backup method. - result = client.delete_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 file_v1_generated_CloudFilestoreManager_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_instance.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_instance.rb deleted file mode 100644 index f27bf08a7815..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_instance.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 file_v1_generated_CloudFilestoreManager_DeleteInstance_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the delete_instance call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_instance. -# -def delete_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::DeleteInstanceRequest.new - - # Call the delete_instance method. - result = client.delete_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 file_v1_generated_CloudFilestoreManager_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_snapshot.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_snapshot.rb deleted file mode 100644 index b2e23a15be9d..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/delete_snapshot.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 file_v1_generated_CloudFilestoreManager_DeleteSnapshot_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the delete_snapshot call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_snapshot. -# -def delete_snapshot - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::DeleteSnapshotRequest.new - - # Call the delete_snapshot method. - result = client.delete_snapshot request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 file_v1_generated_CloudFilestoreManager_DeleteSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_backup.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_backup.rb deleted file mode 100644 index d78c757f6458..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_backup.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 file_v1_generated_CloudFilestoreManager_GetBackup_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the get_backup call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_backup. -# -def get_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::GetBackupRequest.new - - # Call the get_backup method. - result = client.get_backup request - - # The returned object is of type Google::Cloud::Filestore::V1::Backup. - p result -end -# [END file_v1_generated_CloudFilestoreManager_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_instance.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_instance.rb deleted file mode 100644 index b61508279746..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_instance.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 file_v1_generated_CloudFilestoreManager_GetInstance_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the get_instance call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_instance. -# -def get_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::GetInstanceRequest.new - - # Call the get_instance method. - result = client.get_instance request - - # The returned object is of type Google::Cloud::Filestore::V1::Instance. - p result -end -# [END file_v1_generated_CloudFilestoreManager_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_snapshot.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_snapshot.rb deleted file mode 100644 index b6083bb99115..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/get_snapshot.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 file_v1_generated_CloudFilestoreManager_GetSnapshot_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the get_snapshot call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_snapshot. -# -def get_snapshot - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::GetSnapshotRequest.new - - # Call the get_snapshot method. - result = client.get_snapshot request - - # The returned object is of type Google::Cloud::Filestore::V1::Snapshot. - p result -end -# [END file_v1_generated_CloudFilestoreManager_GetSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_backups.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_backups.rb deleted file mode 100644 index 9ab3985122b7..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_backups.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 file_v1_generated_CloudFilestoreManager_ListBackups_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the list_backups call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_backups. -# -def list_backups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::ListBackupsRequest.new - - # Call the list_backups method. - result = client.list_backups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Filestore::V1::Backup. - p item - end -end -# [END file_v1_generated_CloudFilestoreManager_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_instances.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_instances.rb deleted file mode 100644 index 785486e4f16a..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_instances.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 file_v1_generated_CloudFilestoreManager_ListInstances_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the list_instances call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_instances. -# -def list_instances - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::ListInstancesRequest.new - - # Call the list_instances method. - result = client.list_instances request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Filestore::V1::Instance. - p item - end -end -# [END file_v1_generated_CloudFilestoreManager_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_snapshots.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_snapshots.rb deleted file mode 100644 index f333a737f939..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/list_snapshots.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 file_v1_generated_CloudFilestoreManager_ListSnapshots_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the list_snapshots call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_snapshots. -# -def list_snapshots - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::ListSnapshotsRequest.new - - # Call the list_snapshots method. - result = client.list_snapshots request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Filestore::V1::Snapshot. - p item - end -end -# [END file_v1_generated_CloudFilestoreManager_ListSnapshots_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/promote_replica.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/promote_replica.rb deleted file mode 100644 index 958f1542d557..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/promote_replica.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 file_v1_generated_CloudFilestoreManager_PromoteReplica_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the promote_replica call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#promote_replica. -# -def promote_replica - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::PromoteReplicaRequest.new - - # Call the promote_replica method. - result = client.promote_replica request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 file_v1_generated_CloudFilestoreManager_PromoteReplica_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/restore_instance.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/restore_instance.rb deleted file mode 100644 index a814126831f6..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/restore_instance.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 file_v1_generated_CloudFilestoreManager_RestoreInstance_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the restore_instance call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#restore_instance. -# -def restore_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::RestoreInstanceRequest.new - - # Call the restore_instance method. - result = client.restore_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 file_v1_generated_CloudFilestoreManager_RestoreInstance_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/revert_instance.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/revert_instance.rb deleted file mode 100644 index 65a32a9705ab..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/revert_instance.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 file_v1_generated_CloudFilestoreManager_RevertInstance_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the revert_instance call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#revert_instance. -# -def revert_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::RevertInstanceRequest.new - - # Call the revert_instance method. - result = client.revert_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 file_v1_generated_CloudFilestoreManager_RevertInstance_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_backup.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_backup.rb deleted file mode 100644 index ec463df2cee6..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_backup.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 file_v1_generated_CloudFilestoreManager_UpdateBackup_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the update_backup call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_backup. -# -def update_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::UpdateBackupRequest.new - - # Call the update_backup method. - result = client.update_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 file_v1_generated_CloudFilestoreManager_UpdateBackup_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_instance.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_instance.rb deleted file mode 100644 index ba6523f90897..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_instance.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 file_v1_generated_CloudFilestoreManager_UpdateInstance_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the update_instance call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_instance. -# -def update_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::UpdateInstanceRequest.new - - # Call the update_instance method. - result = client.update_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 file_v1_generated_CloudFilestoreManager_UpdateInstance_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_snapshot.rb b/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_snapshot.rb deleted file mode 100644 index 9308e78837af..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/cloud_filestore_manager/update_snapshot.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 file_v1_generated_CloudFilestoreManager_UpdateSnapshot_sync] -require "google/cloud/filestore/v1" - -## -# Snippet for the update_snapshot call in the CloudFilestoreManager service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_snapshot. -# -def update_snapshot - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new - - # Call the update_snapshot method. - result = client.update_snapshot request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 file_v1_generated_CloudFilestoreManager_UpdateSnapshot_sync] diff --git a/owl-bot-staging/google-cloud-filestore-v1/snippets/snippet_metadata_google.cloud.filestore.v1.json b/owl-bot-staging/google-cloud-filestore-v1/snippets/snippet_metadata_google.cloud.filestore.v1.json deleted file mode 100644 index bf273bf9552b..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/snippets/snippet_metadata_google.cloud.filestore.v1.json +++ /dev/null @@ -1,735 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-filestore-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.filestore.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "file_v1_generated_CloudFilestoreManager_ListInstances_sync", - "title": "Snippet for the list_instances call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_instances.", - "file": "cloud_filestore_manager/list_instances.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_instances", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_instances", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::ListInstancesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Filestore::V1::ListInstancesResponse", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "ListInstances", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.ListInstances", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_GetInstance_sync", - "title": "Snippet for the get_instance call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_instance.", - "file": "cloud_filestore_manager/get_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::GetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Filestore::V1::Instance", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "GetInstance", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.GetInstance", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_CreateInstance_sync", - "title": "Snippet for the create_instance call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_instance.", - "file": "cloud_filestore_manager/create_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_instance", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::CreateInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "CreateInstance", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.CreateInstance", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_UpdateInstance_sync", - "title": "Snippet for the update_instance call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_instance.", - "file": "cloud_filestore_manager/update_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_instance", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::UpdateInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "UpdateInstance", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.UpdateInstance", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_RestoreInstance_sync", - "title": "Snippet for the restore_instance call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#restore_instance.", - "file": "cloud_filestore_manager/restore_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "restore_instance", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#restore_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::RestoreInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "RestoreInstance", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.RestoreInstance", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_RevertInstance_sync", - "title": "Snippet for the revert_instance call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#revert_instance.", - "file": "cloud_filestore_manager/revert_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "revert_instance", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#revert_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::RevertInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "RevertInstance", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.RevertInstance", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_DeleteInstance_sync", - "title": "Snippet for the delete_instance call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_instance.", - "file": "cloud_filestore_manager/delete_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_instance", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::DeleteInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "DeleteInstance", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.DeleteInstance", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_ListSnapshots_sync", - "title": "Snippet for the list_snapshots call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_snapshots.", - "file": "cloud_filestore_manager/list_snapshots.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_snapshots", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_snapshots", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::ListSnapshotsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Filestore::V1::ListSnapshotsResponse", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "ListSnapshots", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.ListSnapshots", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_GetSnapshot_sync", - "title": "Snippet for the get_snapshot call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_snapshot.", - "file": "cloud_filestore_manager/get_snapshot.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_snapshot", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_snapshot", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::GetSnapshotRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Filestore::V1::Snapshot", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "GetSnapshot", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.GetSnapshot", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_CreateSnapshot_sync", - "title": "Snippet for the create_snapshot call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_snapshot.", - "file": "cloud_filestore_manager/create_snapshot.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_snapshot", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_snapshot", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::CreateSnapshotRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "CreateSnapshot", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.CreateSnapshot", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_DeleteSnapshot_sync", - "title": "Snippet for the delete_snapshot call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_snapshot.", - "file": "cloud_filestore_manager/delete_snapshot.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_snapshot", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_snapshot", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::DeleteSnapshotRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "DeleteSnapshot", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.DeleteSnapshot", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_UpdateSnapshot_sync", - "title": "Snippet for the update_snapshot call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_snapshot.", - "file": "cloud_filestore_manager/update_snapshot.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_snapshot", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_snapshot", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::UpdateSnapshotRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "UpdateSnapshot", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.UpdateSnapshot", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_ListBackups_sync", - "title": "Snippet for the list_backups call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_backups.", - "file": "cloud_filestore_manager/list_backups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backups", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#list_backups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::ListBackupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Filestore::V1::ListBackupsResponse", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "ListBackups", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.ListBackups", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_GetBackup_sync", - "title": "Snippet for the get_backup call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_backup.", - "file": "cloud_filestore_manager/get_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#get_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::GetBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Filestore::V1::Backup", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "GetBackup", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.GetBackup", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_CreateBackup_sync", - "title": "Snippet for the create_backup call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_backup.", - "file": "cloud_filestore_manager/create_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#create_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::CreateBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "CreateBackup", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.CreateBackup", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_DeleteBackup_sync", - "title": "Snippet for the delete_backup call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_backup.", - "file": "cloud_filestore_manager/delete_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#delete_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::DeleteBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "DeleteBackup", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.DeleteBackup", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_UpdateBackup_sync", - "title": "Snippet for the update_backup call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_backup.", - "file": "cloud_filestore_manager/update_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#update_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::UpdateBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "UpdateBackup", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.UpdateBackup", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "file_v1_generated_CloudFilestoreManager_PromoteReplica_sync", - "title": "Snippet for the promote_replica call in the CloudFilestoreManager service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#promote_replica.", - "file": "cloud_filestore_manager/promote_replica.rb", - "language": "RUBY", - "client_method": { - "short_name": "promote_replica", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client#promote_replica", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Filestore::V1::PromoteReplicaRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFilestoreManager::Client", - "full_name": "::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client" - }, - "method": { - "short_name": "PromoteReplica", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager.PromoteReplica", - "service": { - "short_name": "CloudFilestoreManager", - "full_name": "google.cloud.filestore.v1.CloudFilestoreManager" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_operations_test.rb b/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_operations_test.rb deleted file mode 100644 index b889ba28a9a8..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_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/filestore/v1/cloud_filestore_service_pb" -require "google/cloud/filestore/v1/cloud_filestore_service_services_pb" -require "google/cloud/filestore/v1/cloud_filestore_manager" - -class ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_paths_test.rb b/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_paths_test.rb deleted file mode 100644 index a5c47fd514a8..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_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/filestore/v1/cloud_filestore_manager" - -class ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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_backup_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_path project: "value0", location: "value1", backup: "value2" - assert_equal "projects/value0/locations/value1/backups/value2", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/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::Filestore::V1::CloudFilestoreManager::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_snapshot_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.snapshot_path project: "value0", location: "value1", instance: "value2", snapshot: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/snapshots/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_rest_test.rb b/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_rest_test.rb deleted file mode 100644 index 6cdd95e52a97..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_rest_test.rb +++ /dev/null @@ -1,1098 +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/filestore/v1/cloud_filestore_service_pb" -require "google/cloud/filestore/v1/cloud_filestore_manager/rest" - - -class ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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_list_instances - # Create test objects. - client_result = ::Google::Cloud::Filestore::V1::ListInstancesResponse.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" - order_by = "hello world" - filter = "hello world" - - list_instances_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_instances parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_instances ::Google::Cloud::Filestore::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_instances(::Google::Cloud::Filestore::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_instances_client_stub.call_count - end - end - end - - def test_get_instance - # Create test objects. - client_result = ::Google::Cloud::Filestore::V1::Instance.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_instance ::Google::Cloud::Filestore::V1::GetInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::Filestore::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_count - end - end - end - - def test_create_instance - # 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" - instance_id = "hello world" - instance = {} - - create_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_create_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_instance_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_instance parent: parent, instance_id: instance_id, instance: instance do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_instance ::Google::Cloud::Filestore::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_instance(::Google::Cloud::Filestore::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_instance_client_stub.call_count - end - end - end - - def test_update_instance - # 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 = {} - instance = {} - - update_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_update_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_instance_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_instance({ update_mask: update_mask, instance: instance }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_instance update_mask: update_mask, instance: instance do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_instance ::Google::Cloud::Filestore::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_instance({ update_mask: update_mask, instance: instance }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_instance(::Google::Cloud::Filestore::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_instance_client_stub.call_count - end - end - end - - def test_restore_instance - # 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" - file_share = "hello world" - source_backup = "hello world" - - restore_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_restore_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restore_instance_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.restore_instance({ name: name, file_share: file_share, source_backup: source_backup }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.restore_instance name: name, file_share: file_share, source_backup: source_backup do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.restore_instance ::Google::Cloud::Filestore::V1::RestoreInstanceRequest.new(name: name, file_share: file_share, source_backup: source_backup) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.restore_instance({ name: name, file_share: file_share, source_backup: source_backup }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.restore_instance(::Google::Cloud::Filestore::V1::RestoreInstanceRequest.new(name: name, file_share: file_share, source_backup: source_backup), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restore_instance_client_stub.call_count - end - end - end - - def test_revert_instance - # 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" - target_snapshot_id = "hello world" - - revert_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_revert_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, revert_instance_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.revert_instance({ name: name, target_snapshot_id: target_snapshot_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.revert_instance name: name, target_snapshot_id: target_snapshot_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.revert_instance ::Google::Cloud::Filestore::V1::RevertInstanceRequest.new(name: name, target_snapshot_id: target_snapshot_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.revert_instance({ name: name, target_snapshot_id: target_snapshot_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.revert_instance(::Google::Cloud::Filestore::V1::RevertInstanceRequest.new(name: name, target_snapshot_id: target_snapshot_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, revert_instance_client_stub.call_count - end - end - end - - def test_delete_instance - # 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_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_instance({ name: name, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_instance name: name, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_instance ::Google::Cloud::Filestore::V1::DeleteInstanceRequest.new(name: name, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_instance({ name: name, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_instance(::Google::Cloud::Filestore::V1::DeleteInstanceRequest.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_instance_client_stub.call_count - end - end - end - - def test_list_snapshots - # Create test objects. - client_result = ::Google::Cloud::Filestore::V1::ListSnapshotsResponse.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" - order_by = "hello world" - filter = "hello world" - return_partial_success = true - - list_snapshots_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_list_snapshots_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_snapshots_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_snapshots({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_snapshots parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_snapshots ::Google::Cloud::Filestore::V1::ListSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_snapshots({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_snapshots(::Google::Cloud::Filestore::V1::ListSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_snapshots_client_stub.call_count - end - end - end - - def test_get_snapshot - # Create test objects. - client_result = ::Google::Cloud::Filestore::V1::Snapshot.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_get_snapshot_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_snapshot_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_snapshot({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_snapshot name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_snapshot ::Google::Cloud::Filestore::V1::GetSnapshotRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_snapshot({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_snapshot(::Google::Cloud::Filestore::V1::GetSnapshotRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_snapshot_client_stub.call_count - end - end - end - - def test_create_snapshot - # 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" - snapshot_id = "hello world" - snapshot = {} - - create_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_create_snapshot_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_snapshot_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_snapshot({ parent: parent, snapshot_id: snapshot_id, snapshot: snapshot }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_snapshot parent: parent, snapshot_id: snapshot_id, snapshot: snapshot do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_snapshot ::Google::Cloud::Filestore::V1::CreateSnapshotRequest.new(parent: parent, snapshot_id: snapshot_id, snapshot: snapshot) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_snapshot({ parent: parent, snapshot_id: snapshot_id, snapshot: snapshot }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_snapshot(::Google::Cloud::Filestore::V1::CreateSnapshotRequest.new(parent: parent, snapshot_id: snapshot_id, snapshot: snapshot), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_snapshot_client_stub.call_count - end - end - end - - def test_delete_snapshot - # 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_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_delete_snapshot_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_snapshot_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_snapshot({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_snapshot name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_snapshot ::Google::Cloud::Filestore::V1::DeleteSnapshotRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_snapshot({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_snapshot(::Google::Cloud::Filestore::V1::DeleteSnapshotRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_snapshot_client_stub.call_count - end - end - end - - def test_update_snapshot - # 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 = {} - snapshot = {} - - update_snapshot_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_update_snapshot_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_snapshot_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_snapshot({ update_mask: update_mask, snapshot: snapshot }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_snapshot update_mask: update_mask, snapshot: snapshot do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_snapshot ::Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new(update_mask: update_mask, snapshot: snapshot) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_snapshot({ update_mask: update_mask, snapshot: snapshot }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_snapshot(::Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new(update_mask: update_mask, snapshot: snapshot), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_snapshot_client_stub.call_count - end - end - end - - def test_list_backups - # Create test objects. - client_result = ::Google::Cloud::Filestore::V1::ListBackupsResponse.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" - order_by = "hello world" - filter = "hello world" - - list_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backups parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backups ::Google::Cloud::Filestore::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backups(::Google::Cloud::Filestore::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backups_client_stub.call_count - end - end - end - - def test_get_backup - # Create test objects. - client_result = ::Google::Cloud::Filestore::V1::Backup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup ::Google::Cloud::Filestore::V1::GetBackupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup(::Google::Cloud::Filestore::V1::GetBackupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_client_stub.call_count - end - end - end - - def test_create_backup - # 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" - backup = {} - backup_id = "hello world" - - create_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_create_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_backup({ parent: parent, backup: backup, backup_id: backup_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_backup parent: parent, backup: backup, backup_id: backup_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_backup ::Google::Cloud::Filestore::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_backup({ parent: parent, backup: backup, backup_id: backup_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_backup(::Google::Cloud::Filestore::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_client_stub.call_count - end - end - end - - def test_delete_backup - # 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_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup ::Google::Cloud::Filestore::V1::DeleteBackupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup(::Google::Cloud::Filestore::V1::DeleteBackupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_client_stub.call_count - end - end - end - - def test_update_backup - # 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. - backup = {} - update_mask = {} - - update_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_update_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backup({ backup: backup, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backup backup: backup, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backup ::Google::Cloud::Filestore::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backup({ backup: backup, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backup(::Google::Cloud::Filestore::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_client_stub.call_count - end - end - end - - def test_promote_replica - # 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" - peer_instance = "hello world" - - promote_replica_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::ServiceStub.stub :transcode_promote_replica_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, promote_replica_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.promote_replica({ name: name, peer_instance: peer_instance }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.promote_replica name: name, peer_instance: peer_instance do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.promote_replica ::Google::Cloud::Filestore::V1::PromoteReplicaRequest.new(name: name, peer_instance: peer_instance) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.promote_replica({ name: name, peer_instance: peer_instance }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.promote_replica(::Google::Cloud::Filestore::V1::PromoteReplicaRequest.new(name: name, peer_instance: peer_instance), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, promote_replica_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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_test.rb b/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_test.rb deleted file mode 100644 index 7accada76fb9..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/test/google/cloud/filestore/v1/cloud_filestore_manager_test.rb +++ /dev/null @@ -1,1292 +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/filestore/v1/cloud_filestore_service_pb" -require "google/cloud/filestore/v1/cloud_filestore_manager" - -class ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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_list_instances - # Create GRPC objects. - grpc_response = ::Google::Cloud::Filestore::V1::ListInstancesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - order_by = "hello world" - filter = "hello world" - - list_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_instances, name - assert_kind_of ::Google::Cloud::Filestore::V1::ListInstancesRequest, 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["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_instances_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_instances parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_instances ::Google::Cloud::Filestore::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_instances({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_instances(::Google::Cloud::Filestore::V1::ListInstancesRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_instances_client_stub.call_rpc_count - end - end - - def test_get_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::Filestore::V1::Instance.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_instance, name - assert_kind_of ::Google::Cloud::Filestore::V1::GetInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_instance({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_instance name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_instance ::Google::Cloud::Filestore::V1::GetInstanceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_instance({ 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_instance(::Google::Cloud::Filestore::V1::GetInstanceRequest.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_instance_client_stub.call_rpc_count - end - end - - def test_create_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_id = "hello world" - instance = {} - - create_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_instance, name - assert_kind_of ::Google::Cloud::Filestore::V1::CreateInstanceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["instance_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Filestore::V1::Instance), request["instance"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_instance_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_instance({ parent: parent, instance_id: instance_id, instance: instance }) do |response, 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_instance parent: parent, instance_id: instance_id, instance: instance do |response, 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_instance ::Google::Cloud::Filestore::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance) do |response, operation| - assert_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_instance({ parent: parent, instance_id: instance_id, instance: instance }, grpc_options) do |response, operation| - assert_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_instance(::Google::Cloud::Filestore::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance), grpc_options) do |response, operation| - assert_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_instance_client_stub.call_rpc_count - end - end - - def test_update_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - instance = {} - - update_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_instance, name - assert_kind_of ::Google::Cloud::Filestore::V1::UpdateInstanceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Filestore::V1::Instance), request["instance"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_instance_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_instance({ update_mask: update_mask, instance: instance }) do |response, 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_instance update_mask: update_mask, instance: instance do |response, 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_instance ::Google::Cloud::Filestore::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance) do |response, operation| - assert_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_instance({ update_mask: update_mask, instance: instance }, grpc_options) do |response, operation| - assert_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_instance(::Google::Cloud::Filestore::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance), grpc_options) do |response, operation| - assert_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_instance_client_stub.call_rpc_count - end - end - - def test_restore_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - file_share = "hello world" - source_backup = "hello world" - - restore_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restore_instance, name - assert_kind_of ::Google::Cloud::Filestore::V1::RestoreInstanceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["file_share"] - assert_equal "hello world", request["source_backup"] - assert_equal :source_backup, request.source - refute_nil options - end - - Gapic::ServiceStub.stub :new, restore_instance_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.restore_instance({ name: name, file_share: file_share, source_backup: source_backup }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.restore_instance name: name, file_share: file_share, source_backup: source_backup do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.restore_instance ::Google::Cloud::Filestore::V1::RestoreInstanceRequest.new(name: name, file_share: file_share, source_backup: source_backup) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.restore_instance({ name: name, file_share: file_share, source_backup: source_backup }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.restore_instance(::Google::Cloud::Filestore::V1::RestoreInstanceRequest.new(name: name, file_share: file_share, source_backup: source_backup), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, restore_instance_client_stub.call_rpc_count - end - end - - def test_revert_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - target_snapshot_id = "hello world" - - revert_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :revert_instance, name - assert_kind_of ::Google::Cloud::Filestore::V1::RevertInstanceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["target_snapshot_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, revert_instance_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.revert_instance({ name: name, target_snapshot_id: target_snapshot_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.revert_instance name: name, target_snapshot_id: target_snapshot_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.revert_instance ::Google::Cloud::Filestore::V1::RevertInstanceRequest.new(name: name, target_snapshot_id: target_snapshot_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.revert_instance({ name: name, target_snapshot_id: target_snapshot_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.revert_instance(::Google::Cloud::Filestore::V1::RevertInstanceRequest.new(name: name, target_snapshot_id: target_snapshot_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, revert_instance_client_stub.call_rpc_count - end - end - - def test_delete_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_instance, name - assert_kind_of ::Google::Cloud::Filestore::V1::DeleteInstanceRequest, request - assert_equal "hello world", request["name"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_instance_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_instance({ 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_instance 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_instance ::Google::Cloud::Filestore::V1::DeleteInstanceRequest.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_instance({ 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_instance(::Google::Cloud::Filestore::V1::DeleteInstanceRequest.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_instance_client_stub.call_rpc_count - end - end - - def test_list_snapshots - # Create GRPC objects. - grpc_response = ::Google::Cloud::Filestore::V1::ListSnapshotsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - order_by = "hello world" - filter = "hello world" - return_partial_success = true - - list_snapshots_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_snapshots, name - assert_kind_of ::Google::Cloud::Filestore::V1::ListSnapshotsRequest, 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["order_by"] - assert_equal "hello world", request["filter"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_snapshots_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_snapshots({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, 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_snapshots parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, 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_snapshots ::Google::Cloud::Filestore::V1::ListSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, 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_snapshots({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, 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_snapshots(::Google::Cloud::Filestore::V1::ListSnapshotsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, filter: filter, 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_snapshots_client_stub.call_rpc_count - end - end - - def test_get_snapshot - # Create GRPC objects. - grpc_response = ::Google::Cloud::Filestore::V1::Snapshot.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_snapshot, name - assert_kind_of ::Google::Cloud::Filestore::V1::GetSnapshotRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_snapshot_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_snapshot({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_snapshot name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_snapshot ::Google::Cloud::Filestore::V1::GetSnapshotRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_snapshot({ 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_snapshot(::Google::Cloud::Filestore::V1::GetSnapshotRequest.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_snapshot_client_stub.call_rpc_count - end - end - - def test_create_snapshot - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - snapshot_id = "hello world" - snapshot = {} - - create_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_snapshot, name - assert_kind_of ::Google::Cloud::Filestore::V1::CreateSnapshotRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["snapshot_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Filestore::V1::Snapshot), request["snapshot"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_snapshot_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_snapshot({ parent: parent, snapshot_id: snapshot_id, snapshot: snapshot }) do |response, 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_snapshot parent: parent, snapshot_id: snapshot_id, snapshot: snapshot do |response, 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_snapshot ::Google::Cloud::Filestore::V1::CreateSnapshotRequest.new(parent: parent, snapshot_id: snapshot_id, snapshot: snapshot) do |response, operation| - assert_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_snapshot({ parent: parent, snapshot_id: snapshot_id, snapshot: snapshot }, grpc_options) do |response, operation| - assert_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_snapshot(::Google::Cloud::Filestore::V1::CreateSnapshotRequest.new(parent: parent, snapshot_id: snapshot_id, snapshot: snapshot), grpc_options) do |response, operation| - assert_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_snapshot_client_stub.call_rpc_count - end - end - - def test_delete_snapshot - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_snapshot, name - assert_kind_of ::Google::Cloud::Filestore::V1::DeleteSnapshotRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_snapshot_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_snapshot({ 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_snapshot 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_snapshot ::Google::Cloud::Filestore::V1::DeleteSnapshotRequest.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_snapshot({ 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_snapshot(::Google::Cloud::Filestore::V1::DeleteSnapshotRequest.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_snapshot_client_stub.call_rpc_count - end - end - - def test_update_snapshot - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - snapshot = {} - - update_snapshot_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_snapshot, name - assert_kind_of ::Google::Cloud::Filestore::V1::UpdateSnapshotRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Filestore::V1::Snapshot), request["snapshot"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_snapshot_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_snapshot({ update_mask: update_mask, snapshot: snapshot }) do |response, 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_snapshot update_mask: update_mask, snapshot: snapshot do |response, 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_snapshot ::Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new(update_mask: update_mask, snapshot: snapshot) do |response, operation| - assert_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_snapshot({ update_mask: update_mask, snapshot: snapshot }, grpc_options) do |response, operation| - assert_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_snapshot(::Google::Cloud::Filestore::V1::UpdateSnapshotRequest.new(update_mask: update_mask, snapshot: snapshot), grpc_options) do |response, operation| - assert_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_snapshot_client_stub.call_rpc_count - end - end - - def test_list_backups - # Create GRPC objects. - grpc_response = ::Google::Cloud::Filestore::V1::ListBackupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - order_by = "hello world" - filter = "hello world" - - list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backups, name - assert_kind_of ::Google::Cloud::Filestore::V1::ListBackupsRequest, 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["order_by"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backups_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_backups parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_backups ::Google::Cloud::Filestore::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_backups({ parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_backups(::Google::Cloud::Filestore::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, order_by: order_by, 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_backups_client_stub.call_rpc_count - end - end - - def test_get_backup - # Create GRPC objects. - grpc_response = ::Google::Cloud::Filestore::V1::Backup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup, name - assert_kind_of ::Google::Cloud::Filestore::V1::GetBackupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup ::Google::Cloud::Filestore::V1::GetBackupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup({ 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_backup(::Google::Cloud::Filestore::V1::GetBackupRequest.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_backup_client_stub.call_rpc_count - end - end - - def test_create_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup = {} - backup_id = "hello world" - - create_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup, name - assert_kind_of ::Google::Cloud::Filestore::V1::CreateBackupRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Filestore::V1::Backup), request["backup"] - assert_equal "hello world", request["backup_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_backup({ parent: parent, backup: backup, backup_id: backup_id }) do |response, 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_backup parent: parent, backup: backup, backup_id: backup_id do |response, 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_backup ::Google::Cloud::Filestore::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id) do |response, operation| - assert_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_backup({ parent: parent, backup: backup, backup_id: backup_id }, grpc_options) do |response, operation| - assert_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_backup(::Google::Cloud::Filestore::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id), grpc_options) do |response, operation| - assert_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_backup_client_stub.call_rpc_count - end - end - - def test_delete_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup, name - assert_kind_of ::Google::Cloud::Filestore::V1::DeleteBackupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup({ 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_backup 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_backup ::Google::Cloud::Filestore::V1::DeleteBackupRequest.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_backup({ 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_backup(::Google::Cloud::Filestore::V1::DeleteBackupRequest.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_backup_client_stub.call_rpc_count - end - end - - def test_update_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - backup = {} - update_mask = {} - - update_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup, name - assert_kind_of ::Google::Cloud::Filestore::V1::UpdateBackupRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Filestore::V1::Backup), request["backup"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backup({ backup: backup, 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_backup backup: backup, 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_backup ::Google::Cloud::Filestore::V1::UpdateBackupRequest.new(backup: backup, 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_backup({ backup: backup, 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_backup(::Google::Cloud::Filestore::V1::UpdateBackupRequest.new(backup: backup, 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_backup_client_stub.call_rpc_count - end - end - - def test_promote_replica - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - peer_instance = "hello world" - - promote_replica_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :promote_replica, name - assert_kind_of ::Google::Cloud::Filestore::V1::PromoteReplicaRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["peer_instance"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, promote_replica_client_stub do - # Create client - client = ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.promote_replica({ name: name, peer_instance: peer_instance }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.promote_replica name: name, peer_instance: peer_instance do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.promote_replica ::Google::Cloud::Filestore::V1::PromoteReplicaRequest.new(name: name, peer_instance: peer_instance) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.promote_replica({ name: name, peer_instance: peer_instance }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.promote_replica(::Google::Cloud::Filestore::V1::PromoteReplicaRequest.new(name: name, peer_instance: peer_instance), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, promote_replica_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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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::Filestore::V1::CloudFilestoreManager::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Filestore::V1::CloudFilestoreManager::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-filestore-v1/test/helper.rb b/owl-bot-staging/google-cloud-filestore-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-filestore-v1/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-filestore/.gitignore b/owl-bot-staging/google-cloud-filestore/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-filestore/.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-filestore/.repo-metadata.json b/owl-bot-staging/google-cloud-filestore/.repo-metadata.json deleted file mode 100644 index b2d7db6d605c..000000000000 --- a/owl-bot-staging/google-cloud-filestore/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "file.googleapis.com", - "api_shortname": "file", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-filestore/latest", - "distribution_name": "google-cloud-filestore", - "is_cloud": true, - "language": "ruby", - "name": "file", - "name_pretty": "Filestore API", - "product_documentation": "https://cloud.google.com/filestore/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Filestore instances are fully managed NFS file servers on Google Cloud for use with applications running on Compute Engine virtual machines (VMs) instances or Google Kubernetes Engine clusters.", - "ruby-cloud-product-url": "https://cloud.google.com/filestore/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-filestore/.rubocop.yml b/owl-bot-staging/google-cloud-filestore/.rubocop.yml deleted file mode 100644 index 2b3d473f54d9..000000000000 --- a/owl-bot-staging/google-cloud-filestore/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-filestore.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-filestore.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-filestore/.toys.rb b/owl-bot-staging/google-cloud-filestore/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-filestore/.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-filestore/.yardopts b/owl-bot-staging/google-cloud-filestore/.yardopts deleted file mode 100644 index 469fa0606ccc..000000000000 --- a/owl-bot-staging/google-cloud-filestore/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Filestore API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-filestore/AUTHENTICATION.md b/owl-bot-staging/google-cloud-filestore/AUTHENTICATION.md deleted file mode 100644 index ce8085556ee5..000000000000 --- a/owl-bot-staging/google-cloud-filestore/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-filestore 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-filestore 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/filestore" - -client = Google::Cloud::Filestore.cloud_filestore_manager do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/filestore" - -Google::Cloud::Filestore.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Filestore.cloud_filestore_manager -``` - -### 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-filestore -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/filestore" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Filestore.cloud_filestore_manager -``` - -### 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-filestore/CHANGELOG.md b/owl-bot-staging/google-cloud-filestore/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-filestore/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-filestore/Gemfile b/owl-bot-staging/google-cloud-filestore/Gemfile deleted file mode 100644 index 4ac4716636a4..000000000000 --- a/owl-bot-staging/google-cloud-filestore/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-filestore-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-filestore.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-filestore/LICENSE.md b/owl-bot-staging/google-cloud-filestore/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-filestore/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-filestore/README.md b/owl-bot-staging/google-cloud-filestore/README.md deleted file mode 100644 index 11cd2f82152b..000000000000 --- a/owl-bot-staging/google-cloud-filestore/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Filestore API - -API Client library for the Filestore API - -Filestore instances are fully managed NFS file servers on Google Cloud for use with applications running on Compute Engine virtual machines (VMs) instances or Google Kubernetes Engine clusters. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-filestore-v*`. -The gem `google-cloud-filestore` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-filestore/latest) -for this library, google-cloud-filestore, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-filestore-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-filestore-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/filestore/) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-filestore -``` - -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/file.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/filestore" - -client = Google::Cloud::Filestore.cloud_filestore_manager -request = ::Google::Cloud::Filestore::V1::ListInstancesRequest.new # (request fields as keyword arguments...) -response = client.list_instances request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-filestore-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-filestore-v1/latest). - -## 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-filestore`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-filestore-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-filestore`. -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-filestore-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-filestore/Rakefile b/owl-bot-staging/google-cloud-filestore/Rakefile deleted file mode 100644 index 11fc05975069..000000000000 --- a/owl-bot-staging/google-cloud-filestore/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 = true -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-filestore 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/filestore/v1/cloud_filestore_manager/credentials" - ::Google::Cloud::Filestore::V1::CloudFilestoreManager::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-filestore 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-filestore 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-filestore 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-filestore gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-filestore" - header "google-cloud-filestore rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-filestore yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-filestore 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-filestore 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-filestore 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-filestore/google-cloud-filestore.gemspec b/owl-bot-staging/google-cloud-filestore/google-cloud-filestore.gemspec deleted file mode 100644 index 09669e84f791..000000000000 --- a/owl-bot-staging/google-cloud-filestore/google-cloud-filestore.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/filestore/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-filestore" - gem.version = Google::Cloud::Filestore::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Filestore instances are fully managed NFS file servers on Google Cloud for use with applications running on Compute Engine virtual machines (VMs) instances or Google Kubernetes Engine clusters." - gem.summary = "API Client library for the Filestore API" - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-filestore-v1", "~> 2.0" -end diff --git a/owl-bot-staging/google-cloud-filestore/lib/google-cloud-filestore.rb b/owl-bot-staging/google-cloud-filestore/lib/google-cloud-filestore.rb deleted file mode 100644 index 44c4f810a057..000000000000 --- a/owl-bot-staging/google-cloud-filestore/lib/google-cloud-filestore.rb +++ /dev/null @@ -1,19 +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/filestore" unless defined? Google::Cloud::Filestore::VERSION diff --git a/owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore.rb b/owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore.rb deleted file mode 100644 index 20d0cbe845ff..000000000000 --- a/owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore.rb +++ /dev/null @@ -1,174 +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 this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/filestore/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :filestore do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Filestore - ## - # Create a new client object for CloudFilestoreManager. - # - # By default, this returns an instance of - # [Google::Cloud::Filestore::V1::CloudFilestoreManager::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-filestore-v1/latest/Google-Cloud-Filestore-V1-CloudFilestoreManager-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the CloudFilestoreManager service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the CloudFilestoreManager service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Filestore.cloud_filestore_manager_available?}. - # - # ## About CloudFilestoreManager - # - # Configures and manages Filestore resources. - # - # Filestore Manager v1. - # - # The `file.googleapis.com` service implements the Filestore API and - # defines the following resource model for managing instances: - # * The service works with a collection of cloud projects, named: `/projects/*` - # * Each project has a collection of available locations, named: `/locations/*` - # * Each location has a collection of instances and backups, named: - # `/instances/*` and `/backups/*` respectively. - # * As such, Filestore instances are resources of the form: - # `/projects/{project_number}/locations/{location_id}/instances/{instance_id}` - # and backups are resources of the form: - # `/projects/{project_number}/locations/{location_id}/backup/{backup_id}` - # - # Note that location_id must be a Google Cloud `zone` for instances, but - # a Google Cloud `region` for backups; for example: - # * `projects/12345/locations/us-central1-c/instances/my-filestore` - # * `projects/12345/locations/us-central1/backups/my-backup` - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.cloud_filestore_manager version: :v1, transport: :grpc, &block - require "google/cloud/filestore/#{version.to_s.downcase}" - - package_name = Google::Cloud::Filestore - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Filestore.const_get(package_name).const_get(:CloudFilestoreManager) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the CloudFilestoreManager service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Filestore.cloud_filestore_manager}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the CloudFilestoreManager service, - # or if the versioned client gem needs an update to support the CloudFilestoreManager service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.cloud_filestore_manager_available? version: :v1, transport: :grpc - require "google/cloud/filestore/#{version.to_s.downcase}" - package_name = Google::Cloud::Filestore - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Filestore.const_get package_name - return false unless service_module.const_defined? :CloudFilestoreManager - service_module = service_module.const_get :CloudFilestoreManager - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-filestore library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # 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 [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.filestore if block_given? - - ::Google::Cloud.configure.filestore - end - end - end -end - -helper_path = ::File.join __dir__, "filestore", "helpers.rb" -require "google/cloud/filestore/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore/version.rb b/owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore/version.rb deleted file mode 100644 index e3b570ed9265..000000000000 --- a/owl-bot-staging/google-cloud-filestore/lib/google/cloud/filestore/version.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! - - -module Google - module Cloud - module Filestore - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/client_test.rb b/owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/client_test.rb deleted file mode 100644 index ff67c59a90d3..000000000000 --- a/owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/client_test.rb +++ /dev/null @@ -1,64 +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 "google/cloud/filestore" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Filestore::ClientConstructionMinitest < 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_cloud_filestore_manager_grpc - skip unless Google::Cloud::Filestore.cloud_filestore_manager_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Filestore.cloud_filestore_manager transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Filestore::V1::CloudFilestoreManager::Client, client - end - end - - def test_cloud_filestore_manager_rest - skip unless Google::Cloud::Filestore.cloud_filestore_manager_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Filestore.cloud_filestore_manager transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Filestore::V1::CloudFilestoreManager::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/version_test.rb b/owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/version_test.rb deleted file mode 100644 index 454b2ed51ccd..000000000000 --- a/owl-bot-staging/google-cloud-filestore/test/google/cloud/filestore/version_test.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 "helper" -require "google/cloud/filestore/version" - -class Google::Cloud::Filestore::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Filestore::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-filestore/test/helper.rb b/owl-bot-staging/google-cloud-filestore/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-filestore/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-financial_services-v1/.gitignore b/owl-bot-staging/google-cloud-financial_services-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-financial_services-v1/.repo-metadata.json deleted file mode 100644 index 3d76ae801e6f..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "financialservices.googleapis.com", - "api_shortname": "financialservices", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services-v1/latest", - "distribution_name": "google-cloud-financial_services-v1", - "is_cloud": true, - "language": "ruby", - "name": "financialservices", - "name_pretty": "Financial Services V1 API", - "product_documentation": "https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-financial_services-v1 is the official client library for the Financial Services V1 API. Note that google-cloud-financial_services-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-financial_services instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-financial_services-v1/.rubocop.yml b/owl-bot-staging/google-cloud-financial_services-v1/.rubocop.yml deleted file mode 100644 index 98a6d860878b..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-financial_services-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-financial_services-v1.rb" diff --git a/owl-bot-staging/google-cloud-financial_services-v1/.toys.rb b/owl-bot-staging/google-cloud-financial_services-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/.yardopts b/owl-bot-staging/google-cloud-financial_services-v1/.yardopts deleted file mode 100644 index 9311fd01686a..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Financial Services 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-financial_services-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-financial_services-v1/AUTHENTICATION.md deleted file mode 100644 index 24c00c23958e..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-financial_services-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-financial_services-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/financial_services/v1" - -client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/financial_services/v1" - -::Google::Cloud::FinancialServices::V1::AML::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::FinancialServices::V1::AML::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-financial_services-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/financial_services/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::FinancialServices::V1::AML::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-financial_services-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-financial_services-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-financial_services-v1/Gemfile b/owl-bot-staging/google-cloud-financial_services-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-financial_services-v1/LICENSE.md b/owl-bot-staging/google-cloud-financial_services-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/README.md b/owl-bot-staging/google-cloud-financial_services-v1/README.md deleted file mode 100644 index 78c342fdbcea..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Financial Services V1 API - -API Client library for the Financial Services V1 API - -google-cloud-financial_services-v1 is the official client library for the Financial Services V1 API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Financial Services V1 API. Most users should consider using -the main client gem, -[google-cloud-financial_services](https://rubygems.org/gems/google-cloud-financial_services). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-financial_services-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/financialservices.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/financial_services/v1" - -client = ::Google::Cloud::FinancialServices::V1::AML::Client.new -request = ::Google::Cloud::FinancialServices::V1::ListInstancesRequest.new # (request fields as keyword arguments...) -response = client.list_instances request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview) -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/financial_services/v1" -require "logger" - -client = ::Google::Cloud::FinancialServices::V1::AML::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-financial_services`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-financial_services-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-financial_services`. -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-financial_services-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-financial_services-v1/Rakefile b/owl-bot-staging/google-cloud-financial_services-v1/Rakefile deleted file mode 100644 index 8d6acfa45c3f..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-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/financial_services/v1/aml/credentials" - ::Google::Cloud::FinancialServices::V1::AML::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-financial_services-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-financial_services-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-financial_services-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-financial_services-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-financial_services-v1" - header "google-cloud-financial_services-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-financial_services-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-financial_services-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-financial_services-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-financial_services-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-financial_services-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-financial_services-v1/gapic_metadata.json deleted file mode 100644 index ccfe3e1e260c..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/gapic_metadata.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.financialservices.v1", - "libraryPackage": "::Google::Cloud::FinancialServices::V1", - "services": { - "AML": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::FinancialServices::V1::AML::Client", - "rpcs": { - "ListInstances": { - "methods": [ - "list_instances" - ] - }, - "GetInstance": { - "methods": [ - "get_instance" - ] - }, - "CreateInstance": { - "methods": [ - "create_instance" - ] - }, - "UpdateInstance": { - "methods": [ - "update_instance" - ] - }, - "DeleteInstance": { - "methods": [ - "delete_instance" - ] - }, - "ImportRegisteredParties": { - "methods": [ - "import_registered_parties" - ] - }, - "ExportRegisteredParties": { - "methods": [ - "export_registered_parties" - ] - }, - "ListDatasets": { - "methods": [ - "list_datasets" - ] - }, - "GetDataset": { - "methods": [ - "get_dataset" - ] - }, - "CreateDataset": { - "methods": [ - "create_dataset" - ] - }, - "UpdateDataset": { - "methods": [ - "update_dataset" - ] - }, - "DeleteDataset": { - "methods": [ - "delete_dataset" - ] - }, - "ListModels": { - "methods": [ - "list_models" - ] - }, - "GetModel": { - "methods": [ - "get_model" - ] - }, - "CreateModel": { - "methods": [ - "create_model" - ] - }, - "UpdateModel": { - "methods": [ - "update_model" - ] - }, - "ExportModelMetadata": { - "methods": [ - "export_model_metadata" - ] - }, - "DeleteModel": { - "methods": [ - "delete_model" - ] - }, - "ListEngineConfigs": { - "methods": [ - "list_engine_configs" - ] - }, - "GetEngineConfig": { - "methods": [ - "get_engine_config" - ] - }, - "CreateEngineConfig": { - "methods": [ - "create_engine_config" - ] - }, - "UpdateEngineConfig": { - "methods": [ - "update_engine_config" - ] - }, - "ExportEngineConfigMetadata": { - "methods": [ - "export_engine_config_metadata" - ] - }, - "DeleteEngineConfig": { - "methods": [ - "delete_engine_config" - ] - }, - "GetEngineVersion": { - "methods": [ - "get_engine_version" - ] - }, - "ListEngineVersions": { - "methods": [ - "list_engine_versions" - ] - }, - "ListPredictionResults": { - "methods": [ - "list_prediction_results" - ] - }, - "GetPredictionResult": { - "methods": [ - "get_prediction_result" - ] - }, - "CreatePredictionResult": { - "methods": [ - "create_prediction_result" - ] - }, - "UpdatePredictionResult": { - "methods": [ - "update_prediction_result" - ] - }, - "ExportPredictionResultMetadata": { - "methods": [ - "export_prediction_result_metadata" - ] - }, - "DeletePredictionResult": { - "methods": [ - "delete_prediction_result" - ] - }, - "ListBacktestResults": { - "methods": [ - "list_backtest_results" - ] - }, - "GetBacktestResult": { - "methods": [ - "get_backtest_result" - ] - }, - "CreateBacktestResult": { - "methods": [ - "create_backtest_result" - ] - }, - "UpdateBacktestResult": { - "methods": [ - "update_backtest_result" - ] - }, - "ExportBacktestResultMetadata": { - "methods": [ - "export_backtest_result_metadata" - ] - }, - "DeleteBacktestResult": { - "methods": [ - "delete_backtest_result" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-financial_services-v1/google-cloud-financial_services-v1.gemspec b/owl-bot-staging/google-cloud-financial_services-v1/google-cloud-financial_services-v1.gemspec deleted file mode 100644 index 8dd4d5119752..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/google-cloud-financial_services-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/financial_services/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-financial_services-v1" - gem.version = Google::Cloud::FinancialServices::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-financial_services-v1 is the official client library for the Financial Services V1 API. Note that google-cloud-financial_services-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-financial_services instead. See the readme for more details." - gem.summary = "API Client library for the Financial Services V1 API" - 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.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google-cloud-financial_services-v1.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google-cloud-financial_services-v1.rb deleted file mode 100644 index e3b069acc38d..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google-cloud-financial_services-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/financial_services/v1" diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1.rb deleted file mode 100644 index ed8c4f8eaba8..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1.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/financial_services/v1/aml" -require "google/cloud/financial_services/v1/version" - -module Google - module Cloud - module FinancialServices - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/financial_services/v1" - # client = ::Google::Cloud::FinancialServices::V1::AML::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/financial_services/v1" - # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/financial_services/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml.rb deleted file mode 100644 index 5fdaea94400c..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml.rb +++ /dev/null @@ -1,57 +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/financial_services/v1/version" - -require "google/cloud/financial_services/v1/aml/credentials" -require "google/cloud/financial_services/v1/aml/paths" -require "google/cloud/financial_services/v1/aml/operations" -require "google/cloud/financial_services/v1/aml/client" -require "google/cloud/financial_services/v1/aml/rest" - -module Google - module Cloud - module FinancialServices - module V1 - ## - # The AML (Anti Money Laundering) service allows users to perform REST - # operations on aml. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/financial_services/v1/aml" - # client = ::Google::Cloud::FinancialServices::V1::AML::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/financial_services/v1/aml/rest" - # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - module AML - end - end - end - end -end - -helper_path = ::File.join __dir__, "aml", "helpers.rb" -require "google/cloud/financial_services/v1/aml/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/client.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/client.rb deleted file mode 100644 index edf36dc21bec..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/client.rb +++ /dev/null @@ -1,4704 +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/financialservices/v1/service_pb" -require "google/cloud/location" - -module Google - module Cloud - module FinancialServices - module V1 - module AML - ## - # Client for the AML service. - # - # The AML (Anti Money Laundering) service allows users to perform REST - # operations on aml. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "financialservices.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :aml_stub - - ## - # Configure the AML Client class. - # - # See {::Google::Cloud::FinancialServices::V1::AML::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AML clients - # ::Google::Cloud::FinancialServices::V1::AML::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", "FinancialServices", "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.list_instances.timeout = 10.0 - - default_config.rpcs.get_instance.timeout = 10.0 - - default_config.rpcs.create_instance.timeout = 120.0 - - default_config.rpcs.update_instance.timeout = 120.0 - - default_config.rpcs.delete_instance.timeout = 120.0 - - default_config.rpcs.import_registered_parties.timeout = 120.0 - - default_config.rpcs.export_registered_parties.timeout = 120.0 - - default_config.rpcs.list_datasets.timeout = 10.0 - - default_config.rpcs.get_dataset.timeout = 10.0 - - default_config.rpcs.create_dataset.timeout = 120.0 - - default_config.rpcs.update_dataset.timeout = 120.0 - - default_config.rpcs.delete_dataset.timeout = 120.0 - - default_config.rpcs.list_models.timeout = 10.0 - - default_config.rpcs.get_model.timeout = 10.0 - - default_config.rpcs.create_model.timeout = 120.0 - - default_config.rpcs.update_model.timeout = 120.0 - - default_config.rpcs.export_model_metadata.timeout = 120.0 - - default_config.rpcs.delete_model.timeout = 120.0 - - default_config.rpcs.list_engine_configs.timeout = 10.0 - - default_config.rpcs.get_engine_config.timeout = 10.0 - - default_config.rpcs.update_engine_config.timeout = 120.0 - - default_config.rpcs.export_engine_config_metadata.timeout = 120.0 - - default_config.rpcs.delete_engine_config.timeout = 120.0 - - default_config.rpcs.get_engine_version.timeout = 10.0 - - default_config.rpcs.list_engine_versions.timeout = 10.0 - - default_config.rpcs.list_prediction_results.timeout = 10.0 - - default_config.rpcs.get_prediction_result.timeout = 10.0 - - default_config.rpcs.create_prediction_result.timeout = 120.0 - - default_config.rpcs.update_prediction_result.timeout = 120.0 - - default_config.rpcs.export_prediction_result_metadata.timeout = 120.0 - - default_config.rpcs.delete_prediction_result.timeout = 120.0 - - default_config.rpcs.list_backtest_results.timeout = 10.0 - - default_config.rpcs.get_backtest_result.timeout = 10.0 - - default_config.rpcs.create_backtest_result.timeout = 120.0 - - default_config.rpcs.update_backtest_result.timeout = 120.0 - - default_config.rpcs.export_backtest_result_metadata.timeout = 120.0 - - default_config.rpcs.delete_backtest_result.timeout = 120.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AML 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::FinancialServices::V1::AML::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 - @aml_stub.universe_domain - end - - ## - # Create a new AML client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AML 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/financialservices/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 - - @aml_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::FinancialServices::V1::AML::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 - ) - - @aml_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 = @aml_stub.endpoint - config.universe_domain = @aml_stub.universe_domain - config.logger = @aml_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::FinancialServices::V1::AML::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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @aml_stub.logger - end - - # Service calls - - ## - # Lists instances. - # - # @overload list_instances(request, options = nil) - # Pass arguments to `list_instances` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListInstancesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_instances` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the Instance is the location for that Instance. - # Every location has exactly one instance. - # @param page_size [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @param page_token [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListInstancesResponse. It should be copied here to retrieve the - # next page of resources. This will be empty for the first instance of - # ListInstancesRequest. - # @param filter [::String] - # Specify a filter to narrow search results. - # @param order_by [::String] - # Specify a field to use for ordering. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListInstancesRequest.new - # - # # Call the list_instances method. - # result = client.list_instances request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::FinancialServices::V1::Instance. - # p item - # end - # - def list_instances request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListInstancesRequest - - # Converts hash and nil to 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_instances.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_instances.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_instances.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :list_instances, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @aml_stub, :list_instances, 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 instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Instance. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::FinancialServices::V1::Instance] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::FinancialServices::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetInstanceRequest - - # Converts hash and nil to 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :get_instance, 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 instance. - # - # @overload create_instance(request, options = nil) - # Pass arguments to `create_instance` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::CreateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::CreateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) - # Pass arguments to `create_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the Instance is the location for that Instance. - # Every location has exactly one instance. - # @param instance_id [::String] - # Required. The resource id of the instance. - # @param instance [::Google::Cloud::FinancialServices::V1::Instance, ::Hash] - # Required. The instance that will be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new - # - # # Call the create_instance method. - # result = client.create_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest - - # Converts hash and nil to 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :create_instance, 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 the parameters of a single Instance. - # - # @overload update_instance(request, options = nil) - # Pass arguments to `update_instance` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_instance(update_mask: nil, instance: nil, request_id: nil) - # Pass arguments to `update_instance` via keyword arguments. Note that at - # least one keyword argument is 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] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Instance resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param instance [::Google::Cloud::FinancialServices::V1::Instance, ::Hash] - # Required. The new value of the instance fields that will be updated - # according to the update_mask - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new - # - # # Call the update_instance method. - # result = client.update_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest - - # Converts hash and nil to 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.instance&.name - header_params["instance.name"] = request.instance.name - end - - request_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_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :update_instance, 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 instance. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_instance(name: nil, request_id: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Instance. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest - - # Converts hash and nil to 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_instance.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :delete_instance, 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 - - ## - # Imports the list of registered parties. See - # [Create and manage - # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#import-registered-parties) - # for information on the input schema and response for this method. - # - # @overload import_registered_parties(request, options = nil) - # Pass arguments to `import_registered_parties` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_registered_parties(name: nil, party_tables: nil, mode: nil, validate_only: nil, line_of_business: nil) - # Pass arguments to `import_registered_parties` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The full path to the Instance resource in this API. - # format: `projects/{project}/locations/{location}/instances/{instance}` - # @param party_tables [::Array<::String>] - # Optional. List of BigQuery tables. Union of tables will be taken if there - # is more than one table. VPC-SC restrictions apply. format: - # `bq://{project}.{bqDatasetID}.{bqTableID}` Use of `datasets` is preferred - # over the latter due to its simplicity and the reduced risk of errors - # `party_tables` and `datasets` must not be provided at the - # same time - # @param mode [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest::UpdateMode] - # Required. Mode of the request. - # @param validate_only [::Boolean] - # Optional. If the request will not register the parties, just determine what - # would happen. - # @param line_of_business [::Google::Cloud::FinancialServices::V1::LineOfBusiness] - # Required. LineOfBusiness for the specified registered parties. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new - # - # # Call the import_registered_parties method. - # result = client.import_registered_parties request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_registered_parties request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_registered_parties.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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.import_registered_parties.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_registered_parties.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :import_registered_parties, 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 - - ## - # Exports the list of registered parties. See - # [Create and manage - # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#export-registered-parties) - # for information on the output schema for this method. - # - # @overload export_registered_parties(request, options = nil) - # Pass arguments to `export_registered_parties` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_registered_parties(name: nil, dataset: nil, line_of_business: nil) - # Pass arguments to `export_registered_parties` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The full path to the Instance resource in this API. - # format: `projects/{project}/locations/{location}/instances/{instance}` - # @param dataset [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] - # Required. The location to output the RegisteredParties. - # @param line_of_business [::Google::Cloud::FinancialServices::V1::LineOfBusiness] - # Required. LineOfBusiness to get RegisteredParties from. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new - # - # # Call the export_registered_parties method. - # result = client.export_registered_parties request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_registered_parties request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_registered_parties.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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.export_registered_parties.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_registered_parties.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :export_registered_parties, 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 datasets. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the Dataset is the Instance. - # @param page_size [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @param page_token [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListDatasetResponse. It should be copied here to retrieve the - # next page of resources. Empty will give the first page of - # ListDatasetRequest, and the last page will return an empty page_token. - # @param filter [::String] - # Specify a filter to narrow search results. - # @param order_by [::String] - # Specify a field to use for ordering. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListDatasetsRequest.new - # - # # Call the list_datasets method. - # result = client.list_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::FinancialServices::V1::Dataset. - # p item - # end - # - def list_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest - - # Converts hash and nil to 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_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_datasets.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :list_datasets, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @aml_stub, :list_datasets, 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 a dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_dataset(name: nil) - # Pass arguments to `get_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Dataset - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::FinancialServices::V1::Dataset] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::FinancialServices::V1::Dataset] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::Dataset. - # p result - # - def get_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetDatasetRequest - - # Converts hash and nil to 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :get_dataset, 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 dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::CreateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dataset(parent: nil, dataset_id: nil, dataset: nil, request_id: nil) - # Pass arguments to `create_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the Dataset is the Instance. - # @param dataset_id [::String] - # Required. The resource id of the dataset - # @param dataset [::Google::Cloud::FinancialServices::V1::Dataset, ::Hash] - # Required. The dataset that will be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new - # - # # Call the create_dataset method. - # result = client.create_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest - - # Converts hash and nil to 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :create_dataset, 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 the parameters of a single Dataset. - # - # @overload update_dataset(request, options = nil) - # Pass arguments to `update_dataset` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dataset(update_mask: nil, dataset: nil, request_id: nil) - # Pass arguments to `update_dataset` via keyword arguments. Note that at - # least one keyword argument is 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] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Dataset resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param dataset [::Google::Cloud::FinancialServices::V1::Dataset, ::Hash] - # Required. The new value of the dataset fields that will be updated - # according to the update_mask. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new - # - # # Call the update_dataset method. - # result = client.update_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest - - # Converts hash and nil to 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.dataset&.name - header_params["dataset.name"] = request.dataset.name - end - - request_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_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :update_dataset, 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 dataset. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_dataset(name: nil, request_id: nil) - # Pass arguments to `delete_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Dataset. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new - # - # # Call the delete_dataset method. - # result = client.delete_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest - - # Converts hash and nil to 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_dataset.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :delete_dataset, 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 models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListModelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_models(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_models` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the Model is the Instance. - # @param page_size [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @param page_token [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListModelsResponse. It should be copied here to retrieve the next - # page of resources. Empty will give the first page of ListModelsRequest, and - # the last page will return an empty page_token. - # @param filter [::String] - # Specify a filter to narrow search results. - # @param order_by [::String] - # Specify a field to use for ordering. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListModelsRequest.new - # - # # Call the list_models method. - # result = client.list_models request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::FinancialServices::V1::Model. - # p item - # end - # - def list_models request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListModelsRequest - - # Converts hash and nil to 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_models.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_models.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_models.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :list_models, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @aml_stub, :list_models, 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 a model. - # - # @overload get_model(request, options = nil) - # Pass arguments to `get_model` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_model(name: nil) - # Pass arguments to `get_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Model - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::FinancialServices::V1::Model] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::FinancialServices::V1::Model] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::Model. - # p result - # - def get_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetModelRequest - - # Converts hash and nil to 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :get_model, 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 model. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::CreateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_model(parent: nil, model_id: nil, model: nil, request_id: nil) - # Pass arguments to `create_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the Model is the Instance. - # @param model_id [::String] - # Required. The resource id of the Model - # @param model [::Google::Cloud::FinancialServices::V1::Model, ::Hash] - # Required. The Model that will be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::CreateModelRequest.new - # - # # Call the create_model method. - # result = client.create_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateModelRequest - - # Converts hash and nil to 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :create_model, 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 the parameters of a single Model. - # - # @overload update_model(request, options = nil) - # Pass arguments to `update_model` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::UpdateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::UpdateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_model(update_mask: nil, model: nil, request_id: nil) - # Pass arguments to `update_model` via keyword arguments. Note that at - # least one keyword argument is 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] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Model resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param model [::Google::Cloud::FinancialServices::V1::Model, ::Hash] - # Required. The new value of the Model fields that will be updated according - # to the update_mask. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::UpdateModelRequest.new - # - # # Call the update_model method. - # result = client.update_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateModelRequest - - # Converts hash and nil to 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.model&.name - header_params["model.name"] = request.model.name - end - - request_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_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :update_model, 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 - - ## - # Export governance information for a Model resource. For - # information on the exported fields, see - # [AML output data - # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#model). - # - # @overload export_model_metadata(request, options = nil) - # Pass arguments to `export_model_metadata` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_model_metadata(model: nil, structured_metadata_destination: nil) - # Pass arguments to `export_model_metadata` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param model [::String] - # Required. The resource name of the Model. - # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] - # Required. BigQuery output where the metadata will be written. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new - # - # # Call the export_model_metadata method. - # result = client.export_model_metadata request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_model_metadata request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_model_metadata.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.model - header_params["model"] = request.model - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_model_metadata.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_model_metadata.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :export_model_metadata, 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 model. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::DeleteModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_model(name: nil, request_id: nil) - # Pass arguments to `delete_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Model. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::DeleteModelRequest.new - # - # # Call the delete_model method. - # result = client.delete_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteModelRequest - - # Converts hash and nil to 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_model.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :delete_model, 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 engine configs. - # - # @overload list_engine_configs(request, options = nil) - # Pass arguments to `list_engine_configs` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_engine_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_engine_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 parent of the EngineConfig is the Instance. - # @param page_size [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @param page_token [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListEngineConfigsResponse. It should be copied here to retrieve - # the next page of resources. Empty will give the first page of - # ListEngineConfigsRequest, and the last page will return an empty - # page_token. - # @param filter [::String] - # Specify a filter to narrow search results. - # @param order_by [::String] - # Specify a field to use for ordering. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.new - # - # # Call the list_engine_configs method. - # result = client.list_engine_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::FinancialServices::V1::EngineConfig. - # p item - # end - # - def list_engine_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest - - # Converts hash and nil to 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_engine_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::FinancialServices::V1::VERSION - metadata[:"x-goog-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_engine_configs.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_engine_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :list_engine_configs, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @aml_stub, :list_engine_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 - - ## - # Gets an engine config. - # - # @overload get_engine_config(request, options = nil) - # Pass arguments to `get_engine_config` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_engine_config(name: nil) - # Pass arguments to `get_engine_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 resource name of the EngineConfig - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::FinancialServices::V1::EngineConfig] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::FinancialServices::V1::EngineConfig] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new - # - # # Call the get_engine_config method. - # result = client.get_engine_config request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::EngineConfig. - # p result - # - def get_engine_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest - - # Converts hash and nil to 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_engine_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::FinancialServices::V1::VERSION - metadata[:"x-goog-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_engine_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_engine_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :get_engine_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 - - ## - # Creates an engine config. - # - # @overload create_engine_config(request, options = nil) - # Pass arguments to `create_engine_config` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_engine_config(parent: nil, engine_config_id: nil, engine_config: nil, request_id: nil) - # Pass arguments to `create_engine_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 parent of the EngineConfig is the Instance. - # @param engine_config_id [::String] - # Required. The resource id of the EngineConfig - # @param engine_config [::Google::Cloud::FinancialServices::V1::EngineConfig, ::Hash] - # Required. The EngineConfig that will be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new - # - # # Call the create_engine_config method. - # result = client.create_engine_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_engine_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest - - # Converts hash and nil to 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_engine_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::FinancialServices::V1::VERSION - metadata[:"x-goog-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_engine_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_engine_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :create_engine_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 - - ## - # Updates the parameters of a single EngineConfig. - # - # @overload update_engine_config(request, options = nil) - # Pass arguments to `update_engine_config` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_engine_config(update_mask: nil, engine_config: nil, request_id: nil) - # Pass arguments to `update_engine_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # EngineConfig resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param engine_config [::Google::Cloud::FinancialServices::V1::EngineConfig, ::Hash] - # Required. The new value of the EngineConfig fields that will be updated - # according to the update_mask. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new - # - # # Call the update_engine_config method. - # result = client.update_engine_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_engine_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest - - # Converts hash and nil to 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_engine_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::FinancialServices::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.engine_config&.name - header_params["engine_config.name"] = request.engine_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_engine_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_engine_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :update_engine_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 - - ## - # Export governance information for an EngineConfig resource. For - # information on the exported fields, see - # [AML output data - # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#engine-config). - # - # @overload export_engine_config_metadata(request, options = nil) - # Pass arguments to `export_engine_config_metadata` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_engine_config_metadata(engine_config: nil, structured_metadata_destination: nil) - # Pass arguments to `export_engine_config_metadata` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param engine_config [::String] - # Required. The resource name of the EngineConfig. - # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] - # Required. BigQuery output where the metadata will be written. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new - # - # # Call the export_engine_config_metadata method. - # result = client.export_engine_config_metadata request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_engine_config_metadata request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_engine_config_metadata.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.engine_config - header_params["engine_config"] = request.engine_config - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_engine_config_metadata.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_engine_config_metadata.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :export_engine_config_metadata, 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 engine config. - # - # @overload delete_engine_config(request, options = nil) - # Pass arguments to `delete_engine_config` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_engine_config(name: nil, request_id: nil) - # Pass arguments to `delete_engine_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 resource name of the EngineConfig. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new - # - # # Call the delete_engine_config method. - # result = client.delete_engine_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_engine_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest - - # Converts hash and nil to 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_engine_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::FinancialServices::V1::VERSION - metadata[:"x-goog-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_engine_config.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_engine_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :delete_engine_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 - - ## - # Gets a single EngineVersion. - # - # @overload get_engine_version(request, options = nil) - # Pass arguments to `get_engine_version` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_engine_version(name: nil) - # Pass arguments to `get_engine_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EngineVersion - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::FinancialServices::V1::EngineVersion] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::FinancialServices::V1::EngineVersion] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new - # - # # Call the get_engine_version method. - # result = client.get_engine_version request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::EngineVersion. - # p result - # - def get_engine_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest - - # Converts hash and nil to 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_engine_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_engine_version.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_engine_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :get_engine_version, 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 EngineVersions for given location. - # - # @overload list_engine_versions(request, options = nil) - # Pass arguments to `list_engine_versions` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_engine_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_engine_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the EngineVersion is the Instance. - # @param page_size [::Integer] - # Optional. The number of resources to be included in the response. The - # response contains a next_page_token, which can be used to retrieve the next - # page of resources. - # @param page_token [::String] - # Optional. In case of paginated results, this is the token that was returned - # in the previous ListEngineVersionsResponse. It should be copied here to - # retrieve the next page of resources. Empty will give the first page of - # ListEngineVersionsRequest, and the last page will return an empty - # page_token. - # @param filter [::String] - # Optional. Specify a filter to narrow search results. - # If empty or unset will default to "state!=DEPRECATED", - # to view deprecated versions use "state:*" or any other filter. - # @param order_by [::String] - # Optional. Specify a field to use for ordering. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.new - # - # # Call the list_engine_versions method. - # result = client.list_engine_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::FinancialServices::V1::EngineVersion. - # p item - # end - # - def list_engine_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest - - # Converts hash and nil to 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_engine_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_engine_versions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_engine_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :list_engine_versions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @aml_stub, :list_engine_versions, 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 - - ## - # List PredictionResults. - # - # @overload list_prediction_results(request, options = nil) - # Pass arguments to `list_prediction_results` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_prediction_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_prediction_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the PredictionResult is the Instance. - # @param page_size [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @param page_token [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListPredictionResultsResponse. It should be copied here to - # retrieve the next page of resources. Empty will give the first page of - # ListPredictionResultsRequest, and the last page will return an empty - # page_token. - # @param filter [::String] - # Specify a filter to narrow search results. - # @param order_by [::String] - # Specify a field to use for ordering. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.new - # - # # Call the list_prediction_results method. - # result = client.list_prediction_results request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::FinancialServices::V1::PredictionResult. - # p item - # end - # - def list_prediction_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest - - # Converts hash and nil to 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_prediction_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_prediction_results.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_prediction_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :list_prediction_results, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @aml_stub, :list_prediction_results, 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 a PredictionResult. - # - # @overload get_prediction_result(request, options = nil) - # Pass arguments to `get_prediction_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_prediction_result(name: nil) - # Pass arguments to `get_prediction_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the PredictionResult - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::FinancialServices::V1::PredictionResult] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::FinancialServices::V1::PredictionResult] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new - # - # # Call the get_prediction_result method. - # result = client.get_prediction_result request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::PredictionResult. - # p result - # - def get_prediction_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest - - # Converts hash and nil to 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_prediction_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_prediction_result.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_prediction_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :get_prediction_result, 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 PredictionResult. - # - # @overload create_prediction_result(request, options = nil) - # Pass arguments to `create_prediction_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_prediction_result(parent: nil, prediction_result_id: nil, prediction_result: nil, request_id: nil) - # Pass arguments to `create_prediction_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the PredictionResult is the Instance. - # @param prediction_result_id [::String] - # Required. The resource id of the PredictionResult - # @param prediction_result [::Google::Cloud::FinancialServices::V1::PredictionResult, ::Hash] - # Required. The PredictionResult that will be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new - # - # # Call the create_prediction_result method. - # result = client.create_prediction_result request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_prediction_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest - - # Converts hash and nil to 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_prediction_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_prediction_result.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_prediction_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :create_prediction_result, 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 the parameters of a single PredictionResult. - # - # @overload update_prediction_result(request, options = nil) - # Pass arguments to `update_prediction_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_prediction_result(update_mask: nil, prediction_result: nil, request_id: nil) - # Pass arguments to `update_prediction_result` via keyword arguments. Note that at - # least one keyword argument is 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] - # Optional. Field mask is used to specify the fields to be overwritten in the - # PredictionResult resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param prediction_result [::Google::Cloud::FinancialServices::V1::PredictionResult, ::Hash] - # Required. The new value of the PredictionResult fields that will be updated - # according to the update_mask. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new - # - # # Call the update_prediction_result method. - # result = client.update_prediction_result request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_prediction_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest - - # Converts hash and nil to 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_prediction_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.prediction_result&.name - header_params["prediction_result.name"] = request.prediction_result.name - end - - request_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_prediction_result.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_prediction_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :update_prediction_result, 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 - - ## - # Export governance information for a PredictionResult resource. For - # information on the exported fields, see - # [AML output data - # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#prediction-results). - # - # @overload export_prediction_result_metadata(request, options = nil) - # Pass arguments to `export_prediction_result_metadata` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_prediction_result_metadata(prediction_result: nil, structured_metadata_destination: nil) - # Pass arguments to `export_prediction_result_metadata` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param prediction_result [::String] - # Required. The resource name of the PredictionResult. - # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] - # Required. BigQuery output where the metadata will be written. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new - # - # # Call the export_prediction_result_metadata method. - # result = client.export_prediction_result_metadata request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_prediction_result_metadata request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_prediction_result_metadata.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.prediction_result - header_params["prediction_result"] = request.prediction_result - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_prediction_result_metadata.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_prediction_result_metadata.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :export_prediction_result_metadata, 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 PredictionResult. - # - # @overload delete_prediction_result(request, options = nil) - # Pass arguments to `delete_prediction_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_prediction_result(name: nil, request_id: nil) - # Pass arguments to `delete_prediction_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the PredictionResult. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new - # - # # Call the delete_prediction_result method. - # result = client.delete_prediction_result request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_prediction_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest - - # Converts hash and nil to 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_prediction_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_prediction_result.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_prediction_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :delete_prediction_result, 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 BacktestResults. - # - # @overload list_backtest_results(request, options = nil) - # Pass arguments to `list_backtest_results` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backtest_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backtest_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the BacktestResult is the Instance. - # @param page_size [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @param page_token [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListBacktestResultsResponse. It should be copied here to - # retrieve the next page of resources. Empty will give the first page of - # ListBacktestResultsRequest, and the last page will return an empty - # page_token. - # @param filter [::String] - # Specify a filter to narrow search results. - # @param order_by [::String] - # Specify a field to use for ordering. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.new - # - # # Call the list_backtest_results method. - # result = client.list_backtest_results request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::FinancialServices::V1::BacktestResult. - # p item - # end - # - def list_backtest_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest - - # Converts hash and nil to 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_backtest_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_backtest_results.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backtest_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :list_backtest_results, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @aml_stub, :list_backtest_results, 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 a BacktestResult. - # - # @overload get_backtest_result(request, options = nil) - # Pass arguments to `get_backtest_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backtest_result(name: nil) - # Pass arguments to `get_backtest_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the BacktestResult - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::FinancialServices::V1::BacktestResult] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::FinancialServices::V1::BacktestResult] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new - # - # # Call the get_backtest_result method. - # result = client.get_backtest_result request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::BacktestResult. - # p result - # - def get_backtest_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest - - # Converts hash and nil to 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_backtest_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_backtest_result.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backtest_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :get_backtest_result, 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 BacktestResult. - # - # @overload create_backtest_result(request, options = nil) - # Pass arguments to `create_backtest_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backtest_result(parent: nil, backtest_result_id: nil, backtest_result: nil, request_id: nil) - # Pass arguments to `create_backtest_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the BacktestResult is the Instance. - # @param backtest_result_id [::String] - # Required. The resource id of the BacktestResult - # @param backtest_result [::Google::Cloud::FinancialServices::V1::BacktestResult, ::Hash] - # Required. The BacktestResult that will be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new - # - # # Call the create_backtest_result method. - # result = client.create_backtest_result request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backtest_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest - - # Converts hash and nil to 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_backtest_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_backtest_result.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backtest_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :create_backtest_result, 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 the parameters of a single BacktestResult. - # - # @overload update_backtest_result(request, options = nil) - # Pass arguments to `update_backtest_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backtest_result(update_mask: nil, backtest_result: nil, request_id: nil) - # Pass arguments to `update_backtest_result` via keyword arguments. Note that at - # least one keyword argument is 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] - # Optional. Field mask is used to specify the fields to be overwritten in the - # BacktestResult resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param backtest_result [::Google::Cloud::FinancialServices::V1::BacktestResult, ::Hash] - # Required. The new value of the BacktestResult fields that will be updated - # according to the update_mask. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new - # - # # Call the update_backtest_result method. - # result = client.update_backtest_result request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backtest_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest - - # Converts hash and nil to 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_backtest_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backtest_result&.name - header_params["backtest_result.name"] = request.backtest_result.name - end - - request_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_backtest_result.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backtest_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :update_backtest_result, 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 - - ## - # Export governance information for a BacktestResult resource. For - # information on the exported fields, see - # [AML output data - # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#backtest-results). - # - # @overload export_backtest_result_metadata(request, options = nil) - # Pass arguments to `export_backtest_result_metadata` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_backtest_result_metadata(backtest_result: nil, structured_metadata_destination: nil) - # Pass arguments to `export_backtest_result_metadata` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backtest_result [::String] - # Required. The resource name of the BacktestResult. - # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] - # Required. BigQuery output where the metadata will be written. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new - # - # # Call the export_backtest_result_metadata method. - # result = client.export_backtest_result_metadata request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_backtest_result_metadata request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_backtest_result_metadata.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backtest_result - header_params["backtest_result"] = request.backtest_result - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.export_backtest_result_metadata.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_backtest_result_metadata.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :export_backtest_result_metadata, 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 BacktestResult. - # - # @overload delete_backtest_result(request, options = nil) - # Pass arguments to `delete_backtest_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backtest_result(name: nil, request_id: nil) - # Pass arguments to `delete_backtest_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the BacktestResult. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new - # - # # Call the delete_backtest_result method. - # result = client.delete_backtest_result request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backtest_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest - - # Converts hash and nil to 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_backtest_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION - metadata[:"x-goog-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_backtest_result.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backtest_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.call_rpc :delete_backtest_result, 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 AML API. - # - # This class represents the configuration for AML, - # 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::FinancialServices::V1::AML::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_instances to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::FinancialServices::V1::AML::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.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::FinancialServices::V1::AML::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 = "financialservices.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 AML 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_instances` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instances - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - ## - # RPC-specific configuration for `create_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance - ## - # RPC-specific configuration for `update_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `import_registered_parties` - # @return [::Gapic::Config::Method] - # - attr_reader :import_registered_parties - ## - # RPC-specific configuration for `export_registered_parties` - # @return [::Gapic::Config::Method] - # - attr_reader :export_registered_parties - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `create_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `update_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dataset - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `list_models` - # @return [::Gapic::Config::Method] - # - attr_reader :list_models - ## - # RPC-specific configuration for `get_model` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # RPC-specific configuration for `update_model` - # @return [::Gapic::Config::Method] - # - attr_reader :update_model - ## - # RPC-specific configuration for `export_model_metadata` - # @return [::Gapic::Config::Method] - # - attr_reader :export_model_metadata - ## - # RPC-specific configuration for `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - ## - # RPC-specific configuration for `list_engine_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_engine_configs - ## - # RPC-specific configuration for `get_engine_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_engine_config - ## - # RPC-specific configuration for `create_engine_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_engine_config - ## - # RPC-specific configuration for `update_engine_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_engine_config - ## - # RPC-specific configuration for `export_engine_config_metadata` - # @return [::Gapic::Config::Method] - # - attr_reader :export_engine_config_metadata - ## - # RPC-specific configuration for `delete_engine_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_engine_config - ## - # RPC-specific configuration for `get_engine_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_engine_version - ## - # RPC-specific configuration for `list_engine_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_engine_versions - ## - # RPC-specific configuration for `list_prediction_results` - # @return [::Gapic::Config::Method] - # - attr_reader :list_prediction_results - ## - # RPC-specific configuration for `get_prediction_result` - # @return [::Gapic::Config::Method] - # - attr_reader :get_prediction_result - ## - # RPC-specific configuration for `create_prediction_result` - # @return [::Gapic::Config::Method] - # - attr_reader :create_prediction_result - ## - # RPC-specific configuration for `update_prediction_result` - # @return [::Gapic::Config::Method] - # - attr_reader :update_prediction_result - ## - # RPC-specific configuration for `export_prediction_result_metadata` - # @return [::Gapic::Config::Method] - # - attr_reader :export_prediction_result_metadata - ## - # RPC-specific configuration for `delete_prediction_result` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_prediction_result - ## - # RPC-specific configuration for `list_backtest_results` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backtest_results - ## - # RPC-specific configuration for `get_backtest_result` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backtest_result - ## - # RPC-specific configuration for `create_backtest_result` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backtest_result - ## - # RPC-specific configuration for `update_backtest_result` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backtest_result - ## - # RPC-specific configuration for `export_backtest_result_metadata` - # @return [::Gapic::Config::Method] - # - attr_reader :export_backtest_result_metadata - ## - # RPC-specific configuration for `delete_backtest_result` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backtest_result - - # @private - def initialize parent_rpcs = nil - list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances - @list_instances = ::Gapic::Config::Method.new list_instances_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance - @create_instance = ::Gapic::Config::Method.new create_instance_config - update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance - @update_instance = ::Gapic::Config::Method.new update_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - import_registered_parties_config = parent_rpcs.import_registered_parties if parent_rpcs.respond_to? :import_registered_parties - @import_registered_parties = ::Gapic::Config::Method.new import_registered_parties_config - export_registered_parties_config = parent_rpcs.export_registered_parties if parent_rpcs.respond_to? :export_registered_parties - @export_registered_parties = ::Gapic::Config::Method.new export_registered_parties_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset - @update_dataset = ::Gapic::Config::Method.new update_dataset_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models - @list_models = ::Gapic::Config::Method.new list_models_config - get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model - @get_model = ::Gapic::Config::Method.new get_model_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_config - update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model - @update_model = ::Gapic::Config::Method.new update_model_config - export_model_metadata_config = parent_rpcs.export_model_metadata if parent_rpcs.respond_to? :export_model_metadata - @export_model_metadata = ::Gapic::Config::Method.new export_model_metadata_config - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - list_engine_configs_config = parent_rpcs.list_engine_configs if parent_rpcs.respond_to? :list_engine_configs - @list_engine_configs = ::Gapic::Config::Method.new list_engine_configs_config - get_engine_config_config = parent_rpcs.get_engine_config if parent_rpcs.respond_to? :get_engine_config - @get_engine_config = ::Gapic::Config::Method.new get_engine_config_config - create_engine_config_config = parent_rpcs.create_engine_config if parent_rpcs.respond_to? :create_engine_config - @create_engine_config = ::Gapic::Config::Method.new create_engine_config_config - update_engine_config_config = parent_rpcs.update_engine_config if parent_rpcs.respond_to? :update_engine_config - @update_engine_config = ::Gapic::Config::Method.new update_engine_config_config - export_engine_config_metadata_config = parent_rpcs.export_engine_config_metadata if parent_rpcs.respond_to? :export_engine_config_metadata - @export_engine_config_metadata = ::Gapic::Config::Method.new export_engine_config_metadata_config - delete_engine_config_config = parent_rpcs.delete_engine_config if parent_rpcs.respond_to? :delete_engine_config - @delete_engine_config = ::Gapic::Config::Method.new delete_engine_config_config - get_engine_version_config = parent_rpcs.get_engine_version if parent_rpcs.respond_to? :get_engine_version - @get_engine_version = ::Gapic::Config::Method.new get_engine_version_config - list_engine_versions_config = parent_rpcs.list_engine_versions if parent_rpcs.respond_to? :list_engine_versions - @list_engine_versions = ::Gapic::Config::Method.new list_engine_versions_config - list_prediction_results_config = parent_rpcs.list_prediction_results if parent_rpcs.respond_to? :list_prediction_results - @list_prediction_results = ::Gapic::Config::Method.new list_prediction_results_config - get_prediction_result_config = parent_rpcs.get_prediction_result if parent_rpcs.respond_to? :get_prediction_result - @get_prediction_result = ::Gapic::Config::Method.new get_prediction_result_config - create_prediction_result_config = parent_rpcs.create_prediction_result if parent_rpcs.respond_to? :create_prediction_result - @create_prediction_result = ::Gapic::Config::Method.new create_prediction_result_config - update_prediction_result_config = parent_rpcs.update_prediction_result if parent_rpcs.respond_to? :update_prediction_result - @update_prediction_result = ::Gapic::Config::Method.new update_prediction_result_config - export_prediction_result_metadata_config = parent_rpcs.export_prediction_result_metadata if parent_rpcs.respond_to? :export_prediction_result_metadata - @export_prediction_result_metadata = ::Gapic::Config::Method.new export_prediction_result_metadata_config - delete_prediction_result_config = parent_rpcs.delete_prediction_result if parent_rpcs.respond_to? :delete_prediction_result - @delete_prediction_result = ::Gapic::Config::Method.new delete_prediction_result_config - list_backtest_results_config = parent_rpcs.list_backtest_results if parent_rpcs.respond_to? :list_backtest_results - @list_backtest_results = ::Gapic::Config::Method.new list_backtest_results_config - get_backtest_result_config = parent_rpcs.get_backtest_result if parent_rpcs.respond_to? :get_backtest_result - @get_backtest_result = ::Gapic::Config::Method.new get_backtest_result_config - create_backtest_result_config = parent_rpcs.create_backtest_result if parent_rpcs.respond_to? :create_backtest_result - @create_backtest_result = ::Gapic::Config::Method.new create_backtest_result_config - update_backtest_result_config = parent_rpcs.update_backtest_result if parent_rpcs.respond_to? :update_backtest_result - @update_backtest_result = ::Gapic::Config::Method.new update_backtest_result_config - export_backtest_result_metadata_config = parent_rpcs.export_backtest_result_metadata if parent_rpcs.respond_to? :export_backtest_result_metadata - @export_backtest_result_metadata = ::Gapic::Config::Method.new export_backtest_result_metadata_config - delete_backtest_result_config = parent_rpcs.delete_backtest_result if parent_rpcs.respond_to? :delete_backtest_result - @delete_backtest_result = ::Gapic::Config::Method.new delete_backtest_result_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/credentials.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/credentials.rb deleted file mode 100644 index eff44d9363a6..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/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 FinancialServices - module V1 - module AML - # Credentials for the AML 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-financial_services-v1/lib/google/cloud/financial_services/v1/aml/operations.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/operations.rb deleted file mode 100644 index 401594313496..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/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 FinancialServices - module V1 - module AML - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "financialservices.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AML 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 AML 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::FinancialServices::V1::VERSION - metadata[:"x-goog-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::FinancialServices::V1::VERSION - metadata[:"x-goog-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::FinancialServices::V1::VERSION - metadata[:"x-goog-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::FinancialServices::V1::VERSION - metadata[:"x-goog-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::FinancialServices::V1::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 = "financialservices.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-financial_services-v1/lib/google/cloud/financial_services/v1/aml/paths.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/paths.rb deleted file mode 100644 index aa766eab06fa..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/paths.rb +++ /dev/null @@ -1,195 +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 FinancialServices - module V1 - module AML - # Path helper methods for the AML API. - module Paths - ## - # Create a fully-qualified BacktestResult resource string. - # - # The resource will be in the following format: - # - # `projects/{project_num}/locations/{location}/instances/{instance}/backtestResults/{backtest_result}` - # - # @param project_num [String] - # @param location [String] - # @param instance [String] - # @param backtest_result [String] - # - # @return [::String] - def backtest_result_path project_num:, location:, instance:, backtest_result: - raise ::ArgumentError, "project_num cannot contain /" if project_num.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project_num}/locations/#{location}/instances/#{instance}/backtestResults/#{backtest_result}" - end - - ## - # Create a fully-qualified Dataset resource string. - # - # The resource will be in the following format: - # - # `projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}` - # - # @param project_num [String] - # @param location [String] - # @param instance [String] - # @param dataset [String] - # - # @return [::String] - def dataset_path project_num:, location:, instance:, dataset: - raise ::ArgumentError, "project_num cannot contain /" if project_num.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project_num}/locations/#{location}/instances/#{instance}/datasets/#{dataset}" - end - - ## - # Create a fully-qualified EngineConfig resource string. - # - # The resource will be in the following format: - # - # `projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engine_config}` - # - # @param project_num [String] - # @param location [String] - # @param instance [String] - # @param engine_config [String] - # - # @return [::String] - def engine_config_path project_num:, location:, instance:, engine_config: - raise ::ArgumentError, "project_num cannot contain /" if project_num.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project_num}/locations/#{location}/instances/#{instance}/engineConfigs/#{engine_config}" - end - - ## - # Create a fully-qualified EngineVersion resource string. - # - # The resource will be in the following format: - # - # `projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}` - # - # @param project_num [String] - # @param location [String] - # @param instance [String] - # @param engine_version [String] - # - # @return [::String] - def engine_version_path project_num:, location:, instance:, engine_version: - raise ::ArgumentError, "project_num cannot contain /" if project_num.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project_num}/locations/#{location}/instances/#{instance}/engineVersions/#{engine_version}" - end - - ## - # Create a fully-qualified Instance resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/instances/{instance}` - # - # @param project [String] - # @param location [String] - # @param instance [String] - # - # @return [::String] - def instance_path project:, location:, instance: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/instances/#{instance}" - 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 Model resource string. - # - # The resource will be in the following format: - # - # `projects/{project_num}/locations/{location}/instances/{instance}/models/{model}` - # - # @param project_num [String] - # @param location [String] - # @param instance [String] - # @param model [String] - # - # @return [::String] - def model_path project_num:, location:, instance:, model: - raise ::ArgumentError, "project_num cannot contain /" if project_num.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project_num}/locations/#{location}/instances/#{instance}/models/#{model}" - end - - ## - # Create a fully-qualified PredictionResult resource string. - # - # The resource will be in the following format: - # - # `projects/{project_num}/locations/{location}/instances/{instance}/predictionResults/{prediction_result}` - # - # @param project_num [String] - # @param location [String] - # @param instance [String] - # @param prediction_result [String] - # - # @return [::String] - def prediction_result_path project_num:, location:, instance:, prediction_result: - raise ::ArgumentError, "project_num cannot contain /" if project_num.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "instance cannot contain /" if instance.to_s.include? "/" - - "projects/#{project_num}/locations/#{location}/instances/#{instance}/predictionResults/#{prediction_result}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest.rb deleted file mode 100644 index 22d348f5112f..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/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/financial_services/v1/version" -require "google/cloud/financial_services/v1/bindings_override" - -require "google/cloud/financial_services/v1/aml/credentials" -require "google/cloud/financial_services/v1/aml/paths" -require "google/cloud/financial_services/v1/aml/rest/operations" -require "google/cloud/financial_services/v1/aml/rest/client" - -module Google - module Cloud - module FinancialServices - module V1 - ## - # The AML (Anti Money Laundering) service allows users to perform REST - # operations on aml. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/financial_services/v1/aml/rest" - # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - module AML - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/financial_services/v1/aml/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/client.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/client.rb deleted file mode 100644 index 6d299f9ec841..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/client.rb +++ /dev/null @@ -1,4403 +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/financialservices/v1/service_pb" -require "google/cloud/financial_services/v1/aml/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module FinancialServices - module V1 - module AML - module Rest - ## - # REST client for the AML service. - # - # The AML (Anti Money Laundering) service allows users to perform REST - # operations on aml. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "financialservices.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :aml_stub - - ## - # Configure the AML Client class. - # - # See {::Google::Cloud::FinancialServices::V1::AML::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all AML clients - # ::Google::Cloud::FinancialServices::V1::AML::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", "FinancialServices", "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.list_instances.timeout = 10.0 - - default_config.rpcs.get_instance.timeout = 10.0 - - default_config.rpcs.create_instance.timeout = 120.0 - - default_config.rpcs.update_instance.timeout = 120.0 - - default_config.rpcs.delete_instance.timeout = 120.0 - - default_config.rpcs.import_registered_parties.timeout = 120.0 - - default_config.rpcs.export_registered_parties.timeout = 120.0 - - default_config.rpcs.list_datasets.timeout = 10.0 - - default_config.rpcs.get_dataset.timeout = 10.0 - - default_config.rpcs.create_dataset.timeout = 120.0 - - default_config.rpcs.update_dataset.timeout = 120.0 - - default_config.rpcs.delete_dataset.timeout = 120.0 - - default_config.rpcs.list_models.timeout = 10.0 - - default_config.rpcs.get_model.timeout = 10.0 - - default_config.rpcs.create_model.timeout = 120.0 - - default_config.rpcs.update_model.timeout = 120.0 - - default_config.rpcs.export_model_metadata.timeout = 120.0 - - default_config.rpcs.delete_model.timeout = 120.0 - - default_config.rpcs.list_engine_configs.timeout = 10.0 - - default_config.rpcs.get_engine_config.timeout = 10.0 - - default_config.rpcs.update_engine_config.timeout = 120.0 - - default_config.rpcs.export_engine_config_metadata.timeout = 120.0 - - default_config.rpcs.delete_engine_config.timeout = 120.0 - - default_config.rpcs.get_engine_version.timeout = 10.0 - - default_config.rpcs.list_engine_versions.timeout = 10.0 - - default_config.rpcs.list_prediction_results.timeout = 10.0 - - default_config.rpcs.get_prediction_result.timeout = 10.0 - - default_config.rpcs.create_prediction_result.timeout = 120.0 - - default_config.rpcs.update_prediction_result.timeout = 120.0 - - default_config.rpcs.export_prediction_result_metadata.timeout = 120.0 - - default_config.rpcs.delete_prediction_result.timeout = 120.0 - - default_config.rpcs.list_backtest_results.timeout = 10.0 - - default_config.rpcs.get_backtest_result.timeout = 10.0 - - default_config.rpcs.create_backtest_result.timeout = 120.0 - - default_config.rpcs.update_backtest_result.timeout = 120.0 - - default_config.rpcs.export_backtest_result_metadata.timeout = 120.0 - - default_config.rpcs.delete_backtest_result.timeout = 120.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the AML 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::FinancialServices::V1::AML::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 - @aml_stub.universe_domain - end - - ## - # Create a new AML REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the AML 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::FinancialServices::V1::AML::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 - - @aml_stub = ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @aml_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 = @aml_stub.endpoint - config.universe_domain = @aml_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @aml_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::FinancialServices::V1::AML::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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @aml_stub.logger - end - - # Service calls - - ## - # Lists instances. - # - # @overload list_instances(request, options = nil) - # Pass arguments to `list_instances` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListInstancesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListInstancesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_instances(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_instances` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the Instance is the location for that Instance. - # Every location has exactly one instance. - # @param page_size [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @param page_token [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListInstancesResponse. It should be copied here to retrieve the - # next page of resources. This will be empty for the first instance of - # ListInstancesRequest. - # @param filter [::String] - # Specify a filter to narrow search results. - # @param order_by [::String] - # Specify a field to use for ordering. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Instance>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListInstancesRequest.new - # - # # Call the list_instances method. - # result = client.list_instances request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::FinancialServices::V1::Instance. - # p item - # end - # - def list_instances request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListInstancesRequest - - # Converts hash and nil to an 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_instances.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_instances.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_instances.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.list_instances request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_instances, "instances", 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 instance. - # - # @overload get_instance(request, options = nil) - # Pass arguments to `get_instance` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_instance(name: nil) - # Pass arguments to `get_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Instance. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::Instance] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetInstanceRequest.new - # - # # Call the get_instance method. - # result = client.get_instance request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::Instance. - # p result - # - def get_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetInstanceRequest - - # Converts hash and nil to an 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.get_instance 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 instance. - # - # @overload create_instance(request, options = nil) - # Pass arguments to `create_instance` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::CreateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::CreateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_instance(parent: nil, instance_id: nil, instance: nil, request_id: nil) - # Pass arguments to `create_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the Instance is the location for that Instance. - # Every location has exactly one instance. - # @param instance_id [::String] - # Required. The resource id of the instance. - # @param instance [::Google::Cloud::FinancialServices::V1::Instance, ::Hash] - # Required. The instance that will be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new - # - # # Call the create_instance method. - # result = client.create_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest - - # Converts hash and nil to an 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.create_instance 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 the parameters of a single Instance. - # - # @overload update_instance(request, options = nil) - # Pass arguments to `update_instance` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_instance(update_mask: nil, instance: nil, request_id: nil) - # Pass arguments to `update_instance` via keyword arguments. Note that at - # least one keyword argument is 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] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Instance resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param instance [::Google::Cloud::FinancialServices::V1::Instance, ::Hash] - # Required. The new value of the instance fields that will be updated - # according to the update_mask - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new - # - # # Call the update_instance method. - # result = client.update_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest - - # Converts hash and nil to an 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.update_instance 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 instance. - # - # @overload delete_instance(request, options = nil) - # Pass arguments to `delete_instance` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_instance(name: nil, request_id: nil) - # Pass arguments to `delete_instance` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Instance. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new - # - # # Call the delete_instance method. - # result = client.delete_instance request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_instance request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest - - # Converts hash and nil to an 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_instance.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_instance.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_instance.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.delete_instance 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 - - ## - # Imports the list of registered parties. See - # [Create and manage - # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#import-registered-parties) - # for information on the input schema and response for this method. - # - # @overload import_registered_parties(request, options = nil) - # Pass arguments to `import_registered_parties` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_registered_parties(name: nil, party_tables: nil, mode: nil, validate_only: nil, line_of_business: nil) - # Pass arguments to `import_registered_parties` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The full path to the Instance resource in this API. - # format: `projects/{project}/locations/{location}/instances/{instance}` - # @param party_tables [::Array<::String>] - # Optional. List of BigQuery tables. Union of tables will be taken if there - # is more than one table. VPC-SC restrictions apply. format: - # `bq://{project}.{bqDatasetID}.{bqTableID}` Use of `datasets` is preferred - # over the latter due to its simplicity and the reduced risk of errors - # `party_tables` and `datasets` must not be provided at the - # same time - # @param mode [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest::UpdateMode] - # Required. Mode of the request. - # @param validate_only [::Boolean] - # Optional. If the request will not register the parties, just determine what - # would happen. - # @param line_of_business [::Google::Cloud::FinancialServices::V1::LineOfBusiness] - # Required. LineOfBusiness for the specified registered parties. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new - # - # # Call the import_registered_parties method. - # result = client.import_registered_parties request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_registered_parties request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_registered_parties.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.import_registered_parties.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_registered_parties.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.import_registered_parties 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 - - ## - # Exports the list of registered parties. See - # [Create and manage - # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#export-registered-parties) - # for information on the output schema for this method. - # - # @overload export_registered_parties(request, options = nil) - # Pass arguments to `export_registered_parties` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_registered_parties(name: nil, dataset: nil, line_of_business: nil) - # Pass arguments to `export_registered_parties` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The full path to the Instance resource in this API. - # format: `projects/{project}/locations/{location}/instances/{instance}` - # @param dataset [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] - # Required. The location to output the RegisteredParties. - # @param line_of_business [::Google::Cloud::FinancialServices::V1::LineOfBusiness] - # Required. LineOfBusiness to get RegisteredParties from. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new - # - # # Call the export_registered_parties method. - # result = client.export_registered_parties request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_registered_parties request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_registered_parties.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_registered_parties.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_registered_parties.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.export_registered_parties 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 datasets. - # - # @overload list_datasets(request, options = nil) - # Pass arguments to `list_datasets` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListDatasetsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListDatasetsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_datasets(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_datasets` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the Dataset is the Instance. - # @param page_size [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @param page_token [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListDatasetResponse. It should be copied here to retrieve the - # next page of resources. Empty will give the first page of - # ListDatasetRequest, and the last page will return an empty page_token. - # @param filter [::String] - # Specify a filter to narrow search results. - # @param order_by [::String] - # Specify a field to use for ordering. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Dataset>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListDatasetsRequest.new - # - # # Call the list_datasets method. - # result = client.list_datasets request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::FinancialServices::V1::Dataset. - # p item - # end - # - def list_datasets request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest - - # Converts hash and nil to an 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_datasets.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_datasets.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_datasets.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.list_datasets request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_datasets, "datasets", 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 a dataset. - # - # @overload get_dataset(request, options = nil) - # Pass arguments to `get_dataset` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_dataset(name: nil) - # Pass arguments to `get_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Dataset - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::Dataset] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetDatasetRequest.new - # - # # Call the get_dataset method. - # result = client.get_dataset request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::Dataset. - # p result - # - def get_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetDatasetRequest - - # Converts hash and nil to an 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.get_dataset 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 dataset. - # - # @overload create_dataset(request, options = nil) - # Pass arguments to `create_dataset` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::CreateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::CreateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dataset(parent: nil, dataset_id: nil, dataset: nil, request_id: nil) - # Pass arguments to `create_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the Dataset is the Instance. - # @param dataset_id [::String] - # Required. The resource id of the dataset - # @param dataset [::Google::Cloud::FinancialServices::V1::Dataset, ::Hash] - # Required. The dataset that will be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new - # - # # Call the create_dataset method. - # result = client.create_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest - - # Converts hash and nil to an 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.create_dataset 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 the parameters of a single Dataset. - # - # @overload update_dataset(request, options = nil) - # Pass arguments to `update_dataset` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_dataset(update_mask: nil, dataset: nil, request_id: nil) - # Pass arguments to `update_dataset` via keyword arguments. Note that at - # least one keyword argument is 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] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Dataset resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param dataset [::Google::Cloud::FinancialServices::V1::Dataset, ::Hash] - # Required. The new value of the dataset fields that will be updated - # according to the update_mask. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new - # - # # Call the update_dataset method. - # result = client.update_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest - - # Converts hash and nil to an 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.update_dataset 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 dataset. - # - # @overload delete_dataset(request, options = nil) - # Pass arguments to `delete_dataset` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_dataset(name: nil, request_id: nil) - # Pass arguments to `delete_dataset` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Dataset. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new - # - # # Call the delete_dataset method. - # result = client.delete_dataset request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_dataset request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest - - # Converts hash and nil to an 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_dataset.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_dataset.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_dataset.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.delete_dataset 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 models. - # - # @overload list_models(request, options = nil) - # Pass arguments to `list_models` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListModelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListModelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_models(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_models` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the Model is the Instance. - # @param page_size [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @param page_token [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListModelsResponse. It should be copied here to retrieve the next - # page of resources. Empty will give the first page of ListModelsRequest, and - # the last page will return an empty page_token. - # @param filter [::String] - # Specify a filter to narrow search results. - # @param order_by [::String] - # Specify a field to use for ordering. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::Model>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListModelsRequest.new - # - # # Call the list_models method. - # result = client.list_models request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::FinancialServices::V1::Model. - # p item - # end - # - def list_models request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListModelsRequest - - # Converts hash and nil to an 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_models.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_models.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_models.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.list_models request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_models, "models", 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 a model. - # - # @overload get_model(request, options = nil) - # Pass arguments to `get_model` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_model(name: nil) - # Pass arguments to `get_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Model - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::Model] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetModelRequest.new - # - # # Call the get_model method. - # result = client.get_model request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::Model. - # p result - # - def get_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetModelRequest - - # Converts hash and nil to an 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.get_model 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 model. - # - # @overload create_model(request, options = nil) - # Pass arguments to `create_model` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::CreateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::CreateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_model(parent: nil, model_id: nil, model: nil, request_id: nil) - # Pass arguments to `create_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the Model is the Instance. - # @param model_id [::String] - # Required. The resource id of the Model - # @param model [::Google::Cloud::FinancialServices::V1::Model, ::Hash] - # Required. The Model that will be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::CreateModelRequest.new - # - # # Call the create_model method. - # result = client.create_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateModelRequest - - # Converts hash and nil to an 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.create_model 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 the parameters of a single Model. - # - # @overload update_model(request, options = nil) - # Pass arguments to `update_model` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::UpdateModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::UpdateModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_model(update_mask: nil, model: nil, request_id: nil) - # Pass arguments to `update_model` via keyword arguments. Note that at - # least one keyword argument is 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] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Model resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param model [::Google::Cloud::FinancialServices::V1::Model, ::Hash] - # Required. The new value of the Model fields that will be updated according - # to the update_mask. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::UpdateModelRequest.new - # - # # Call the update_model method. - # result = client.update_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateModelRequest - - # Converts hash and nil to an 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.update_model 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 - - ## - # Export governance information for a Model resource. For - # information on the exported fields, see - # [AML output data - # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#model). - # - # @overload export_model_metadata(request, options = nil) - # Pass arguments to `export_model_metadata` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_model_metadata(model: nil, structured_metadata_destination: nil) - # Pass arguments to `export_model_metadata` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param model [::String] - # Required. The resource name of the Model. - # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] - # Required. BigQuery output where the metadata will be written. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new - # - # # Call the export_model_metadata method. - # result = client.export_model_metadata request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_model_metadata request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_model_metadata.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_model_metadata.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_model_metadata.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.export_model_metadata 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 model. - # - # @overload delete_model(request, options = nil) - # Pass arguments to `delete_model` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::DeleteModelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::DeleteModelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_model(name: nil, request_id: nil) - # Pass arguments to `delete_model` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Model. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::DeleteModelRequest.new - # - # # Call the delete_model method. - # result = client.delete_model request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_model request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteModelRequest - - # Converts hash and nil to an 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_model.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_model.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_model.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.delete_model 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 engine configs. - # - # @overload list_engine_configs(request, options = nil) - # Pass arguments to `list_engine_configs` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_engine_configs(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_engine_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 parent of the EngineConfig is the Instance. - # @param page_size [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @param page_token [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListEngineConfigsResponse. It should be copied here to retrieve - # the next page of resources. Empty will give the first page of - # ListEngineConfigsRequest, and the last page will return an empty - # page_token. - # @param filter [::String] - # Specify a filter to narrow search results. - # @param order_by [::String] - # Specify a field to use for ordering. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineConfig>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.new - # - # # Call the list_engine_configs method. - # result = client.list_engine_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::FinancialServices::V1::EngineConfig. - # p item - # end - # - def list_engine_configs request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest - - # Converts hash and nil to an 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_engine_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::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_engine_configs.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_engine_configs.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.list_engine_configs request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_engine_configs, "engine_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 - - ## - # Gets an engine config. - # - # @overload get_engine_config(request, options = nil) - # Pass arguments to `get_engine_config` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_engine_config(name: nil) - # Pass arguments to `get_engine_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 resource name of the EngineConfig - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::EngineConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::EngineConfig] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new - # - # # Call the get_engine_config method. - # result = client.get_engine_config request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::EngineConfig. - # p result - # - def get_engine_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest - - # Converts hash and nil to an 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_engine_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::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_engine_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_engine_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.get_engine_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 - - ## - # Creates an engine config. - # - # @overload create_engine_config(request, options = nil) - # Pass arguments to `create_engine_config` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_engine_config(parent: nil, engine_config_id: nil, engine_config: nil, request_id: nil) - # Pass arguments to `create_engine_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 parent of the EngineConfig is the Instance. - # @param engine_config_id [::String] - # Required. The resource id of the EngineConfig - # @param engine_config [::Google::Cloud::FinancialServices::V1::EngineConfig, ::Hash] - # Required. The EngineConfig that will be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new - # - # # Call the create_engine_config method. - # result = client.create_engine_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_engine_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest - - # Converts hash and nil to an 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_engine_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::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_engine_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_engine_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.create_engine_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 - - ## - # Updates the parameters of a single EngineConfig. - # - # @overload update_engine_config(request, options = nil) - # Pass arguments to `update_engine_config` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_engine_config(update_mask: nil, engine_config: nil, request_id: nil) - # Pass arguments to `update_engine_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. Field mask is used to specify the fields to be overwritten in the - # EngineConfig resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param engine_config [::Google::Cloud::FinancialServices::V1::EngineConfig, ::Hash] - # Required. The new value of the EngineConfig fields that will be updated - # according to the update_mask. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new - # - # # Call the update_engine_config method. - # result = client.update_engine_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_engine_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest - - # Converts hash and nil to an 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_engine_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::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_engine_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_engine_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.update_engine_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 - - ## - # Export governance information for an EngineConfig resource. For - # information on the exported fields, see - # [AML output data - # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#engine-config). - # - # @overload export_engine_config_metadata(request, options = nil) - # Pass arguments to `export_engine_config_metadata` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_engine_config_metadata(engine_config: nil, structured_metadata_destination: nil) - # Pass arguments to `export_engine_config_metadata` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param engine_config [::String] - # Required. The resource name of the EngineConfig. - # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] - # Required. BigQuery output where the metadata will be written. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new - # - # # Call the export_engine_config_metadata method. - # result = client.export_engine_config_metadata request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_engine_config_metadata request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_engine_config_metadata.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_engine_config_metadata.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_engine_config_metadata.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.export_engine_config_metadata 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 engine config. - # - # @overload delete_engine_config(request, options = nil) - # Pass arguments to `delete_engine_config` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_engine_config(name: nil, request_id: nil) - # Pass arguments to `delete_engine_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 resource name of the EngineConfig. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new - # - # # Call the delete_engine_config method. - # result = client.delete_engine_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_engine_config request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest - - # Converts hash and nil to an 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_engine_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::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_engine_config.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_engine_config.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.delete_engine_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 - - ## - # Gets a single EngineVersion. - # - # @overload get_engine_version(request, options = nil) - # Pass arguments to `get_engine_version` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_engine_version(name: nil) - # Pass arguments to `get_engine_version` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the EngineVersion - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::EngineVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::EngineVersion] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new - # - # # Call the get_engine_version method. - # result = client.get_engine_version request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::EngineVersion. - # p result - # - def get_engine_version request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest - - # Converts hash and nil to an 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_engine_version.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_engine_version.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_engine_version.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.get_engine_version 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 EngineVersions for given location. - # - # @overload list_engine_versions(request, options = nil) - # Pass arguments to `list_engine_versions` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_engine_versions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_engine_versions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the EngineVersion is the Instance. - # @param page_size [::Integer] - # Optional. The number of resources to be included in the response. The - # response contains a next_page_token, which can be used to retrieve the next - # page of resources. - # @param page_token [::String] - # Optional. In case of paginated results, this is the token that was returned - # in the previous ListEngineVersionsResponse. It should be copied here to - # retrieve the next page of resources. Empty will give the first page of - # ListEngineVersionsRequest, and the last page will return an empty - # page_token. - # @param filter [::String] - # Optional. Specify a filter to narrow search results. - # If empty or unset will default to "state!=DEPRECATED", - # to view deprecated versions use "state:*" or any other filter. - # @param order_by [::String] - # Optional. Specify a field to use for ordering. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::EngineVersion>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.new - # - # # Call the list_engine_versions method. - # result = client.list_engine_versions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::FinancialServices::V1::EngineVersion. - # p item - # end - # - def list_engine_versions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest - - # Converts hash and nil to an 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_engine_versions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_engine_versions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_engine_versions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.list_engine_versions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_engine_versions, "engine_versions", 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 - - ## - # List PredictionResults. - # - # @overload list_prediction_results(request, options = nil) - # Pass arguments to `list_prediction_results` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_prediction_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_prediction_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the PredictionResult is the Instance. - # @param page_size [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @param page_token [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListPredictionResultsResponse. It should be copied here to - # retrieve the next page of resources. Empty will give the first page of - # ListPredictionResultsRequest, and the last page will return an empty - # page_token. - # @param filter [::String] - # Specify a filter to narrow search results. - # @param order_by [::String] - # Specify a field to use for ordering. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::PredictionResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.new - # - # # Call the list_prediction_results method. - # result = client.list_prediction_results request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::FinancialServices::V1::PredictionResult. - # p item - # end - # - def list_prediction_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest - - # Converts hash and nil to an 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_prediction_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_prediction_results.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_prediction_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.list_prediction_results request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_prediction_results, "prediction_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 - - ## - # Gets a PredictionResult. - # - # @overload get_prediction_result(request, options = nil) - # Pass arguments to `get_prediction_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_prediction_result(name: nil) - # Pass arguments to `get_prediction_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the PredictionResult - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::PredictionResult] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::PredictionResult] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new - # - # # Call the get_prediction_result method. - # result = client.get_prediction_result request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::PredictionResult. - # p result - # - def get_prediction_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest - - # Converts hash and nil to an 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_prediction_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_prediction_result.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_prediction_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.get_prediction_result 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 PredictionResult. - # - # @overload create_prediction_result(request, options = nil) - # Pass arguments to `create_prediction_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_prediction_result(parent: nil, prediction_result_id: nil, prediction_result: nil, request_id: nil) - # Pass arguments to `create_prediction_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the PredictionResult is the Instance. - # @param prediction_result_id [::String] - # Required. The resource id of the PredictionResult - # @param prediction_result [::Google::Cloud::FinancialServices::V1::PredictionResult, ::Hash] - # Required. The PredictionResult that will be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new - # - # # Call the create_prediction_result method. - # result = client.create_prediction_result request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_prediction_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest - - # Converts hash and nil to an 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_prediction_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_prediction_result.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_prediction_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.create_prediction_result 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 the parameters of a single PredictionResult. - # - # @overload update_prediction_result(request, options = nil) - # Pass arguments to `update_prediction_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_prediction_result(update_mask: nil, prediction_result: nil, request_id: nil) - # Pass arguments to `update_prediction_result` via keyword arguments. Note that at - # least one keyword argument is 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] - # Optional. Field mask is used to specify the fields to be overwritten in the - # PredictionResult resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param prediction_result [::Google::Cloud::FinancialServices::V1::PredictionResult, ::Hash] - # Required. The new value of the PredictionResult fields that will be updated - # according to the update_mask. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new - # - # # Call the update_prediction_result method. - # result = client.update_prediction_result request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_prediction_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest - - # Converts hash and nil to an 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_prediction_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_prediction_result.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_prediction_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.update_prediction_result 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 - - ## - # Export governance information for a PredictionResult resource. For - # information on the exported fields, see - # [AML output data - # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#prediction-results). - # - # @overload export_prediction_result_metadata(request, options = nil) - # Pass arguments to `export_prediction_result_metadata` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_prediction_result_metadata(prediction_result: nil, structured_metadata_destination: nil) - # Pass arguments to `export_prediction_result_metadata` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param prediction_result [::String] - # Required. The resource name of the PredictionResult. - # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] - # Required. BigQuery output where the metadata will be written. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new - # - # # Call the export_prediction_result_metadata method. - # result = client.export_prediction_result_metadata request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_prediction_result_metadata request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_prediction_result_metadata.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_prediction_result_metadata.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_prediction_result_metadata.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.export_prediction_result_metadata 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 PredictionResult. - # - # @overload delete_prediction_result(request, options = nil) - # Pass arguments to `delete_prediction_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_prediction_result(name: nil, request_id: nil) - # Pass arguments to `delete_prediction_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the PredictionResult. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new - # - # # Call the delete_prediction_result method. - # result = client.delete_prediction_result request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_prediction_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest - - # Converts hash and nil to an 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_prediction_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_prediction_result.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_prediction_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.delete_prediction_result 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 BacktestResults. - # - # @overload list_backtest_results(request, options = nil) - # Pass arguments to `list_backtest_results` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backtest_results(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backtest_results` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the BacktestResult is the Instance. - # @param page_size [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @param page_token [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListBacktestResultsResponse. It should be copied here to - # retrieve the next page of resources. Empty will give the first page of - # ListBacktestResultsRequest, and the last page will return an empty - # page_token. - # @param filter [::String] - # Specify a filter to narrow search results. - # @param order_by [::String] - # Specify a field to use for ordering. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::FinancialServices::V1::BacktestResult>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.new - # - # # Call the list_backtest_results method. - # result = client.list_backtest_results request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::FinancialServices::V1::BacktestResult. - # p item - # end - # - def list_backtest_results request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest - - # Converts hash and nil to an 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_backtest_results.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backtest_results.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backtest_results.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.list_backtest_results request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @aml_stub, :list_backtest_results, "backtest_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 - - ## - # Gets a BacktestResult. - # - # @overload get_backtest_result(request, options = nil) - # Pass arguments to `get_backtest_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backtest_result(name: nil) - # Pass arguments to `get_backtest_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the BacktestResult - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::BacktestResult] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::BacktestResult] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new - # - # # Call the get_backtest_result method. - # result = client.get_backtest_result request - # - # # The returned object is of type Google::Cloud::FinancialServices::V1::BacktestResult. - # p result - # - def get_backtest_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest - - # Converts hash and nil to an 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_backtest_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backtest_result.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backtest_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.get_backtest_result 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 BacktestResult. - # - # @overload create_backtest_result(request, options = nil) - # Pass arguments to `create_backtest_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backtest_result(parent: nil, backtest_result_id: nil, backtest_result: nil, request_id: nil) - # Pass arguments to `create_backtest_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 of the BacktestResult is the Instance. - # @param backtest_result_id [::String] - # Required. The resource id of the BacktestResult - # @param backtest_result [::Google::Cloud::FinancialServices::V1::BacktestResult, ::Hash] - # Required. The BacktestResult that will be created. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new - # - # # Call the create_backtest_result method. - # result = client.create_backtest_result request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backtest_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest - - # Converts hash and nil to an 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_backtest_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backtest_result.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backtest_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.create_backtest_result 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 the parameters of a single BacktestResult. - # - # @overload update_backtest_result(request, options = nil) - # Pass arguments to `update_backtest_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backtest_result(update_mask: nil, backtest_result: nil, request_id: nil) - # Pass arguments to `update_backtest_result` via keyword arguments. Note that at - # least one keyword argument is 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] - # Optional. Field mask is used to specify the fields to be overwritten in the - # BacktestResult resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @param backtest_result [::Google::Cloud::FinancialServices::V1::BacktestResult, ::Hash] - # Required. The new value of the BacktestResult fields that will be updated - # according to the update_mask. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new - # - # # Call the update_backtest_result method. - # result = client.update_backtest_result request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backtest_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest - - # Converts hash and nil to an 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_backtest_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backtest_result.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backtest_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.update_backtest_result 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 - - ## - # Export governance information for a BacktestResult resource. For - # information on the exported fields, see - # [AML output data - # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#backtest-results). - # - # @overload export_backtest_result_metadata(request, options = nil) - # Pass arguments to `export_backtest_result_metadata` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_backtest_result_metadata(backtest_result: nil, structured_metadata_destination: nil) - # Pass arguments to `export_backtest_result_metadata` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backtest_result [::String] - # Required. The resource name of the BacktestResult. - # @param structured_metadata_destination [::Google::Cloud::FinancialServices::V1::BigQueryDestination, ::Hash] - # Required. BigQuery output where the metadata will be written. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new - # - # # Call the export_backtest_result_metadata method. - # result = client.export_backtest_result_metadata request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_backtest_result_metadata request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_backtest_result_metadata.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_backtest_result_metadata.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_backtest_result_metadata.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.export_backtest_result_metadata 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 BacktestResult. - # - # @overload delete_backtest_result(request, options = nil) - # Pass arguments to `delete_backtest_result` via a request object, either of type - # {::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backtest_result(name: nil, request_id: nil) - # Pass arguments to `delete_backtest_result` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the BacktestResult. - # @param request_id [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/financial_services/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new - # - # # Call the delete_backtest_result method. - # result = client.delete_backtest_result request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backtest_result request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest - - # Converts hash and nil to an 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_backtest_result.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backtest_result.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backtest_result.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @aml_stub.delete_backtest_result 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 AML REST API. - # - # This class represents the configuration for AML 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::FinancialServices::V1::AML::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_instances to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_instances.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 = "financialservices.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 AML 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_instances` - # @return [::Gapic::Config::Method] - # - attr_reader :list_instances - ## - # RPC-specific configuration for `get_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :get_instance - ## - # RPC-specific configuration for `create_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :create_instance - ## - # RPC-specific configuration for `update_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :update_instance - ## - # RPC-specific configuration for `delete_instance` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_instance - ## - # RPC-specific configuration for `import_registered_parties` - # @return [::Gapic::Config::Method] - # - attr_reader :import_registered_parties - ## - # RPC-specific configuration for `export_registered_parties` - # @return [::Gapic::Config::Method] - # - attr_reader :export_registered_parties - ## - # RPC-specific configuration for `list_datasets` - # @return [::Gapic::Config::Method] - # - attr_reader :list_datasets - ## - # RPC-specific configuration for `get_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :get_dataset - ## - # RPC-specific configuration for `create_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :create_dataset - ## - # RPC-specific configuration for `update_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :update_dataset - ## - # RPC-specific configuration for `delete_dataset` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_dataset - ## - # RPC-specific configuration for `list_models` - # @return [::Gapic::Config::Method] - # - attr_reader :list_models - ## - # RPC-specific configuration for `get_model` - # @return [::Gapic::Config::Method] - # - attr_reader :get_model - ## - # RPC-specific configuration for `create_model` - # @return [::Gapic::Config::Method] - # - attr_reader :create_model - ## - # RPC-specific configuration for `update_model` - # @return [::Gapic::Config::Method] - # - attr_reader :update_model - ## - # RPC-specific configuration for `export_model_metadata` - # @return [::Gapic::Config::Method] - # - attr_reader :export_model_metadata - ## - # RPC-specific configuration for `delete_model` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_model - ## - # RPC-specific configuration for `list_engine_configs` - # @return [::Gapic::Config::Method] - # - attr_reader :list_engine_configs - ## - # RPC-specific configuration for `get_engine_config` - # @return [::Gapic::Config::Method] - # - attr_reader :get_engine_config - ## - # RPC-specific configuration for `create_engine_config` - # @return [::Gapic::Config::Method] - # - attr_reader :create_engine_config - ## - # RPC-specific configuration for `update_engine_config` - # @return [::Gapic::Config::Method] - # - attr_reader :update_engine_config - ## - # RPC-specific configuration for `export_engine_config_metadata` - # @return [::Gapic::Config::Method] - # - attr_reader :export_engine_config_metadata - ## - # RPC-specific configuration for `delete_engine_config` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_engine_config - ## - # RPC-specific configuration for `get_engine_version` - # @return [::Gapic::Config::Method] - # - attr_reader :get_engine_version - ## - # RPC-specific configuration for `list_engine_versions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_engine_versions - ## - # RPC-specific configuration for `list_prediction_results` - # @return [::Gapic::Config::Method] - # - attr_reader :list_prediction_results - ## - # RPC-specific configuration for `get_prediction_result` - # @return [::Gapic::Config::Method] - # - attr_reader :get_prediction_result - ## - # RPC-specific configuration for `create_prediction_result` - # @return [::Gapic::Config::Method] - # - attr_reader :create_prediction_result - ## - # RPC-specific configuration for `update_prediction_result` - # @return [::Gapic::Config::Method] - # - attr_reader :update_prediction_result - ## - # RPC-specific configuration for `export_prediction_result_metadata` - # @return [::Gapic::Config::Method] - # - attr_reader :export_prediction_result_metadata - ## - # RPC-specific configuration for `delete_prediction_result` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_prediction_result - ## - # RPC-specific configuration for `list_backtest_results` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backtest_results - ## - # RPC-specific configuration for `get_backtest_result` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backtest_result - ## - # RPC-specific configuration for `create_backtest_result` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backtest_result - ## - # RPC-specific configuration for `update_backtest_result` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backtest_result - ## - # RPC-specific configuration for `export_backtest_result_metadata` - # @return [::Gapic::Config::Method] - # - attr_reader :export_backtest_result_metadata - ## - # RPC-specific configuration for `delete_backtest_result` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backtest_result - - # @private - def initialize parent_rpcs = nil - list_instances_config = parent_rpcs.list_instances if parent_rpcs.respond_to? :list_instances - @list_instances = ::Gapic::Config::Method.new list_instances_config - get_instance_config = parent_rpcs.get_instance if parent_rpcs.respond_to? :get_instance - @get_instance = ::Gapic::Config::Method.new get_instance_config - create_instance_config = parent_rpcs.create_instance if parent_rpcs.respond_to? :create_instance - @create_instance = ::Gapic::Config::Method.new create_instance_config - update_instance_config = parent_rpcs.update_instance if parent_rpcs.respond_to? :update_instance - @update_instance = ::Gapic::Config::Method.new update_instance_config - delete_instance_config = parent_rpcs.delete_instance if parent_rpcs.respond_to? :delete_instance - @delete_instance = ::Gapic::Config::Method.new delete_instance_config - import_registered_parties_config = parent_rpcs.import_registered_parties if parent_rpcs.respond_to? :import_registered_parties - @import_registered_parties = ::Gapic::Config::Method.new import_registered_parties_config - export_registered_parties_config = parent_rpcs.export_registered_parties if parent_rpcs.respond_to? :export_registered_parties - @export_registered_parties = ::Gapic::Config::Method.new export_registered_parties_config - list_datasets_config = parent_rpcs.list_datasets if parent_rpcs.respond_to? :list_datasets - @list_datasets = ::Gapic::Config::Method.new list_datasets_config - get_dataset_config = parent_rpcs.get_dataset if parent_rpcs.respond_to? :get_dataset - @get_dataset = ::Gapic::Config::Method.new get_dataset_config - create_dataset_config = parent_rpcs.create_dataset if parent_rpcs.respond_to? :create_dataset - @create_dataset = ::Gapic::Config::Method.new create_dataset_config - update_dataset_config = parent_rpcs.update_dataset if parent_rpcs.respond_to? :update_dataset - @update_dataset = ::Gapic::Config::Method.new update_dataset_config - delete_dataset_config = parent_rpcs.delete_dataset if parent_rpcs.respond_to? :delete_dataset - @delete_dataset = ::Gapic::Config::Method.new delete_dataset_config - list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models - @list_models = ::Gapic::Config::Method.new list_models_config - get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model - @get_model = ::Gapic::Config::Method.new get_model_config - create_model_config = parent_rpcs.create_model if parent_rpcs.respond_to? :create_model - @create_model = ::Gapic::Config::Method.new create_model_config - update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model - @update_model = ::Gapic::Config::Method.new update_model_config - export_model_metadata_config = parent_rpcs.export_model_metadata if parent_rpcs.respond_to? :export_model_metadata - @export_model_metadata = ::Gapic::Config::Method.new export_model_metadata_config - delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model - @delete_model = ::Gapic::Config::Method.new delete_model_config - list_engine_configs_config = parent_rpcs.list_engine_configs if parent_rpcs.respond_to? :list_engine_configs - @list_engine_configs = ::Gapic::Config::Method.new list_engine_configs_config - get_engine_config_config = parent_rpcs.get_engine_config if parent_rpcs.respond_to? :get_engine_config - @get_engine_config = ::Gapic::Config::Method.new get_engine_config_config - create_engine_config_config = parent_rpcs.create_engine_config if parent_rpcs.respond_to? :create_engine_config - @create_engine_config = ::Gapic::Config::Method.new create_engine_config_config - update_engine_config_config = parent_rpcs.update_engine_config if parent_rpcs.respond_to? :update_engine_config - @update_engine_config = ::Gapic::Config::Method.new update_engine_config_config - export_engine_config_metadata_config = parent_rpcs.export_engine_config_metadata if parent_rpcs.respond_to? :export_engine_config_metadata - @export_engine_config_metadata = ::Gapic::Config::Method.new export_engine_config_metadata_config - delete_engine_config_config = parent_rpcs.delete_engine_config if parent_rpcs.respond_to? :delete_engine_config - @delete_engine_config = ::Gapic::Config::Method.new delete_engine_config_config - get_engine_version_config = parent_rpcs.get_engine_version if parent_rpcs.respond_to? :get_engine_version - @get_engine_version = ::Gapic::Config::Method.new get_engine_version_config - list_engine_versions_config = parent_rpcs.list_engine_versions if parent_rpcs.respond_to? :list_engine_versions - @list_engine_versions = ::Gapic::Config::Method.new list_engine_versions_config - list_prediction_results_config = parent_rpcs.list_prediction_results if parent_rpcs.respond_to? :list_prediction_results - @list_prediction_results = ::Gapic::Config::Method.new list_prediction_results_config - get_prediction_result_config = parent_rpcs.get_prediction_result if parent_rpcs.respond_to? :get_prediction_result - @get_prediction_result = ::Gapic::Config::Method.new get_prediction_result_config - create_prediction_result_config = parent_rpcs.create_prediction_result if parent_rpcs.respond_to? :create_prediction_result - @create_prediction_result = ::Gapic::Config::Method.new create_prediction_result_config - update_prediction_result_config = parent_rpcs.update_prediction_result if parent_rpcs.respond_to? :update_prediction_result - @update_prediction_result = ::Gapic::Config::Method.new update_prediction_result_config - export_prediction_result_metadata_config = parent_rpcs.export_prediction_result_metadata if parent_rpcs.respond_to? :export_prediction_result_metadata - @export_prediction_result_metadata = ::Gapic::Config::Method.new export_prediction_result_metadata_config - delete_prediction_result_config = parent_rpcs.delete_prediction_result if parent_rpcs.respond_to? :delete_prediction_result - @delete_prediction_result = ::Gapic::Config::Method.new delete_prediction_result_config - list_backtest_results_config = parent_rpcs.list_backtest_results if parent_rpcs.respond_to? :list_backtest_results - @list_backtest_results = ::Gapic::Config::Method.new list_backtest_results_config - get_backtest_result_config = parent_rpcs.get_backtest_result if parent_rpcs.respond_to? :get_backtest_result - @get_backtest_result = ::Gapic::Config::Method.new get_backtest_result_config - create_backtest_result_config = parent_rpcs.create_backtest_result if parent_rpcs.respond_to? :create_backtest_result - @create_backtest_result = ::Gapic::Config::Method.new create_backtest_result_config - update_backtest_result_config = parent_rpcs.update_backtest_result if parent_rpcs.respond_to? :update_backtest_result - @update_backtest_result = ::Gapic::Config::Method.new update_backtest_result_config - export_backtest_result_metadata_config = parent_rpcs.export_backtest_result_metadata if parent_rpcs.respond_to? :export_backtest_result_metadata - @export_backtest_result_metadata = ::Gapic::Config::Method.new export_backtest_result_metadata_config - delete_backtest_result_config = parent_rpcs.delete_backtest_result if parent_rpcs.respond_to? :delete_backtest_result - @delete_backtest_result = ::Gapic::Config::Method.new delete_backtest_result_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/operations.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/operations.rb deleted file mode 100644 index 5e33de2276b7..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/operations.rb +++ /dev/null @@ -1,925 +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 FinancialServices - module V1 - module AML - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "financialservices.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the AML 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 AML 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::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::FinancialServices::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "financialservices.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] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/service_stub.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/service_stub.rb deleted file mode 100644 index e1e14d02b765..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/aml/rest/service_stub.rb +++ /dev/null @@ -1,2417 +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/financialservices/v1/service_pb" - -module Google - module Cloud - module FinancialServices - module V1 - module AML - module Rest - ## - # REST service stub for the AML 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 list_instances REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListInstancesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListInstancesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::ListInstancesResponse] - # A result object deserialized from the server's reply - def list_instances request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_instances_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_instances", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::ListInstancesResponse.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_instance REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::Instance] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::Instance] - # A result object deserialized from the server's reply - def get_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_instance", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::Instance.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_instance REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_instance", - 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_instance REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_instance", - 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_instance REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_instance request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_instance_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_instance", - 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 import_registered_parties REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_registered_parties request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_registered_parties_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_registered_parties", - 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 export_registered_parties REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_registered_parties request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_registered_parties_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_registered_parties", - 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_datasets REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListDatasetsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListDatasetsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::ListDatasetsResponse] - # A result object deserialized from the server's reply - def list_datasets request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_datasets_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_datasets", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::ListDatasetsResponse.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_dataset REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::Dataset] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::Dataset] - # A result object deserialized from the server's reply - def get_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dataset", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::Dataset.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_dataset REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dataset", - 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_dataset REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dataset", - 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_dataset REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_dataset request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_dataset_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_dataset", - 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_models REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListModelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListModelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::ListModelsResponse] - # A result object deserialized from the server's reply - def list_models request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_models_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_models", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::ListModelsResponse.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_model REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::Model] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::Model] - # A result object deserialized from the server's reply - def get_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_model", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::Model.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_model REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_model", - 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_model REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_model", - 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 export_model_metadata REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_model_metadata request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_model_metadata_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_model_metadata", - 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_model REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteModelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_model request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_model_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_model", - 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_engine_configs REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse] - # A result object deserialized from the server's reply - def list_engine_configs request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_engine_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_engine_configs", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse.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_engine_config REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::EngineConfig] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::EngineConfig] - # A result object deserialized from the server's reply - def get_engine_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_engine_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_engine_config", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::EngineConfig.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_engine_config REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_engine_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_engine_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_engine_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_engine_config REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_engine_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_engine_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_engine_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 export_engine_config_metadata REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_engine_config_metadata request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_engine_config_metadata_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_engine_config_metadata", - 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_engine_config REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_engine_config request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_engine_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_engine_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 get_engine_version REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::EngineVersion] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::EngineVersion] - # A result object deserialized from the server's reply - def get_engine_version request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_engine_version_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_engine_version", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::EngineVersion.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_engine_versions REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse] - # A result object deserialized from the server's reply - def list_engine_versions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_engine_versions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_engine_versions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse.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_prediction_results REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse] - # A result object deserialized from the server's reply - def list_prediction_results request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_prediction_results_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_prediction_results", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse.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_prediction_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::PredictionResult] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::PredictionResult] - # A result object deserialized from the server's reply - def get_prediction_result request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_prediction_result_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_prediction_result", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::PredictionResult.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_prediction_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_prediction_result request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_prediction_result_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_prediction_result", - 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_prediction_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_prediction_result request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_prediction_result_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_prediction_result", - 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 export_prediction_result_metadata REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_prediction_result_metadata request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_prediction_result_metadata_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_prediction_result_metadata", - 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_prediction_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_prediction_result request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_prediction_result_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_prediction_result", - 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_backtest_results REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse] - # A result object deserialized from the server's reply - def list_backtest_results request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backtest_results_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backtest_results", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse.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_backtest_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::FinancialServices::V1::BacktestResult] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::FinancialServices::V1::BacktestResult] - # A result object deserialized from the server's reply - def get_backtest_result request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backtest_result_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backtest_result", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::FinancialServices::V1::BacktestResult.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_backtest_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backtest_result request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backtest_result_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backtest_result", - 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_backtest_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backtest_result request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backtest_result_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backtest_result", - 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 export_backtest_result_metadata REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_backtest_result_metadata request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_backtest_result_metadata_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_backtest_result_metadata", - 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_backtest_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backtest_result request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backtest_result_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backtest_result", - 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 list_instances REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListInstancesRequest] - # 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_instances_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/instances", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_instance REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetInstanceRequest] - # 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_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_instance REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateInstanceRequest] - # 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_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/instances", - body: "instance", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_instance REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest] - # 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_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{instance.name}", - body: "instance", - matches: [ - ["instance.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_instance REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest] - # 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_instance_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_registered_parties REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_registered_parties_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:importRegisteredParties", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_registered_parties REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_registered_parties_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:exportRegisteredParties", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_datasets REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListDatasetsRequest] - # 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_datasets_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/datasets", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_dataset REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetDatasetRequest] - # 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_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_dataset REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateDatasetRequest] - # 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_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/datasets", - body: "dataset", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_dataset REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest] - # 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_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{dataset.name}", - body: "dataset", - matches: [ - ["dataset.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_dataset REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest] - # 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_dataset_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/datasets/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_models REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListModelsRequest] - # 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_models_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/models", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_model REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetModelRequest] - # 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_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_model REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateModelRequest] - # 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_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/models", - body: "model", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_model REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateModelRequest] - # 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_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{model.name}", - body: "model", - matches: [ - ["model.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_model_metadata REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_model_metadata_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{model}:exportMetadata", - body: "*", - matches: [ - ["model", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_model REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteModelRequest] - # 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_model_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/models/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_engine_configs REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest] - # 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_engine_configs_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/engineConfigs", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_engine_config REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest] - # 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_engine_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/engineConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_engine_config REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest] - # 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_engine_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/engineConfigs", - body: "engine_config", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_engine_config REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest] - # 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_engine_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{engine_config.name}", - body: "engine_config", - matches: [ - ["engine_config.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/engineConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_engine_config_metadata REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_engine_config_metadata_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{engine_config}:exportMetadata", - body: "*", - matches: [ - ["engine_config", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/engineConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_engine_config REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest] - # 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_engine_config_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/engineConfigs/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_engine_version REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest] - # 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_engine_version_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/engineVersions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_engine_versions REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest] - # 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_engine_versions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/engineVersions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_prediction_results REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest] - # 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_prediction_results_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/predictionResults", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_prediction_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest] - # 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_prediction_result_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/predictionResults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_prediction_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest] - # 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_prediction_result_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/predictionResults", - body: "prediction_result", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_prediction_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest] - # 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_prediction_result_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{prediction_result.name}", - body: "prediction_result", - matches: [ - ["prediction_result.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/predictionResults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_prediction_result_metadata REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_prediction_result_metadata_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{prediction_result}:exportMetadata", - body: "*", - matches: [ - ["prediction_result", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/predictionResults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_prediction_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest] - # 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_prediction_result_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/predictionResults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backtest_results REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest] - # 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_backtest_results_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backtestResults", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backtest_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest] - # 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_backtest_result_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/backtestResults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backtest_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest] - # 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_backtest_result_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backtestResults", - body: "backtest_result", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backtest_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest] - # 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_backtest_result_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backtest_result.name}", - body: "backtest_result", - matches: [ - ["backtest_result.name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/backtestResults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_backtest_result_metadata REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_backtest_result_metadata_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{backtest_result}:exportMetadata", - body: "*", - matches: [ - ["backtest_result", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/backtestResults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backtest_result REST call - # - # @param request_pb [::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest] - # 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_backtest_result_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/instances/[^/]+/backtestResults/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/bindings_override.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/bindings_override.rb deleted file mode 100644 index c052705e72c0..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/bindings_override.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! - -require "gapic/rest" - -module Google - module Cloud - module FinancialServices - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/financial_services/v1/rest" - # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "FinancialServices"] - 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 - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/rest.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/rest.rb deleted file mode 100644 index 41874560658b..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/rest.rb +++ /dev/null @@ -1,38 +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/financial_services/v1/aml/rest" -require "google/cloud/financial_services/v1/bindings_override" -require "google/cloud/financial_services/v1/version" - -module Google - module Cloud - module FinancialServices - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/financial_services/v1/rest" - # client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/version.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/v1/version.rb deleted file mode 100644 index 95392d8da6ce..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financial_services/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 FinancialServices - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/backtest_result_pb.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/backtest_result_pb.rb deleted file mode 100644 index ad5f6b05f7d5..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/backtest_result_pb.rb +++ /dev/null @@ -1,62 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/financialservices/v1/backtest_result.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/financialservices/v1/bigquery_destination_pb' -require 'google/cloud/financialservices/v1/line_of_business_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n7google/cloud/financialservices/v1/backtest_result.proto\x12!google.cloud.financialservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(financialservices.googleapis.com/Dataset\"\xcd\x01\n\x14\x43reateDatasetRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)financialservices.googleapis.com/Instance\x12\x17\n\ndataset_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12@\n\x07\x64\x61taset\x18\x03 \x01(\x0b\x32*.google.cloud.financialservices.v1.DatasetB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa7\x01\n\x14UpdateDatasetRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12@\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32*.google.cloud.financialservices.v1.DatasetB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"o\n\x14\x44\x65leteDatasetRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(financialservices.googleapis.com/Dataset\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x42\xfb\x01\n%com.google.cloud.financialservices.v1B\x0c\x44\x61tasetProtoP\x01ZScloud.google.com/go/financialservices/apiv1/financialservicespb;financialservicespb\xaa\x02!Google.Cloud.FinancialServices.V1\xca\x02!Google\\Cloud\\FinancialServices\\V1\xea\x02$Google::Cloud::FinancialServices::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.type.Interval", "google/type/interval.proto"], - ["google.type.TimeZone", "google/type/datetime.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module FinancialServices - module V1 - Dataset = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.Dataset").msgclass - Dataset::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.Dataset.State").enummodule - ListDatasetsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ListDatasetsRequest").msgclass - ListDatasetsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ListDatasetsResponse").msgclass - GetDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.GetDatasetRequest").msgclass - CreateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.CreateDatasetRequest").msgclass - UpdateDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.UpdateDatasetRequest").msgclass - DeleteDatasetRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.DeleteDatasetRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/engine_config_pb.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/engine_config_pb.rb deleted file mode 100644 index bc32c25a895c..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/engine_config_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/financialservices/v1/engine_config.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/financialservices/v1/bigquery_destination_pb' -require 'google/cloud/financialservices/v1/line_of_business_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n5google/cloud/financialservices/v1/engine_config.proto\x12!google.cloud.financialservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\n\tinstances\x18\x01 \x03(\x0b\x32+.google.cloud.financialservices.v1.Instance\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"U\n\x12GetInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)financialservices.googleapis.com/Instance\"\xc9\x01\n\x15\x43reateInstanceRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x18\n\x0binstance_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\x08instance\x18\x03 \x01(\x0b\x32+.google.cloud.financialservices.v1.InstanceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n\x15UpdateInstanceRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\x12\x42\n\x08instance\x18\x02 \x01(\x0b\x32+.google.cloud.financialservices.v1.InstanceB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"q\n\x15\x44\x65leteInstanceRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)financialservices.googleapis.com/Instance\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x8f\x03\n\x1eImportRegisteredPartiesRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)financialservices.googleapis.com/Instance\x12\x19\n\x0cparty_tables\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12_\n\x04mode\x18\x03 \x01(\x0e\x32L.google.cloud.financialservices.v1.ImportRegisteredPartiesRequest.UpdateModeB\x03\xe0\x41\x02\x12\x1a\n\rvalidate_only\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12P\n\x10line_of_business\x18\x05 \x01(\x0e\x32\x31.google.cloud.financialservices.v1.LineOfBusinessB\x03\xe0\x41\x02\"B\n\nUpdateMode\x12\x1b\n\x17UPDATE_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07REPLACE\x10\x01\x12\n\n\x06\x41PPEND\x10\x02\"\xe4\x01\n\x1fImportRegisteredPartiesResponse\x12\x15\n\rparties_added\x18\x01 \x01(\x03\x12\x17\n\x0fparties_removed\x18\x02 \x01(\x03\x12\x15\n\rparties_total\x18\x03 \x01(\x03\x12 \n\x18parties_failed_to_remove\x18\x04 \x01(\x03\x12\x18\n\x10parties_uptiered\x18\x05 \x01(\x03\x12\x1a\n\x12parties_downtiered\x18\x06 \x01(\x03\x12\"\n\x1aparties_failed_to_downtier\x18\x07 \x01(\x03\"\x81\x02\n\x1e\x45xportRegisteredPartiesRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)financialservices.googleapis.com/Instance\x12L\n\x07\x64\x61taset\x18\x02 \x01(\x0b\x32\x36.google.cloud.financialservices.v1.BigQueryDestinationB\x03\xe0\x41\x02\x12P\n\x10line_of_business\x18\x03 \x01(\x0e\x32\x31.google.cloud.financialservices.v1.LineOfBusinessB\x03\xe0\x41\x02\"!\n\x1f\x45xportRegisteredPartiesResponseB\xfc\x01\n%com.google.cloud.financialservices.v1B\rInstanceProtoP\x01ZScloud.google.com/go/financialservices/apiv1/financialservicespb;financialservicespb\xaa\x02!Google.Cloud.FinancialServices.V1\xca\x02!Google\\Cloud\\FinancialServices\\V1\xea\x02$Google::Cloud::FinancialServices::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.cloud.financialservices.v1.BigQueryDestination", "google/cloud/financialservices/v1/bigquery_destination.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module FinancialServices - module V1 - Instance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.Instance").msgclass - Instance::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.Instance.State").enummodule - ListInstancesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ListInstancesRequest").msgclass - ListInstancesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ListInstancesResponse").msgclass - GetInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.GetInstanceRequest").msgclass - CreateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.CreateInstanceRequest").msgclass - UpdateInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.UpdateInstanceRequest").msgclass - DeleteInstanceRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.DeleteInstanceRequest").msgclass - ImportRegisteredPartiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ImportRegisteredPartiesRequest").msgclass - ImportRegisteredPartiesRequest::UpdateMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ImportRegisteredPartiesRequest.UpdateMode").enummodule - ImportRegisteredPartiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ImportRegisteredPartiesResponse").msgclass - ExportRegisteredPartiesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ExportRegisteredPartiesRequest").msgclass - ExportRegisteredPartiesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.ExportRegisteredPartiesResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/line_of_business_pb.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/line_of_business_pb.rb deleted file mode 100644 index 49d9ea8515c4..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/line_of_business_pb.rb +++ /dev/null @@ -1,42 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/financialservices/v1/line_of_business.proto - -require 'google/protobuf' - - -descriptor_data = "\n8google/cloud/financialservices/v1/line_of_business.proto\x12!google.cloud.financialservices.v1*N\n\x0eLineOfBusiness\x12 \n\x1cLINE_OF_BUSINESS_UNSPECIFIED\x10\x00\x12\x0e\n\nCOMMERCIAL\x10\x01\x12\n\n\x06RETAIL\x10\x02\x42\x82\x02\n%com.google.cloud.financialservices.v1B\x13LineOfBusinessProtoP\x01ZScloud.google.com/go/financialservices/apiv1/financialservicespb;financialservicespb\xaa\x02!Google.Cloud.FinancialServices.V1\xca\x02!Google\\Cloud\\FinancialServices\\V1\xea\x02$Google::Cloud::FinancialServices::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module FinancialServices - module V1 - LineOfBusiness = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.LineOfBusiness").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/model_pb.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/model_pb.rb deleted file mode 100644 index 852de5b79e07..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/model_pb.rb +++ /dev/null @@ -1,61 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/financialservices/v1/model.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/financialservices/v1/bigquery_destination_pb' -require 'google/cloud/financialservices/v1/line_of_business_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n-google/cloud/financialservices/v1/model.proto\x12!google.cloud.financialservices.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/instances\x12\xaf\x01\n\x0bGetInstance\x12\x35.google.cloud.financialservices.v1.GetInstanceRequest\x1a+.google.cloud.financialservices.v1.Instance\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/instances/*}\x12\xe8\x01\n\x0e\x43reateInstance\x12\x38.google.cloud.financialservices.v1.CreateInstanceRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x1bparent,instance,instance_id\x82\xd3\xe4\x93\x02\x39\"-/v1/{parent=projects/*/locations/*}/instances:\x08instance\x12\xea\x01\n\x0eUpdateInstance\x12\x38.google.cloud.financialservices.v1.UpdateInstanceRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1d\n\x08Instance\x12\x11OperationMetadata\xda\x41\x14instance,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{instance.name=projects/*/locations/*/instances/*}:\x08instance\x12\xd4\x01\n\x0e\x44\x65leteInstance\x12\x38.google.cloud.financialservices.v1.DeleteInstanceRequest\x1a\x1d.google.longrunning.Operation\"i\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/instances/*}\x12\xaf\x02\n\x17ImportRegisteredParties\x12\x41.google.cloud.financialservices.v1.ImportRegisteredPartiesRequest\x1a\x1d.google.longrunning.Operation\"\xb1\x01\xca\x41\x34\n\x1fImportRegisteredPartiesResponse\x12\x11OperationMetadata\xda\x41\'name,mode,line_of_business,party_tables\x82\xd3\xe4\x93\x02J\"E/v1/{name=projects/*/locations/*/instances/*}:importRegisteredParties:\x01*\x12\xa5\x02\n\x17\x45xportRegisteredParties\x12\x41.google.cloud.financialservices.v1.ExportRegisteredPartiesRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41\x34\n\x1f\x45xportRegisteredPartiesResponse\x12\x11OperationMetadata\xda\x41\x1dname,dataset,line_of_business\x82\xd3\xe4\x93\x02J\"E/v1/{name=projects/*/locations/*/instances/*}:exportRegisteredParties:\x01*\x12\xca\x01\n\x0cListDatasets\x12\x36.google.cloud.financialservices.v1.ListDatasetsRequest\x1a\x37.google.cloud.financialservices.v1.ListDatasetsResponse\"I\xda\x41\x06parent\x82\xd3\xe4\x93\x02:\x12\x38/v1/{parent=projects/*/locations/*/instances/*}/datasets\x12\xb7\x01\n\nGetDataset\x12\x34.google.cloud.financialservices.v1.GetDatasetRequest\x1a*.google.cloud.financialservices.v1.Dataset\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\x12\x38/v1/{name=projects/*/locations/*/instances/*/datasets/*}\x12\xee\x01\n\rCreateDataset\x12\x37.google.cloud.financialservices.v1.CreateDatasetRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41\x1c\n\x07\x44\x61taset\x12\x11OperationMetadata\xda\x41\x19parent,dataset,dataset_id\x82\xd3\xe4\x93\x02\x43\"8/v1/{parent=projects/*/locations/*/instances/*}/datasets:\x07\x64\x61taset\x12\xf0\x01\n\rUpdateDataset\x12\x37.google.cloud.financialservices.v1.UpdateDatasetRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41\x1c\n\x07\x44\x61taset\x12\x11OperationMetadata\xda\x41\x13\x64\x61taset,update_mask\x82\xd3\xe4\x93\x02K2@/v1/{dataset.name=projects/*/locations/*/instances/*/datasets/*}:\x07\x64\x61taset\x12\xdd\x01\n\rDeleteDataset\x12\x37.google.cloud.financialservices.v1.DeleteDatasetRequest\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/*/instances/*/datasets/*}\x12\xc2\x01\n\nListModels\x12\x34.google.cloud.financialservices.v1.ListModelsRequest\x1a\x35.google.cloud.financialservices.v1.ListModelsResponse\"G\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{parent=projects/*/locations/*/instances/*}/models\x12\xaf\x01\n\x08GetModel\x12\x32.google.cloud.financialservices.v1.GetModelRequest\x1a(.google.cloud.financialservices.v1.Model\"E\xda\x41\x04name\x82\xd3\xe4\x93\x02\x38\x12\x36/v1/{name=projects/*/locations/*/instances/*/models/*}\x12\xdf\x01\n\x0b\x43reateModel\x12\x35.google.cloud.financialservices.v1.CreateModelRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\xda\x41\x15parent,model,model_id\x82\xd3\xe4\x93\x02?\"6/v1/{parent=projects/*/locations/*/instances/*}/models:\x05model\x12\xe1\x01\n\x0bUpdateModel\x12\x35.google.cloud.financialservices.v1.UpdateModelRequest\x1a\x1d.google.longrunning.Operation\"|\xca\x41\x1a\n\x05Model\x12\x11OperationMetadata\xda\x41\x11model,update_mask\x82\xd3\xe4\x93\x02\x45\x32/v1/{name=projects/*/locations/*/instances/*/engineVersions/*}\x12\xe2\x01\n\x12ListEngineVersions\x12<.google.cloud.financialservices.v1.ListEngineVersionsRequest\x1a=.google.cloud.financialservices.v1.ListEngineVersionsResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/locations/*/instances/*}/engineVersions\x12\xee\x01\n\x15ListPredictionResults\x12?.google.cloud.financialservices.v1.ListPredictionResultsRequest\x1a@.google.cloud.financialservices.v1.ListPredictionResultsResponse\"R\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{parent=projects/*/locations/*/instances/*}/predictionResults\x12\xdb\x01\n\x13GetPredictionResult\x12=.google.cloud.financialservices.v1.GetPredictionResultRequest\x1a\x33.google.cloud.financialservices.v1.PredictionResult\"P\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43\x12\x41/v1/{name=projects/*/locations/*/instances/*/predictionResults/*}\x12\xb0\x02\n\x16\x43reatePredictionResult\x12@.google.cloud.financialservices.v1.CreatePredictionResultRequest\x1a\x1d.google.longrunning.Operation\"\xb4\x01\xca\x41%\n\x10PredictionResult\x12\x11OperationMetadata\xda\x41-parent,prediction_result,prediction_result_id\x82\xd3\xe4\x93\x02V\"A/v1/{parent=projects/*/locations/*/instances/*}/predictionResults:\x11prediction_result\x12\xb2\x02\n\x16UpdatePredictionResult\x12@.google.cloud.financialservices.v1.UpdatePredictionResultRequest\x1a\x1d.google.longrunning.Operation\"\xb6\x01\xca\x41%\n\x10PredictionResult\x12\x11OperationMetadata\xda\x41\x1dprediction_result,update_mask\x82\xd3\xe4\x93\x02h2S/v1/{prediction_result.name=projects/*/locations/*/instances/*/predictionResults/*}:\x11prediction_result\x12\xe6\x02\n\x1e\x45xportPredictionResultMetadata\x12H.google.cloud.financialservices.v1.ExportPredictionResultMetadataRequest\x1a\x1d.google.longrunning.Operation\"\xda\x01\xca\x41;\n&ExportPredictionResultMetadataResponse\x12\x11OperationMetadata\xda\x41\x31prediction_result,structured_metadata_destination\x82\xd3\xe4\x93\x02\x62\"]/v1/{prediction_result=projects/*/locations/*/instances/*/predictionResults/*}:exportMetadata:\x01*\x12\xf8\x01\n\x16\x44\x65letePredictionResult\x12@.google.cloud.financialservices.v1.DeletePredictionResultRequest\x1a\x1d.google.longrunning.Operation\"}\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x43*A/v1/{name=projects/*/locations/*/instances/*/predictionResults/*}\x12\xe6\x01\n\x13ListBacktestResults\x12=.google.cloud.financialservices.v1.ListBacktestResultsRequest\x1a>.google.cloud.financialservices.v1.ListBacktestResultsResponse\"P\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x41\x12?/v1/{parent=projects/*/locations/*/instances/*}/backtestResults\x12\xd3\x01\n\x11GetBacktestResult\x12;.google.cloud.financialservices.v1.GetBacktestResultRequest\x1a\x31.google.cloud.financialservices.v1.BacktestResult\"N\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41\x12?/v1/{name=projects/*/locations/*/instances/*/backtestResults/*}\x12\xa2\x02\n\x14\x43reateBacktestResult\x12>.google.cloud.financialservices.v1.CreateBacktestResultRequest\x1a\x1d.google.longrunning.Operation\"\xaa\x01\xca\x41#\n\x0e\x42\x61\x63ktestResult\x12\x11OperationMetadata\xda\x41)parent,backtest_result,backtest_result_id\x82\xd3\xe4\x93\x02R\"?/v1/{parent=projects/*/locations/*/instances/*}/backtestResults:\x0f\x62\x61\x63ktest_result\x12\xa4\x02\n\x14UpdateBacktestResult\x12>.google.cloud.financialservices.v1.UpdateBacktestResultRequest\x1a\x1d.google.longrunning.Operation\"\xac\x01\xca\x41#\n\x0e\x42\x61\x63ktestResult\x12\x11OperationMetadata\xda\x41\x1b\x62\x61\x63ktest_result,update_mask\x82\xd3\xe4\x93\x02\x62\x32O/v1/{backtest_result.name=projects/*/locations/*/instances/*/backtestResults/*}:\x0f\x62\x61\x63ktest_result\x12\xda\x02\n\x1c\x45xportBacktestResultMetadata\x12\x46.google.cloud.financialservices.v1.ExportBacktestResultMetadataRequest\x1a\x1d.google.longrunning.Operation\"\xd2\x01\xca\x41\x39\n$ExportBacktestResultMetadataResponse\x12\x11OperationMetadata\xda\x41/backtest_result,structured_metadata_destination\x82\xd3\xe4\x93\x02^\"Y/v1/{backtest_result=projects/*/locations/*/instances/*/backtestResults/*}:exportMetadata:\x01*\x12\xf2\x01\n\x14\x44\x65leteBacktestResult\x12>.google.cloud.financialservices.v1.DeleteBacktestResultRequest\x1a\x1d.google.longrunning.Operation\"{\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x41*?/v1/{name=projects/*/locations/*/instances/*/backtestResults/*}\x1aT\xca\x41 financialservices.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xfb\x01\n%com.google.cloud.financialservices.v1B\x0cServiceProtoP\x01ZScloud.google.com/go/financialservices/apiv1/financialservicespb;financialservicespb\xaa\x02!Google.Cloud.FinancialServices.V1\xca\x02!Google\\Cloud\\FinancialServices\\V1\xea\x02$Google::Cloud::FinancialServices::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module FinancialServices - module V1 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.financialservices.v1.OperationMetadata").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/service_services_pb.rb b/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/service_services_pb.rb deleted file mode 100644 index 6f2d59f876f1..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/lib/google/cloud/financialservices/v1/service_services_pb.rb +++ /dev/null @@ -1,138 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/financialservices/v1/service.proto for package 'Google.Cloud.FinancialServices.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/financialservices/v1/service_pb' - -module Google - module Cloud - module FinancialServices - module V1 - module AML - # The AML (Anti Money Laundering) service allows users to perform REST - # operations on aml. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.financialservices.v1.AML' - - # Lists instances. - rpc :ListInstances, ::Google::Cloud::FinancialServices::V1::ListInstancesRequest, ::Google::Cloud::FinancialServices::V1::ListInstancesResponse - # Gets an instance. - rpc :GetInstance, ::Google::Cloud::FinancialServices::V1::GetInstanceRequest, ::Google::Cloud::FinancialServices::V1::Instance - # Creates an instance. - rpc :CreateInstance, ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single Instance. - rpc :UpdateInstance, ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest, ::Google::Longrunning::Operation - # Deletes an instance. - rpc :DeleteInstance, ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest, ::Google::Longrunning::Operation - # Imports the list of registered parties. See - # [Create and manage - # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#import-registered-parties) - # for information on the input schema and response for this method. - rpc :ImportRegisteredParties, ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest, ::Google::Longrunning::Operation - # Exports the list of registered parties. See - # [Create and manage - # instances](https://cloud.google.com/financial-services/anti-money-laundering/docs/create-and-manage-instances#export-registered-parties) - # for information on the output schema for this method. - rpc :ExportRegisteredParties, ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest, ::Google::Longrunning::Operation - # Lists datasets. - rpc :ListDatasets, ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest, ::Google::Cloud::FinancialServices::V1::ListDatasetsResponse - # Gets a dataset. - rpc :GetDataset, ::Google::Cloud::FinancialServices::V1::GetDatasetRequest, ::Google::Cloud::FinancialServices::V1::Dataset - # Creates a dataset. - rpc :CreateDataset, ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single Dataset. - rpc :UpdateDataset, ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest, ::Google::Longrunning::Operation - # Deletes a dataset. - rpc :DeleteDataset, ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest, ::Google::Longrunning::Operation - # Lists models. - rpc :ListModels, ::Google::Cloud::FinancialServices::V1::ListModelsRequest, ::Google::Cloud::FinancialServices::V1::ListModelsResponse - # Gets a model. - rpc :GetModel, ::Google::Cloud::FinancialServices::V1::GetModelRequest, ::Google::Cloud::FinancialServices::V1::Model - # Creates a model. - rpc :CreateModel, ::Google::Cloud::FinancialServices::V1::CreateModelRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single Model. - rpc :UpdateModel, ::Google::Cloud::FinancialServices::V1::UpdateModelRequest, ::Google::Longrunning::Operation - # Export governance information for a Model resource. For - # information on the exported fields, see - # [AML output data - # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#model). - rpc :ExportModelMetadata, ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest, ::Google::Longrunning::Operation - # Deletes a model. - rpc :DeleteModel, ::Google::Cloud::FinancialServices::V1::DeleteModelRequest, ::Google::Longrunning::Operation - # Lists engine configs. - rpc :ListEngineConfigs, ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest, ::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse - # Gets an engine config. - rpc :GetEngineConfig, ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest, ::Google::Cloud::FinancialServices::V1::EngineConfig - # Creates an engine config. - rpc :CreateEngineConfig, ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single EngineConfig. - rpc :UpdateEngineConfig, ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest, ::Google::Longrunning::Operation - # Export governance information for an EngineConfig resource. For - # information on the exported fields, see - # [AML output data - # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#engine-config). - rpc :ExportEngineConfigMetadata, ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest, ::Google::Longrunning::Operation - # Deletes an engine config. - rpc :DeleteEngineConfig, ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest, ::Google::Longrunning::Operation - # Gets a single EngineVersion. - rpc :GetEngineVersion, ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest, ::Google::Cloud::FinancialServices::V1::EngineVersion - # Lists EngineVersions for given location. - rpc :ListEngineVersions, ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest, ::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse - # List PredictionResults. - rpc :ListPredictionResults, ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest, ::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse - # Gets a PredictionResult. - rpc :GetPredictionResult, ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest, ::Google::Cloud::FinancialServices::V1::PredictionResult - # Create a PredictionResult. - rpc :CreatePredictionResult, ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single PredictionResult. - rpc :UpdatePredictionResult, ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest, ::Google::Longrunning::Operation - # Export governance information for a PredictionResult resource. For - # information on the exported fields, see - # [AML output data - # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#prediction-results). - rpc :ExportPredictionResultMetadata, ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest, ::Google::Longrunning::Operation - # Deletes a PredictionResult. - rpc :DeletePredictionResult, ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest, ::Google::Longrunning::Operation - # List BacktestResults. - rpc :ListBacktestResults, ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest, ::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse - # Gets a BacktestResult. - rpc :GetBacktestResult, ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest, ::Google::Cloud::FinancialServices::V1::BacktestResult - # Create a BacktestResult. - rpc :CreateBacktestResult, ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest, ::Google::Longrunning::Operation - # Updates the parameters of a single BacktestResult. - rpc :UpdateBacktestResult, ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest, ::Google::Longrunning::Operation - # Export governance information for a BacktestResult resource. For - # information on the exported fields, see - # [AML output data - # model](https://cloud.google.com/financial-services/anti-money-laundering/docs/reference/schemas/aml-output-data-model#backtest-results). - rpc :ExportBacktestResultMetadata, ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest, ::Google::Longrunning::Operation - # Deletes a BacktestResult. - rpc :DeleteBacktestResult, ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/README.md deleted file mode 100644 index 7a70566775e2..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Financial Services 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-financial_services-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/cloud/financialservices/v1/backtest_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/backtest_result.rb deleted file mode 100644 index b522c677114d..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/backtest_result.rb +++ /dev/null @@ -1,277 +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 FinancialServices - module V1 - # BacktestResult is created to test the performance of a model on a dataset. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the BacktestResult. - # format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/backtestResults/{backtest_result}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of creation of this resource. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of the most recent update of this resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels - # @!attribute [r] state - # @return [::Google::Cloud::FinancialServices::V1::BacktestResult::State] - # Output only. State of the BacktestResult (creating, active, deleting, etc.) - # @!attribute [rw] dataset - # @return [::String] - # Required. The resource name of the Dataset to backtest on - # Format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}` - # @!attribute [rw] model - # @return [::String] - # Required. The resource name of the Model to use or to backtest. - # Format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/models/{model}` - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Required. End_time specifies the latest time from which labels are used and - # from which data is used to generate features for backtesting. End_time - # should be no later than the end of the date_range of the primary dataset. - # @!attribute [rw] backtest_periods - # @return [::Integer] - # The number of consecutive months to conduct backtesting for, ending with - # the last full month prior to the end_time according to the dataset's - # timezone. - # @!attribute [rw] performance_target - # @return [::Google::Cloud::FinancialServices::V1::BacktestResult::PerformanceTarget] - # Required. PerformanceTarget gives information on how the test will be - # evaluated. - # @!attribute [r] line_of_business - # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] - # Output only. The line of business (Retail/Commercial) this backtest is for. - # Determined by Model, cannot be set by user. - class BacktestResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # PerformanceTarget gives hints on how to evaluate the performance of a - # model. - # @!attribute [rw] party_investigations_per_period_hint - # @return [::Integer] - # Required. A number that gives the tuner a hint on the number of parties - # from this data that will be investigated per period (monthly). This is - # used to control how the model is evaluated. For example, when trying AML - # AI for the first time, we recommend setting this to the number of parties - # investigated in an average month, based on alerts from your existing - # automated alerting system. - class PerformanceTarget - 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 - - # The possible states of a resource. - module State - # State is unspecified, should not occur. - STATE_UNSPECIFIED = 0 - - # The resource has not finished being created. - CREATING = 1 - - # The resource is active/ready to be used. - ACTIVE = 2 - - # The resource is in the process of being updated. - UPDATING = 3 - - # The resource is in the process of being deleted. - DELETING = 4 - end - end - - # Request for retrieving a paginated list of BacktestResult resources that - # meet the specified criteria. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the BacktestResult is the Instance. - # @!attribute [rw] page_size - # @return [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @!attribute [rw] page_token - # @return [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListBacktestResultsResponse. It should be copied here to - # retrieve the next page of resources. Empty will give the first page of - # ListBacktestResultsRequest, and the last page will return an empty - # page_token. - # @!attribute [rw] filter - # @return [::String] - # Specify a filter to narrow search results. - # @!attribute [rw] order_by - # @return [::String] - # Specify a field to use for ordering. - class ListBacktestResultsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for retrieving a list of BacktestResults - # @!attribute [rw] backtest_results - # @return [::Array<::Google::Cloud::FinancialServices::V1::BacktestResult>] - # List of BacktestResult resources - # @!attribute [rw] next_page_token - # @return [::String] - # This token should be passed to the next ListBacktestResultsRequest to - # retrieve the next page of BacktestResults (empty indicates we are - # done). - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBacktestResultsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for retrieving a specific BacktestResult resource. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the BacktestResult - class GetBacktestResultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for creating a BacktestResult resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the BacktestResult is the Instance. - # @!attribute [rw] backtest_result_id - # @return [::String] - # Required. The resource id of the BacktestResult - # @!attribute [rw] backtest_result - # @return [::Google::Cloud::FinancialServices::V1::BacktestResult] - # Required. The BacktestResult that will be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateBacktestResultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for updating a BacktestResult - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # BacktestResult resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] backtest_result - # @return [::Google::Cloud::FinancialServices::V1::BacktestResult] - # Required. The new value of the BacktestResult fields that will be updated - # according to the update_mask. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateBacktestResultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting a BacktestResult. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the BacktestResult. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteBacktestResultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for exporting BacktestResult metadata. - # @!attribute [rw] backtest_result - # @return [::String] - # Required. The resource name of the BacktestResult. - # @!attribute [rw] structured_metadata_destination - # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] - # Required. BigQuery output where the metadata will be written. - class ExportBacktestResultMetadataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for exporting BacktestResult metadata. - class ExportBacktestResultMetadataResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/bigquery_destination.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/bigquery_destination.rb deleted file mode 100644 index 283b4557047b..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/bigquery_destination.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! - - -module Google - module Cloud - module FinancialServices - module V1 - # BigQueryDestination is a wrapper for BigQuery output information. - # @!attribute [rw] table_uri - # @return [::String] - # Optional. BigQuery URI to a table, must be of the form - # bq://projectId.bqDatasetId.tableId. - # Note that the BigQuery dataset must already exist. - # VPC-SC restrictions apply. - # @!attribute [rw] write_disposition - # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination::WriteDisposition] - # Required. Whether or not to overwrite the destination table. By default the - # table won't be overwritten and an error will be returned if the table - # exists and contains data. - class BigQueryDestination - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # WriteDisposition controls the behavior when the destination table already - # exists. - module WriteDisposition - # Default behavior is the same as WRITE_EMPTY. - WRITE_DISPOSITION_UNSPECIFIED = 0 - - # If the table already exists and contains data, an error is returned. - WRITE_EMPTY = 1 - - # If the table already exists, the data will be overwritten. - WRITE_TRUNCATE = 2 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/dataset.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/dataset.rb deleted file mode 100644 index f981223852c2..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/dataset.rb +++ /dev/null @@ -1,242 +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 FinancialServices - module V1 - # The Dataset resource contains summary information about a dataset. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the Dataset. - # format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of creation of this resource. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of the most recent update of this resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels - # @!attribute [rw] table_specs - # @return [::Google::Protobuf::Map{::String => ::String}] - # Required. The set of BigQuery tables in the dataset. The key should be the - # table type and the value should be the BigQuery tables in the format - # `bq://{project}.{dataset}.{table}`. - # Current table types are: - # - # * `party` - # * `account_party_link` - # * `transaction` - # * `risk_case_event` - # * `party_supplementary_data` - # @!attribute [r] state - # @return [::Google::Cloud::FinancialServices::V1::Dataset::State] - # Output only. State of the dataset (creating, active, deleting, etc.) - # @!attribute [rw] date_range - # @return [::Google::Type::Interval] - # Required. Core time window of the dataset. All tables should have complete - # data covering this period. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # The timezone of the data, default will act as UTC. - class Dataset - 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 TableSpecsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The possible states of a resource. - module State - # State is unspecified, should not occur. - STATE_UNSPECIFIED = 0 - - # The resource has not finished being created. - CREATING = 1 - - # The resource is active/ready to be used. - ACTIVE = 2 - - # The resource is in the process of being updated. - UPDATING = 3 - - # The resource is in the process of being deleted. - DELETING = 4 - end - end - - # Request for retrieving a paginated list of Dataset resources that meet the - # specified criteria. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the Dataset is the Instance. - # @!attribute [rw] page_size - # @return [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @!attribute [rw] page_token - # @return [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListDatasetResponse. It should be copied here to retrieve the - # next page of resources. Empty will give the first page of - # ListDatasetRequest, and the last page will return an empty page_token. - # @!attribute [rw] filter - # @return [::String] - # Specify a filter to narrow search results. - # @!attribute [rw] order_by - # @return [::String] - # Specify a field to use for ordering. - class ListDatasetsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for retrieving a list of Datasets - # @!attribute [rw] datasets - # @return [::Array<::Google::Cloud::FinancialServices::V1::Dataset>] - # List of Dataset resources - # @!attribute [rw] next_page_token - # @return [::String] - # This token should be passed to the next ListDatasetsRequest to retrieve - # the next page of Datasets (empty indicates we are done). - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListDatasetsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for retrieving a specific Dataset resource. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Dataset - class GetDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for creating a Dataset resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the Dataset is the Instance. - # @!attribute [rw] dataset_id - # @return [::String] - # Required. The resource id of the dataset - # @!attribute [rw] dataset - # @return [::Google::Cloud::FinancialServices::V1::Dataset] - # Required. The dataset that will be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for updating a Dataset - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Dataset resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] dataset - # @return [::Google::Cloud::FinancialServices::V1::Dataset] - # Required. The new value of the dataset fields that will be updated - # according to the update_mask. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting a Dataset. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Dataset. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteDatasetRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_config.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_config.rb deleted file mode 100644 index 638e1e1e734b..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_config.rb +++ /dev/null @@ -1,324 +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 FinancialServices - module V1 - # The EngineConfig resource creates the configuration for training a model. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the EngineConfig. - # format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engine_config}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of creation of this resource. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of the most recent update of this resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels - # @!attribute [r] state - # @return [::Google::Cloud::FinancialServices::V1::EngineConfig::State] - # Output only. State of the EngineConfig (creating, active, deleting, etc.) - # @!attribute [rw] engine_version - # @return [::String] - # Required. The resource name of the EngineVersion used in this model tuning. - # format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}` - # @!attribute [rw] tuning - # @return [::Google::Cloud::FinancialServices::V1::EngineConfig::Tuning] - # Optional. Configuration for tuning in creation of the EngineConfig. - # This field is required if `hyperparameter_source.type` is not `INHERITED`, - # and output-only otherwise. - # @!attribute [rw] performance_target - # @return [::Google::Cloud::FinancialServices::V1::EngineConfig::PerformanceTarget] - # Optional. PerformanceTarget gives information on how the tuning and - # training will be evaluated. This field is required if - # `hyperparameter_source.type` is not `INHERITED`, and output-only otherwise. - # @!attribute [r] line_of_business - # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] - # Output only. The line of business (Retail/Commercial) this engine config is - # used for. Determined by EngineVersion, cannot be set by user. - # @!attribute [rw] hyperparameter_source_type - # @return [::Google::Cloud::FinancialServices::V1::EngineConfig::HyperparameterSourceType] - # Optional. The origin of hyperparameters for the created EngineConfig. The - # default is `TUNING`. In this case, the hyperparameters are selected as a - # result of a - # tuning run. - # @!attribute [rw] hyperparameter_source - # @return [::Google::Cloud::FinancialServices::V1::EngineConfig::HyperparameterSource] - # Optional. Configuration of hyperparameters source EngineConfig. - class EngineConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The parameters needed for the tuning operation, these are used only in - # tuning and not passed on to training. - # @!attribute [rw] primary_dataset - # @return [::String] - # Required. The resource name of the Primary Dataset used in this model - # tuning. For information about how primary and auxiliary datasets are - # used, refer to the engine version's documentation. Format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}` - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Required. End_time specifies the latest time from which labels are used - # and from which data is used to generate features for tuning. End_time - # should be no later than the end of the date_range of the dataset. - class Tuning - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # PerformanceTarget gives hints on how to evaluate the performance of a - # model. - # @!attribute [rw] party_investigations_per_period_hint - # @return [::Integer] - # Required. A number that gives the tuner a hint on the number of parties - # from this data that will be investigated per period (monthly). This is - # used to control how the model is evaluated. For example, when trying AML - # AI for the first time, we recommend setting this to the number of parties - # investigated in an average month, based on alerts from your existing - # automated alerting system. - class PerformanceTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Parameters for bootstrapping an Engine Config with the results of another - # one. - # @!attribute [rw] source_engine_config - # @return [::String] - # Required. The resource name of the source EngineConfig whose outputs are - # used. Format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engine_config}` - # @!attribute [r] source_engine_version - # @return [::String] - # Output only. The resource name of the EngineVersion that was used in the - # tuning run. Format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}` - class HyperparameterSource - 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 - - # The possible states of a resource. - module State - # State is unspecified, should not occur. - STATE_UNSPECIFIED = 0 - - # The resource has not finished being created. - CREATING = 1 - - # The resource is active/ready to be used. - ACTIVE = 2 - - # The resource is in the process of being updated. - UPDATING = 3 - - # The resource is in the process of being deleted. - DELETING = 4 - end - - # The type of the hyperparameter source. - module HyperparameterSourceType - # Hyperparameter source type is unspecified, defaults to TUNING. - HYPERPARAMETER_SOURCE_TYPE_UNSPECIFIED = 0 - - # The EngineConfig creation starts a tuning job which selects the best - # hyperparameters. - TUNING = 1 - - # The hyperparameters are inherited from another EngineConfig. - INHERITED = 2 - end - end - - # Request for retrieving a paginated list of EngineConfig resources that - # meet the specified criteria. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the EngineConfig is the Instance. - # @!attribute [rw] page_size - # @return [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @!attribute [rw] page_token - # @return [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListEngineConfigsResponse. It should be copied here to retrieve - # the next page of resources. Empty will give the first page of - # ListEngineConfigsRequest, and the last page will return an empty - # page_token. - # @!attribute [rw] filter - # @return [::String] - # Specify a filter to narrow search results. - # @!attribute [rw] order_by - # @return [::String] - # Specify a field to use for ordering. - class ListEngineConfigsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for retrieving a list of EngineConfigs - # @!attribute [rw] engine_configs - # @return [::Array<::Google::Cloud::FinancialServices::V1::EngineConfig>] - # List of EngineConfig resources - # @!attribute [rw] next_page_token - # @return [::String] - # This token should be passed to the next ListEngineConfigsRequest to - # retrieve the next page of EngineConfigs (empty indicates we are done). - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListEngineConfigsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for retrieving a specific EngineConfig resource. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EngineConfig - class GetEngineConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for creating an EngineConfig resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the EngineConfig is the Instance. - # @!attribute [rw] engine_config_id - # @return [::String] - # Required. The resource id of the EngineConfig - # @!attribute [rw] engine_config - # @return [::Google::Cloud::FinancialServices::V1::EngineConfig] - # Required. The EngineConfig that will be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateEngineConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for updating an EngineConfig - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # EngineConfig resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] engine_config - # @return [::Google::Cloud::FinancialServices::V1::EngineConfig] - # Required. The new value of the EngineConfig fields that will be updated - # according to the update_mask. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateEngineConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting an EngineConfig. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EngineConfig. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteEngineConfigRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for exporting EngineConfig metadata. - # @!attribute [rw] engine_config - # @return [::String] - # Required. The resource name of the EngineConfig. - # @!attribute [rw] structured_metadata_destination - # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] - # Required. BigQuery output where the metadata will be written. - class ExportEngineConfigMetadataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for exporting EngineConfig metadata. - class ExportEngineConfigMetadataResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_version.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_version.rb deleted file mode 100644 index 7ffe05a27b7d..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/engine_version.rb +++ /dev/null @@ -1,126 +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 FinancialServices - module V1 - # EngineVersion controls which version of the engine is used to tune, train, - # and run the model. - # @!attribute [r] name - # @return [::String] - # Output only. Identifier. The resource name of the EngineVersion - # format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/engineVersions/{engine_version}` - # @!attribute [r] state - # @return [::Google::Cloud::FinancialServices::V1::EngineVersion::State] - # Output only. The state of the version. - # @!attribute [r] expected_limitation_start_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Planned time to stop allowing training/tuning using this - # version. Existing trained models can still be used for prediction/backtest. - # @!attribute [r] expected_decommission_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Planned time to stop supporting the version, in addition - # to no training or tuning, models trained on this version - # can no longer be used for prediction/backtest. - # @!attribute [r] line_of_business - # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] - # Output only. The line of business (Retail/Commercial) this engine version - # is used for. - class EngineVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # State determines the lifecycle of a version and the models/engine configs - # trained with it. - module State - # Default state, should never be used. - STATE_UNSPECIFIED = 0 - - # Version is available for training and inference. - ACTIVE = 1 - - # Models using this version can still be run, but new ones cannot be - # trained. - LIMITED = 2 - - # Version is deprecated, listed for informational purposes only. - DECOMMISSIONED = 3 - end - end - - # Request for retrieving a paginated list of EngineVersion resources that meet - # the specified criteria. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the EngineVersion is the Instance. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The number of resources to be included in the response. The - # response contains a next_page_token, which can be used to retrieve the next - # page of resources. - # @!attribute [rw] page_token - # @return [::String] - # Optional. In case of paginated results, this is the token that was returned - # in the previous ListEngineVersionsResponse. It should be copied here to - # retrieve the next page of resources. Empty will give the first page of - # ListEngineVersionsRequest, and the last page will return an empty - # page_token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Specify a filter to narrow search results. - # If empty or unset will default to "state!=DEPRECATED", - # to view deprecated versions use "state:*" or any other filter. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Specify a field to use for ordering. - class ListEngineVersionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response to a list call containing the list of engine versions. - # @!attribute [rw] engine_versions - # @return [::Array<::Google::Cloud::FinancialServices::V1::EngineVersion>] - # List of EngineVersion resources - # @!attribute [rw] next_page_token - # @return [::String] - # This token should be passed to the next EngineVersionsRequest to retrieve - # the next page of EngineVersions (empty indicates we are done). - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListEngineVersionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for retrieving a specific EngineVersion resource. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the EngineVersion - class GetEngineVersionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/instance.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/instance.rb deleted file mode 100644 index 9cc31a9210ea..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/instance.rb +++ /dev/null @@ -1,318 +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 FinancialServices - module V1 - # Instance is a container for the rest of API resources. - # Only resources in the same instance can interact with each other. - # Child resources inherit the location (data residency) and encryption (CMEK). - # The location of the provided input and output in requests must match the - # location of the instance. - # @!attribute [r] name - # @return [::String] - # Output only. The full path to the Instance resource in this API. - # format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the Instance was created. - # Assigned by the server. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp when the Instance was last updated. - # Assigned by the server. - # @!attribute [r] state - # @return [::Google::Cloud::FinancialServices::V1::Instance::State] - # Output only. State of the instance. - # Assigned by the server. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels - # @!attribute [rw] kms_key - # @return [::String] - # Required. The KMS key name used for CMEK (encryption-at-rest). - # format: - # `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{cryptoKey}` - # VPC-SC restrictions apply. - class Instance - 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 - - # The Resource State - module State - # State is unspecified, should not occur. - STATE_UNSPECIFIED = 0 - - # The resource has not finished being created. - CREATING = 1 - - # The resource is active/ready to be used. - ACTIVE = 2 - - # The resource is in the process of being updated. - UPDATING = 3 - - # The resource is in the process of being deleted. - DELETING = 4 - end - end - - # Request for retrieving a paginated list of Instance resources that meet the - # specified criteria. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the Instance is the location for that Instance. - # Every location has exactly one instance. - # @!attribute [rw] page_size - # @return [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @!attribute [rw] page_token - # @return [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListInstancesResponse. It should be copied here to retrieve the - # next page of resources. This will be empty for the first instance of - # ListInstancesRequest. - # @!attribute [rw] filter - # @return [::String] - # Specify a filter to narrow search results. - # @!attribute [rw] order_by - # @return [::String] - # Specify a field to use for ordering. - class ListInstancesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for retrieving a list of Instances - # @!attribute [rw] instances - # @return [::Array<::Google::Cloud::FinancialServices::V1::Instance>] - # List of Instance resources - # @!attribute [rw] next_page_token - # @return [::String] - # This token should be passed to the next ListInstancesRequest to retrieve - # the next page of Instances. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListInstancesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for retrieving a specific Instance resource. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Instance. - class GetInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for creating a Instance resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the Instance is the location for that Instance. - # Every location has exactly one instance. - # @!attribute [rw] instance_id - # @return [::String] - # Required. The resource id of the instance. - # @!attribute [rw] instance - # @return [::Google::Cloud::FinancialServices::V1::Instance] - # Required. The instance that will be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for updating a Instance - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Instance resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] instance - # @return [::Google::Cloud::FinancialServices::V1::Instance] - # Required. The new value of the instance fields that will be updated - # according to the update_mask - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting a Instance. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Instance. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteInstanceRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for adding/removing registered parties from BigQuery tables - # specified by the customer. - # @!attribute [rw] name - # @return [::String] - # Required. The full path to the Instance resource in this API. - # format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] party_tables - # @return [::Array<::String>] - # Optional. List of BigQuery tables. Union of tables will be taken if there - # is more than one table. VPC-SC restrictions apply. format: - # `bq://{project}.{bqDatasetID}.{bqTableID}` Use of `datasets` is preferred - # over the latter due to its simplicity and the reduced risk of errors - # `party_tables` and `datasets` must not be provided at the - # same time - # @!attribute [rw] mode - # @return [::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest::UpdateMode] - # Required. Mode of the request. - # @!attribute [rw] validate_only - # @return [::Boolean] - # Optional. If the request will not register the parties, just determine what - # would happen. - # @!attribute [rw] line_of_business - # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] - # Required. LineOfBusiness for the specified registered parties. - class ImportRegisteredPartiesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # UpdateMode controls the behavior for ImportRegisteredParties. - module UpdateMode - # Default mode. - UPDATE_MODE_UNSPECIFIED = 0 - - # Replace parties that are removable in Parties Table with new parties. - REPLACE = 1 - - # Add new parties to Parties Table. - APPEND = 2 - end - end - - # Response for adding/removing registered parties from BigQuery tables. - # @!attribute [rw] parties_added - # @return [::Integer] - # Number of parties added by this operation. - # @!attribute [rw] parties_removed - # @return [::Integer] - # Number of parties removed by this operation. - # @!attribute [rw] parties_total - # @return [::Integer] - # Total number of parties that are registered in this instance, after the - # update operation was completed. - # @!attribute [rw] parties_failed_to_remove - # @return [::Integer] - # Number of parties that failed to be removed by this operation. - # @!attribute [rw] parties_uptiered - # @return [::Integer] - # @!attribute [rw] parties_downtiered - # @return [::Integer] - # Total number of parties that are downtiered in this instance - # @!attribute [rw] parties_failed_to_downtier - # @return [::Integer] - # Number of parties that failed to be downtiered - class ImportRegisteredPartiesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request to export a list of currently registered parties. - # @!attribute [rw] name - # @return [::String] - # Required. The full path to the Instance resource in this API. - # format: `projects/{project}/locations/{location}/instances/{instance}` - # @!attribute [rw] dataset - # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] - # Required. The location to output the RegisteredParties. - # @!attribute [rw] line_of_business - # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] - # Required. LineOfBusiness to get RegisteredParties from. - class ExportRegisteredPartiesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response to export registered parties request. - class ExportRegisteredPartiesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/line_of_business.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/line_of_business.rb deleted file mode 100644 index 3473397b4756..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/line_of_business.rb +++ /dev/null @@ -1,38 +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 FinancialServices - module V1 - # Indicate which LineOfBusiness a party belongs to. - module LineOfBusiness - # An unspecified LineOfBusiness. Do not use. - LINE_OF_BUSINESS_UNSPECIFIED = 0 - - # Commercial LineOfBusiness. - COMMERCIAL = 1 - - # Retail LineOfBusiness. - RETAIL = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/model.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/model.rb deleted file mode 100644 index 7de397a99c7b..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/model.rb +++ /dev/null @@ -1,256 +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 FinancialServices - module V1 - # Model represents a trained model. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the Model. - # format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/models/{model}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of creation of this resource. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of the most recent update of this resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels - # @!attribute [r] state - # @return [::Google::Cloud::FinancialServices::V1::Model::State] - # Output only. State of the model (creating, active, deleting, etc.) - # @!attribute [r] engine_version - # @return [::String] - # Output only. The EngineVersion used in training this model. This is output - # only, and is determined from the EngineConfig used. - # @!attribute [rw] engine_config - # @return [::String] - # Required. The resource name of the EngineConfig the model training will be - # based on. Format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/engineConfigs/{engineConfig}` - # @!attribute [rw] primary_dataset - # @return [::String] - # Required. The resource name of the Primary Dataset used in this model - # training. For information about how primary and auxiliary datasets are - # used, refer to the engine version's documentation. Format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/datasets/{dataset}` - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Required. End_time specifies the latest time from which labels are used and - # from which data is used to generate features for training. End_time should - # be no later than the end of the date_range of the dataset. - # @!attribute [r] line_of_business - # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] - # Output only. The line of business (Retail/Commercial) this model is used - # for. Determined by EngineConfig, cannot be set by user. - class Model - 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 - - # The possible states of a resource. - module State - # State is unspecified, should not occur. - STATE_UNSPECIFIED = 0 - - # The resource has not finished being created. - CREATING = 1 - - # The resource is active/ready to be used. - ACTIVE = 2 - - # The resource is in the process of being updated. - UPDATING = 3 - - # The resource is in the process of being deleted. - DELETING = 4 - end - end - - # Request for retrieving a paginated list of Model resources that meet the - # specified criteria. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the Model is the Instance. - # @!attribute [rw] page_size - # @return [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @!attribute [rw] page_token - # @return [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListModelsResponse. It should be copied here to retrieve the next - # page of resources. Empty will give the first page of ListModelsRequest, and - # the last page will return an empty page_token. - # @!attribute [rw] filter - # @return [::String] - # Specify a filter to narrow search results. - # @!attribute [rw] order_by - # @return [::String] - # Specify a field to use for ordering. - class ListModelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for retrieving a list of Models - # @!attribute [rw] models - # @return [::Array<::Google::Cloud::FinancialServices::V1::Model>] - # List of Model resources - # @!attribute [rw] next_page_token - # @return [::String] - # This token should be passed to the next ListModelsRequest to - # retrieve the next page of Models (empty indicicates we are done). - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListModelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for retrieving a specific Model resource. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Model - class GetModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for creating a Model resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the Model is the Instance. - # @!attribute [rw] model_id - # @return [::String] - # Required. The resource id of the Model - # @!attribute [rw] model - # @return [::Google::Cloud::FinancialServices::V1::Model] - # Required. The Model that will be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreateModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for updating a Model - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # Model resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] model - # @return [::Google::Cloud::FinancialServices::V1::Model] - # Required. The new value of the Model fields that will be updated according - # to the update_mask. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdateModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting a Model. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Model. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeleteModelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for exporting Model metadata. - # @!attribute [rw] model - # @return [::String] - # Required. The resource name of the Model. - # @!attribute [rw] structured_metadata_destination - # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] - # Required. BigQuery output where the metadata will be written. - class ExportModelMetadataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for exporting Model metadata. - class ExportModelMetadataResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/prediction_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/prediction_result.rb deleted file mode 100644 index 449eb26243fc..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/prediction_result.rb +++ /dev/null @@ -1,277 +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 FinancialServices - module V1 - # PredictionResult is the result of using a model to create predictions. - # @!attribute [r] name - # @return [::String] - # Output only. The resource name of the PredictionResult. - # format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/predictionResults/{prediction_result}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of creation of this resource. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp of the most recent update of this resource. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels - # @!attribute [r] state - # @return [::Google::Cloud::FinancialServices::V1::PredictionResult::State] - # Output only. State of the PredictionResult (creating, active, deleting, - # etc.) - # @!attribute [rw] dataset - # @return [::String] - # Required. The resource name of the Dataset to do predictions on - # Format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/dataset/{dataset_id}` - # @!attribute [rw] model - # @return [::String] - # Required. The resource name of the Model to use to use to make predictions - # Format: - # `/projects/{project_num}/locations/{location}/instances/{instance}/models/{model}` - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Required. Specifies the latest time from which data is used to generate - # features for predictions. This time should be no later than the end of the - # {::Google::Cloud::FinancialServices::V1::Dataset#date_range date_range} of the - # dataset. - # @!attribute [rw] prediction_periods - # @return [::Integer] - # The number of consecutive months to produce predictions for, ending with - # the last full month prior to - # {::Google::Cloud::FinancialServices::V1::PredictionResult#end_time end_time} - # according to the dataset's timezone. - # @!attribute [rw] outputs - # @return [::Google::Cloud::FinancialServices::V1::PredictionResult::Outputs] - # Required. Where to write the output of the predictions. - # @!attribute [r] line_of_business - # @return [::Google::Cloud::FinancialServices::V1::LineOfBusiness] - # Output only. The line of business (Retail/Commercial) this prediction is - # for. Determined by Model, cannot be set by user. - class PredictionResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Outputs is a list of places where the operation will write results. - # @!attribute [rw] prediction_destination - # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] - # Required. The location to output the predictions. - # @!attribute [rw] explainability_destination - # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] - # The location to output explainability information. If not specified - # no explainability data will be output. - class Outputs - 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 - - # The possible states of a resource. - module State - # State is unspecified, should not occur. - STATE_UNSPECIFIED = 0 - - # The resource has not finished being created. - CREATING = 1 - - # The resource is active/ready to be used. - ACTIVE = 2 - - # The resource is in the process of being updated. - UPDATING = 3 - - # The resource is in the process of being deleted. - DELETING = 4 - end - end - - # Request for retrieving a paginated list of PredictionResult resources that - # meet the specified criteria. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the PredictionResult is the Instance. - # @!attribute [rw] page_size - # @return [::Integer] - # The number of resources to be included in the response. The response - # contains a next_page_token, which can be used to retrieve the next page of - # resources. - # @!attribute [rw] page_token - # @return [::String] - # In case of paginated results, this is the token that was returned in the - # previous ListPredictionResultsResponse. It should be copied here to - # retrieve the next page of resources. Empty will give the first page of - # ListPredictionResultsRequest, and the last page will return an empty - # page_token. - # @!attribute [rw] filter - # @return [::String] - # Specify a filter to narrow search results. - # @!attribute [rw] order_by - # @return [::String] - # Specify a field to use for ordering. - class ListPredictionResultsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for retrieving a list of PredictionResults - # @!attribute [rw] prediction_results - # @return [::Array<::Google::Cloud::FinancialServices::V1::PredictionResult>] - # List of PredictionResult resources - # @!attribute [rw] next_page_token - # @return [::String] - # This token should be passed to the next ListPredictionResultsRequest to - # retrieve the next page of PredictionResults (empty indicicates we are - # done). - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListPredictionResultsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for retrieving a specific PredictionResult resource. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the PredictionResult - class GetPredictionResultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for creating a PredictionResult resource. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent of the PredictionResult is the Instance. - # @!attribute [rw] prediction_result_id - # @return [::String] - # Required. The resource id of the PredictionResult - # @!attribute [rw] prediction_result - # @return [::Google::Cloud::FinancialServices::V1::PredictionResult] - # Required. The PredictionResult that will be created. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class CreatePredictionResultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for updating a PredictionResult - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. Field mask is used to specify the fields to be overwritten in the - # PredictionResult resource by the update. - # The fields specified in the update_mask are relative to the resource, not - # the full request. A field will be overwritten if it is in the mask. If the - # user does not provide a mask then all fields will be overwritten. - # @!attribute [rw] prediction_result - # @return [::Google::Cloud::FinancialServices::V1::PredictionResult] - # Required. The new value of the PredictionResult fields that will be updated - # according to the update_mask. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes since the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class UpdatePredictionResultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for deleting a PredictionResult. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the PredictionResult. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional request ID to identify requests. Specify a unique - # request ID so that if you must retry your request, the server will know to - # ignore the request if it has already been completed. The server will - # guarantee that for at least 60 minutes after the first request. - # - # For example, consider a situation where you make an initial request and the - # request times out. If you make the request again with the same request - # ID, the server can check if original operation with the same request ID - # was received, and if so, will ignore the second request. This prevents - # clients from accidentally creating duplicate commitments. - # - # The request ID must be a valid UUID with the exception that zero UUID is - # not supported (00000000-0000-0000-0000-000000000000). - class DeletePredictionResultRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for exporting PredictionResult metadata. - # @!attribute [rw] prediction_result - # @return [::String] - # Required. The resource name of the PredictionResult. - # @!attribute [rw] structured_metadata_destination - # @return [::Google::Cloud::FinancialServices::V1::BigQueryDestination] - # Required. BigQuery output where the metadata will be written. - class ExportPredictionResultMetadataRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for exporting PredictionResult metadata. - class ExportPredictionResultMetadataResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/service.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/service.rb deleted file mode 100644 index ad3a0c4bb605..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/cloud/financialservices/v1/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! - - -module Google - module Cloud - module FinancialServices - module V1 - # Represents the metadata of the 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. - # format: "/projects/\\{project}/..." - # VPC-SC restrictions apply. - # @!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. - # - # Successfully cancelled operations have a [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 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/datetime.rb deleted file mode 100644 index d15ba7af54e4..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/datetime.rb +++ /dev/null @@ -1,103 +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 civil time (or occasionally physical time). - # - # This type can represent a civil time in one of a few possible ways: - # - # * When utc_offset is set and time_zone is unset: a civil time on a calendar - # day with a particular offset from UTC. - # * When time_zone is set and utc_offset is unset: a civil time on a calendar - # day in a particular time zone. - # * When neither time_zone nor utc_offset is set: a civil time on a calendar - # day in local time. - # - # The date is relative to the Proleptic Gregorian Calendar. - # - # If year is 0, the DateTime is considered not to have a specific year. month - # and day must have valid, non-zero values. - # - # This type may also be used to represent a physical time if all the date and - # time fields are set and either case of the `time_offset` oneof is set. - # Consider using `Timestamp` message for physical time instead. If your use - # case also would like to store the user's timezone, that can be done in - # another field. - # - # This type is more flexible than some applications may want. Make sure to - # document and validate your application's limitations. - # @!attribute [rw] year - # @return [::Integer] - # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a - # datetime without a year. - # @!attribute [rw] month - # @return [::Integer] - # Required. Month of year. Must be from 1 to 12. - # @!attribute [rw] day - # @return [::Integer] - # Required. Day of month. Must be from 1 to 31 and valid for the year and - # month. - # @!attribute [rw] hours - # @return [::Integer] - # Required. Hours of day in 24 hour format. Should be from 0 to 23. An API - # may choose to allow the value "24:00:00" for scenarios like business - # closing time. - # @!attribute [rw] minutes - # @return [::Integer] - # Required. Minutes of hour of day. Must be from 0 to 59. - # @!attribute [rw] seconds - # @return [::Integer] - # Required. Seconds of minutes of the time. Must normally be from 0 to 59. An - # API may allow the value 60 if it allows leap-seconds. - # @!attribute [rw] nanos - # @return [::Integer] - # Required. Fractions of seconds in nanoseconds. Must be from 0 to - # 999,999,999. - # @!attribute [rw] utc_offset - # @return [::Google::Protobuf::Duration] - # UTC offset. Must be whole seconds, between -18 hours and +18 hours. - # For example, a UTC offset of -4:00 would be represented as - # { seconds: -14400 }. - # - # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # Time zone. - # - # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DateTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a time zone from the - # [IANA Time Zone Database](https://www.iana.org/time-zones). - # @!attribute [rw] id - # @return [::String] - # IANA Time Zone Database time zone, e.g. "America/New_York". - # @!attribute [rw] version - # @return [::String] - # Optional. IANA Time Zone Database version number, e.g. "2019a". - class TimeZone - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/interval.rb b/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/interval.rb deleted file mode 100644 index 9350ca479005..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/proto_docs/google/type/interval.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! - - -module Google - module Type - # Represents a time interval, encoded as a Timestamp start (inclusive) and a - # Timestamp end (exclusive). - # - # The start must be less than or equal to the end. - # When the start equals the end, the interval is empty (matches no time). - # When both start and end are unspecified, the interval matches any time. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Inclusive start of the interval. - # - # If specified, a Timestamp matching this interval will have to be the same - # or after the start. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # Optional. Exclusive end of the interval. - # - # If specified, a Timestamp matching this interval will have to be before the - # end. - class Interval - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-financial_services-v1/snippets/Gemfile deleted file mode 100644 index 14dd75718273..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-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-financial_services-v1", path: "../" -else - gem "google-cloud-financial_services-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-financial_services-v1/snippets/aml/create_backtest_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_backtest_result.rb deleted file mode 100644 index 7d2a70a67125..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_backtest_result.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 financialserivces_v1_generated_AML_CreateBacktestResult_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the create_backtest_result call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#create_backtest_result. -# -def create_backtest_result - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new - - # Call the create_backtest_result method. - result = client.create_backtest_result request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_CreateBacktestResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_dataset.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_dataset.rb deleted file mode 100644 index 83e25ed042e4..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_dataset.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 financialserivces_v1_generated_AML_CreateDataset_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the create_dataset call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#create_dataset. -# -def create_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new - - # Call the create_dataset method. - result = client.create_dataset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_CreateDataset_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_engine_config.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_engine_config.rb deleted file mode 100644 index 9ba53877e63c..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_engine_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 financialserivces_v1_generated_AML_CreateEngineConfig_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the create_engine_config call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#create_engine_config. -# -def create_engine_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new - - # Call the create_engine_config method. - result = client.create_engine_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 financialserivces_v1_generated_AML_CreateEngineConfig_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_instance.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_instance.rb deleted file mode 100644 index 5e8002e47859..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_instance.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 financialserivces_v1_generated_AML_CreateInstance_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the create_instance call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#create_instance. -# -def create_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new - - # Call the create_instance method. - result = client.create_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_CreateInstance_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_model.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_model.rb deleted file mode 100644 index bae675b97ecf..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_model.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 financialserivces_v1_generated_AML_CreateModel_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the create_model call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#create_model. -# -def create_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::CreateModelRequest.new - - # Call the create_model method. - result = client.create_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_CreateModel_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_prediction_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_prediction_result.rb deleted file mode 100644 index 3e4d91007d3e..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/create_prediction_result.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 financialserivces_v1_generated_AML_CreatePredictionResult_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the create_prediction_result call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#create_prediction_result. -# -def create_prediction_result - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new - - # Call the create_prediction_result method. - result = client.create_prediction_result request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_CreatePredictionResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_backtest_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_backtest_result.rb deleted file mode 100644 index e902bc37df89..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_backtest_result.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 financialserivces_v1_generated_AML_DeleteBacktestResult_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the delete_backtest_result call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#delete_backtest_result. -# -def delete_backtest_result - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new - - # Call the delete_backtest_result method. - result = client.delete_backtest_result request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_DeleteBacktestResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_dataset.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_dataset.rb deleted file mode 100644 index ec4c63d9edee..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_dataset.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 financialserivces_v1_generated_AML_DeleteDataset_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the delete_dataset call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#delete_dataset. -# -def delete_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new - - # Call the delete_dataset method. - result = client.delete_dataset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_DeleteDataset_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_engine_config.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_engine_config.rb deleted file mode 100644 index 30b8cab2aad1..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_engine_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 financialserivces_v1_generated_AML_DeleteEngineConfig_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the delete_engine_config call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#delete_engine_config. -# -def delete_engine_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new - - # Call the delete_engine_config method. - result = client.delete_engine_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 financialserivces_v1_generated_AML_DeleteEngineConfig_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_instance.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_instance.rb deleted file mode 100644 index 10a7b4aa6248..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_instance.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 financialserivces_v1_generated_AML_DeleteInstance_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the delete_instance call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#delete_instance. -# -def delete_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new - - # Call the delete_instance method. - result = client.delete_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_DeleteInstance_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_model.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_model.rb deleted file mode 100644 index 458a9b128e67..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_model.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 financialserivces_v1_generated_AML_DeleteModel_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the delete_model call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#delete_model. -# -def delete_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::DeleteModelRequest.new - - # Call the delete_model method. - result = client.delete_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_DeleteModel_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_prediction_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_prediction_result.rb deleted file mode 100644 index 2d2575714c4b..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/delete_prediction_result.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 financialserivces_v1_generated_AML_DeletePredictionResult_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the delete_prediction_result call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#delete_prediction_result. -# -def delete_prediction_result - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new - - # Call the delete_prediction_result method. - result = client.delete_prediction_result request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_DeletePredictionResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_backtest_result_metadata.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_backtest_result_metadata.rb deleted file mode 100644 index 03b0e8f66e3e..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_backtest_result_metadata.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 financialserivces_v1_generated_AML_ExportBacktestResultMetadata_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the export_backtest_result_metadata call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#export_backtest_result_metadata. -# -def export_backtest_result_metadata - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new - - # Call the export_backtest_result_metadata method. - result = client.export_backtest_result_metadata request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_ExportBacktestResultMetadata_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_engine_config_metadata.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_engine_config_metadata.rb deleted file mode 100644 index 5d6812b2ad7d..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_engine_config_metadata.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 financialserivces_v1_generated_AML_ExportEngineConfigMetadata_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the export_engine_config_metadata call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#export_engine_config_metadata. -# -def export_engine_config_metadata - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new - - # Call the export_engine_config_metadata method. - result = client.export_engine_config_metadata request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_ExportEngineConfigMetadata_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_model_metadata.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_model_metadata.rb deleted file mode 100644 index 5fcbff921343..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_model_metadata.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 financialserivces_v1_generated_AML_ExportModelMetadata_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the export_model_metadata call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#export_model_metadata. -# -def export_model_metadata - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new - - # Call the export_model_metadata method. - result = client.export_model_metadata request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_ExportModelMetadata_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_prediction_result_metadata.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_prediction_result_metadata.rb deleted file mode 100644 index 2e8ada3bb3aa..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_prediction_result_metadata.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 financialserivces_v1_generated_AML_ExportPredictionResultMetadata_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the export_prediction_result_metadata call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#export_prediction_result_metadata. -# -def export_prediction_result_metadata - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new - - # Call the export_prediction_result_metadata method. - result = client.export_prediction_result_metadata request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_ExportPredictionResultMetadata_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_registered_parties.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_registered_parties.rb deleted file mode 100644 index 5fa8d8836317..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/export_registered_parties.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 financialserivces_v1_generated_AML_ExportRegisteredParties_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the export_registered_parties call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#export_registered_parties. -# -def export_registered_parties - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new - - # Call the export_registered_parties method. - result = client.export_registered_parties request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_ExportRegisteredParties_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_backtest_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_backtest_result.rb deleted file mode 100644 index 51d08bc8eee2..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_backtest_result.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 financialserivces_v1_generated_AML_GetBacktestResult_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the get_backtest_result call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#get_backtest_result. -# -def get_backtest_result - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new - - # Call the get_backtest_result method. - result = client.get_backtest_result request - - # The returned object is of type Google::Cloud::FinancialServices::V1::BacktestResult. - p result -end -# [END financialserivces_v1_generated_AML_GetBacktestResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_dataset.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_dataset.rb deleted file mode 100644 index fa19ec72707d..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_dataset.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 financialserivces_v1_generated_AML_GetDataset_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the get_dataset call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#get_dataset. -# -def get_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::GetDatasetRequest.new - - # Call the get_dataset method. - result = client.get_dataset request - - # The returned object is of type Google::Cloud::FinancialServices::V1::Dataset. - p result -end -# [END financialserivces_v1_generated_AML_GetDataset_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_config.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_config.rb deleted file mode 100644 index d2f596f8b31c..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_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 financialserivces_v1_generated_AML_GetEngineConfig_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the get_engine_config call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#get_engine_config. -# -def get_engine_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new - - # Call the get_engine_config method. - result = client.get_engine_config request - - # The returned object is of type Google::Cloud::FinancialServices::V1::EngineConfig. - p result -end -# [END financialserivces_v1_generated_AML_GetEngineConfig_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_version.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_version.rb deleted file mode 100644 index 38c1b3cddcad..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_engine_version.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 financialserivces_v1_generated_AML_GetEngineVersion_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the get_engine_version call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#get_engine_version. -# -def get_engine_version - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new - - # Call the get_engine_version method. - result = client.get_engine_version request - - # The returned object is of type Google::Cloud::FinancialServices::V1::EngineVersion. - p result -end -# [END financialserivces_v1_generated_AML_GetEngineVersion_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_instance.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_instance.rb deleted file mode 100644 index 43591eeb095c..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_instance.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 financialserivces_v1_generated_AML_GetInstance_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the get_instance call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#get_instance. -# -def get_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::GetInstanceRequest.new - - # Call the get_instance method. - result = client.get_instance request - - # The returned object is of type Google::Cloud::FinancialServices::V1::Instance. - p result -end -# [END financialserivces_v1_generated_AML_GetInstance_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_model.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_model.rb deleted file mode 100644 index 5a9297b6e7f5..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_model.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 financialserivces_v1_generated_AML_GetModel_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the get_model call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#get_model. -# -def get_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::GetModelRequest.new - - # Call the get_model method. - result = client.get_model request - - # The returned object is of type Google::Cloud::FinancialServices::V1::Model. - p result -end -# [END financialserivces_v1_generated_AML_GetModel_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_prediction_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_prediction_result.rb deleted file mode 100644 index 270ca19c7ad2..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/get_prediction_result.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 financialserivces_v1_generated_AML_GetPredictionResult_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the get_prediction_result call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#get_prediction_result. -# -def get_prediction_result - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new - - # Call the get_prediction_result method. - result = client.get_prediction_result request - - # The returned object is of type Google::Cloud::FinancialServices::V1::PredictionResult. - p result -end -# [END financialserivces_v1_generated_AML_GetPredictionResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/import_registered_parties.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/import_registered_parties.rb deleted file mode 100644 index 7f0d7ac1f5e7..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/import_registered_parties.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 financialserivces_v1_generated_AML_ImportRegisteredParties_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the import_registered_parties call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#import_registered_parties. -# -def import_registered_parties - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new - - # Call the import_registered_parties method. - result = client.import_registered_parties request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_ImportRegisteredParties_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_backtest_results.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_backtest_results.rb deleted file mode 100644 index ec5d2af2ff4f..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_backtest_results.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 financialserivces_v1_generated_AML_ListBacktestResults_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the list_backtest_results call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#list_backtest_results. -# -def list_backtest_results - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.new - - # Call the list_backtest_results method. - result = client.list_backtest_results request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::FinancialServices::V1::BacktestResult. - p item - end -end -# [END financialserivces_v1_generated_AML_ListBacktestResults_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_datasets.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_datasets.rb deleted file mode 100644 index 426e6b0544ef..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_datasets.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 financialserivces_v1_generated_AML_ListDatasets_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the list_datasets call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#list_datasets. -# -def list_datasets - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::ListDatasetsRequest.new - - # Call the list_datasets method. - result = client.list_datasets request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::FinancialServices::V1::Dataset. - p item - end -end -# [END financialserivces_v1_generated_AML_ListDatasets_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_configs.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_configs.rb deleted file mode 100644 index 3997f515d096..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_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 financialserivces_v1_generated_AML_ListEngineConfigs_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the list_engine_configs call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#list_engine_configs. -# -def list_engine_configs - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.new - - # Call the list_engine_configs method. - result = client.list_engine_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::FinancialServices::V1::EngineConfig. - p item - end -end -# [END financialserivces_v1_generated_AML_ListEngineConfigs_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_versions.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_versions.rb deleted file mode 100644 index 98b57a693564..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_engine_versions.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 financialserivces_v1_generated_AML_ListEngineVersions_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the list_engine_versions call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#list_engine_versions. -# -def list_engine_versions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.new - - # Call the list_engine_versions method. - result = client.list_engine_versions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::FinancialServices::V1::EngineVersion. - p item - end -end -# [END financialserivces_v1_generated_AML_ListEngineVersions_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_instances.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_instances.rb deleted file mode 100644 index 3b6c47d584d2..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_instances.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 financialserivces_v1_generated_AML_ListInstances_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the list_instances call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#list_instances. -# -def list_instances - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::ListInstancesRequest.new - - # Call the list_instances method. - result = client.list_instances request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::FinancialServices::V1::Instance. - p item - end -end -# [END financialserivces_v1_generated_AML_ListInstances_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_models.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_models.rb deleted file mode 100644 index fdf5ed6508ea..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_models.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 financialserivces_v1_generated_AML_ListModels_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the list_models call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#list_models. -# -def list_models - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::ListModelsRequest.new - - # Call the list_models method. - result = client.list_models request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::FinancialServices::V1::Model. - p item - end -end -# [END financialserivces_v1_generated_AML_ListModels_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_prediction_results.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_prediction_results.rb deleted file mode 100644 index 129f7876f530..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/list_prediction_results.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 financialserivces_v1_generated_AML_ListPredictionResults_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the list_prediction_results call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#list_prediction_results. -# -def list_prediction_results - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.new - - # Call the list_prediction_results method. - result = client.list_prediction_results request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::FinancialServices::V1::PredictionResult. - p item - end -end -# [END financialserivces_v1_generated_AML_ListPredictionResults_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_backtest_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_backtest_result.rb deleted file mode 100644 index c917770102f2..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_backtest_result.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 financialserivces_v1_generated_AML_UpdateBacktestResult_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the update_backtest_result call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#update_backtest_result. -# -def update_backtest_result - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new - - # Call the update_backtest_result method. - result = client.update_backtest_result request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_UpdateBacktestResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_dataset.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_dataset.rb deleted file mode 100644 index c58d8da5db4a..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_dataset.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 financialserivces_v1_generated_AML_UpdateDataset_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the update_dataset call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#update_dataset. -# -def update_dataset - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new - - # Call the update_dataset method. - result = client.update_dataset request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_UpdateDataset_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_engine_config.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_engine_config.rb deleted file mode 100644 index d7984edf4e49..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_engine_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 financialserivces_v1_generated_AML_UpdateEngineConfig_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the update_engine_config call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#update_engine_config. -# -def update_engine_config - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new - - # Call the update_engine_config method. - result = client.update_engine_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 financialserivces_v1_generated_AML_UpdateEngineConfig_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_instance.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_instance.rb deleted file mode 100644 index ffc9ed715f66..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_instance.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 financialserivces_v1_generated_AML_UpdateInstance_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the update_instance call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#update_instance. -# -def update_instance - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new - - # Call the update_instance method. - result = client.update_instance request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_UpdateInstance_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_model.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_model.rb deleted file mode 100644 index 0f6be62e5c75..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_model.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 financialserivces_v1_generated_AML_UpdateModel_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the update_model call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#update_model. -# -def update_model - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::UpdateModelRequest.new - - # Call the update_model method. - result = client.update_model request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_UpdateModel_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_prediction_result.rb b/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_prediction_result.rb deleted file mode 100644 index 3a6c19a47e8b..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/aml/update_prediction_result.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 financialserivces_v1_generated_AML_UpdatePredictionResult_sync] -require "google/cloud/financial_services/v1" - -## -# Snippet for the update_prediction_result call in the AML service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::FinancialServices::V1::AML::Client#update_prediction_result. -# -def update_prediction_result - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::FinancialServices::V1::AML::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new - - # Call the update_prediction_result method. - result = client.update_prediction_result request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 financialserivces_v1_generated_AML_UpdatePredictionResult_sync] diff --git a/owl-bot-staging/google-cloud-financial_services-v1/snippets/snippet_metadata_google.cloud.financialservices.v1.json b/owl-bot-staging/google-cloud-financial_services-v1/snippets/snippet_metadata_google.cloud.financialservices.v1.json deleted file mode 100644 index 94304b930124..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/snippets/snippet_metadata_google.cloud.financialservices.v1.json +++ /dev/null @@ -1,1535 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-financial_services-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.financialservices.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "financialserivces_v1_generated_AML_ListInstances_sync", - "title": "Snippet for the list_instances call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_instances.", - "file": "aml/list_instances.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_instances", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_instances", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::ListInstancesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::ListInstancesResponse", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "ListInstances", - "full_name": "google.cloud.financialservices.v1.AML.ListInstances", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_GetInstance_sync", - "title": "Snippet for the get_instance call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_instance.", - "file": "aml/get_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_instance", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::GetInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::Instance", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "GetInstance", - "full_name": "google.cloud.financialservices.v1.AML.GetInstance", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_CreateInstance_sync", - "title": "Snippet for the create_instance call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#create_instance.", - "file": "aml/create_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_instance", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#create_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::CreateInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "CreateInstance", - "full_name": "google.cloud.financialservices.v1.AML.CreateInstance", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_UpdateInstance_sync", - "title": "Snippet for the update_instance call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#update_instance.", - "file": "aml/update_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_instance", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#update_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "UpdateInstance", - "full_name": "google.cloud.financialservices.v1.AML.UpdateInstance", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_DeleteInstance_sync", - "title": "Snippet for the delete_instance call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#delete_instance.", - "file": "aml/delete_instance.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_instance", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#delete_instance", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "DeleteInstance", - "full_name": "google.cloud.financialservices.v1.AML.DeleteInstance", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_ImportRegisteredParties_sync", - "title": "Snippet for the import_registered_parties call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#import_registered_parties.", - "file": "aml/import_registered_parties.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_registered_parties", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#import_registered_parties", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "ImportRegisteredParties", - "full_name": "google.cloud.financialservices.v1.AML.ImportRegisteredParties", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_ExportRegisteredParties_sync", - "title": "Snippet for the export_registered_parties call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#export_registered_parties.", - "file": "aml/export_registered_parties.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_registered_parties", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#export_registered_parties", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "ExportRegisteredParties", - "full_name": "google.cloud.financialservices.v1.AML.ExportRegisteredParties", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_ListDatasets_sync", - "title": "Snippet for the list_datasets call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_datasets.", - "file": "aml/list_datasets.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_datasets", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_datasets", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::ListDatasetsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::ListDatasetsResponse", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "ListDatasets", - "full_name": "google.cloud.financialservices.v1.AML.ListDatasets", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_GetDataset_sync", - "title": "Snippet for the get_dataset call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_dataset.", - "file": "aml/get_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_dataset", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::GetDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::Dataset", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "GetDataset", - "full_name": "google.cloud.financialservices.v1.AML.GetDataset", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_CreateDataset_sync", - "title": "Snippet for the create_dataset call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#create_dataset.", - "file": "aml/create_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_dataset", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#create_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::CreateDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "CreateDataset", - "full_name": "google.cloud.financialservices.v1.AML.CreateDataset", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_UpdateDataset_sync", - "title": "Snippet for the update_dataset call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#update_dataset.", - "file": "aml/update_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_dataset", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#update_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "UpdateDataset", - "full_name": "google.cloud.financialservices.v1.AML.UpdateDataset", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_DeleteDataset_sync", - "title": "Snippet for the delete_dataset call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#delete_dataset.", - "file": "aml/delete_dataset.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_dataset", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#delete_dataset", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "DeleteDataset", - "full_name": "google.cloud.financialservices.v1.AML.DeleteDataset", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_ListModels_sync", - "title": "Snippet for the list_models call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_models.", - "file": "aml/list_models.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_models", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_models", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::ListModelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::ListModelsResponse", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "ListModels", - "full_name": "google.cloud.financialservices.v1.AML.ListModels", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_GetModel_sync", - "title": "Snippet for the get_model call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_model.", - "file": "aml/get_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_model", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::GetModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::Model", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "GetModel", - "full_name": "google.cloud.financialservices.v1.AML.GetModel", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_CreateModel_sync", - "title": "Snippet for the create_model call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#create_model.", - "file": "aml/create_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_model", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#create_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::CreateModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "CreateModel", - "full_name": "google.cloud.financialservices.v1.AML.CreateModel", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_UpdateModel_sync", - "title": "Snippet for the update_model call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#update_model.", - "file": "aml/update_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_model", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#update_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::UpdateModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "UpdateModel", - "full_name": "google.cloud.financialservices.v1.AML.UpdateModel", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_ExportModelMetadata_sync", - "title": "Snippet for the export_model_metadata call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#export_model_metadata.", - "file": "aml/export_model_metadata.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_model_metadata", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#export_model_metadata", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "ExportModelMetadata", - "full_name": "google.cloud.financialservices.v1.AML.ExportModelMetadata", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_DeleteModel_sync", - "title": "Snippet for the delete_model call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#delete_model.", - "file": "aml/delete_model.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_model", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#delete_model", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::DeleteModelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "DeleteModel", - "full_name": "google.cloud.financialservices.v1.AML.DeleteModel", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_ListEngineConfigs_sync", - "title": "Snippet for the list_engine_configs call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_engine_configs.", - "file": "aml/list_engine_configs.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_engine_configs", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_engine_configs", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "ListEngineConfigs", - "full_name": "google.cloud.financialservices.v1.AML.ListEngineConfigs", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_GetEngineConfig_sync", - "title": "Snippet for the get_engine_config call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_engine_config.", - "file": "aml/get_engine_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_engine_config", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_engine_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::EngineConfig", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "GetEngineConfig", - "full_name": "google.cloud.financialservices.v1.AML.GetEngineConfig", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_CreateEngineConfig_sync", - "title": "Snippet for the create_engine_config call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#create_engine_config.", - "file": "aml/create_engine_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_engine_config", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#create_engine_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "CreateEngineConfig", - "full_name": "google.cloud.financialservices.v1.AML.CreateEngineConfig", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_UpdateEngineConfig_sync", - "title": "Snippet for the update_engine_config call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#update_engine_config.", - "file": "aml/update_engine_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_engine_config", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#update_engine_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "UpdateEngineConfig", - "full_name": "google.cloud.financialservices.v1.AML.UpdateEngineConfig", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_ExportEngineConfigMetadata_sync", - "title": "Snippet for the export_engine_config_metadata call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#export_engine_config_metadata.", - "file": "aml/export_engine_config_metadata.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_engine_config_metadata", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#export_engine_config_metadata", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "ExportEngineConfigMetadata", - "full_name": "google.cloud.financialservices.v1.AML.ExportEngineConfigMetadata", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_DeleteEngineConfig_sync", - "title": "Snippet for the delete_engine_config call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#delete_engine_config.", - "file": "aml/delete_engine_config.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_engine_config", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#delete_engine_config", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "DeleteEngineConfig", - "full_name": "google.cloud.financialservices.v1.AML.DeleteEngineConfig", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_GetEngineVersion_sync", - "title": "Snippet for the get_engine_version call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_engine_version.", - "file": "aml/get_engine_version.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_engine_version", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_engine_version", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::EngineVersion", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "GetEngineVersion", - "full_name": "google.cloud.financialservices.v1.AML.GetEngineVersion", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_ListEngineVersions_sync", - "title": "Snippet for the list_engine_versions call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_engine_versions.", - "file": "aml/list_engine_versions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_engine_versions", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_engine_versions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "ListEngineVersions", - "full_name": "google.cloud.financialservices.v1.AML.ListEngineVersions", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_ListPredictionResults_sync", - "title": "Snippet for the list_prediction_results call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_prediction_results.", - "file": "aml/list_prediction_results.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_prediction_results", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_prediction_results", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "ListPredictionResults", - "full_name": "google.cloud.financialservices.v1.AML.ListPredictionResults", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_GetPredictionResult_sync", - "title": "Snippet for the get_prediction_result call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_prediction_result.", - "file": "aml/get_prediction_result.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_prediction_result", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_prediction_result", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::PredictionResult", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "GetPredictionResult", - "full_name": "google.cloud.financialservices.v1.AML.GetPredictionResult", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_CreatePredictionResult_sync", - "title": "Snippet for the create_prediction_result call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#create_prediction_result.", - "file": "aml/create_prediction_result.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_prediction_result", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#create_prediction_result", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "CreatePredictionResult", - "full_name": "google.cloud.financialservices.v1.AML.CreatePredictionResult", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_UpdatePredictionResult_sync", - "title": "Snippet for the update_prediction_result call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#update_prediction_result.", - "file": "aml/update_prediction_result.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_prediction_result", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#update_prediction_result", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "UpdatePredictionResult", - "full_name": "google.cloud.financialservices.v1.AML.UpdatePredictionResult", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_ExportPredictionResultMetadata_sync", - "title": "Snippet for the export_prediction_result_metadata call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#export_prediction_result_metadata.", - "file": "aml/export_prediction_result_metadata.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_prediction_result_metadata", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#export_prediction_result_metadata", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "ExportPredictionResultMetadata", - "full_name": "google.cloud.financialservices.v1.AML.ExportPredictionResultMetadata", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_DeletePredictionResult_sync", - "title": "Snippet for the delete_prediction_result call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#delete_prediction_result.", - "file": "aml/delete_prediction_result.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_prediction_result", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#delete_prediction_result", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "DeletePredictionResult", - "full_name": "google.cloud.financialservices.v1.AML.DeletePredictionResult", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_ListBacktestResults_sync", - "title": "Snippet for the list_backtest_results call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#list_backtest_results.", - "file": "aml/list_backtest_results.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backtest_results", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#list_backtest_results", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "ListBacktestResults", - "full_name": "google.cloud.financialservices.v1.AML.ListBacktestResults", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_GetBacktestResult_sync", - "title": "Snippet for the get_backtest_result call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#get_backtest_result.", - "file": "aml/get_backtest_result.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backtest_result", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#get_backtest_result", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::FinancialServices::V1::BacktestResult", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "GetBacktestResult", - "full_name": "google.cloud.financialservices.v1.AML.GetBacktestResult", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_CreateBacktestResult_sync", - "title": "Snippet for the create_backtest_result call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#create_backtest_result.", - "file": "aml/create_backtest_result.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backtest_result", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#create_backtest_result", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "CreateBacktestResult", - "full_name": "google.cloud.financialservices.v1.AML.CreateBacktestResult", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_UpdateBacktestResult_sync", - "title": "Snippet for the update_backtest_result call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#update_backtest_result.", - "file": "aml/update_backtest_result.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backtest_result", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#update_backtest_result", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "UpdateBacktestResult", - "full_name": "google.cloud.financialservices.v1.AML.UpdateBacktestResult", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_ExportBacktestResultMetadata_sync", - "title": "Snippet for the export_backtest_result_metadata call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#export_backtest_result_metadata.", - "file": "aml/export_backtest_result_metadata.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_backtest_result_metadata", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#export_backtest_result_metadata", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "ExportBacktestResultMetadata", - "full_name": "google.cloud.financialservices.v1.AML.ExportBacktestResultMetadata", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "financialserivces_v1_generated_AML_DeleteBacktestResult_sync", - "title": "Snippet for the delete_backtest_result call in the AML service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::FinancialServices::V1::AML::Client#delete_backtest_result.", - "file": "aml/delete_backtest_result.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backtest_result", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client#delete_backtest_result", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "AML::Client", - "full_name": "::Google::Cloud::FinancialServices::V1::AML::Client" - }, - "method": { - "short_name": "DeleteBacktestResult", - "full_name": "google.cloud.financialservices.v1.AML.DeleteBacktestResult", - "service": { - "short_name": "AML", - "full_name": "google.cloud.financialservices.v1.AML" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_operations_test.rb b/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_operations_test.rb deleted file mode 100644 index 338abe107014..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_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/financialservices/v1/service_pb" -require "google/cloud/financialservices/v1/service_services_pb" -require "google/cloud/financial_services/v1/aml" - -class ::Google::Cloud::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_paths_test.rb b/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_paths_test.rb deleted file mode 100644 index dd40ab5d678a..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_paths_test.rb +++ /dev/null @@ -1,139 +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/financial_services/v1/aml" - -class ::Google::Cloud::FinancialServices::V1::AML::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_backtest_result_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backtest_result_path project_num: "value0", location: "value1", instance: "value2", backtest_result: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/backtestResults/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::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.dataset_path project_num: "value0", location: "value1", instance: "value2", dataset: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/datasets/value3", path - end - end - - def test_engine_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::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.engine_config_path project_num: "value0", location: "value1", instance: "value2", engine_config: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/engineConfigs/value3", path - end - end - - def test_engine_version_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.engine_version_path project_num: "value0", location: "value1", instance: "value2", engine_version: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/engineVersions/value3", path - end - end - - def test_instance_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.instance_path project: "value0", location: "value1", instance: "value2" - assert_equal "projects/value0/locations/value1/instances/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::FinancialServices::V1::AML::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_model_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.model_path project_num: "value0", location: "value1", instance: "value2", model: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/models/value3", path - end - end - - def test_prediction_result_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.prediction_result_path project_num: "value0", location: "value1", instance: "value2", prediction_result: "value3" - assert_equal "projects/value0/locations/value1/instances/value2/predictionResults/value3", path - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_rest_test.rb b/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_rest_test.rb deleted file mode 100644 index ff1208a8e26e..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_rest_test.rb +++ /dev/null @@ -1,2225 +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/financialservices/v1/service_pb" -require "google/cloud/financial_services/v1/aml/rest" - - -class ::Google::Cloud::FinancialServices::V1::AML::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_list_instances - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::ListInstancesResponse.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_instances_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_instances_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_instances_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_instances({ parent: parent, page_size: 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_instances parent: parent, page_size: 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_instances ::Google::Cloud::FinancialServices::V1::ListInstancesRequest.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_instances({ 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_instances(::Google::Cloud::FinancialServices::V1::ListInstancesRequest.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_instances_client_stub.call_count - end - end - end - - def test_get_instance - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::Instance.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_instance({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_instance name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_instance ::Google::Cloud::FinancialServices::V1::GetInstanceRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_instance({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_instance(::Google::Cloud::FinancialServices::V1::GetInstanceRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_instance_client_stub.call_count - end - end - end - - def test_create_instance - # 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" - instance_id = "hello world" - instance = {} - request_id = "hello world" - - create_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_create_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_instance_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_instance parent: parent, instance_id: instance_id, instance: instance, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_instance ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_instance(::Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_instance_client_stub.call_count - end - end - end - - def test_update_instance - # 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 = {} - instance = {} - request_id = "hello world" - - update_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_update_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_instance_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_instance({ update_mask: update_mask, instance: instance, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_instance update_mask: update_mask, instance: instance, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_instance ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_instance({ update_mask: update_mask, instance: instance, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_instance(::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_instance_client_stub.call_count - end - end - end - - def test_delete_instance - # 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" - request_id = "hello world" - - delete_instance_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_delete_instance_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_instance_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_instance({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_instance name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_instance ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_instance({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_instance(::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_instance_client_stub.call_count - end - end - end - - def test_import_registered_parties - # 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" - party_tables = ["hello world"] - mode = :UPDATE_MODE_UNSPECIFIED - validate_only = true - line_of_business = :LINE_OF_BUSINESS_UNSPECIFIED - - import_registered_parties_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_import_registered_parties_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_registered_parties_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_registered_parties({ name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_registered_parties name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_registered_parties ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new(name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_registered_parties({ name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_registered_parties(::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new(name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_registered_parties_client_stub.call_count - end - end - end - - def test_export_registered_parties - # 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" - dataset = {} - line_of_business = :LINE_OF_BUSINESS_UNSPECIFIED - - export_registered_parties_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_export_registered_parties_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_registered_parties_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_registered_parties({ name: name, dataset: dataset, line_of_business: line_of_business }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_registered_parties name: name, dataset: dataset, line_of_business: line_of_business do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_registered_parties ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new(name: name, dataset: dataset, line_of_business: line_of_business) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_registered_parties({ name: name, dataset: dataset, line_of_business: line_of_business }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_registered_parties(::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new(name: name, dataset: dataset, line_of_business: line_of_business), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_registered_parties_client_stub.call_count - end - end - end - - def test_list_datasets - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::ListDatasetsResponse.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_datasets_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_datasets_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_datasets_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_datasets({ parent: parent, page_size: 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_datasets parent: parent, page_size: 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_datasets ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::FinancialServices::V1::ListDatasetsRequest.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_datasets_client_stub.call_count - end - end - end - - def test_get_dataset - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::Dataset.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_dataset_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_dataset({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_dataset name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_dataset ::Google::Cloud::FinancialServices::V1::GetDatasetRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_dataset({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_dataset(::Google::Cloud::FinancialServices::V1::GetDatasetRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_dataset_client_stub.call_count - end - end - end - - def test_create_dataset - # 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" - dataset_id = "hello world" - dataset = {} - request_id = "hello world" - - create_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_create_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_dataset_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_dataset({ parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_dataset parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_dataset ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new(parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_dataset({ parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_dataset(::Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new(parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_dataset_client_stub.call_count - end - end - end - - def test_update_dataset - # 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 = {} - dataset = {} - request_id = "hello world" - - update_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_update_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_dataset_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_dataset({ update_mask: update_mask, dataset: dataset, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_dataset update_mask: update_mask, dataset: dataset, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_dataset ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new(update_mask: update_mask, dataset: dataset, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_dataset({ update_mask: update_mask, dataset: dataset, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_dataset(::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new(update_mask: update_mask, dataset: dataset, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_dataset_client_stub.call_count - end - end - end - - def test_delete_dataset - # 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" - request_id = "hello world" - - delete_dataset_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_delete_dataset_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_dataset_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_dataset({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_dataset name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_dataset ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_dataset({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_dataset(::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_dataset_client_stub.call_count - end - end - end - - def test_list_models - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::ListModelsResponse.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_models_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_models_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_models_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_models({ parent: parent, page_size: 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_models parent: parent, page_size: 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_models ::Google::Cloud::FinancialServices::V1::ListModelsRequest.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_models({ 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_models(::Google::Cloud::FinancialServices::V1::ListModelsRequest.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_models_client_stub.call_count - end - end - end - - def test_get_model - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::Model.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_model_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_model({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_model name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_model ::Google::Cloud::FinancialServices::V1::GetModelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_model({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_model(::Google::Cloud::FinancialServices::V1::GetModelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_model_client_stub.call_count - end - end - end - - def test_create_model - # 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" - model_id = "hello world" - model = {} - request_id = "hello world" - - create_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_create_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_model_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_model({ parent: parent, model_id: model_id, model: model, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_model parent: parent, model_id: model_id, model: model, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_model ::Google::Cloud::FinancialServices::V1::CreateModelRequest.new(parent: parent, model_id: model_id, model: model, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_model({ parent: parent, model_id: model_id, model: model, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_model(::Google::Cloud::FinancialServices::V1::CreateModelRequest.new(parent: parent, model_id: model_id, model: model, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_model_client_stub.call_count - end - end - end - - def test_update_model - # 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 = {} - model = {} - request_id = "hello world" - - update_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_update_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_model_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_model({ update_mask: update_mask, model: model, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_model update_mask: update_mask, model: model, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_model ::Google::Cloud::FinancialServices::V1::UpdateModelRequest.new(update_mask: update_mask, model: model, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_model({ update_mask: update_mask, model: model, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_model(::Google::Cloud::FinancialServices::V1::UpdateModelRequest.new(update_mask: update_mask, model: model, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_model_client_stub.call_count - end - end - end - - def test_export_model_metadata - # 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. - model = "hello world" - structured_metadata_destination = {} - - export_model_metadata_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_export_model_metadata_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_model_metadata_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_model_metadata({ model: model, structured_metadata_destination: structured_metadata_destination }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_model_metadata model: model, structured_metadata_destination: structured_metadata_destination do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_model_metadata ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new(model: model, structured_metadata_destination: structured_metadata_destination) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_model_metadata({ model: model, structured_metadata_destination: structured_metadata_destination }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_model_metadata(::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new(model: model, structured_metadata_destination: structured_metadata_destination), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_model_metadata_client_stub.call_count - end - end - end - - def test_delete_model - # 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" - request_id = "hello world" - - delete_model_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_delete_model_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_model_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_model({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_model name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_model ::Google::Cloud::FinancialServices::V1::DeleteModelRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_model({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_model(::Google::Cloud::FinancialServices::V1::DeleteModelRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_model_client_stub.call_count - end - end - end - - def test_list_engine_configs - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse.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_engine_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::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_engine_configs_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_engine_configs_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_engine_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_engine_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_engine_configs ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.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_engine_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_engine_configs(::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.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_engine_configs_client_stub.call_count - end - end - end - - def test_get_engine_config - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::EngineConfig.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_engine_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::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_engine_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_engine_config_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_engine_config({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_engine_config name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_engine_config ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_engine_config({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_engine_config(::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_engine_config_client_stub.call_count - end - end - end - - def test_create_engine_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" - engine_config_id = "hello world" - engine_config = {} - request_id = "hello world" - - create_engine_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::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_create_engine_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_engine_config_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_engine_config({ parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_engine_config parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_engine_config ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new(parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_engine_config({ parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_engine_config(::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new(parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_engine_config_client_stub.call_count - end - end - end - - def test_update_engine_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. - update_mask = {} - engine_config = {} - request_id = "hello world" - - update_engine_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::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_update_engine_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_engine_config_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_engine_config({ update_mask: update_mask, engine_config: engine_config, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_engine_config update_mask: update_mask, engine_config: engine_config, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_engine_config ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new(update_mask: update_mask, engine_config: engine_config, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_engine_config({ update_mask: update_mask, engine_config: engine_config, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_engine_config(::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new(update_mask: update_mask, engine_config: engine_config, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_engine_config_client_stub.call_count - end - end - end - - def test_export_engine_config_metadata - # 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. - engine_config = "hello world" - structured_metadata_destination = {} - - export_engine_config_metadata_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_export_engine_config_metadata_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_engine_config_metadata_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_engine_config_metadata({ engine_config: engine_config, structured_metadata_destination: structured_metadata_destination }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_engine_config_metadata engine_config: engine_config, structured_metadata_destination: structured_metadata_destination do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_engine_config_metadata ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new(engine_config: engine_config, structured_metadata_destination: structured_metadata_destination) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_engine_config_metadata({ engine_config: engine_config, structured_metadata_destination: structured_metadata_destination }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_engine_config_metadata(::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new(engine_config: engine_config, structured_metadata_destination: structured_metadata_destination), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_engine_config_metadata_client_stub.call_count - end - end - end - - def test_delete_engine_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" - request_id = "hello world" - - delete_engine_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::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_delete_engine_config_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_engine_config_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_engine_config({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_engine_config name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_engine_config ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_engine_config({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_engine_config(::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_engine_config_client_stub.call_count - end - end - end - - def test_get_engine_version - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::EngineVersion.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_engine_version_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_engine_version_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_engine_version_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_engine_version({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_engine_version name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_engine_version ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_engine_version({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_engine_version(::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_engine_version_client_stub.call_count - end - end - end - - def test_list_engine_versions - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse.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_engine_versions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_engine_versions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_engine_versions_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_engine_versions({ parent: parent, page_size: 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_engine_versions parent: parent, page_size: 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_engine_versions ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.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_engine_versions({ 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_engine_versions(::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.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_engine_versions_client_stub.call_count - end - end - end - - def test_list_prediction_results - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse.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_prediction_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_prediction_results_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_prediction_results_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_prediction_results({ parent: parent, page_size: 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_prediction_results parent: parent, page_size: 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_prediction_results ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.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_prediction_results({ 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_prediction_results(::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.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_prediction_results_client_stub.call_count - end - end - end - - def test_get_prediction_result - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::PredictionResult.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_prediction_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_prediction_result_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_prediction_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_prediction_result({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_prediction_result name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_prediction_result ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_prediction_result({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_prediction_result(::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_prediction_result_client_stub.call_count - end - end - end - - def test_create_prediction_result - # 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" - prediction_result_id = "hello world" - prediction_result = {} - request_id = "hello world" - - create_prediction_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_create_prediction_result_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_prediction_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_prediction_result({ parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_prediction_result parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_prediction_result ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new(parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_prediction_result({ parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_prediction_result(::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new(parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_prediction_result_client_stub.call_count - end - end - end - - def test_update_prediction_result - # 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 = {} - prediction_result = {} - request_id = "hello world" - - update_prediction_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_update_prediction_result_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_prediction_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_prediction_result({ update_mask: update_mask, prediction_result: prediction_result, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_prediction_result update_mask: update_mask, prediction_result: prediction_result, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_prediction_result ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new(update_mask: update_mask, prediction_result: prediction_result, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_prediction_result({ update_mask: update_mask, prediction_result: prediction_result, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_prediction_result(::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new(update_mask: update_mask, prediction_result: prediction_result, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_prediction_result_client_stub.call_count - end - end - end - - def test_export_prediction_result_metadata - # 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. - prediction_result = "hello world" - structured_metadata_destination = {} - - export_prediction_result_metadata_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_export_prediction_result_metadata_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_prediction_result_metadata_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_prediction_result_metadata({ prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_prediction_result_metadata prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_prediction_result_metadata ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new(prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_prediction_result_metadata({ prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_prediction_result_metadata(::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new(prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_prediction_result_metadata_client_stub.call_count - end - end - end - - def test_delete_prediction_result - # 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" - request_id = "hello world" - - delete_prediction_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_delete_prediction_result_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_prediction_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_prediction_result({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_prediction_result name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_prediction_result ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_prediction_result({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_prediction_result(::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_prediction_result_client_stub.call_count - end - end - end - - def test_list_backtest_results - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse.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_backtest_results_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_list_backtest_results_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backtest_results_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backtest_results({ parent: parent, page_size: 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_backtest_results parent: parent, page_size: 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_backtest_results ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.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_backtest_results({ 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_backtest_results(::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.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_backtest_results_client_stub.call_count - end - end - end - - def test_get_backtest_result - # Create test objects. - client_result = ::Google::Cloud::FinancialServices::V1::BacktestResult.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backtest_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_get_backtest_result_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backtest_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backtest_result({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backtest_result name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backtest_result ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backtest_result({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backtest_result(::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backtest_result_client_stub.call_count - end - end - end - - def test_create_backtest_result - # 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" - backtest_result_id = "hello world" - backtest_result = {} - request_id = "hello world" - - create_backtest_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_create_backtest_result_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backtest_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_backtest_result({ parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_backtest_result parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_backtest_result ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new(parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_backtest_result({ parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_backtest_result(::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new(parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backtest_result_client_stub.call_count - end - end - end - - def test_update_backtest_result - # 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 = {} - backtest_result = {} - request_id = "hello world" - - update_backtest_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_update_backtest_result_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backtest_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backtest_result({ update_mask: update_mask, backtest_result: backtest_result, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backtest_result update_mask: update_mask, backtest_result: backtest_result, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backtest_result ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new(update_mask: update_mask, backtest_result: backtest_result, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backtest_result({ update_mask: update_mask, backtest_result: backtest_result, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backtest_result(::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new(update_mask: update_mask, backtest_result: backtest_result, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backtest_result_client_stub.call_count - end - end - end - - def test_export_backtest_result_metadata - # 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. - backtest_result = "hello world" - structured_metadata_destination = {} - - export_backtest_result_metadata_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_export_backtest_result_metadata_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_backtest_result_metadata_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_backtest_result_metadata({ backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_backtest_result_metadata backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_backtest_result_metadata ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new(backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_backtest_result_metadata({ backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_backtest_result_metadata(::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new(backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_backtest_result_metadata_client_stub.call_count - end - end - end - - def test_delete_backtest_result - # 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" - request_id = "hello world" - - delete_backtest_result_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::FinancialServices::V1::AML::Rest::ServiceStub.stub :transcode_delete_backtest_result_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backtest_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backtest_result({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backtest_result name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backtest_result ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backtest_result({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backtest_result(::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backtest_result_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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_test.rb b/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_test.rb deleted file mode 100644 index dee4963beb8c..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/test/google/cloud/financial_services/v1/aml_test.rb +++ /dev/null @@ -1,2625 +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/financialservices/v1/service_pb" -require "google/cloud/financial_services/v1/aml" - -class ::Google::Cloud::FinancialServices::V1::AML::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_list_instances - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::ListInstancesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_instances_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_instances, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::ListInstancesRequest, 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_instances_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_instances({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_instances parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_instances ::Google::Cloud::FinancialServices::V1::ListInstancesRequest.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_instances({ 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_instances(::Google::Cloud::FinancialServices::V1::ListInstancesRequest.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_instances_client_stub.call_rpc_count - end - end - - def test_get_instance - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::Instance.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_instance, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::GetInstanceRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_instance_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_instance({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_instance name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_instance ::Google::Cloud::FinancialServices::V1::GetInstanceRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_instance({ 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_instance(::Google::Cloud::FinancialServices::V1::GetInstanceRequest.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_instance_client_stub.call_rpc_count - end - end - - def test_create_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - instance_id = "hello world" - instance = {} - request_id = "hello world" - - create_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_instance, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["instance_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::Instance), request["instance"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_instance_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }) do |response, 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_instance parent: parent, instance_id: instance_id, instance: instance, request_id: request_id do |response, 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_instance ::Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id) do |response, operation| - assert_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_instance({ parent: parent, instance_id: instance_id, instance: instance, request_id: request_id }, grpc_options) do |response, operation| - assert_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_instance(::Google::Cloud::FinancialServices::V1::CreateInstanceRequest.new(parent: parent, instance_id: instance_id, instance: instance, request_id: request_id), grpc_options) do |response, operation| - assert_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_instance_client_stub.call_rpc_count - end - end - - def test_update_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - instance = {} - request_id = "hello world" - - update_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_instance, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::Instance), request["instance"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_instance_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_instance({ update_mask: update_mask, instance: instance, request_id: request_id }) do |response, 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_instance update_mask: update_mask, instance: instance, request_id: request_id do |response, 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_instance ::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance, request_id: request_id) do |response, operation| - assert_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_instance({ update_mask: update_mask, instance: instance, request_id: request_id }, grpc_options) do |response, operation| - assert_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_instance(::Google::Cloud::FinancialServices::V1::UpdateInstanceRequest.new(update_mask: update_mask, instance: instance, request_id: request_id), grpc_options) do |response, operation| - assert_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_instance_client_stub.call_rpc_count - end - end - - def test_delete_instance - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_instance_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_instance, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_instance_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_instance({ name: name, request_id: request_id }) do |response, 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_instance name: name, request_id: request_id do |response, 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_instance ::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new(name: name, request_id: request_id) do |response, operation| - assert_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_instance({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_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_instance(::Google::Cloud::FinancialServices::V1::DeleteInstanceRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_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_instance_client_stub.call_rpc_count - end - end - - def test_import_registered_parties - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - party_tables = ["hello world"] - mode = :UPDATE_MODE_UNSPECIFIED - validate_only = true - line_of_business = :LINE_OF_BUSINESS_UNSPECIFIED - - import_registered_parties_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_registered_parties, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["party_tables"] - assert_equal :UPDATE_MODE_UNSPECIFIED, request["mode"] - assert_equal true, request["validate_only"] - assert_equal :LINE_OF_BUSINESS_UNSPECIFIED, request["line_of_business"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_registered_parties_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_registered_parties({ name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.import_registered_parties name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.import_registered_parties ::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new(name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.import_registered_parties({ name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.import_registered_parties(::Google::Cloud::FinancialServices::V1::ImportRegisteredPartiesRequest.new(name: name, party_tables: party_tables, mode: mode, validate_only: validate_only, line_of_business: line_of_business), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_registered_parties_client_stub.call_rpc_count - end - end - - def test_export_registered_parties - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - dataset = {} - line_of_business = :LINE_OF_BUSINESS_UNSPECIFIED - - export_registered_parties_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_registered_parties, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BigQueryDestination), request["dataset"] - assert_equal :LINE_OF_BUSINESS_UNSPECIFIED, request["line_of_business"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_registered_parties_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_registered_parties({ name: name, dataset: dataset, line_of_business: line_of_business }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_registered_parties name: name, dataset: dataset, line_of_business: line_of_business do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_registered_parties ::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new(name: name, dataset: dataset, line_of_business: line_of_business) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_registered_parties({ name: name, dataset: dataset, line_of_business: line_of_business }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_registered_parties(::Google::Cloud::FinancialServices::V1::ExportRegisteredPartiesRequest.new(name: name, dataset: dataset, line_of_business: line_of_business), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_registered_parties_client_stub.call_rpc_count - end - end - - def test_list_datasets - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::ListDatasetsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_datasets_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_datasets, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest, 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_datasets_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_datasets({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_datasets parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_datasets ::Google::Cloud::FinancialServices::V1::ListDatasetsRequest.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_datasets({ 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_datasets(::Google::Cloud::FinancialServices::V1::ListDatasetsRequest.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_datasets_client_stub.call_rpc_count - end - end - - def test_get_dataset - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::Dataset.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_dataset, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::GetDatasetRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_dataset_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_dataset({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_dataset name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_dataset ::Google::Cloud::FinancialServices::V1::GetDatasetRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_dataset({ 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_dataset(::Google::Cloud::FinancialServices::V1::GetDatasetRequest.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_dataset_client_stub.call_rpc_count - end - end - - def test_create_dataset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - dataset_id = "hello world" - dataset = {} - request_id = "hello world" - - create_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_dataset, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["dataset_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::Dataset), request["dataset"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_dataset_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_dataset({ parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id }) do |response, 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_dataset parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id do |response, 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_dataset ::Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new(parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id) do |response, operation| - assert_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_dataset({ parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id }, grpc_options) do |response, operation| - assert_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_dataset(::Google::Cloud::FinancialServices::V1::CreateDatasetRequest.new(parent: parent, dataset_id: dataset_id, dataset: dataset, request_id: request_id), grpc_options) do |response, operation| - assert_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_dataset_client_stub.call_rpc_count - end - end - - def test_update_dataset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - dataset = {} - request_id = "hello world" - - update_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_dataset, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::Dataset), request["dataset"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_dataset_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_dataset({ update_mask: update_mask, dataset: dataset, request_id: request_id }) do |response, 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_dataset update_mask: update_mask, dataset: dataset, request_id: request_id do |response, 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_dataset ::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new(update_mask: update_mask, dataset: dataset, request_id: request_id) do |response, operation| - assert_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_dataset({ update_mask: update_mask, dataset: dataset, request_id: request_id }, grpc_options) do |response, operation| - assert_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_dataset(::Google::Cloud::FinancialServices::V1::UpdateDatasetRequest.new(update_mask: update_mask, dataset: dataset, request_id: request_id), grpc_options) do |response, operation| - assert_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_dataset_client_stub.call_rpc_count - end - end - - def test_delete_dataset - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_dataset_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_dataset, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_dataset_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_dataset({ name: name, request_id: request_id }) do |response, 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_dataset name: name, request_id: request_id do |response, 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_dataset ::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new(name: name, request_id: request_id) do |response, operation| - assert_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_dataset({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_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_dataset(::Google::Cloud::FinancialServices::V1::DeleteDatasetRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_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_dataset_client_stub.call_rpc_count - end - end - - def test_list_models - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::ListModelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_models_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_models, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::ListModelsRequest, 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_models_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_models({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_models parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_models ::Google::Cloud::FinancialServices::V1::ListModelsRequest.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_models({ 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_models(::Google::Cloud::FinancialServices::V1::ListModelsRequest.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_models_client_stub.call_rpc_count - end - end - - def test_get_model - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::Model.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_model, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::GetModelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_model_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_model({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_model name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_model ::Google::Cloud::FinancialServices::V1::GetModelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_model({ 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_model(::Google::Cloud::FinancialServices::V1::GetModelRequest.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_model_client_stub.call_rpc_count - end - end - - def test_create_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - model_id = "hello world" - model = {} - request_id = "hello world" - - create_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_model, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::CreateModelRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["model_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::Model), request["model"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_model_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_model({ parent: parent, model_id: model_id, model: model, request_id: request_id }) do |response, 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_model parent: parent, model_id: model_id, model: model, request_id: request_id do |response, 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_model ::Google::Cloud::FinancialServices::V1::CreateModelRequest.new(parent: parent, model_id: model_id, model: model, request_id: request_id) do |response, operation| - assert_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_model({ parent: parent, model_id: model_id, model: model, request_id: request_id }, grpc_options) do |response, operation| - assert_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_model(::Google::Cloud::FinancialServices::V1::CreateModelRequest.new(parent: parent, model_id: model_id, model: model, request_id: request_id), grpc_options) do |response, operation| - assert_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_model_client_stub.call_rpc_count - end - end - - def test_update_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - model = {} - request_id = "hello world" - - update_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_model, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::UpdateModelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::Model), request["model"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_model_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_model({ update_mask: update_mask, model: model, request_id: request_id }) do |response, 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_model update_mask: update_mask, model: model, request_id: request_id do |response, 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_model ::Google::Cloud::FinancialServices::V1::UpdateModelRequest.new(update_mask: update_mask, model: model, request_id: request_id) do |response, operation| - assert_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_model({ update_mask: update_mask, model: model, request_id: request_id }, grpc_options) do |response, operation| - assert_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_model(::Google::Cloud::FinancialServices::V1::UpdateModelRequest.new(update_mask: update_mask, model: model, request_id: request_id), grpc_options) do |response, operation| - assert_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_model_client_stub.call_rpc_count - end - end - - def test_export_model_metadata - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - model = "hello world" - structured_metadata_destination = {} - - export_model_metadata_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_model_metadata, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest, request - assert_equal "hello world", request["model"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BigQueryDestination), request["structured_metadata_destination"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_model_metadata_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_model_metadata({ model: model, structured_metadata_destination: structured_metadata_destination }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_model_metadata model: model, structured_metadata_destination: structured_metadata_destination do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_model_metadata ::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new(model: model, structured_metadata_destination: structured_metadata_destination) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_model_metadata({ model: model, structured_metadata_destination: structured_metadata_destination }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_model_metadata(::Google::Cloud::FinancialServices::V1::ExportModelMetadataRequest.new(model: model, structured_metadata_destination: structured_metadata_destination), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_model_metadata_client_stub.call_rpc_count - end - end - - def test_delete_model - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_model_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_model, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::DeleteModelRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_model_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_model({ name: name, request_id: request_id }) do |response, 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_model name: name, request_id: request_id do |response, 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_model ::Google::Cloud::FinancialServices::V1::DeleteModelRequest.new(name: name, request_id: request_id) do |response, operation| - assert_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_model({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_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_model(::Google::Cloud::FinancialServices::V1::DeleteModelRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_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_model_client_stub.call_rpc_count - end - end - - def test_list_engine_configs - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::ListEngineConfigsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_engine_configs_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_engine_configs, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest, 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_engine_configs_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_engine_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_engine_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_engine_configs ::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.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_engine_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_engine_configs(::Google::Cloud::FinancialServices::V1::ListEngineConfigsRequest.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_engine_configs_client_stub.call_rpc_count - end - end - - def test_get_engine_config - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::EngineConfig.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_engine_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_engine_config, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_engine_config_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_engine_config({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_engine_config name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_engine_config ::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_engine_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_engine_config(::Google::Cloud::FinancialServices::V1::GetEngineConfigRequest.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_engine_config_client_stub.call_rpc_count - end - end - - def test_create_engine_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" - engine_config_id = "hello world" - engine_config = {} - request_id = "hello world" - - create_engine_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_engine_config, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["engine_config_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::EngineConfig), request["engine_config"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_engine_config_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_engine_config({ parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id }) do |response, 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_engine_config parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id do |response, 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_engine_config ::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new(parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id) do |response, operation| - assert_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_engine_config({ parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id }, grpc_options) do |response, operation| - assert_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_engine_config(::Google::Cloud::FinancialServices::V1::CreateEngineConfigRequest.new(parent: parent, engine_config_id: engine_config_id, engine_config: engine_config, request_id: request_id), grpc_options) do |response, operation| - assert_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_engine_config_client_stub.call_rpc_count - end - end - - def test_update_engine_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. - update_mask = {} - engine_config = {} - request_id = "hello world" - - update_engine_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_engine_config, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::EngineConfig), request["engine_config"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_engine_config_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_engine_config({ update_mask: update_mask, engine_config: engine_config, request_id: request_id }) do |response, 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_engine_config update_mask: update_mask, engine_config: engine_config, request_id: request_id do |response, 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_engine_config ::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new(update_mask: update_mask, engine_config: engine_config, request_id: request_id) do |response, operation| - assert_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_engine_config({ update_mask: update_mask, engine_config: engine_config, request_id: request_id }, grpc_options) do |response, operation| - assert_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_engine_config(::Google::Cloud::FinancialServices::V1::UpdateEngineConfigRequest.new(update_mask: update_mask, engine_config: engine_config, request_id: request_id), grpc_options) do |response, operation| - assert_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_engine_config_client_stub.call_rpc_count - end - end - - def test_export_engine_config_metadata - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - engine_config = "hello world" - structured_metadata_destination = {} - - export_engine_config_metadata_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_engine_config_metadata, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest, request - assert_equal "hello world", request["engine_config"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BigQueryDestination), request["structured_metadata_destination"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_engine_config_metadata_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_engine_config_metadata({ engine_config: engine_config, structured_metadata_destination: structured_metadata_destination }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_engine_config_metadata engine_config: engine_config, structured_metadata_destination: structured_metadata_destination do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_engine_config_metadata ::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new(engine_config: engine_config, structured_metadata_destination: structured_metadata_destination) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_engine_config_metadata({ engine_config: engine_config, structured_metadata_destination: structured_metadata_destination }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_engine_config_metadata(::Google::Cloud::FinancialServices::V1::ExportEngineConfigMetadataRequest.new(engine_config: engine_config, structured_metadata_destination: structured_metadata_destination), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_engine_config_metadata_client_stub.call_rpc_count - end - end - - def test_delete_engine_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" - request_id = "hello world" - - delete_engine_config_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_engine_config, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_engine_config_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_engine_config({ name: name, request_id: request_id }) do |response, 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_engine_config name: name, request_id: request_id do |response, 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_engine_config ::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new(name: name, request_id: request_id) do |response, operation| - assert_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_engine_config({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_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_engine_config(::Google::Cloud::FinancialServices::V1::DeleteEngineConfigRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_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_engine_config_client_stub.call_rpc_count - end - end - - def test_get_engine_version - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::EngineVersion.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_engine_version_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_engine_version, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_engine_version_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_engine_version({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_engine_version name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_engine_version ::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_engine_version({ 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_engine_version(::Google::Cloud::FinancialServices::V1::GetEngineVersionRequest.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_engine_version_client_stub.call_rpc_count - end - end - - def test_list_engine_versions - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::ListEngineVersionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_engine_versions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_engine_versions, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest, 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_engine_versions_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_engine_versions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_engine_versions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_engine_versions ::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.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_engine_versions({ 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_engine_versions(::Google::Cloud::FinancialServices::V1::ListEngineVersionsRequest.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_engine_versions_client_stub.call_rpc_count - end - end - - def test_list_prediction_results - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::ListPredictionResultsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_prediction_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_prediction_results, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest, 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_prediction_results_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_prediction_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_prediction_results parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_prediction_results ::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.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_prediction_results({ 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_prediction_results(::Google::Cloud::FinancialServices::V1::ListPredictionResultsRequest.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_prediction_results_client_stub.call_rpc_count - end - end - - def test_get_prediction_result - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::PredictionResult.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_prediction_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_prediction_result, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_prediction_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_prediction_result({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_prediction_result name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_prediction_result ::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_prediction_result({ 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_prediction_result(::Google::Cloud::FinancialServices::V1::GetPredictionResultRequest.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_prediction_result_client_stub.call_rpc_count - end - end - - def test_create_prediction_result - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - prediction_result_id = "hello world" - prediction_result = {} - request_id = "hello world" - - create_prediction_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_prediction_result, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["prediction_result_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::PredictionResult), request["prediction_result"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_prediction_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_prediction_result({ parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id }) do |response, 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_prediction_result parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id do |response, 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_prediction_result ::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new(parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id) do |response, operation| - assert_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_prediction_result({ parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id }, grpc_options) do |response, operation| - assert_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_prediction_result(::Google::Cloud::FinancialServices::V1::CreatePredictionResultRequest.new(parent: parent, prediction_result_id: prediction_result_id, prediction_result: prediction_result, request_id: request_id), grpc_options) do |response, operation| - assert_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_prediction_result_client_stub.call_rpc_count - end - end - - def test_update_prediction_result - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - prediction_result = {} - request_id = "hello world" - - update_prediction_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_prediction_result, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::PredictionResult), request["prediction_result"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_prediction_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_prediction_result({ update_mask: update_mask, prediction_result: prediction_result, request_id: request_id }) do |response, 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_prediction_result update_mask: update_mask, prediction_result: prediction_result, request_id: request_id do |response, 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_prediction_result ::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new(update_mask: update_mask, prediction_result: prediction_result, request_id: request_id) do |response, operation| - assert_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_prediction_result({ update_mask: update_mask, prediction_result: prediction_result, request_id: request_id }, grpc_options) do |response, operation| - assert_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_prediction_result(::Google::Cloud::FinancialServices::V1::UpdatePredictionResultRequest.new(update_mask: update_mask, prediction_result: prediction_result, request_id: request_id), grpc_options) do |response, operation| - assert_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_prediction_result_client_stub.call_rpc_count - end - end - - def test_export_prediction_result_metadata - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - prediction_result = "hello world" - structured_metadata_destination = {} - - export_prediction_result_metadata_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_prediction_result_metadata, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest, request - assert_equal "hello world", request["prediction_result"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BigQueryDestination), request["structured_metadata_destination"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_prediction_result_metadata_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_prediction_result_metadata({ prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_prediction_result_metadata prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_prediction_result_metadata ::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new(prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_prediction_result_metadata({ prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_prediction_result_metadata(::Google::Cloud::FinancialServices::V1::ExportPredictionResultMetadataRequest.new(prediction_result: prediction_result, structured_metadata_destination: structured_metadata_destination), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_prediction_result_metadata_client_stub.call_rpc_count - end - end - - def test_delete_prediction_result - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_prediction_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_prediction_result, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_prediction_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_prediction_result({ name: name, request_id: request_id }) do |response, 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_prediction_result name: name, request_id: request_id do |response, 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_prediction_result ::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new(name: name, request_id: request_id) do |response, operation| - assert_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_prediction_result({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_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_prediction_result(::Google::Cloud::FinancialServices::V1::DeletePredictionResultRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_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_prediction_result_client_stub.call_rpc_count - end - end - - def test_list_backtest_results - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::ListBacktestResultsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backtest_results_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backtest_results, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest, 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_backtest_results_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backtest_results({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_backtest_results parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_backtest_results ::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.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_backtest_results({ 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_backtest_results(::Google::Cloud::FinancialServices::V1::ListBacktestResultsRequest.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_backtest_results_client_stub.call_rpc_count - end - end - - def test_get_backtest_result - # Create GRPC objects. - grpc_response = ::Google::Cloud::FinancialServices::V1::BacktestResult.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backtest_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backtest_result, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backtest_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backtest_result({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backtest_result name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backtest_result ::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backtest_result({ 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_backtest_result(::Google::Cloud::FinancialServices::V1::GetBacktestResultRequest.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_backtest_result_client_stub.call_rpc_count - end - end - - def test_create_backtest_result - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backtest_result_id = "hello world" - backtest_result = {} - request_id = "hello world" - - create_backtest_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backtest_result, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["backtest_result_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BacktestResult), request["backtest_result"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backtest_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_backtest_result({ parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id }) do |response, 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_backtest_result parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id do |response, 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_backtest_result ::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new(parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id) do |response, operation| - assert_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_backtest_result({ parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id }, grpc_options) do |response, operation| - assert_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_backtest_result(::Google::Cloud::FinancialServices::V1::CreateBacktestResultRequest.new(parent: parent, backtest_result_id: backtest_result_id, backtest_result: backtest_result, request_id: request_id), grpc_options) do |response, operation| - assert_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_backtest_result_client_stub.call_rpc_count - end - end - - def test_update_backtest_result - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - backtest_result = {} - request_id = "hello world" - - update_backtest_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backtest_result, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BacktestResult), request["backtest_result"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backtest_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backtest_result({ update_mask: update_mask, backtest_result: backtest_result, request_id: request_id }) do |response, 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_backtest_result update_mask: update_mask, backtest_result: backtest_result, request_id: request_id do |response, 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_backtest_result ::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new(update_mask: update_mask, backtest_result: backtest_result, request_id: request_id) do |response, operation| - assert_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_backtest_result({ update_mask: update_mask, backtest_result: backtest_result, request_id: request_id }, grpc_options) do |response, operation| - assert_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_backtest_result(::Google::Cloud::FinancialServices::V1::UpdateBacktestResultRequest.new(update_mask: update_mask, backtest_result: backtest_result, request_id: request_id), grpc_options) do |response, operation| - assert_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_backtest_result_client_stub.call_rpc_count - end - end - - def test_export_backtest_result_metadata - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - backtest_result = "hello world" - structured_metadata_destination = {} - - export_backtest_result_metadata_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_backtest_result_metadata, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest, request - assert_equal "hello world", request["backtest_result"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::FinancialServices::V1::BigQueryDestination), request["structured_metadata_destination"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_backtest_result_metadata_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_backtest_result_metadata({ backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_backtest_result_metadata backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_backtest_result_metadata ::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new(backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_backtest_result_metadata({ backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_backtest_result_metadata(::Google::Cloud::FinancialServices::V1::ExportBacktestResultMetadataRequest.new(backtest_result: backtest_result, structured_metadata_destination: structured_metadata_destination), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_backtest_result_metadata_client_stub.call_rpc_count - end - end - - def test_delete_backtest_result - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_backtest_result_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backtest_result, name - assert_kind_of ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backtest_result_client_stub do - # Create client - client = ::Google::Cloud::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backtest_result({ name: name, request_id: request_id }) do |response, 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_backtest_result name: name, request_id: request_id do |response, 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_backtest_result ::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new(name: name, request_id: request_id) do |response, operation| - assert_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_backtest_result({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_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_backtest_result(::Google::Cloud::FinancialServices::V1::DeleteBacktestResultRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_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_backtest_result_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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::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::FinancialServices::V1::AML::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::FinancialServices::V1::AML::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::FinancialServices::V1::AML::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::FinancialServices::V1::AML::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-financial_services-v1/test/helper.rb b/owl-bot-staging/google-cloud-financial_services-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-financial_services-v1/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-financial_services/.gitignore b/owl-bot-staging/google-cloud-financial_services/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/.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-financial_services/.repo-metadata.json b/owl-bot-staging/google-cloud-financial_services/.repo-metadata.json deleted file mode 100644 index 242458e39d5d..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "financialservices.googleapis.com", - "api_shortname": "financialservices", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services/latest", - "distribution_name": "google-cloud-financial_services", - "is_cloud": true, - "language": "ruby", - "name": "financialservices", - "name_pretty": "Financial Services API", - "product_documentation": "https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-financial_services is the official client library for the Financial Services API.", - "ruby-cloud-product-url": "https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-financial_services/.rubocop.yml b/owl-bot-staging/google-cloud-financial_services/.rubocop.yml deleted file mode 100644 index cc27aee09ff0..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-financial_services.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-financial_services.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-financial_services/.toys.rb b/owl-bot-staging/google-cloud-financial_services/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/.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-financial_services/.yardopts b/owl-bot-staging/google-cloud-financial_services/.yardopts deleted file mode 100644 index 9e3998c1ad60..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Financial Services API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-financial_services/AUTHENTICATION.md b/owl-bot-staging/google-cloud-financial_services/AUTHENTICATION.md deleted file mode 100644 index 0f4e348cb59d..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-financial_services 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-financial_services 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/financial_services" - -client = Google::Cloud::FinancialServices.aml do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/financial_services" - -Google::Cloud::FinancialServices.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::FinancialServices.aml -``` - -### 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-financial_services -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/financial_services" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::FinancialServices.aml -``` - -### 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-financial_services/CHANGELOG.md b/owl-bot-staging/google-cloud-financial_services/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-financial_services/Gemfile b/owl-bot-staging/google-cloud-financial_services/Gemfile deleted file mode 100644 index f55d6d2113e4..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-financial_services-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-financial_services.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-financial_services/LICENSE.md b/owl-bot-staging/google-cloud-financial_services/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/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-financial_services/README.md b/owl-bot-staging/google-cloud-financial_services/README.md deleted file mode 100644 index 6b7fb7c4ecbe..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Financial Services API - -API Client library for the Financial Services API - -google-cloud-financial_services is the official client library for the Financial Services API. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-financial_services-v*`. -The gem `google-cloud-financial_services` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services/latest) -for this library, google-cloud-financial_services, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-financial_services-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/financial-services/anti-money-laundering/docs/concepts/overview) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-financial_services -``` - -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/financialservices.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/financial_services" - -client = Google::Cloud::FinancialServices.aml -request = ::Google::Cloud::FinancialServices::V1::ListInstancesRequest.new # (request fields as keyword arguments...) -response = client.list_instances request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-financial_services-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services-v1/latest). - -## 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-financial_services`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-financial_services-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-financial_services`. -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-financial_services-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-financial_services/Rakefile b/owl-bot-staging/google-cloud-financial_services/Rakefile deleted file mode 100644 index c413046b4dec..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/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 = true -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-financial_services 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/financial_services/v1/aml/credentials" - ::Google::Cloud::FinancialServices::V1::AML::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-financial_services 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-financial_services 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-financial_services 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-financial_services gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-financial_services" - header "google-cloud-financial_services rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-financial_services yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-financial_services 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-financial_services 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-financial_services 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-financial_services/google-cloud-financial_services.gemspec b/owl-bot-staging/google-cloud-financial_services/google-cloud-financial_services.gemspec deleted file mode 100644 index 9522169baf90..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/google-cloud-financial_services.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/financial_services/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-financial_services" - gem.version = Google::Cloud::FinancialServices::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-financial_services is the official client library for the Financial Services API." - gem.summary = "API Client library for the Financial Services API" - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-financial_services-v1", ">= 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-financial_services/lib/google-cloud-financial_services.rb b/owl-bot-staging/google-cloud-financial_services/lib/google-cloud-financial_services.rb deleted file mode 100644 index 6b006141b68f..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/lib/google-cloud-financial_services.rb +++ /dev/null @@ -1,19 +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/financial_services" unless defined? Google::Cloud::FinancialServices::VERSION diff --git a/owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services.rb b/owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services.rb deleted file mode 100644 index ed8c6516dda5..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services.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! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/financial_services/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :financial_services do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module FinancialServices - ## - # Create a new client object for AML. - # - # By default, this returns an instance of - # [Google::Cloud::FinancialServices::V1::AML::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-financial_services-v1/latest/Google-Cloud-FinancialServices-V1-AML-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the AML service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the AML service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::FinancialServices.aml_available?}. - # - # ## About AML - # - # The AML (Anti Money Laundering) service allows users to perform REST - # operations on aml. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.aml version: :v1, transport: :grpc, &block - require "google/cloud/financial_services/#{version.to_s.downcase}" - - package_name = Google::Cloud::FinancialServices - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::FinancialServices.const_get(package_name).const_get(:AML) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the AML service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::FinancialServices.aml}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the AML service, - # or if the versioned client gem needs an update to support the AML service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.aml_available? version: :v1, transport: :grpc - require "google/cloud/financial_services/#{version.to_s.downcase}" - package_name = Google::Cloud::FinancialServices - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::FinancialServices.const_get package_name - return false unless service_module.const_defined? :AML - service_module = service_module.const_get :AML - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-financial_services library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # 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 [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.financial_services if block_given? - - ::Google::Cloud.configure.financial_services - end - end - end -end - -helper_path = ::File.join __dir__, "financial_services", "helpers.rb" -require "google/cloud/financial_services/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services/version.rb b/owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services/version.rb deleted file mode 100644 index 2fc671ddd481..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/lib/google/cloud/financial_services/version.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! - - -module Google - module Cloud - module FinancialServices - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/client_test.rb b/owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/client_test.rb deleted file mode 100644 index 47740c6b8f45..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/client_test.rb +++ /dev/null @@ -1,64 +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 "google/cloud/financial_services" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::FinancialServices::ClientConstructionMinitest < 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_aml_grpc - skip unless Google::Cloud::FinancialServices.aml_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::FinancialServices.aml transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::FinancialServices::V1::AML::Client, client - end - end - - def test_aml_rest - skip unless Google::Cloud::FinancialServices.aml_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::FinancialServices.aml transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::FinancialServices::V1::AML::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/version_test.rb b/owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/version_test.rb deleted file mode 100644 index e8165659db0d..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/test/google/cloud/financial_services/version_test.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 "helper" -require "google/cloud/financial_services/version" - -class Google::Cloud::FinancialServices::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::FinancialServices::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-financial_services/test/helper.rb b/owl-bot-staging/google-cloud-financial_services/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-financial_services/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/.gitignore b/owl-bot-staging/google-cloud-firestore-admin-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-firestore-admin-v1/.repo-metadata.json deleted file mode 100644 index 5fe9788514ab..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "firestore.googleapis.com", - "api_shortname": "firestore", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin-v1/latest", - "distribution_name": "google-cloud-firestore-admin-v1", - "is_cloud": true, - "language": "ruby", - "name": "firestore", - "name_pretty": "Cloud Firestore Admin V1 API", - "product_documentation": "https://cloud.google.com/firestore", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Note that google-cloud-firestore-admin-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-firestore-admin instead. See the readme for more details.", - "ruby-cloud-env-prefix": "FIRESTORE", - "ruby-cloud-product-url": "https://cloud.google.com/firestore", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/.rubocop.yml b/owl-bot-staging/google-cloud-firestore-admin-v1/.rubocop.yml deleted file mode 100644 index 8cc38d8fdd28..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-firestore-admin-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-firestore-admin-v1.rb" diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/.toys.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/.yardopts b/owl-bot-staging/google-cloud-firestore-admin-v1/.yardopts deleted file mode 100644 index 6eb0d4f42a37..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Firestore Admin 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-firestore-admin-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-firestore-admin-v1/AUTHENTICATION.md deleted file mode 100644 index 8143a0bdf549..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-firestore-admin-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-firestore-admin-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/firestore/admin/v1" - -client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/firestore/admin/v1" - -::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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-firestore-admin-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/firestore/admin/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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-firestore-admin-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-firestore-admin-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/Gemfile b/owl-bot-staging/google-cloud-firestore-admin-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/LICENSE.md b/owl-bot-staging/google-cloud-firestore-admin-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/README.md b/owl-bot-staging/google-cloud-firestore-admin-v1/README.md deleted file mode 100644 index 038402866b16..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Firestore Admin V1 API - -Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development. - -Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Firestore Admin V1 API. Most users should consider using -the main client gem, -[google-cloud-firestore-admin](https://rubygems.org/gems/google-cloud-firestore-admin). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-firestore-admin-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/firestore.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/firestore/admin/v1" - -client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new -request = ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new # (request fields as keyword arguments...) -response = client.create_index request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/firestore) -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/firestore/admin/v1" -require "logger" - -client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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-firestore-admin`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-firestore-admin-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-firestore-admin`. -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-firestore-admin-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-firestore-admin-v1/Rakefile b/owl-bot-staging/google-cloud-firestore-admin-v1/Rakefile deleted file mode 100644 index a6087cc77563..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["FIRESTORE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["FIRESTORE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["FIRESTORE_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 FIRESTORE_TEST_PROJECT=test123 FIRESTORE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/firestore/admin/v1/firestore_admin/credentials" - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["FIRESTORE_PROJECT"] = project - ENV["FIRESTORE_TEST_PROJECT"] = project - ENV["FIRESTORE_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-firestore-admin-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-firestore-admin-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-firestore-admin-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-firestore-admin-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-firestore-admin-v1" - header "google-cloud-firestore-admin-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-firestore-admin-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-firestore-admin-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-firestore-admin-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-firestore-admin-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-firestore-admin-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-firestore-admin-v1/gapic_metadata.json deleted file mode 100644 index b3ac64250ccf..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/gapic_metadata.json +++ /dev/null @@ -1,178 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.firestore.admin.v1", - "libraryPackage": "::Google::Cloud::Firestore::Admin::V1", - "services": { - "FirestoreAdmin": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client", - "rpcs": { - "CreateIndex": { - "methods": [ - "create_index" - ] - }, - "ListIndexes": { - "methods": [ - "list_indexes" - ] - }, - "GetIndex": { - "methods": [ - "get_index" - ] - }, - "DeleteIndex": { - "methods": [ - "delete_index" - ] - }, - "GetField": { - "methods": [ - "get_field" - ] - }, - "UpdateField": { - "methods": [ - "update_field" - ] - }, - "ListFields": { - "methods": [ - "list_fields" - ] - }, - "ExportDocuments": { - "methods": [ - "export_documents" - ] - }, - "ImportDocuments": { - "methods": [ - "import_documents" - ] - }, - "BulkDeleteDocuments": { - "methods": [ - "bulk_delete_documents" - ] - }, - "CreateDatabase": { - "methods": [ - "create_database" - ] - }, - "GetDatabase": { - "methods": [ - "get_database" - ] - }, - "ListDatabases": { - "methods": [ - "list_databases" - ] - }, - "UpdateDatabase": { - "methods": [ - "update_database" - ] - }, - "DeleteDatabase": { - "methods": [ - "delete_database" - ] - }, - "CreateUserCreds": { - "methods": [ - "create_user_creds" - ] - }, - "GetUserCreds": { - "methods": [ - "get_user_creds" - ] - }, - "ListUserCreds": { - "methods": [ - "list_user_creds" - ] - }, - "EnableUserCreds": { - "methods": [ - "enable_user_creds" - ] - }, - "DisableUserCreds": { - "methods": [ - "disable_user_creds" - ] - }, - "ResetUserPassword": { - "methods": [ - "reset_user_password" - ] - }, - "DeleteUserCreds": { - "methods": [ - "delete_user_creds" - ] - }, - "GetBackup": { - "methods": [ - "get_backup" - ] - }, - "ListBackups": { - "methods": [ - "list_backups" - ] - }, - "DeleteBackup": { - "methods": [ - "delete_backup" - ] - }, - "RestoreDatabase": { - "methods": [ - "restore_database" - ] - }, - "CreateBackupSchedule": { - "methods": [ - "create_backup_schedule" - ] - }, - "GetBackupSchedule": { - "methods": [ - "get_backup_schedule" - ] - }, - "ListBackupSchedules": { - "methods": [ - "list_backup_schedules" - ] - }, - "UpdateBackupSchedule": { - "methods": [ - "update_backup_schedule" - ] - }, - "DeleteBackupSchedule": { - "methods": [ - "delete_backup_schedule" - ] - }, - "CloneDatabase": { - "methods": [ - "clone_database" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/google-cloud-firestore-admin-v1.gemspec b/owl-bot-staging/google-cloud-firestore-admin-v1/google-cloud-firestore-admin-v1.gemspec deleted file mode 100644 index 1d5191b71829..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/google-cloud-firestore-admin-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/firestore/admin/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-firestore-admin-v1" - gem.version = Google::Cloud::Firestore::Admin::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Note that google-cloud-firestore-admin-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-firestore-admin instead. See the readme for more details." - gem.summary = "Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development." - 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.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google-cloud-firestore-admin-v1.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google-cloud-firestore-admin-v1.rb deleted file mode 100644 index 653eb12e8e8e..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google-cloud-firestore-admin-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/firestore/admin/v1" diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1.rb deleted file mode 100644 index 43cc6acbca5a..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1.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 "google/cloud/firestore/admin/v1/firestore_admin" -require "google/cloud/firestore/admin/v1/version" - -module Google - module Cloud - module Firestore - module Admin - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/firestore/admin/v1" - # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/firestore/admin/v1" - # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - module V1 - end - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/firestore/admin/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin.rb deleted file mode 100644 index 38eed9c8a7f9..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin.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! - -require "gapic/common" -require "gapic/config" -require "gapic/config/method" - -require "google/cloud/firestore/admin/v1/version" - -require "google/cloud/firestore/admin/v1/firestore_admin/credentials" -require "google/cloud/firestore/admin/v1/firestore_admin/paths" -require "google/cloud/firestore/admin/v1/firestore_admin/operations" -require "google/cloud/firestore/admin/v1/firestore_admin/client" -require "google/cloud/firestore/admin/v1/firestore_admin/rest" - -module Google - module Cloud - module Firestore - module Admin - module V1 - ## - # The Cloud Firestore Admin API. - # - # This API provides several administrative services for Cloud Firestore. - # - # Project, Database, Namespace, Collection, Collection Group, and Document are - # used as defined in the Google Cloud Firestore API. - # - # Operation: An Operation represents work being performed in the background. - # - # The index service manages Cloud Firestore indexes. - # - # Index creation is performed asynchronously. - # An Operation resource is created for each such asynchronous operation. - # The state of the operation (including any errors encountered) - # may be queried via the Operation resource. - # - # The Operations collection provides a record of actions performed for the - # specified Project (including any Operations in progress). Operations are not - # created directly but through calls on other collections or resources. - # - # An Operation that is done may be deleted so that it is no longer listed as - # part of the Operation collection. Operations are garbage collected after - # 30 days. By default, ListOperations will only return in progress and failed - # operations. To list completed operation, issue a ListOperations request with - # the filter `done: true`. - # - # Operations are created by service `FirestoreAdmin`, but are accessed via - # service `google.longrunning.Operations`. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/firestore/admin/v1/firestore_admin" - # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/firestore/admin/v1/firestore_admin/rest" - # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - module FirestoreAdmin - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "firestore_admin", "helpers.rb" -require "google/cloud/firestore/admin/v1/firestore_admin/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb deleted file mode 100644 index 882f95e4afaf..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/client.rb +++ /dev/null @@ -1,3849 +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/firestore/admin/v1/firestore_admin_pb" -require "google/cloud/location" - -module Google - module Cloud - module Firestore - module Admin - module V1 - module FirestoreAdmin - ## - # Client for the FirestoreAdmin service. - # - # The Cloud Firestore Admin API. - # - # This API provides several administrative services for Cloud Firestore. - # - # Project, Database, Namespace, Collection, Collection Group, and Document are - # used as defined in the Google Cloud Firestore API. - # - # Operation: An Operation represents work being performed in the background. - # - # The index service manages Cloud Firestore indexes. - # - # Index creation is performed asynchronously. - # An Operation resource is created for each such asynchronous operation. - # The state of the operation (including any errors encountered) - # may be queried via the Operation resource. - # - # The Operations collection provides a record of actions performed for the - # specified Project (including any Operations in progress). Operations are not - # created directly but through calls on other collections or resources. - # - # An Operation that is done may be deleted so that it is no longer listed as - # part of the Operation collection. Operations are garbage collected after - # 30 days. By default, ListOperations will only return in progress and failed - # operations. To list completed operation, issue a ListOperations request with - # the filter `done: true`. - # - # Operations are created by service `FirestoreAdmin`, but are accessed via - # service `google.longrunning.Operations`. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :firestore_admin_stub - - ## - # Configure the FirestoreAdmin Client class. - # - # See {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all FirestoreAdmin clients - # ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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", "Firestore", "Admin", "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_index.timeout = 60.0 - - default_config.rpcs.list_indexes.timeout = 60.0 - default_config.rpcs.list_indexes.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] - } - - default_config.rpcs.get_index.timeout = 60.0 - default_config.rpcs.get_index.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] - } - - default_config.rpcs.delete_index.timeout = 60.0 - default_config.rpcs.delete_index.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] - } - - default_config.rpcs.get_field.timeout = 60.0 - default_config.rpcs.get_field.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] - } - - default_config.rpcs.update_field.timeout = 60.0 - - default_config.rpcs.list_fields.timeout = 60.0 - default_config.rpcs.list_fields.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] - } - - default_config.rpcs.export_documents.timeout = 60.0 - - default_config.rpcs.import_documents.timeout = 60.0 - - default_config.rpcs.bulk_delete_documents.timeout = 60.0 - - default_config.rpcs.create_database.timeout = 120.0 - - default_config.rpcs.restore_database.timeout = 120.0 - - default_config.rpcs.clone_database.timeout = 120.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the FirestoreAdmin 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::Firestore::Admin::V1::FirestoreAdmin::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 - @firestore_admin_stub.universe_domain - end - - ## - # Create a new FirestoreAdmin client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the FirestoreAdmin 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/firestore/admin/v1/firestore_admin_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 - - @firestore_admin_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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 - ) - - @firestore_admin_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 = @firestore_admin_stub.endpoint - config.universe_domain = @firestore_admin_stub.universe_domain - config.logger = @firestore_admin_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @firestore_admin_stub.logger - end - - # Service calls - - ## - # Creates a composite index. This returns a - # {::Google::Longrunning::Operation google.longrunning.Operation} which may be - # used to track the status of the creation. The metadata for the operation - # will be the type - # {::Google::Cloud::Firestore::Admin::V1::IndexOperationMetadata IndexOperationMetadata}. - # - # @overload create_index(request, options = nil) - # Pass arguments to `create_index` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_index(parent: nil, index: nil) - # Pass arguments to `create_index` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - # @param index [::Google::Cloud::Firestore::Admin::V1::Index, ::Hash] - # Required. The composite index 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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new - # - # # Call the create_index method. - # result = client.create_index request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_index request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest - - # Converts hash and nil to 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_index.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_index.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_index.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :create_index, 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 composite indexes. - # - # @overload list_indexes(request, options = nil) - # Pass arguments to `list_indexes` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_indexes(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_indexes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - # @param filter [::String] - # The filter to apply to list results. - # @param page_size [::Integer] - # The number of results to return. - # @param page_token [::String] - # A page token, returned from a previous call to - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes FirestoreAdmin.ListIndexes}, - # that may be used to get the next page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new - # - # # Call the list_indexes method. - # result = client.list_indexes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Index. - # p item - # end - # - def list_indexes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest - - # Converts hash and nil to 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_indexes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_indexes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_indexes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :list_indexes, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @firestore_admin_stub, :list_indexes, 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 a composite index. - # - # @overload get_index(request, options = nil) - # Pass arguments to `get_index` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::GetIndexRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::GetIndexRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_index(name: nil) - # Pass arguments to `get_index` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::Index] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::Index] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::GetIndexRequest.new - # - # # Call the get_index method. - # result = client.get_index request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Index. - # p result - # - def get_index request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetIndexRequest - - # Converts hash and nil to 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_index.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_index.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_index.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :get_index, 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 composite index. - # - # @overload delete_index(request, options = nil) - # Pass arguments to `delete_index` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_index(name: nil) - # Pass arguments to `delete_index` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.new - # - # # Call the delete_index method. - # result = client.delete_index request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_index request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest - - # Converts hash and nil to 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_index.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_index.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_index.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :delete_index, 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 metadata and configuration for a Field. - # - # @overload get_field(request, options = nil) - # Pass arguments to `get_field` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::GetFieldRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::GetFieldRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_field(name: nil) - # Pass arguments to `get_field` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::Field] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::Field] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::GetFieldRequest.new - # - # # Call the get_field method. - # result = client.get_field request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Field. - # p result - # - def get_field request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetFieldRequest - - # Converts hash and nil to 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_field.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_field.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_field.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :get_field, 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 field configuration. Currently, field updates apply only to - # single field index configuration. However, calls to - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_field FirestoreAdmin.UpdateField} - # should provide a field mask to avoid changing any configuration that the - # caller isn't aware of. The field mask should be specified as: `{ paths: - # "index_config" }`. - # - # This call returns a - # {::Google::Longrunning::Operation google.longrunning.Operation} which may be - # used to track the status of the field update. The metadata for the - # operation will be the type - # {::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata FieldOperationMetadata}. - # - # To configure the default field settings for the database, use - # the special `Field` with resource name: - # `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - # - # @overload update_field(request, options = nil) - # Pass arguments to `update_field` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_field(field: nil, update_mask: nil) - # Pass arguments to `update_field` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param field [::Google::Cloud::Firestore::Admin::V1::Field, ::Hash] - # Required. The field to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # A mask, relative to the field. If specified, only configuration specified - # by this field_mask will be updated in the field. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new - # - # # Call the update_field method. - # result = client.update_field request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_field request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest - - # Converts hash and nil to 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_field.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.field&.name - header_params["field.name"] = request.field.name - end - - request_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_field.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_field.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :update_field, 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 the field configuration and metadata for this database. - # - # Currently, - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} - # only supports listing fields that have been explicitly overridden. To issue - # this query, call - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} - # with the filter set to `indexConfig.usesAncestorConfig:false` or - # `ttlConfig:*`. - # - # @overload list_fields(request, options = nil) - # Pass arguments to `list_fields` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_fields(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_fields` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - # @param filter [::String] - # The filter to apply to list results. Currently, - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} - # only supports listing fields that have been explicitly overridden. To issue - # this query, call - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} - # with a filter that includes `indexConfig.usesAncestorConfig:false` or - # `ttlConfig:*`. - # @param page_size [::Integer] - # The number of results to return. - # @param page_token [::String] - # A page token, returned from a previous call to - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields}, - # that may be used to get the next page of results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new - # - # # Call the list_fields method. - # result = client.list_fields request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Field. - # p item - # end - # - def list_fields request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest - - # Converts hash and nil to 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_fields.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_fields.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_fields.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :list_fields, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @firestore_admin_stub, :list_fields, 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 - - ## - # Exports a copy of all or a subset of documents from Google Cloud Firestore - # to another storage system, such as Google Cloud Storage. Recent updates to - # documents may not be reflected in the export. The export occurs in the - # background and its progress can be monitored and managed via the - # Operation resource that is created. The output of an export may only be - # used once the associated operation is done. If an export operation is - # cancelled before completion it may leave partial data behind in Google - # Cloud Storage. - # - # For more details on export behavior and output format, refer to: - # https://cloud.google.com/firestore/docs/manage-data/export-import - # - # @overload export_documents(request, options = nil) - # Pass arguments to `export_documents` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload export_documents(name: nil, collection_ids: nil, output_uri_prefix: nil, namespace_ids: nil, snapshot_time: nil) - # Pass arguments to `export_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Database to export. Should be of the form: - # `projects/{project_id}/databases/{database_id}`. - # @param collection_ids [::Array<::String>] - # Which collection IDs to export. Unspecified means all collections. Each - # collection ID in this list must be unique. - # @param output_uri_prefix [::String] - # The output URI. Currently only supports Google Cloud Storage URIs of the - # form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - # of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - # Google Cloud Storage namespace path. When - # choosing a name, be sure to consider Google Cloud Storage naming - # guidelines: https://cloud.google.com/storage/docs/naming. - # If the URI is a bucket (without a namespace path), a prefix will be - # generated based on the start time. - # @param namespace_ids [::Array<::String>] - # An empty list represents all namespaces. This is the preferred - # usage for databases that don't use namespaces. - # - # An empty string element represents the default namespace. This should be - # used if the database has data in non-default namespaces, but doesn't want - # to include them. Each namespace in this list must be unique. - # @param snapshot_time [::Google::Protobuf::Timestamp, ::Hash] - # The timestamp that corresponds to the version of the database to be - # exported. The timestamp must be in the past, rounded to the minute and not - # older than - # {::Google::Cloud::Firestore::Admin::V1::Database#earliest_version_time earliestVersionTime}. - # If specified, then the exported documents will represent a consistent view - # of the database at the provided time. Otherwise, there are no guarantees - # about the consistency of the exported documents. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new - # - # # Call the export_documents method. - # result = client.export_documents request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.export_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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.export_documents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.export_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :export_documents, 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 - - ## - # Imports documents into Google Cloud Firestore. Existing documents with the - # same name are overwritten. The import occurs in the background and its - # progress can be monitored and managed via the Operation resource that is - # created. If an ImportDocuments operation is cancelled, it is possible - # that a subset of the data has already been imported to Cloud Firestore. - # - # @overload import_documents(request, options = nil) - # Pass arguments to `import_documents` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload import_documents(name: nil, collection_ids: nil, input_uri_prefix: nil, namespace_ids: nil) - # Pass arguments to `import_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Database to import into. Should be of the form: - # `projects/{project_id}/databases/{database_id}`. - # @param collection_ids [::Array<::String>] - # Which collection IDs to import. Unspecified means all collections included - # in the import. Each collection ID in this list must be unique. - # @param input_uri_prefix [::String] - # Location of the exported files. - # This must match the output_uri_prefix of an ExportDocumentsResponse from - # an export that has completed successfully. - # See: - # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsResponse#output_uri_prefix google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix}. - # @param namespace_ids [::Array<::String>] - # An empty list represents all namespaces. This is the preferred - # usage for databases that don't use namespaces. - # - # An empty string element represents the default namespace. This should be - # used if the database has data in non-default namespaces, but doesn't want - # to include them. Each namespace in this list must be unique. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new - # - # # Call the import_documents method. - # result = client.import_documents request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.import_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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.import_documents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.import_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :import_documents, 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 - - ## - # Bulk deletes a subset of documents from Google Cloud Firestore. - # Documents created or updated after the underlying system starts to process - # the request will not be deleted. The bulk delete occurs in the background - # and its progress can be monitored and managed via the Operation resource - # that is created. - # - # For more details on bulk delete behavior, refer to: - # https://cloud.google.com/firestore/docs/manage-data/bulk-delete - # - # @overload bulk_delete_documents(request, options = nil) - # Pass arguments to `bulk_delete_documents` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload bulk_delete_documents(name: nil, collection_ids: nil, namespace_ids: nil) - # Pass arguments to `bulk_delete_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Database to operate. Should be of the form: - # `projects/{project_id}/databases/{database_id}`. - # @param collection_ids [::Array<::String>] - # Optional. IDs of the collection groups to delete. Unspecified means all - # collection groups. - # - # Each collection group in this list must be unique. - # @param namespace_ids [::Array<::String>] - # Optional. Namespaces to delete. - # - # An empty list means all namespaces. This is the recommended - # usage for databases that don't use namespaces. - # - # An empty string element represents the default namespace. This should be - # used if the database has data in non-default namespaces, but doesn't want - # to delete from them. - # - # Each namespace in this list must be unique. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new - # - # # Call the bulk_delete_documents method. - # result = client.bulk_delete_documents request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def bulk_delete_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.bulk_delete_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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.bulk_delete_documents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.bulk_delete_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :bulk_delete_documents, 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 - - ## - # Create a database. - # - # @overload create_database(request, options = nil) - # Pass arguments to `create_database` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_database(parent: nil, database: nil, database_id: nil) - # Pass arguments to `create_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent name of the form - # `projects/{project_id}` - # @param database [::Google::Cloud::Firestore::Admin::V1::Database, ::Hash] - # Required. The Database to create. - # @param database_id [::String] - # Required. The ID to use for the database, which will become the final - # component of the database's resource name. - # - # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - # with first character a letter and the last a letter or a number. Must not - # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. - # - # "(default)" database ID is also valid. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new - # - # # Call the create_database method. - # result = client.create_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest - - # Converts hash and nil to 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_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_database.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :create_database, 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 information about a database. - # - # @overload get_database(request, options = nil) - # Pass arguments to `get_database` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_database(name: nil) - # Pass arguments to `get_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::Database] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::Database] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.new - # - # # Call the get_database method. - # result = client.get_database request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Database. - # p result - # - def get_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest - - # Converts hash and nil to 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_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_database.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :get_database, 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 all the databases in the project. - # - # @overload list_databases(request, options = nil) - # Pass arguments to `list_databases` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_databases(parent: nil, show_deleted: nil) - # Pass arguments to `list_databases` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent name of the form - # `projects/{project_id}` - # @param show_deleted [::Boolean] - # If true, also returns deleted resources. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new - # - # # Call the list_databases method. - # result = client.list_databases request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse. - # p result - # - def list_databases request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest - - # Converts hash and nil to 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_databases.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_databases.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_databases.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :list_databases, 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 database. - # - # @overload update_database(request, options = nil) - # Pass arguments to `update_database` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_database(database: nil, update_mask: nil) - # Pass arguments to `update_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::Google::Cloud::Firestore::Admin::V1::Database, ::Hash] - # Required. The database to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new - # - # # Call the update_database method. - # result = client.update_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest - - # Converts hash and nil to 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_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database&.name - header_params["database.name"] = request.database.name - end - - request_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_database.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :update_database, 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 database. - # - # @overload delete_database(request, options = nil) - # Pass arguments to `delete_database` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_database(name: nil, etag: nil) - # Pass arguments to `delete_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}` - # @param etag [::String] - # The current etag of the Database. - # If an etag is provided and does not match the current etag of the database, - # deletion will be blocked and a FAILED_PRECONDITION error will be returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.new - # - # # Call the delete_database method. - # result = client.delete_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest - - # Converts hash and nil to 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_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_database.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :delete_database, 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 - - ## - # Create a user creds. - # - # @overload create_user_creds(request, options = nil) - # Pass arguments to `create_user_creds` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_user_creds(parent: nil, user_creds: nil, user_creds_id: nil) - # Pass arguments to `create_user_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent name of the form - # `projects/{project_id}/databases/{database_id}` - # @param user_creds [::Google::Cloud::Firestore::Admin::V1::UserCreds, ::Hash] - # Required. The user creds to create. - # @param user_creds_id [::String] - # Required. The ID to use for the user creds, which will become the final - # component of the user creds's resource name. - # - # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - # with first character a letter and the last a letter or a number. Must not - # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new - # - # # Call the create_user_creds method. - # result = client.create_user_creds request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - # p result - # - def create_user_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest - - # Converts hash and nil to 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_user_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_user_creds.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_user_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :create_user_creds, 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 user creds resource. Note that the returned resource does not - # contain the secret value itself. - # - # @overload get_user_creds(request, options = nil) - # Pass arguments to `get_user_creds` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_user_creds(name: nil) - # Pass arguments to `get_user_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new - # - # # Call the get_user_creds method. - # result = client.get_user_creds request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - # p result - # - def get_user_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest - - # Converts hash and nil to 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_user_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_user_creds.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_user_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :get_user_creds, 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 all user creds in the database. Note that the returned resource - # does not contain the secret value itself. - # - # @overload list_user_creds(request, options = nil) - # Pass arguments to `list_user_creds` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_user_creds(parent: nil) - # Pass arguments to `list_user_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent database name of the form - # `projects/{project_id}/databases/{database_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new - # - # # Call the list_user_creds method. - # result = client.list_user_creds request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse. - # p result - # - def list_user_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest - - # Converts hash and nil to 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_user_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_user_creds.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_user_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :list_user_creds, 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 - - ## - # Enables a user creds. No-op if the user creds are already enabled. - # - # @overload enable_user_creds(request, options = nil) - # Pass arguments to `enable_user_creds` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload enable_user_creds(name: nil) - # Pass arguments to `enable_user_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new - # - # # Call the enable_user_creds method. - # result = client.enable_user_creds request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - # p result - # - def enable_user_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.enable_user_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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.enable_user_creds.timeout, - metadata: metadata, - retry_policy: @config.rpcs.enable_user_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :enable_user_creds, 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 - - ## - # Disables a user creds. No-op if the user creds are already disabled. - # - # @overload disable_user_creds(request, options = nil) - # Pass arguments to `disable_user_creds` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload disable_user_creds(name: nil) - # Pass arguments to `disable_user_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new - # - # # Call the disable_user_creds method. - # result = client.disable_user_creds request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - # p result - # - def disable_user_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.disable_user_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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.disable_user_creds.timeout, - metadata: metadata, - retry_policy: @config.rpcs.disable_user_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :disable_user_creds, 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 - - ## - # Resets the password of a user creds. - # - # @overload reset_user_password(request, options = nil) - # Pass arguments to `reset_user_password` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload reset_user_password(name: nil) - # Pass arguments to `reset_user_password` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new - # - # # Call the reset_user_password method. - # result = client.reset_user_password request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - # p result - # - def reset_user_password request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.reset_user_password.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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.reset_user_password.timeout, - metadata: metadata, - retry_policy: @config.rpcs.reset_user_password.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :reset_user_password, 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 user creds. - # - # @overload delete_user_creds(request, options = nil) - # Pass arguments to `delete_user_creds` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_user_creds(name: nil) - # Pass arguments to `delete_user_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new - # - # # Call the delete_user_creds method. - # result = client.delete_user_creds request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_user_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest - - # Converts hash and nil to 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_user_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_user_creds.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_user_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :delete_user_creds, 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 information about a backup. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::GetBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup(name: nil) - # Pass arguments to `get_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup to fetch. - # - # Format is `projects/{project}/locations/{location}/backups/{backup}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::Backup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Backup. - # p result - # - def get_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetBackupRequest - - # Converts hash and nil to 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :get_backup, 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 all the backups. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backups(parent: nil, filter: nil) - # Pass arguments to `list_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 to list backups from. - # - # Format is `projects/{project}/locations/{location}`. - # Use `{location} = '-'` to list backups from all locations for the given - # project. This allows listing backups from a single location or from all - # locations. - # @param filter [::String] - # An expression that filters the list of returned backups. - # - # A filter expression consists of a field name, a comparison operator, and a - # value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the {::Google::Cloud::Firestore::Admin::V1::Backup Backup} are - # eligible for filtering: - # - # * `database_uid` (supports `=` only) - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new - # - # # Call the list_backups method. - # result = client.list_backups request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupsResponse. - # p result - # - def list_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest - - # Converts hash and nil to 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_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_backups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :list_backups, 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 backup. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup(name: nil) - # Pass arguments to `delete_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup to delete. - # - # format is `projects/{project}/locations/{location}/backups/{backup}`. - # - # @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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_backup request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest - - # Converts hash and nil to 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :delete_backup, 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 new database by restoring from an existing backup. - # - # The new database must be in the same cloud region or multi-region location - # as the existing backup. This behaves similar to - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database FirestoreAdmin.CreateDatabase} - # except instead of creating a new empty database, a new database is created - # with the database type, index configuration, and documents from an existing - # backup. - # - # The {::Google::Longrunning::Operation long-running operation} can be used to - # track the progress of the restore, with the Operation's - # {::Google::Longrunning::Operation#metadata metadata} field type being the - # {::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. - # The {::Google::Longrunning::Operation#response response} type is the - # {::Google::Cloud::Firestore::Admin::V1::Database Database} if the restore was - # successful. The new database is not readable or writeable until the LRO has - # completed. - # - # @overload restore_database(request, options = nil) - # Pass arguments to `restore_database` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload restore_database(parent: nil, database_id: nil, backup: nil, encryption_config: nil, tags: nil) - # Pass arguments to `restore_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project to restore the database in. Format is - # `projects/{project_id}`. - # @param database_id [::String] - # Required. The ID to use for the database, which will become the final - # component of the database's resource name. This database ID must not be - # associated with an existing database. - # - # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - # with first character a letter and the last a letter or a number. Must not - # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. - # - # "(default)" database ID is also valid. - # @param backup [::String] - # Required. Backup to restore from. Must be from the same project as the - # parent. - # - # The restored database will be created in the same location as the source - # backup. - # - # Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - # @param encryption_config [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig, ::Hash] - # Optional. Encryption configuration for the restored database. - # - # If this field is not specified, the restored database will use - # the same encryption configuration as the backup, namely - # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. - # @param tags [::Hash{::String => ::String}] - # Optional. Immutable. Tags to be bound to the restored database. - # - # The tags should be provided in the format of - # `tagKeys/{tag_key_id} -> tagValues/{tag_value_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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new - # - # # Call the restore_database method. - # result = client.restore_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.restore_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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.restore_database.timeout, - metadata: metadata, - retry_policy: @config.rpcs.restore_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :restore_database, 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 backup schedule on a database. - # At most two backup schedules can be configured on a database, one daily - # backup schedule and one weekly backup schedule. - # - # @overload create_backup_schedule(request, options = nil) - # Pass arguments to `create_backup_schedule` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_schedule(parent: nil, backup_schedule: nil) - # Pass arguments to `create_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 database. - # - # Format `projects/{project}/databases/{database}` - # @param backup_schedule [::Google::Cloud::Firestore::Admin::V1::BackupSchedule, ::Hash] - # Required. The backup schedule to create. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new - # - # # Call the create_backup_schedule method. - # result = client.create_backup_schedule request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. - # p result - # - def create_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest - - # Converts hash and nil to 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_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_backup_schedule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :create_backup_schedule, 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 information about a backup schedule. - # - # @overload get_backup_schedule(request, options = nil) - # Pass arguments to `get_backup_schedule` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_schedule(name: nil) - # Pass arguments to `get_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 backup schedule. - # - # Format - # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.new - # - # # Call the get_backup_schedule method. - # result = client.get_backup_schedule request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. - # p result - # - def get_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest - - # Converts hash and nil to 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_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_backup_schedule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :get_backup_schedule, 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 backup schedules. - # - # @overload list_backup_schedules(request, options = nil) - # Pass arguments to `list_backup_schedules` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_schedules(parent: nil) - # Pass arguments to `list_backup_schedules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 database. - # - # Format is `projects/{project}/databases/{database}`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new - # - # # Call the list_backup_schedules method. - # result = client.list_backup_schedules request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse. - # p result - # - def list_backup_schedules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest - - # Converts hash and nil to 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_backup_schedules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_backup_schedules.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_schedules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :list_backup_schedules, 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 backup schedule. - # - # @overload update_backup_schedule(request, options = nil) - # Pass arguments to `update_backup_schedule` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_schedule(backup_schedule: nil, update_mask: nil) - # Pass arguments to `update_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_schedule [::Google::Cloud::Firestore::Admin::V1::BackupSchedule, ::Hash] - # Required. The backup schedule to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new - # - # # Call the update_backup_schedule method. - # result = client.update_backup_schedule request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. - # p result - # - def update_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest - - # Converts hash and nil to 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_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup_schedule&.name - header_params["backup_schedule.name"] = request.backup_schedule.name - end - - request_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_backup_schedule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :update_backup_schedule, 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 backup schedule. - # - # @overload delete_backup_schedule(request, options = nil) - # Pass arguments to `delete_backup_schedule` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup_schedule(name: nil) - # Pass arguments to `delete_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 backup schedule. - # - # Format - # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - # - # @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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.new - # - # # Call the delete_backup_schedule method. - # result = client.delete_backup_schedule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest - - # Converts hash and nil to 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_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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_backup_schedule.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :delete_backup_schedule, 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 new database by cloning an existing one. - # - # The new database must be in the same cloud region or multi-region location - # as the existing database. This behaves similar to - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database FirestoreAdmin.CreateDatabase} - # except instead of creating a new empty database, a new database is created - # with the database type, index configuration, and documents from an existing - # database. - # - # The {::Google::Longrunning::Operation long-running operation} can be used to - # track the progress of the clone, with the Operation's - # {::Google::Longrunning::Operation#metadata metadata} field type being the - # {::Google::Cloud::Firestore::Admin::V1::CloneDatabaseMetadata CloneDatabaseMetadata}. - # The {::Google::Longrunning::Operation#response response} type is the - # {::Google::Cloud::Firestore::Admin::V1::Database Database} if the clone was - # successful. The new database is not readable or writeable until the LRO has - # completed. - # - # @overload clone_database(request, options = nil) - # Pass arguments to `clone_database` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload clone_database(parent: nil, database_id: nil, pitr_snapshot: nil, encryption_config: nil, tags: nil) - # Pass arguments to `clone_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project to clone the database in. Format is - # `projects/{project_id}`. - # @param database_id [::String] - # Required. The ID to use for the database, which will become the final - # component of the database's resource name. This database ID must not be - # associated with an existing database. - # - # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - # with first character a letter and the last a letter or a number. Must not - # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. - # - # "(default)" database ID is also valid. - # @param pitr_snapshot [::Google::Cloud::Firestore::Admin::V1::PitrSnapshot, ::Hash] - # Required. Specification of the PITR data to clone from. The source database - # must exist. - # - # The cloned database will be created in the same location as the source - # database. - # @param encryption_config [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig, ::Hash] - # Optional. Encryption configuration for the cloned database. - # - # If this field is not specified, the cloned database will use - # the same encryption configuration as the source database, namely - # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. - # @param tags [::Hash{::String => ::String}] - # Optional. Immutable. Tags to be bound to the cloned database. - # - # The tags should be provided in the format of - # `tagKeys/{tag_key_id} -> tagValues/{tag_value_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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new - # - # # Call the clone_database method. - # result = client.clone_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def clone_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.clone_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.pitr_snapshot&.database - regex_match = %r{^projects/(?[^/]+)(?:/.*)?$}.match request.pitr_snapshot.database - if regex_match - header_params["project_id"] = regex_match["project_id".to_s] - end - end - if request.pitr_snapshot&.database - regex_match = %r{^projects/[^/]+/databases/(?[^/]+)(?:/.*)?$}.match request.pitr_snapshot.database - if regex_match - header_params["database_id"] = regex_match["database_id".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.clone_database.timeout, - metadata: metadata, - retry_policy: @config.rpcs.clone_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.call_rpc :clone_database, 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 FirestoreAdmin API. - # - # This class represents the configuration for FirestoreAdmin, - # 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::Firestore::Admin::V1::FirestoreAdmin::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_index to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_index.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_index.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::Firestore::Admin::V1::FirestoreAdmin::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 = "firestore.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 FirestoreAdmin 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_index` - # @return [::Gapic::Config::Method] - # - attr_reader :create_index - ## - # RPC-specific configuration for `list_indexes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_indexes - ## - # RPC-specific configuration for `get_index` - # @return [::Gapic::Config::Method] - # - attr_reader :get_index - ## - # RPC-specific configuration for `delete_index` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_index - ## - # RPC-specific configuration for `get_field` - # @return [::Gapic::Config::Method] - # - attr_reader :get_field - ## - # RPC-specific configuration for `update_field` - # @return [::Gapic::Config::Method] - # - attr_reader :update_field - ## - # RPC-specific configuration for `list_fields` - # @return [::Gapic::Config::Method] - # - attr_reader :list_fields - ## - # RPC-specific configuration for `export_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :export_documents - ## - # RPC-specific configuration for `import_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :import_documents - ## - # RPC-specific configuration for `bulk_delete_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_delete_documents - ## - # RPC-specific configuration for `create_database` - # @return [::Gapic::Config::Method] - # - attr_reader :create_database - ## - # RPC-specific configuration for `get_database` - # @return [::Gapic::Config::Method] - # - attr_reader :get_database - ## - # RPC-specific configuration for `list_databases` - # @return [::Gapic::Config::Method] - # - attr_reader :list_databases - ## - # RPC-specific configuration for `update_database` - # @return [::Gapic::Config::Method] - # - attr_reader :update_database - ## - # RPC-specific configuration for `delete_database` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_database - ## - # RPC-specific configuration for `create_user_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :create_user_creds - ## - # RPC-specific configuration for `get_user_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :get_user_creds - ## - # RPC-specific configuration for `list_user_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :list_user_creds - ## - # RPC-specific configuration for `enable_user_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_user_creds - ## - # RPC-specific configuration for `disable_user_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_user_creds - ## - # RPC-specific configuration for `reset_user_password` - # @return [::Gapic::Config::Method] - # - attr_reader :reset_user_password - ## - # RPC-specific configuration for `delete_user_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_user_creds - ## - # RPC-specific configuration for `get_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `delete_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup - ## - # RPC-specific configuration for `restore_database` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_database - ## - # RPC-specific configuration for `create_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_schedule - ## - # RPC-specific configuration for `get_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_schedule - ## - # RPC-specific configuration for `list_backup_schedules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_schedules - ## - # RPC-specific configuration for `update_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_schedule - ## - # RPC-specific configuration for `delete_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_schedule - ## - # RPC-specific configuration for `clone_database` - # @return [::Gapic::Config::Method] - # - attr_reader :clone_database - - # @private - def initialize parent_rpcs = nil - create_index_config = parent_rpcs.create_index if parent_rpcs.respond_to? :create_index - @create_index = ::Gapic::Config::Method.new create_index_config - list_indexes_config = parent_rpcs.list_indexes if parent_rpcs.respond_to? :list_indexes - @list_indexes = ::Gapic::Config::Method.new list_indexes_config - get_index_config = parent_rpcs.get_index if parent_rpcs.respond_to? :get_index - @get_index = ::Gapic::Config::Method.new get_index_config - delete_index_config = parent_rpcs.delete_index if parent_rpcs.respond_to? :delete_index - @delete_index = ::Gapic::Config::Method.new delete_index_config - get_field_config = parent_rpcs.get_field if parent_rpcs.respond_to? :get_field - @get_field = ::Gapic::Config::Method.new get_field_config - update_field_config = parent_rpcs.update_field if parent_rpcs.respond_to? :update_field - @update_field = ::Gapic::Config::Method.new update_field_config - list_fields_config = parent_rpcs.list_fields if parent_rpcs.respond_to? :list_fields - @list_fields = ::Gapic::Config::Method.new list_fields_config - export_documents_config = parent_rpcs.export_documents if parent_rpcs.respond_to? :export_documents - @export_documents = ::Gapic::Config::Method.new export_documents_config - import_documents_config = parent_rpcs.import_documents if parent_rpcs.respond_to? :import_documents - @import_documents = ::Gapic::Config::Method.new import_documents_config - bulk_delete_documents_config = parent_rpcs.bulk_delete_documents if parent_rpcs.respond_to? :bulk_delete_documents - @bulk_delete_documents = ::Gapic::Config::Method.new bulk_delete_documents_config - create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database - @create_database = ::Gapic::Config::Method.new create_database_config - get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database - @get_database = ::Gapic::Config::Method.new get_database_config - list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases - @list_databases = ::Gapic::Config::Method.new list_databases_config - update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database - @update_database = ::Gapic::Config::Method.new update_database_config - delete_database_config = parent_rpcs.delete_database if parent_rpcs.respond_to? :delete_database - @delete_database = ::Gapic::Config::Method.new delete_database_config - create_user_creds_config = parent_rpcs.create_user_creds if parent_rpcs.respond_to? :create_user_creds - @create_user_creds = ::Gapic::Config::Method.new create_user_creds_config - get_user_creds_config = parent_rpcs.get_user_creds if parent_rpcs.respond_to? :get_user_creds - @get_user_creds = ::Gapic::Config::Method.new get_user_creds_config - list_user_creds_config = parent_rpcs.list_user_creds if parent_rpcs.respond_to? :list_user_creds - @list_user_creds = ::Gapic::Config::Method.new list_user_creds_config - enable_user_creds_config = parent_rpcs.enable_user_creds if parent_rpcs.respond_to? :enable_user_creds - @enable_user_creds = ::Gapic::Config::Method.new enable_user_creds_config - disable_user_creds_config = parent_rpcs.disable_user_creds if parent_rpcs.respond_to? :disable_user_creds - @disable_user_creds = ::Gapic::Config::Method.new disable_user_creds_config - reset_user_password_config = parent_rpcs.reset_user_password if parent_rpcs.respond_to? :reset_user_password - @reset_user_password = ::Gapic::Config::Method.new reset_user_password_config - delete_user_creds_config = parent_rpcs.delete_user_creds if parent_rpcs.respond_to? :delete_user_creds - @delete_user_creds = ::Gapic::Config::Method.new delete_user_creds_config - get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup - @get_backup = ::Gapic::Config::Method.new get_backup_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup - @delete_backup = ::Gapic::Config::Method.new delete_backup_config - restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database - @restore_database = ::Gapic::Config::Method.new restore_database_config - create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule - @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config - get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule - @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config - list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules - @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config - update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule - @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config - delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule - @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config - clone_database_config = parent_rpcs.clone_database if parent_rpcs.respond_to? :clone_database - @clone_database = ::Gapic::Config::Method.new clone_database_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/credentials.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/credentials.rb deleted file mode 100644 index 0837b6c659cd..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/credentials.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 "googleauth" - -module Google - module Cloud - module Firestore - module Admin - module V1 - module FirestoreAdmin - # Credentials for the FirestoreAdmin API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore" - ] - self.env_vars = [ - "FIRESTORE_CREDENTIALS", - "FIRESTORE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "FIRESTORE_CREDENTIALS_JSON", - "FIRESTORE_KEYFILE_JSON", - "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 -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb deleted file mode 100644 index c0d9502b6fc8..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/operations.rb +++ /dev/null @@ -1,843 +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 Firestore - module Admin - module V1 - module FirestoreAdmin - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the FirestoreAdmin 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 FirestoreAdmin 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::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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::Firestore::Admin::V1::VERSION - metadata[:"x-goog-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::Firestore::Admin::V1::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 = "firestore.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 -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/paths.rb deleted file mode 100644 index 37f0b87e6c0b..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/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 Firestore - module Admin - module V1 - module FirestoreAdmin - # Path helper methods for the FirestoreAdmin API. - module Paths - ## - # Create a fully-qualified Backup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backups/{backup}` - # - # @param project [String] - # @param location [String] - # @param backup [String] - # - # @return [::String] - def backup_path project:, location:, backup: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backups/#{backup}" - end - - ## - # Create a fully-qualified BackupSchedule resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - # - # @param project [String] - # @param database [String] - # @param backup_schedule [String] - # - # @return [::String] - def backup_schedule_path project:, database:, backup_schedule: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" - - "projects/#{project}/databases/#{database}/backupSchedules/#{backup_schedule}" - end - - ## - # Create a fully-qualified CollectionGroup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/databases/{database}/collectionGroups/{collection}` - # - # @param project [String] - # @param database [String] - # @param collection [String] - # - # @return [::String] - def collection_group_path project:, database:, collection: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" - - "projects/#{project}/databases/#{database}/collectionGroups/#{collection}" - end - - ## - # Create a fully-qualified Database resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/databases/{database}` - # - # @param project [String] - # @param database [String] - # - # @return [::String] - def database_path project:, database: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/databases/#{database}" - end - - ## - # Create a fully-qualified Field resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}` - # - # @param project [String] - # @param database [String] - # @param collection [String] - # @param field [String] - # - # @return [::String] - def field_path project:, database:, collection:, field: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" - raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" - - "projects/#{project}/databases/#{database}/collectionGroups/#{collection}/fields/#{field}" - end - - ## - # Create a fully-qualified Index resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}` - # - # @param project [String] - # @param database [String] - # @param collection [String] - # @param index [String] - # - # @return [::String] - def index_path project:, database:, collection:, index: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" - raise ::ArgumentError, "collection cannot contain /" if collection.to_s.include? "/" - - "projects/#{project}/databases/#{database}/collectionGroups/#{collection}/indexes/#{index}" - 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 Operation resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/databases/{database}/operations/{operation}` - # - # @param project [String] - # @param database [String] - # @param operation [String] - # - # @return [::String] - def operation_path project:, database:, operation: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" - - "projects/#{project}/databases/#{database}/operations/#{operation}" - 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 - - ## - # Create a fully-qualified UserCreds resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/databases/{database}/userCreds/{user_creds}` - # - # @param project [String] - # @param database [String] - # @param user_creds [String] - # - # @return [::String] - def user_creds_path project:, database:, user_creds: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "database cannot contain /" if database.to_s.include? "/" - - "projects/#{project}/databases/#{database}/userCreds/#{user_creds}" - end - - extend self - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest.rb deleted file mode 100644 index de531d6fbc46..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest.rb +++ /dev/null @@ -1,82 +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/firestore/admin/v1/version" - -require "google/cloud/firestore/admin/v1/firestore_admin/credentials" -require "google/cloud/firestore/admin/v1/firestore_admin/paths" -require "google/cloud/firestore/admin/v1/firestore_admin/rest/operations" -require "google/cloud/firestore/admin/v1/firestore_admin/rest/client" - -module Google - module Cloud - module Firestore - module Admin - module V1 - ## - # The Cloud Firestore Admin API. - # - # This API provides several administrative services for Cloud Firestore. - # - # Project, Database, Namespace, Collection, Collection Group, and Document are - # used as defined in the Google Cloud Firestore API. - # - # Operation: An Operation represents work being performed in the background. - # - # The index service manages Cloud Firestore indexes. - # - # Index creation is performed asynchronously. - # An Operation resource is created for each such asynchronous operation. - # The state of the operation (including any errors encountered) - # may be queried via the Operation resource. - # - # The Operations collection provides a record of actions performed for the - # specified Project (including any Operations in progress). Operations are not - # created directly but through calls on other collections or resources. - # - # An Operation that is done may be deleted so that it is no longer listed as - # part of the Operation collection. Operations are garbage collected after - # 30 days. By default, ListOperations will only return in progress and failed - # operations. To list completed operation, issue a ListOperations request with - # the filter `done: true`. - # - # Operations are created by service `FirestoreAdmin`, but are accessed via - # service `google.longrunning.Operations`. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/firestore/admin/v1/firestore_admin/rest" - # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - module FirestoreAdmin - # Client for the REST transport - module Rest - end - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/firestore/admin/v1/firestore_admin/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb deleted file mode 100644 index 063eaab47780..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/client.rb +++ /dev/null @@ -1,3573 +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/firestore/admin/v1/firestore_admin_pb" -require "google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Firestore - module Admin - module V1 - module FirestoreAdmin - module Rest - ## - # REST client for the FirestoreAdmin service. - # - # The Cloud Firestore Admin API. - # - # This API provides several administrative services for Cloud Firestore. - # - # Project, Database, Namespace, Collection, Collection Group, and Document are - # used as defined in the Google Cloud Firestore API. - # - # Operation: An Operation represents work being performed in the background. - # - # The index service manages Cloud Firestore indexes. - # - # Index creation is performed asynchronously. - # An Operation resource is created for each such asynchronous operation. - # The state of the operation (including any errors encountered) - # may be queried via the Operation resource. - # - # The Operations collection provides a record of actions performed for the - # specified Project (including any Operations in progress). Operations are not - # created directly but through calls on other collections or resources. - # - # An Operation that is done may be deleted so that it is no longer listed as - # part of the Operation collection. Operations are garbage collected after - # 30 days. By default, ListOperations will only return in progress and failed - # operations. To list completed operation, issue a ListOperations request with - # the filter `done: true`. - # - # Operations are created by service `FirestoreAdmin`, but are accessed via - # service `google.longrunning.Operations`. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :firestore_admin_stub - - ## - # Configure the FirestoreAdmin Client class. - # - # See {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all FirestoreAdmin clients - # ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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", "Firestore", "Admin", "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_index.timeout = 60.0 - - default_config.rpcs.list_indexes.timeout = 60.0 - default_config.rpcs.list_indexes.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] - } - - default_config.rpcs.get_index.timeout = 60.0 - default_config.rpcs.get_index.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] - } - - default_config.rpcs.delete_index.timeout = 60.0 - default_config.rpcs.delete_index.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] - } - - default_config.rpcs.get_field.timeout = 60.0 - default_config.rpcs.get_field.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] - } - - default_config.rpcs.update_field.timeout = 60.0 - - default_config.rpcs.list_fields.timeout = 60.0 - default_config.rpcs.list_fields.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 13, 4] - } - - default_config.rpcs.export_documents.timeout = 60.0 - - default_config.rpcs.import_documents.timeout = 60.0 - - default_config.rpcs.bulk_delete_documents.timeout = 60.0 - - default_config.rpcs.create_database.timeout = 120.0 - - default_config.rpcs.restore_database.timeout = 120.0 - - default_config.rpcs.clone_database.timeout = 120.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the FirestoreAdmin 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::Firestore::Admin::V1::FirestoreAdmin::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 - @firestore_admin_stub.universe_domain - end - - ## - # Create a new FirestoreAdmin REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the FirestoreAdmin 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::Firestore::Admin::V1::FirestoreAdmin::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 - - @firestore_admin_stub = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @firestore_admin_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 = @firestore_admin_stub.endpoint - config.universe_domain = @firestore_admin_stub.universe_domain - config.logger = @firestore_admin_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @firestore_admin_stub.logger - end - - # Service calls - - ## - # Creates a composite index. This returns a - # {::Google::Longrunning::Operation google.longrunning.Operation} which may be - # used to track the status of the creation. The metadata for the operation - # will be the type - # {::Google::Cloud::Firestore::Admin::V1::IndexOperationMetadata IndexOperationMetadata}. - # - # @overload create_index(request, options = nil) - # Pass arguments to `create_index` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_index(parent: nil, index: nil) - # Pass arguments to `create_index` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - # @param index [::Google::Cloud::Firestore::Admin::V1::Index, ::Hash] - # Required. The composite index 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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new - # - # # Call the create_index method. - # result = client.create_index request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_index request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest - - # Converts hash and nil to an 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_index.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_index.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_index.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.create_index 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 composite indexes. - # - # @overload list_indexes(request, options = nil) - # Pass arguments to `list_indexes` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_indexes(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_indexes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - # @param filter [::String] - # The filter to apply to list results. - # @param page_size [::Integer] - # The number of results to return. - # @param page_token [::String] - # A page token, returned from a previous call to - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_indexes FirestoreAdmin.ListIndexes}, - # that may be used to get the next page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Index>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new - # - # # Call the list_indexes method. - # result = client.list_indexes request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Index. - # p item - # end - # - def list_indexes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest - - # Converts hash and nil to an 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_indexes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_indexes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_indexes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.list_indexes request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @firestore_admin_stub, :list_indexes, "indexes", 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 a composite index. - # - # @overload get_index(request, options = nil) - # Pass arguments to `get_index` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::GetIndexRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::GetIndexRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_index(name: nil) - # Pass arguments to `get_index` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Index] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::Index] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::GetIndexRequest.new - # - # # Call the get_index method. - # result = client.get_index request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Index. - # p result - # - def get_index request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetIndexRequest - - # Converts hash and nil to an 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_index.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_index.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_index.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.get_index 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 composite index. - # - # @overload delete_index(request, options = nil) - # Pass arguments to `delete_index` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_index(name: nil) - # Pass arguments to `delete_index` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.new - # - # # Call the delete_index method. - # result = client.delete_index request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_index request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest - - # Converts hash and nil to an 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_index.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_index.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_index.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.delete_index 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 metadata and configuration for a Field. - # - # @overload get_field(request, options = nil) - # Pass arguments to `get_field` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::GetFieldRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::GetFieldRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_field(name: nil) - # Pass arguments to `get_field` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Field] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::Field] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::GetFieldRequest.new - # - # # Call the get_field method. - # result = client.get_field request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Field. - # p result - # - def get_field request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetFieldRequest - - # Converts hash and nil to an 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_field.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_field.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_field.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.get_field 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 field configuration. Currently, field updates apply only to - # single field index configuration. However, calls to - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#update_field FirestoreAdmin.UpdateField} - # should provide a field mask to avoid changing any configuration that the - # caller isn't aware of. The field mask should be specified as: `{ paths: - # "index_config" }`. - # - # This call returns a - # {::Google::Longrunning::Operation google.longrunning.Operation} which may be - # used to track the status of the field update. The metadata for the - # operation will be the type - # {::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata FieldOperationMetadata}. - # - # To configure the default field settings for the database, use - # the special `Field` with resource name: - # `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - # - # @overload update_field(request, options = nil) - # Pass arguments to `update_field` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_field(field: nil, update_mask: nil) - # Pass arguments to `update_field` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param field [::Google::Cloud::Firestore::Admin::V1::Field, ::Hash] - # Required. The field to be updated. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # A mask, relative to the field. If specified, only configuration specified - # by this field_mask will be updated in the field. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new - # - # # Call the update_field method. - # result = client.update_field request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_field request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest - - # Converts hash and nil to an 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_field.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_field.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_field.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.update_field 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 the field configuration and metadata for this database. - # - # Currently, - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_fields FirestoreAdmin.ListFields} - # only supports listing fields that have been explicitly overridden. To issue - # this query, call - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_fields FirestoreAdmin.ListFields} - # with the filter set to `indexConfig.usesAncestorConfig:false` or - # `ttlConfig:*`. - # - # @overload list_fields(request, options = nil) - # Pass arguments to `list_fields` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_fields(parent: nil, filter: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_fields` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - # @param filter [::String] - # The filter to apply to list results. Currently, - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_fields FirestoreAdmin.ListFields} - # only supports listing fields that have been explicitly overridden. To issue - # this query, call - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_fields FirestoreAdmin.ListFields} - # with a filter that includes `indexConfig.usesAncestorConfig:false` or - # `ttlConfig:*`. - # @param page_size [::Integer] - # The number of results to return. - # @param page_token [::String] - # A page token, returned from a previous call to - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#list_fields FirestoreAdmin.ListFields}, - # that may be used to get the next page of results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::Admin::V1::Field>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new - # - # # Call the list_fields method. - # result = client.list_fields request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Field. - # p item - # end - # - def list_fields request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest - - # Converts hash and nil to an 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_fields.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_fields.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_fields.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.list_fields request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @firestore_admin_stub, :list_fields, "fields", 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 - - ## - # Exports a copy of all or a subset of documents from Google Cloud Firestore - # to another storage system, such as Google Cloud Storage. Recent updates to - # documents may not be reflected in the export. The export occurs in the - # background and its progress can be monitored and managed via the - # Operation resource that is created. The output of an export may only be - # used once the associated operation is done. If an export operation is - # cancelled before completion it may leave partial data behind in Google - # Cloud Storage. - # - # For more details on export behavior and output format, refer to: - # https://cloud.google.com/firestore/docs/manage-data/export-import - # - # @overload export_documents(request, options = nil) - # Pass arguments to `export_documents` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload export_documents(name: nil, collection_ids: nil, output_uri_prefix: nil, namespace_ids: nil, snapshot_time: nil) - # Pass arguments to `export_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Database to export. Should be of the form: - # `projects/{project_id}/databases/{database_id}`. - # @param collection_ids [::Array<::String>] - # Which collection IDs to export. Unspecified means all collections. Each - # collection ID in this list must be unique. - # @param output_uri_prefix [::String] - # The output URI. Currently only supports Google Cloud Storage URIs of the - # form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - # of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - # Google Cloud Storage namespace path. When - # choosing a name, be sure to consider Google Cloud Storage naming - # guidelines: https://cloud.google.com/storage/docs/naming. - # If the URI is a bucket (without a namespace path), a prefix will be - # generated based on the start time. - # @param namespace_ids [::Array<::String>] - # An empty list represents all namespaces. This is the preferred - # usage for databases that don't use namespaces. - # - # An empty string element represents the default namespace. This should be - # used if the database has data in non-default namespaces, but doesn't want - # to include them. Each namespace in this list must be unique. - # @param snapshot_time [::Google::Protobuf::Timestamp, ::Hash] - # The timestamp that corresponds to the version of the database to be - # exported. The timestamp must be in the past, rounded to the minute and not - # older than - # {::Google::Cloud::Firestore::Admin::V1::Database#earliest_version_time earliestVersionTime}. - # If specified, then the exported documents will represent a consistent view - # of the database at the provided time. Otherwise, there are no guarantees - # about the consistency of the exported documents. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new - # - # # Call the export_documents method. - # result = client.export_documents request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def export_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.export_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.export_documents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.export_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.export_documents 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 - - ## - # Imports documents into Google Cloud Firestore. Existing documents with the - # same name are overwritten. The import occurs in the background and its - # progress can be monitored and managed via the Operation resource that is - # created. If an ImportDocuments operation is cancelled, it is possible - # that a subset of the data has already been imported to Cloud Firestore. - # - # @overload import_documents(request, options = nil) - # Pass arguments to `import_documents` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload import_documents(name: nil, collection_ids: nil, input_uri_prefix: nil, namespace_ids: nil) - # Pass arguments to `import_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Database to import into. Should be of the form: - # `projects/{project_id}/databases/{database_id}`. - # @param collection_ids [::Array<::String>] - # Which collection IDs to import. Unspecified means all collections included - # in the import. Each collection ID in this list must be unique. - # @param input_uri_prefix [::String] - # Location of the exported files. - # This must match the output_uri_prefix of an ExportDocumentsResponse from - # an export that has completed successfully. - # See: - # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsResponse#output_uri_prefix google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix}. - # @param namespace_ids [::Array<::String>] - # An empty list represents all namespaces. This is the preferred - # usage for databases that don't use namespaces. - # - # An empty string element represents the default namespace. This should be - # used if the database has data in non-default namespaces, but doesn't want - # to include them. Each namespace in this list must be unique. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new - # - # # Call the import_documents method. - # result = client.import_documents request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def import_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.import_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.import_documents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.import_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.import_documents 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 - - ## - # Bulk deletes a subset of documents from Google Cloud Firestore. - # Documents created or updated after the underlying system starts to process - # the request will not be deleted. The bulk delete occurs in the background - # and its progress can be monitored and managed via the Operation resource - # that is created. - # - # For more details on bulk delete behavior, refer to: - # https://cloud.google.com/firestore/docs/manage-data/bulk-delete - # - # @overload bulk_delete_documents(request, options = nil) - # Pass arguments to `bulk_delete_documents` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload bulk_delete_documents(name: nil, collection_ids: nil, namespace_ids: nil) - # Pass arguments to `bulk_delete_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Database to operate. Should be of the form: - # `projects/{project_id}/databases/{database_id}`. - # @param collection_ids [::Array<::String>] - # Optional. IDs of the collection groups to delete. Unspecified means all - # collection groups. - # - # Each collection group in this list must be unique. - # @param namespace_ids [::Array<::String>] - # Optional. Namespaces to delete. - # - # An empty list means all namespaces. This is the recommended - # usage for databases that don't use namespaces. - # - # An empty string element represents the default namespace. This should be - # used if the database has data in non-default namespaces, but doesn't want - # to delete from them. - # - # Each namespace in this list must be unique. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new - # - # # Call the bulk_delete_documents method. - # result = client.bulk_delete_documents request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def bulk_delete_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.bulk_delete_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.bulk_delete_documents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.bulk_delete_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.bulk_delete_documents 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 - - ## - # Create a database. - # - # @overload create_database(request, options = nil) - # Pass arguments to `create_database` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_database(parent: nil, database: nil, database_id: nil) - # Pass arguments to `create_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent name of the form - # `projects/{project_id}` - # @param database [::Google::Cloud::Firestore::Admin::V1::Database, ::Hash] - # Required. The Database to create. - # @param database_id [::String] - # Required. The ID to use for the database, which will become the final - # component of the database's resource name. - # - # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - # with first character a letter and the last a letter or a number. Must not - # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. - # - # "(default)" database ID is also valid. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new - # - # # Call the create_database method. - # result = client.create_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest - - # Converts hash and nil to an 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_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_database.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.create_database 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 information about a database. - # - # @overload get_database(request, options = nil) - # Pass arguments to `get_database` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_database(name: nil) - # Pass arguments to `get_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Database] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::Database] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.new - # - # # Call the get_database method. - # result = client.get_database request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Database. - # p result - # - def get_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest - - # Converts hash and nil to an 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_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_database.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.get_database 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 all the databases in the project. - # - # @overload list_databases(request, options = nil) - # Pass arguments to `list_databases` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_databases(parent: nil, show_deleted: nil) - # Pass arguments to `list_databases` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent name of the form - # `projects/{project_id}` - # @param show_deleted [::Boolean] - # If true, also returns deleted resources. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new - # - # # Call the list_databases method. - # result = client.list_databases request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse. - # p result - # - def list_databases request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest - - # Converts hash and nil to an 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_databases.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_databases.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_databases.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.list_databases 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 database. - # - # @overload update_database(request, options = nil) - # Pass arguments to `update_database` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_database(database: nil, update_mask: nil) - # Pass arguments to `update_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::Google::Cloud::Firestore::Admin::V1::Database, ::Hash] - # Required. The database to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new - # - # # Call the update_database method. - # result = client.update_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest - - # Converts hash and nil to an 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_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_database.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.update_database 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 database. - # - # @overload delete_database(request, options = nil) - # Pass arguments to `delete_database` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_database(name: nil, etag: nil) - # Pass arguments to `delete_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}` - # @param etag [::String] - # The current etag of the Database. - # If an etag is provided and does not match the current etag of the database, - # deletion will be blocked and a FAILED_PRECONDITION error will be returned. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.new - # - # # Call the delete_database method. - # result = client.delete_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest - - # Converts hash and nil to an 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_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_database.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.delete_database 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 - - ## - # Create a user creds. - # - # @overload create_user_creds(request, options = nil) - # Pass arguments to `create_user_creds` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_user_creds(parent: nil, user_creds: nil, user_creds_id: nil) - # Pass arguments to `create_user_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent name of the form - # `projects/{project_id}/databases/{database_id}` - # @param user_creds [::Google::Cloud::Firestore::Admin::V1::UserCreds, ::Hash] - # Required. The user creds to create. - # @param user_creds_id [::String] - # Required. The ID to use for the user creds, which will become the final - # component of the user creds's resource name. - # - # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - # with first character a letter and the last a letter or a number. Must not - # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new - # - # # Call the create_user_creds method. - # result = client.create_user_creds request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - # p result - # - def create_user_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest - - # Converts hash and nil to an 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_user_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_user_creds.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_user_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.create_user_creds 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 user creds resource. Note that the returned resource does not - # contain the secret value itself. - # - # @overload get_user_creds(request, options = nil) - # Pass arguments to `get_user_creds` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_user_creds(name: nil) - # Pass arguments to `get_user_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new - # - # # Call the get_user_creds method. - # result = client.get_user_creds request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - # p result - # - def get_user_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest - - # Converts hash and nil to an 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_user_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_user_creds.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_user_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.get_user_creds 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 all user creds in the database. Note that the returned resource - # does not contain the secret value itself. - # - # @overload list_user_creds(request, options = nil) - # Pass arguments to `list_user_creds` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_user_creds(parent: nil) - # Pass arguments to `list_user_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. A parent database name of the form - # `projects/{project_id}/databases/{database_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new - # - # # Call the list_user_creds method. - # result = client.list_user_creds request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse. - # p result - # - def list_user_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest - - # Converts hash and nil to an 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_user_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_user_creds.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_user_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.list_user_creds 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 - - ## - # Enables a user creds. No-op if the user creds are already enabled. - # - # @overload enable_user_creds(request, options = nil) - # Pass arguments to `enable_user_creds` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload enable_user_creds(name: nil) - # Pass arguments to `enable_user_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new - # - # # Call the enable_user_creds method. - # result = client.enable_user_creds request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - # p result - # - def enable_user_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.enable_user_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.enable_user_creds.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.enable_user_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.enable_user_creds 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 - - ## - # Disables a user creds. No-op if the user creds are already disabled. - # - # @overload disable_user_creds(request, options = nil) - # Pass arguments to `disable_user_creds` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload disable_user_creds(name: nil) - # Pass arguments to `disable_user_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new - # - # # Call the disable_user_creds method. - # result = client.disable_user_creds request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - # p result - # - def disable_user_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.disable_user_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.disable_user_creds.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.disable_user_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.disable_user_creds 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 - - ## - # Resets the password of a user creds. - # - # @overload reset_user_password(request, options = nil) - # Pass arguments to `reset_user_password` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload reset_user_password(name: nil) - # Pass arguments to `reset_user_password` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new - # - # # Call the reset_user_password method. - # result = client.reset_user_password request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - # p result - # - def reset_user_password request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.reset_user_password.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.reset_user_password.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.reset_user_password.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.reset_user_password 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 user creds. - # - # @overload delete_user_creds(request, options = nil) - # Pass arguments to `delete_user_creds` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_user_creds(name: nil) - # Pass arguments to `delete_user_creds` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new - # - # # Call the delete_user_creds method. - # result = client.delete_user_creds request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_user_creds request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest - - # Converts hash and nil to an 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_user_creds.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_user_creds.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_user_creds.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.delete_user_creds 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 information about a backup. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::GetBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup(name: nil) - # Pass arguments to `get_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup to fetch. - # - # Format is `projects/{project}/locations/{location}/backups/{backup}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::Backup. - # p result - # - def get_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetBackupRequest - - # Converts hash and nil to an 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.get_backup 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 all the backups. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backups(parent: nil, filter: nil) - # Pass arguments to `list_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 to list backups from. - # - # Format is `projects/{project}/locations/{location}`. - # Use `{location} = '-'` to list backups from all locations for the given - # project. This allows listing backups from a single location or from all - # locations. - # @param filter [::String] - # An expression that filters the list of returned backups. - # - # A filter expression consists of a field name, a comparison operator, and a - # value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the {::Google::Cloud::Firestore::Admin::V1::Backup Backup} are - # eligible for filtering: - # - # * `database_uid` (supports `=` only) - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new - # - # # Call the list_backups method. - # result = client.list_backups request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupsResponse. - # p result - # - def list_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest - - # Converts hash and nil to an 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_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.list_backups 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 backup. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup(name: nil) - # Pass arguments to `delete_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the backup to delete. - # - # format is `projects/{project}/locations/{location}/backups/{backup}`. - # @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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_backup request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest - - # Converts hash and nil to an 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.delete_backup 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 new database by restoring from an existing backup. - # - # The new database must be in the same cloud region or multi-region location - # as the existing backup. This behaves similar to - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#create_database FirestoreAdmin.CreateDatabase} - # except instead of creating a new empty database, a new database is created - # with the database type, index configuration, and documents from an existing - # backup. - # - # The {::Google::Longrunning::Operation long-running operation} can be used to - # track the progress of the restore, with the Operation's - # {::Google::Longrunning::Operation#metadata metadata} field type being the - # {::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseMetadata RestoreDatabaseMetadata}. - # The {::Google::Longrunning::Operation#response response} type is the - # {::Google::Cloud::Firestore::Admin::V1::Database Database} if the restore was - # successful. The new database is not readable or writeable until the LRO has - # completed. - # - # @overload restore_database(request, options = nil) - # Pass arguments to `restore_database` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload restore_database(parent: nil, database_id: nil, backup: nil, encryption_config: nil, tags: nil) - # Pass arguments to `restore_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project to restore the database in. Format is - # `projects/{project_id}`. - # @param database_id [::String] - # Required. The ID to use for the database, which will become the final - # component of the database's resource name. This database ID must not be - # associated with an existing database. - # - # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - # with first character a letter and the last a letter or a number. Must not - # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. - # - # "(default)" database ID is also valid. - # @param backup [::String] - # Required. Backup to restore from. Must be from the same project as the - # parent. - # - # The restored database will be created in the same location as the source - # backup. - # - # Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - # @param encryption_config [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig, ::Hash] - # Optional. Encryption configuration for the restored database. - # - # If this field is not specified, the restored database will use - # the same encryption configuration as the backup, namely - # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. - # @param tags [::Hash{::String => ::String}] - # Optional. Immutable. Tags to be bound to the restored database. - # - # The tags should be provided in the format of - # `tagKeys/{tag_key_id} -> tagValues/{tag_value_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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new - # - # # Call the restore_database method. - # result = client.restore_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def restore_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.restore_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.restore_database.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.restore_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.restore_database 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 backup schedule on a database. - # At most two backup schedules can be configured on a database, one daily - # backup schedule and one weekly backup schedule. - # - # @overload create_backup_schedule(request, options = nil) - # Pass arguments to `create_backup_schedule` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_schedule(parent: nil, backup_schedule: nil) - # Pass arguments to `create_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 database. - # - # Format `projects/{project}/databases/{database}` - # @param backup_schedule [::Google::Cloud::Firestore::Admin::V1::BackupSchedule, ::Hash] - # Required. The backup schedule to create. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new - # - # # Call the create_backup_schedule method. - # result = client.create_backup_schedule request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. - # p result - # - def create_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest - - # Converts hash and nil to an 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_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_schedule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.create_backup_schedule 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 information about a backup schedule. - # - # @overload get_backup_schedule(request, options = nil) - # Pass arguments to `get_backup_schedule` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_schedule(name: nil) - # Pass arguments to `get_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 backup schedule. - # - # Format - # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.new - # - # # Call the get_backup_schedule method. - # result = client.get_backup_schedule request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. - # p result - # - def get_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest - - # Converts hash and nil to an 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_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_schedule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.get_backup_schedule 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 backup schedules. - # - # @overload list_backup_schedules(request, options = nil) - # Pass arguments to `list_backup_schedules` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_schedules(parent: nil) - # Pass arguments to `list_backup_schedules` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 database. - # - # Format is `projects/{project}/databases/{database}`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new - # - # # Call the list_backup_schedules method. - # result = client.list_backup_schedules request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse. - # p result - # - def list_backup_schedules request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest - - # Converts hash and nil to an 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_backup_schedules.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_schedules.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_schedules.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.list_backup_schedules 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 backup schedule. - # - # @overload update_backup_schedule(request, options = nil) - # Pass arguments to `update_backup_schedule` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_schedule(backup_schedule: nil, update_mask: nil) - # Pass arguments to `update_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_schedule [::Google::Cloud::Firestore::Admin::V1::BackupSchedule, ::Hash] - # Required. The backup schedule to update. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new - # - # # Call the update_backup_schedule method. - # result = client.update_backup_schedule request - # - # # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. - # p result - # - def update_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest - - # Converts hash and nil to an 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_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_schedule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.update_backup_schedule 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 backup schedule. - # - # @overload delete_backup_schedule(request, options = nil) - # Pass arguments to `delete_backup_schedule` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup_schedule(name: nil) - # Pass arguments to `delete_backup_schedule` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 backup schedule. - # - # Format - # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - # @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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.new - # - # # Call the delete_backup_schedule method. - # result = client.delete_backup_schedule request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_backup_schedule request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest - - # Converts hash and nil to an 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_backup_schedule.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_schedule.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_schedule.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.delete_backup_schedule 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 new database by cloning an existing one. - # - # The new database must be in the same cloud region or multi-region location - # as the existing database. This behaves similar to - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client#create_database FirestoreAdmin.CreateDatabase} - # except instead of creating a new empty database, a new database is created - # with the database type, index configuration, and documents from an existing - # database. - # - # The {::Google::Longrunning::Operation long-running operation} can be used to - # track the progress of the clone, with the Operation's - # {::Google::Longrunning::Operation#metadata metadata} field type being the - # {::Google::Cloud::Firestore::Admin::V1::CloneDatabaseMetadata CloneDatabaseMetadata}. - # The {::Google::Longrunning::Operation#response response} type is the - # {::Google::Cloud::Firestore::Admin::V1::Database Database} if the clone was - # successful. The new database is not readable or writeable until the LRO has - # completed. - # - # @overload clone_database(request, options = nil) - # Pass arguments to `clone_database` via a request object, either of type - # {::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload clone_database(parent: nil, database_id: nil, pitr_snapshot: nil, encryption_config: nil, tags: nil) - # Pass arguments to `clone_database` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project to clone the database in. Format is - # `projects/{project_id}`. - # @param database_id [::String] - # Required. The ID to use for the database, which will become the final - # component of the database's resource name. This database ID must not be - # associated with an existing database. - # - # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - # with first character a letter and the last a letter or a number. Must not - # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. - # - # "(default)" database ID is also valid. - # @param pitr_snapshot [::Google::Cloud::Firestore::Admin::V1::PitrSnapshot, ::Hash] - # Required. Specification of the PITR data to clone from. The source database - # must exist. - # - # The cloned database will be created in the same location as the source - # database. - # @param encryption_config [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig, ::Hash] - # Optional. Encryption configuration for the cloned database. - # - # If this field is not specified, the cloned database will use - # the same encryption configuration as the source database, namely - # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. - # @param tags [::Hash{::String => ::String}] - # Optional. Immutable. Tags to be bound to the cloned database. - # - # The tags should be provided in the format of - # `tagKeys/{tag_key_id} -> tagValues/{tag_value_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/firestore/admin/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new - # - # # Call the clone_database method. - # result = client.clone_database request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def clone_database request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.clone_database.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.clone_database.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.clone_database.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_admin_stub.clone_database 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 FirestoreAdmin REST API. - # - # This class represents the configuration for FirestoreAdmin 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::Firestore::Admin::V1::FirestoreAdmin::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_index to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_index.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_index.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 = "firestore.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 FirestoreAdmin 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_index` - # @return [::Gapic::Config::Method] - # - attr_reader :create_index - ## - # RPC-specific configuration for `list_indexes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_indexes - ## - # RPC-specific configuration for `get_index` - # @return [::Gapic::Config::Method] - # - attr_reader :get_index - ## - # RPC-specific configuration for `delete_index` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_index - ## - # RPC-specific configuration for `get_field` - # @return [::Gapic::Config::Method] - # - attr_reader :get_field - ## - # RPC-specific configuration for `update_field` - # @return [::Gapic::Config::Method] - # - attr_reader :update_field - ## - # RPC-specific configuration for `list_fields` - # @return [::Gapic::Config::Method] - # - attr_reader :list_fields - ## - # RPC-specific configuration for `export_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :export_documents - ## - # RPC-specific configuration for `import_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :import_documents - ## - # RPC-specific configuration for `bulk_delete_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :bulk_delete_documents - ## - # RPC-specific configuration for `create_database` - # @return [::Gapic::Config::Method] - # - attr_reader :create_database - ## - # RPC-specific configuration for `get_database` - # @return [::Gapic::Config::Method] - # - attr_reader :get_database - ## - # RPC-specific configuration for `list_databases` - # @return [::Gapic::Config::Method] - # - attr_reader :list_databases - ## - # RPC-specific configuration for `update_database` - # @return [::Gapic::Config::Method] - # - attr_reader :update_database - ## - # RPC-specific configuration for `delete_database` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_database - ## - # RPC-specific configuration for `create_user_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :create_user_creds - ## - # RPC-specific configuration for `get_user_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :get_user_creds - ## - # RPC-specific configuration for `list_user_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :list_user_creds - ## - # RPC-specific configuration for `enable_user_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :enable_user_creds - ## - # RPC-specific configuration for `disable_user_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :disable_user_creds - ## - # RPC-specific configuration for `reset_user_password` - # @return [::Gapic::Config::Method] - # - attr_reader :reset_user_password - ## - # RPC-specific configuration for `delete_user_creds` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_user_creds - ## - # RPC-specific configuration for `get_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `delete_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup - ## - # RPC-specific configuration for `restore_database` - # @return [::Gapic::Config::Method] - # - attr_reader :restore_database - ## - # RPC-specific configuration for `create_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_schedule - ## - # RPC-specific configuration for `get_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_schedule - ## - # RPC-specific configuration for `list_backup_schedules` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_schedules - ## - # RPC-specific configuration for `update_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_schedule - ## - # RPC-specific configuration for `delete_backup_schedule` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_schedule - ## - # RPC-specific configuration for `clone_database` - # @return [::Gapic::Config::Method] - # - attr_reader :clone_database - - # @private - def initialize parent_rpcs = nil - create_index_config = parent_rpcs.create_index if parent_rpcs.respond_to? :create_index - @create_index = ::Gapic::Config::Method.new create_index_config - list_indexes_config = parent_rpcs.list_indexes if parent_rpcs.respond_to? :list_indexes - @list_indexes = ::Gapic::Config::Method.new list_indexes_config - get_index_config = parent_rpcs.get_index if parent_rpcs.respond_to? :get_index - @get_index = ::Gapic::Config::Method.new get_index_config - delete_index_config = parent_rpcs.delete_index if parent_rpcs.respond_to? :delete_index - @delete_index = ::Gapic::Config::Method.new delete_index_config - get_field_config = parent_rpcs.get_field if parent_rpcs.respond_to? :get_field - @get_field = ::Gapic::Config::Method.new get_field_config - update_field_config = parent_rpcs.update_field if parent_rpcs.respond_to? :update_field - @update_field = ::Gapic::Config::Method.new update_field_config - list_fields_config = parent_rpcs.list_fields if parent_rpcs.respond_to? :list_fields - @list_fields = ::Gapic::Config::Method.new list_fields_config - export_documents_config = parent_rpcs.export_documents if parent_rpcs.respond_to? :export_documents - @export_documents = ::Gapic::Config::Method.new export_documents_config - import_documents_config = parent_rpcs.import_documents if parent_rpcs.respond_to? :import_documents - @import_documents = ::Gapic::Config::Method.new import_documents_config - bulk_delete_documents_config = parent_rpcs.bulk_delete_documents if parent_rpcs.respond_to? :bulk_delete_documents - @bulk_delete_documents = ::Gapic::Config::Method.new bulk_delete_documents_config - create_database_config = parent_rpcs.create_database if parent_rpcs.respond_to? :create_database - @create_database = ::Gapic::Config::Method.new create_database_config - get_database_config = parent_rpcs.get_database if parent_rpcs.respond_to? :get_database - @get_database = ::Gapic::Config::Method.new get_database_config - list_databases_config = parent_rpcs.list_databases if parent_rpcs.respond_to? :list_databases - @list_databases = ::Gapic::Config::Method.new list_databases_config - update_database_config = parent_rpcs.update_database if parent_rpcs.respond_to? :update_database - @update_database = ::Gapic::Config::Method.new update_database_config - delete_database_config = parent_rpcs.delete_database if parent_rpcs.respond_to? :delete_database - @delete_database = ::Gapic::Config::Method.new delete_database_config - create_user_creds_config = parent_rpcs.create_user_creds if parent_rpcs.respond_to? :create_user_creds - @create_user_creds = ::Gapic::Config::Method.new create_user_creds_config - get_user_creds_config = parent_rpcs.get_user_creds if parent_rpcs.respond_to? :get_user_creds - @get_user_creds = ::Gapic::Config::Method.new get_user_creds_config - list_user_creds_config = parent_rpcs.list_user_creds if parent_rpcs.respond_to? :list_user_creds - @list_user_creds = ::Gapic::Config::Method.new list_user_creds_config - enable_user_creds_config = parent_rpcs.enable_user_creds if parent_rpcs.respond_to? :enable_user_creds - @enable_user_creds = ::Gapic::Config::Method.new enable_user_creds_config - disable_user_creds_config = parent_rpcs.disable_user_creds if parent_rpcs.respond_to? :disable_user_creds - @disable_user_creds = ::Gapic::Config::Method.new disable_user_creds_config - reset_user_password_config = parent_rpcs.reset_user_password if parent_rpcs.respond_to? :reset_user_password - @reset_user_password = ::Gapic::Config::Method.new reset_user_password_config - delete_user_creds_config = parent_rpcs.delete_user_creds if parent_rpcs.respond_to? :delete_user_creds - @delete_user_creds = ::Gapic::Config::Method.new delete_user_creds_config - get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup - @get_backup = ::Gapic::Config::Method.new get_backup_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup - @delete_backup = ::Gapic::Config::Method.new delete_backup_config - restore_database_config = parent_rpcs.restore_database if parent_rpcs.respond_to? :restore_database - @restore_database = ::Gapic::Config::Method.new restore_database_config - create_backup_schedule_config = parent_rpcs.create_backup_schedule if parent_rpcs.respond_to? :create_backup_schedule - @create_backup_schedule = ::Gapic::Config::Method.new create_backup_schedule_config - get_backup_schedule_config = parent_rpcs.get_backup_schedule if parent_rpcs.respond_to? :get_backup_schedule - @get_backup_schedule = ::Gapic::Config::Method.new get_backup_schedule_config - list_backup_schedules_config = parent_rpcs.list_backup_schedules if parent_rpcs.respond_to? :list_backup_schedules - @list_backup_schedules = ::Gapic::Config::Method.new list_backup_schedules_config - update_backup_schedule_config = parent_rpcs.update_backup_schedule if parent_rpcs.respond_to? :update_backup_schedule - @update_backup_schedule = ::Gapic::Config::Method.new update_backup_schedule_config - delete_backup_schedule_config = parent_rpcs.delete_backup_schedule if parent_rpcs.respond_to? :delete_backup_schedule - @delete_backup_schedule = ::Gapic::Config::Method.new delete_backup_schedule_config - clone_database_config = parent_rpcs.clone_database if parent_rpcs.respond_to? :clone_database - @clone_database = ::Gapic::Config::Method.new clone_database_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb deleted file mode 100644 index cd55f393cf90..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/operations.rb +++ /dev/null @@ -1,927 +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 Firestore - module Admin - module V1 - module FirestoreAdmin - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the FirestoreAdmin 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 FirestoreAdmin 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::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Firestore::Admin::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "firestore.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/[^/]+/databases/[^/]+/?$}, 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/[^/]+/databases/[^/]+/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/[^/]+/databases/[^/]+/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/[^/]+/databases/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb deleted file mode 100644 index 57d850599a12..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/firestore_admin/rest/service_stub.rb +++ /dev/null @@ -1,2050 +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/firestore/admin/v1/firestore_admin_pb" - -module Google - module Cloud - module Firestore - module Admin - module V1 - module FirestoreAdmin - module Rest - ## - # REST service stub for the FirestoreAdmin 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_index REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_index request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_index_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_index", - 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_indexes REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse] - # A result object deserialized from the server's reply - def list_indexes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_indexes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_indexes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse.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_index REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetIndexRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Index] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::Index] - # A result object deserialized from the server's reply - def get_index request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_index_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_index", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::Index.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_index REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_index request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_index_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_index", - 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_field REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetFieldRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Field] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::Field] - # A result object deserialized from the server's reply - def get_field request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_field_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_field", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::Field.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_field REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_field request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_field_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_field", - 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_fields REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse] - # A result object deserialized from the server's reply - def list_fields request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_fields_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_fields", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the export_documents REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def export_documents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_export_documents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "export_documents", - 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 import_documents REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def import_documents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_import_documents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "import_documents", - 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 bulk_delete_documents REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def bulk_delete_documents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_bulk_delete_documents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "bulk_delete_documents", - 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_database REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_database request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_database_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_database", - 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_database REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Database] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::Database] - # A result object deserialized from the server's reply - def get_database request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_database_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_database", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::Database.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_databases REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse] - # A result object deserialized from the server's reply - def list_databases request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_databases_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_databases", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse.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_database REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_database request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_database_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_database", - 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_database REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_database request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_database_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_database", - 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_user_creds REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # A result object deserialized from the server's reply - def create_user_creds request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_user_creds_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_user_creds", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.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_user_creds REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # A result object deserialized from the server's reply - def get_user_creds request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_user_creds_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_user_creds", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.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_user_creds REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse] - # A result object deserialized from the server's reply - def list_user_creds request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_user_creds_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_user_creds", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the enable_user_creds REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # A result object deserialized from the server's reply - def enable_user_creds request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_enable_user_creds_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "enable_user_creds", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the disable_user_creds REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # A result object deserialized from the server's reply - def disable_user_creds request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_disable_user_creds_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "disable_user_creds", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the reset_user_password REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # A result object deserialized from the server's reply - def reset_user_password request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_reset_user_password_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "reset_user_password", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.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_user_creds REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_user_creds request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_user_creds_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_user_creds", - 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_backup REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::Backup] - # A result object deserialized from the server's reply - def get_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::Backup.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_backups REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse] - # A result object deserialized from the server's reply - def list_backups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse.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_backup REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup", - 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 restore_database REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def restore_database request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_restore_database_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "restore_database", - 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_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # A result object deserialized from the server's reply - def create_backup_schedule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_schedule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_schedule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.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_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # A result object deserialized from the server's reply - def get_backup_schedule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_schedule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_schedule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.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_backup_schedules REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse] - # A result object deserialized from the server's reply - def list_backup_schedules request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_schedules_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_schedules", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse.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_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # A result object deserialized from the server's reply - def update_backup_schedule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_schedule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_schedule", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.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_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_backup_schedule request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_schedule_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_schedule", - 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 clone_database REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def clone_database request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_clone_database_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "clone_database", - 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_index REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest] - # 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_index_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/indexes", - body: "index", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_indexes REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest] - # 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_indexes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/indexes", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_index REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetIndexRequest] - # 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_index_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/indexes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_index REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest] - # 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_index_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/indexes/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_field REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetFieldRequest] - # 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_field_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/fields/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_field REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest] - # 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_field_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{field.name}", - body: "field", - matches: [ - ["field.name", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/fields/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_fields REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest] - # 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_fields_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/fields", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/collectionGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the export_documents REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_export_documents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:exportDocuments", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the import_documents REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_import_documents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:importDocuments", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the bulk_delete_documents REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_bulk_delete_documents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:bulkDeleteDocuments", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_database REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest] - # 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_database_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/databases", - body: "database", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_database REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest] - # 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_database_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_databases REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest] - # 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_databases_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/databases", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_database REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest] - # 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_database_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{database.name}", - body: "database", - matches: [ - ["database.name", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_database REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest] - # 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_database_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_user_creds REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest] - # 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_user_creds_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/userCreds", - body: "user_creds", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_user_creds REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest] - # 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_user_creds_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/userCreds/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_user_creds REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest] - # 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_user_creds_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/userCreds", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the enable_user_creds REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_enable_user_creds_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:enable", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/userCreds/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the disable_user_creds REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_disable_user_creds_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:disable", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/userCreds/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the reset_user_password REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_reset_user_password_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:resetPassword", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/userCreds/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_user_creds REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest] - # 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_user_creds_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/userCreds/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetBackupRequest] - # 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_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backups REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest] - # 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_backups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest] - # 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_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the restore_database REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_restore_database_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/databases:restore", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest] - # 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_backup_schedule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backupSchedules", - body: "backup_schedule", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest] - # 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_backup_schedule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_schedules REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest] - # 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_backup_schedules_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupSchedules", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest] - # 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_backup_schedule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup_schedule.name}", - body: "backup_schedule", - matches: [ - ["backup_schedule.name", %r{^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup_schedule REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest] - # 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_backup_schedule_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/backupSchedules/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the clone_database REST call - # - # @param request_pb [::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_clone_database_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/databases:clone", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/rest.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/rest.rb deleted file mode 100644 index d599ad3cdd38..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/rest.rb +++ /dev/null @@ -1,39 +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/firestore/admin/v1/firestore_admin/rest" -require "google/cloud/firestore/admin/v1/version" - -module Google - module Cloud - module Firestore - module Admin - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/firestore/admin/v1/rest" - # client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new - # - module V1 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb deleted file mode 100644 index ec727a6a3960..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/cloud/firestore/admin/v1/version.rb +++ /dev/null @@ -1,30 +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 Firestore - module Admin - module V1 - VERSION = "0.0.1" - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/backup_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/backup_pb.rb deleted file mode 100644 index e0ac294397fe..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/backup_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/admin/v1/backup.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/firestore/admin/v1/backup.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xe0\x04\n\x06\x42\x61\x63kup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12;\n\x08\x64\x61tabase\x18\x02 \x01(\tB)\xe0\x41\x03\xfa\x41#\n!firestore.googleapis.com/Database\x12\x19\n\x0c\x64\x61tabase_uid\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rsnapshot_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0b\x65xpire_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12;\n\x05stats\x18\x06 \x01(\x0b\x32\'.google.firestore.admin.v1.Backup.StatsB\x03\xe0\x41\x03\x12;\n\x05state\x18\x08 \x01(\x0e\x32\'.google.firestore.admin.v1.Backup.StateB\x03\xe0\x41\x03\x1aW\n\x05Stats\x12\x17\n\nsize_bytes\x18\x01 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1b\n\x0e\x64ocument_count\x18\x02 \x01(\x03\x42\x03\xe0\x41\x03\x12\x18\n\x0bindex_count\x18\x03 \x01(\x03\x42\x03\xe0\x41\x03\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x11\n\rNOT_AVAILABLE\x10\x03:^\xea\x41[\n\x1f\x66irestore.googleapis.com/Backup\x12\x38projects/{project}/locations/{location}/backups/{backup}B\xda\x01\n\x1d\x63om.google.firestore.admin.v1B\x0b\x42\x61\x63kupProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module Admin - module V1 - Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Backup").msgclass - Backup::Stats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Backup.Stats").msgclass - Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Backup.State").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/database_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/database_pb.rb deleted file mode 100644 index 637cde4b3cc8..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/database_pb.rb +++ /dev/null @@ -1,64 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/admin/v1/database.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/firestore/admin/v1/database.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa3\x16\n\x08\x44\x61tabase\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x10\n\x03uid\x18\x03 \x01(\tB\x03\xe0\x41\x03\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\x34\n\x0b\x64\x65lete_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x13\n\x0blocation_id\x18\t \x01(\t\x12>\n\x04type\x18\n \x01(\x0e\x32\x30.google.firestore.admin.v1.Database.DatabaseType\x12M\n\x10\x63oncurrency_mode\x18\x0f \x01(\x0e\x32\x33.google.firestore.admin.v1.Database.ConcurrencyMode\x12@\n\x18version_retention_period\x18\x11 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x03\x12>\n\x15\x65\x61rliest_version_time\x18\x12 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12l\n!point_in_time_recovery_enablement\x18\x15 \x01(\x0e\x32\x41.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement\x12\x61\n\x1b\x61pp_engine_integration_mode\x18\x13 \x01(\x0e\x32<.google.firestore.admin.v1.Database.AppEngineIntegrationMode\x12\x17\n\nkey_prefix\x18\x14 \x01(\tB\x03\xe0\x41\x03\x12Z\n\x17\x64\x65lete_protection_state\x18\x16 \x01(\x0e\x32\x39.google.firestore.admin.v1.Database.DeleteProtectionState\x12H\n\x0b\x63mek_config\x18\x17 \x01(\x0b\x32..google.firestore.admin.v1.Database.CmekConfigB\x03\xe0\x41\x01\x12\x18\n\x0bprevious_id\x18\x19 \x01(\tB\x03\xe0\x41\x03\x12H\n\x0bsource_info\x18\x1a \x01(\x0b\x32..google.firestore.admin.v1.Database.SourceInfoB\x03\xe0\x41\x03\x12\x46\n\x04tags\x18\x1d \x03(\x0b\x32-.google.firestore.admin.v1.Database.TagsEntryB\t\xe0\x41\x04\xe0\x41\x05\xe0\x41\x01\x12\x1b\n\tfree_tier\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03H\x00\x88\x01\x01\x12\x0c\n\x04\x65tag\x18\x63 \x01(\t\x12R\n\x10\x64\x61tabase_edition\x18\x1c \x01(\x0e\x32\x33.google.firestore.admin.v1.Database.DatabaseEditionB\x03\xe0\x41\x05\x1aH\n\nCmekConfig\x12\x19\n\x0ckms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1f\n\x12\x61\x63tive_key_version\x18\x02 \x03(\tB\x03\xe0\x41\x03\x1a\xe7\x01\n\nSourceInfo\x12M\n\x06\x62\x61\x63kup\x18\x01 \x01(\x0b\x32;.google.firestore.admin.v1.Database.SourceInfo.BackupSourceH\x00\x12:\n\toperation\x18\x03 \x01(\tB\'\xfa\x41$\n\"firestore.googleapis.com/Operation\x1a\x44\n\x0c\x42\x61\x63kupSource\x12\x34\n\x06\x62\x61\x63kup\x18\x01 \x01(\tB$\xfa\x41!\n\x1f\x66irestore.googleapis.com/BackupB\x08\n\x06source\x1a\x88\x04\n\x10\x45ncryptionConfig\x12x\n\x19google_default_encryption\x18\x01 \x01(\x0b\x32S.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptionsH\x00\x12m\n\x15use_source_encryption\x18\x02 \x01(\x0b\x32L.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptionsH\x00\x12|\n\x1b\x63ustomer_managed_encryption\x18\x03 \x01(\x0b\x32U.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptionsH\x00\x1a \n\x1eGoogleDefaultEncryptionOptions\x1a\x19\n\x17SourceEncryptionOptions\x1a=\n CustomerManagedEncryptionOptions\x12\x19\n\x0ckms_key_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x42\x11\n\x0f\x65ncryption_type\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"W\n\x0c\x44\x61tabaseType\x12\x1d\n\x19\x44\x41TABASE_TYPE_UNSPECIFIED\x10\x00\x12\x14\n\x10\x46IRESTORE_NATIVE\x10\x01\x12\x12\n\x0e\x44\x41TASTORE_MODE\x10\x02\"w\n\x0f\x43oncurrencyMode\x12 \n\x1c\x43ONCURRENCY_MODE_UNSPECIFIED\x10\x00\x12\x0e\n\nOPTIMISTIC\x10\x01\x12\x0f\n\x0bPESSIMISTIC\x10\x02\x12!\n\x1dOPTIMISTIC_WITH_ENTITY_GROUPS\x10\x03\"\x9b\x01\n\x1dPointInTimeRecoveryEnablement\x12\x31\n-POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED\x10\x00\x12\"\n\x1ePOINT_IN_TIME_RECOVERY_ENABLED\x10\x01\x12#\n\x1fPOINT_IN_TIME_RECOVERY_DISABLED\x10\x02\"b\n\x18\x41ppEngineIntegrationMode\x12+\n\'APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02\"\x7f\n\x15\x44\x65leteProtectionState\x12\'\n#DELETE_PROTECTION_STATE_UNSPECIFIED\x10\x00\x12\x1e\n\x1a\x44\x45LETE_PROTECTION_DISABLED\x10\x01\x12\x1d\n\x19\x44\x45LETE_PROTECTION_ENABLED\x10\x02\"Q\n\x0f\x44\x61tabaseEdition\x12 \n\x1c\x44\x41TABASE_EDITION_UNSPECIFIED\x10\x00\x12\x0c\n\x08STANDARD\x10\x01\x12\x0e\n\nENTERPRISE\x10\x02:R\xea\x41O\n!firestore.googleapis.com/Database\x12\'projects/{project}/databases/{database}R\x01\x01\x42\x0c\n\n_free_tierB\xc3\x02\n\x1d\x63om.google.firestore.admin.v1B\rDatabaseProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1\xea\x41\x64\n\"firestore.googleapis.com/Operation\x12>projects/{project}/databases/{database}/operations/{operation}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.Duration", "google/protobuf/duration.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module Admin - module V1 - Database = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database").msgclass - Database::CmekConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.CmekConfig").msgclass - Database::SourceInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.SourceInfo").msgclass - Database::SourceInfo::BackupSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.SourceInfo.BackupSource").msgclass - Database::EncryptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.EncryptionConfig").msgclass - Database::EncryptionConfig::GoogleDefaultEncryptionOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions").msgclass - Database::EncryptionConfig::SourceEncryptionOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions").msgclass - Database::EncryptionConfig::CustomerManagedEncryptionOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions").msgclass - Database::DatabaseType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.DatabaseType").enummodule - Database::ConcurrencyMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.ConcurrencyMode").enummodule - Database::PointInTimeRecoveryEnablement = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement").enummodule - Database::AppEngineIntegrationMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.AppEngineIntegrationMode").enummodule - Database::DeleteProtectionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.DeleteProtectionState").enummodule - Database::DatabaseEdition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Database.DatabaseEdition").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/field_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/field_pb.rb deleted file mode 100644 index 986cb252bd7b..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/field_pb.rb +++ /dev/null @@ -1,52 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/admin/v1/field.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/firestore/admin/v1/index_pb' - - -descriptor_data = "\n%google/firestore/admin/v1/field.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a%google/firestore/admin/v1/index.proto\"\xc5\x04\n\x05\x46ield\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x42\n\x0cindex_config\x18\x02 \x01(\x0b\x32,.google.firestore.admin.v1.Field.IndexConfig\x12>\n\nttl_config\x18\x03 \x01(\x0b\x32*.google.firestore.admin.v1.Field.TtlConfig\x1a\x89\x01\n\x0bIndexConfig\x12\x31\n\x07indexes\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Index\x12\x1c\n\x14uses_ancestor_config\x18\x02 \x01(\x08\x12\x16\n\x0e\x61ncestor_field\x18\x03 \x01(\t\x12\x11\n\treverting\x18\x04 \x01(\x08\x1a\x9d\x01\n\tTtlConfig\x12\x44\n\x05state\x18\x01 \x01(\x0e\x32\x30.google.firestore.admin.v1.Field.TtlConfig.StateB\x03\xe0\x41\x03\"J\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\n\n\x06\x41\x43TIVE\x10\x02\x12\x10\n\x0cNEEDS_REPAIR\x10\x03:y\xea\x41v\n\x1e\x66irestore.googleapis.com/Field\x12Tprojects/{project}/databases/{database}/collectionGroups/{collection}/fields/{field}B\xd9\x01\n\x1d\x63om.google.firestore.admin.v1B\nFieldProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.firestore.admin.v1.Index", "google/firestore/admin/v1/index.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module Admin - module V1 - Field = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field").msgclass - Field::IndexConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field.IndexConfig").msgclass - Field::TtlConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field.TtlConfig").msgclass - Field::TtlConfig::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Field.TtlConfig.State").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb deleted file mode 100644 index 571d8d96b27f..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_pb.rb +++ /dev/null @@ -1,112 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/admin/v1/firestore_admin.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/api/routing_pb' -require 'google/firestore/admin/v1/backup_pb' -require 'google/firestore/admin/v1/database_pb' -require 'google/firestore/admin/v1/field_pb' -require 'google/firestore/admin/v1/index_pb' -require 'google/firestore/admin/v1/operation_pb' -require 'google/firestore/admin/v1/schedule_pb' -require 'google/firestore/admin/v1/snapshot_pb' -require 'google/firestore/admin/v1/user_creds_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/firestore/admin/v1/firestore_admin.proto\x12\x19google.firestore.admin.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x18google/api/routing.proto\x1a&google/firestore/admin/v1/backup.proto\x1a(google/firestore/admin/v1/database.proto\x1a%google/firestore/admin/v1/field.proto\x1a%google/firestore/admin/v1/index.proto\x1a)google/firestore/admin/v1/operation.proto\x1a(google/firestore/admin/v1/schedule.proto\x1a(google/firestore/admin/v1/snapshot.proto\x1a*google/firestore/admin/v1/user_creds.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"g\n\x14ListDatabasesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x14\n\x0cshow_deleted\x18\x04 \x01(\x08\"\xa8\x01\n\x15\x43reateDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12:\n\x08\x64\x61tabase\x18\x02 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12\x18\n\x0b\x64\x61tabase_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\x18\n\x16\x43reateDatabaseMetadata\"d\n\x15ListDatabasesResponse\x12\x36\n\tdatabases\x18\x01 \x03(\x0b\x32#.google.firestore.admin.v1.Database\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"M\n\x12GetDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"\x84\x01\n\x15UpdateDatabaseRequest\x12:\n\x08\x64\x61tabase\x18\x01 \x01(\x0b\x32#.google.firestore.admin.v1.DatabaseB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\x18\n\x16UpdateDatabaseMetadata\"^\n\x15\x44\x65leteDatabaseRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x0c\n\x04\x65tag\x18\x03 \x01(\t\"\x18\n\x16\x44\x65leteDatabaseMetadata\"\xaf\x01\n\x16\x43reateUserCredsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"firestore.googleapis.com/UserCreds\x12=\n\nuser_creds\x18\x02 \x01(\x0b\x32$.google.firestore.admin.v1.UserCredsB\x03\xe0\x41\x02\x12\x1a\n\ruser_creds_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"O\n\x13GetUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"R\n\x14ListUserCredsRequest\x12:\n\x06parent\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\x12\"firestore.googleapis.com/UserCreds\"Q\n\x15ListUserCredsResponse\x12\x38\n\nuser_creds\x18\x01 \x03(\x0b\x32$.google.firestore.admin.v1.UserCreds\"R\n\x16\x45nableUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"S\n\x17\x44isableUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"T\n\x18ResetUserPasswordRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"R\n\x16\x44\x65leteUserCredsRequest\x12\x38\n\x04name\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n\"firestore.googleapis.com/UserCreds\"\xa1\x01\n\x1b\x43reateBackupScheduleRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12G\n\x0f\x62\x61\x63kup_schedule\x18\x02 \x01(\x0b\x32).google.firestore.admin.v1.BackupScheduleB\x03\xe0\x41\x02\"Y\n\x18GetBackupScheduleRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'firestore.googleapis.com/BackupSchedule\"\x97\x01\n\x1bUpdateBackupScheduleRequest\x12G\n\x0f\x62\x61\x63kup_schedule\x18\x01 \x01(\x0b\x32).google.firestore.admin.v1.BackupScheduleB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"W\n\x1aListBackupSchedulesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\"b\n\x1bListBackupSchedulesResponse\x12\x43\n\x10\x62\x61\x63kup_schedules\x18\x01 \x03(\x0b\x32).google.firestore.admin.v1.BackupSchedule\"\\\n\x1b\x44\x65leteBackupScheduleRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'firestore.googleapis.com/BackupSchedule\"\x8c\x01\n\x12\x43reateIndexRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x34\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.IndexB\x03\xe0\x41\x02\"\x8d\x01\n\x12ListIndexesRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"a\n\x13ListIndexesResponse\x12\x31\n\x07indexes\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Index\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"G\n\x0fGetIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"J\n\x12\x44\x65leteIndexRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Index\"{\n\x12UpdateFieldRequest\x12\x34\n\x05\x66ield\x18\x01 \x01(\x0b\x32 .google.firestore.admin.v1.FieldB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"G\n\x0fGetFieldRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1e\x66irestore.googleapis.com/Field\"\x8c\x01\n\x11ListFieldsRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(firestore.googleapis.com/CollectionGroup\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\x12\x11\n\tpage_size\x18\x03 \x01(\x05\x12\x12\n\npage_token\x18\x04 \x01(\t\"_\n\x12ListFieldsResponse\x12\x30\n\x06\x66ields\x18\x01 \x03(\x0b\x32 .google.firestore.admin.v1.Field\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xce\x01\n\x16\x45xportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t\x12\x31\n\rsnapshot_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x9a\x01\n\x16ImportDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x16\n\x0e\x63ollection_ids\x18\x02 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x03 \x01(\t\x12\x15\n\rnamespace_ids\x18\x04 \x03(\t\"\x8e\x01\n\x1a\x42ulkDeleteDocumentsRequest\x12\x37\n\x04name\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x1b\n\x0e\x63ollection_ids\x18\x02 \x03(\tB\x03\xe0\x41\x01\x12\x1a\n\rnamespace_ids\x18\x03 \x03(\tB\x03\xe0\x41\x01\"\x1d\n\x1b\x42ulkDeleteDocumentsResponse\"I\n\x10GetBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\"_\n\x12ListBackupsRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\"^\n\x13ListBackupsResponse\x12\x32\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32!.google.firestore.admin.v1.Backup\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"L\n\x13\x44\x65leteBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\"\xfc\x02\n\x16RestoreDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x18\n\x0b\x64\x61tabase_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x37\n\x06\x62\x61\x63kup\x18\x03 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\x12T\n\x11\x65ncryption_config\x18\t \x01(\x0b\x32\x34.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xe0\x41\x01\x12Q\n\x04tags\x18\n \x03(\x0b\x32;.google.firestore.admin.v1.RestoreDatabaseRequest.TagsEntryB\x06\xe0\x41\x05\xe0\x41\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x84\x03\n\x14\x43loneDatabaseRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\x12!firestore.googleapis.com/Database\x12\x18\n\x0b\x64\x61tabase_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x43\n\rpitr_snapshot\x18\x06 \x01(\x0b\x32\'.google.firestore.admin.v1.PitrSnapshotB\x03\xe0\x41\x02\x12T\n\x11\x65ncryption_config\x18\x04 \x01(\x0b\x32\x34.google.firestore.admin.v1.Database.EncryptionConfigB\x03\xe0\x41\x01\x12O\n\x04tags\x18\x05 \x03(\x0b\x32\x39.google.firestore.admin.v1.CloneDatabaseRequest.TagsEntryB\x06\xe0\x41\x05\xe0\x41\x01\x1a+\n\tTagsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x32\xfb\x31\n\x0e\x46irestoreAdmin\x12\xdb\x01\n\x0b\x43reateIndex\x12-.google.firestore.admin.v1.CreateIndexRequest\x1a\x1d.google.longrunning.Operation\"~\xca\x41\x1f\n\x05Index\x12\x16IndexOperationMetadata\xda\x41\x0cparent,index\x82\xd3\xe4\x93\x02G\">/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes:\x05index\x12\xbd\x01\n\x0bListIndexes\x12-.google.firestore.admin.v1.ListIndexesRequest\x1a..google.firestore.admin.v1.ListIndexesResponse\"O\xda\x41\x06parent\x82\xd3\xe4\x93\x02@\x12>/v1/{parent=projects/*/databases/*/collectionGroups/*}/indexes\x12\xa7\x01\n\x08GetIndex\x12*.google.firestore.admin.v1.GetIndexRequest\x1a .google.firestore.admin.v1.Index\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\x12>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xa3\x01\n\x0b\x44\x65leteIndex\x12-.google.firestore.admin.v1.DeleteIndexRequest\x1a\x16.google.protobuf.Empty\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@*>/v1/{name=projects/*/databases/*/collectionGroups/*/indexes/*}\x12\xa6\x01\n\x08GetField\x12*.google.firestore.admin.v1.GetFieldRequest\x1a .google.firestore.admin.v1.Field\"L\xda\x41\x04name\x82\xd3\xe4\x93\x02?\x12=/v1/{name=projects/*/databases/*/collectionGroups/*/fields/*}\x12\xd9\x01\n\x0bUpdateField\x12-.google.firestore.admin.v1.UpdateFieldRequest\x1a\x1d.google.longrunning.Operation\"|\xca\x41\x1f\n\x05\x46ield\x12\x16\x46ieldOperationMetadata\xda\x41\x05\x66ield\x82\xd3\xe4\x93\x02L2C/v1/{field.name=projects/*/databases/*/collectionGroups/*/fields/*}:\x05\x66ield\x12\xb9\x01\n\nListFields\x12,.google.firestore.admin.v1.ListFieldsRequest\x1a-.google.firestore.admin.v1.ListFieldsResponse\"N\xda\x41\x06parent\x82\xd3\xe4\x93\x02?\x12=/v1/{parent=projects/*/databases/*/collectionGroups/*}/fields\x12\xdd\x01\n\x0f\x45xportDocuments\x12\x31.google.firestore.admin.v1.ExportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\x32\n\x17\x45xportDocumentsResponse\x12\x17\x45xportDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:exportDocuments:\x01*\x12\xdb\x01\n\x0fImportDocuments\x12\x31.google.firestore.admin.v1.ImportDocumentsRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\x30\n\x15google.protobuf.Empty\x12\x17ImportDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x36\"1/v1/{name=projects/*/databases/*}:importDocuments:\x01*\x12\xf2\x01\n\x13\x42ulkDeleteDocuments\x12\x35.google.firestore.admin.v1.BulkDeleteDocumentsRequest\x1a\x1d.google.longrunning.Operation\"\x84\x01\xca\x41:\n\x1b\x42ulkDeleteDocumentsResponse\x12\x1b\x42ulkDeleteDocumentsMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/databases/*}:bulkDeleteDocuments:\x01*\x12\xd9\x01\n\x0e\x43reateDatabase\x12\x30.google.firestore.admin.v1.CreateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"v\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x43reateDatabaseMetadata\xda\x41\x1bparent,database,database_id\x82\xd3\xe4\x93\x02-\"!/v1/{parent=projects/*}/databases:\x08\x64\x61tabase\x12\x93\x01\n\x0bGetDatabase\x12-.google.firestore.admin.v1.GetDatabaseRequest\x1a#.google.firestore.admin.v1.Database\"0\xda\x41\x04name\x82\xd3\xe4\x93\x02#\x12!/v1/{name=projects/*/databases/*}\x12\xa6\x01\n\rListDatabases\x12/.google.firestore.admin.v1.ListDatabasesRequest\x1a\x30.google.firestore.admin.v1.ListDatabasesResponse\"2\xda\x41\x06parent\x82\xd3\xe4\x93\x02#\x12!/v1/{parent=projects/*}/databases\x12\xdb\x01\n\x0eUpdateDatabase\x12\x30.google.firestore.admin.v1.UpdateDatabaseRequest\x1a\x1d.google.longrunning.Operation\"x\xca\x41\"\n\x08\x44\x61tabase\x12\x16UpdateDatabaseMetadata\xda\x41\x14\x64\x61tabase,update_mask\x82\xd3\xe4\x93\x02\x36\x32*/v1/{database.name=projects/*/databases/*}:\x08\x64\x61tabase\x12\xb8\x01\n\x0e\x44\x65leteDatabase\x12\x30.google.firestore.admin.v1.DeleteDatabaseRequest\x1a\x1d.google.longrunning.Operation\"U\xca\x41\"\n\x08\x44\x61tabase\x12\x16\x44\x65leteDatabaseMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02#*!/v1/{name=projects/*/databases/*}\x12\xcf\x01\n\x0f\x43reateUserCreds\x12\x31.google.firestore.admin.v1.CreateUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"c\xda\x41\x1fparent,user_creds,user_creds_id\x82\xd3\xe4\x93\x02;\"-/v1/{parent=projects/*/databases/*}/userCreds:\nuser_creds\x12\xa2\x01\n\x0cGetUserCreds\x12..google.firestore.admin.v1.GetUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/databases/*/userCreds/*}\x12\xb2\x01\n\rListUserCreds\x12/.google.firestore.admin.v1.ListUserCredsRequest\x1a\x30.google.firestore.admin.v1.ListUserCredsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/databases/*}/userCreds\x12\xb2\x01\n\x0f\x45nableUserCreds\x12\x31.google.firestore.admin.v1.EnableUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"F\xda\x41\x04name\x82\xd3\xe4\x93\x02\x39\"4/v1/{name=projects/*/databases/*/userCreds/*}:enable:\x01*\x12\xb5\x01\n\x10\x44isableUserCreds\x12\x32.google.firestore.admin.v1.DisableUserCredsRequest\x1a$.google.firestore.admin.v1.UserCreds\"G\xda\x41\x04name\x82\xd3\xe4\x93\x02:\"5/v1/{name=projects/*/databases/*/userCreds/*}:disable:\x01*\x12\xbd\x01\n\x11ResetUserPassword\x12\x33.google.firestore.admin.v1.ResetUserPasswordRequest\x1a$.google.firestore.admin.v1.UserCreds\"M\xda\x41\x04name\x82\xd3\xe4\x93\x02@\";/v1/{name=projects/*/databases/*/userCreds/*}:resetPassword:\x01*\x12\x9a\x01\n\x0f\x44\x65leteUserCreds\x12\x31.google.firestore.admin.v1.DeleteUserCredsRequest\x1a\x16.google.protobuf.Empty\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/databases/*/userCreds/*}\x12\x97\x01\n\tGetBackup\x12+.google.firestore.admin.v1.GetBackupRequest\x1a!.google.firestore.admin.v1.Backup\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-\x12+/v1/{name=projects/*/locations/*/backups/*}\x12\xaa\x01\n\x0bListBackups\x12-.google.firestore.admin.v1.ListBackupsRequest\x1a..google.firestore.admin.v1.ListBackupsResponse\"<\xda\x41\x06parent\x82\xd3\xe4\x93\x02-\x12+/v1/{parent=projects/*/locations/*}/backups\x12\x92\x01\n\x0c\x44\x65leteBackup\x12..google.firestore.admin.v1.DeleteBackupRequest\x1a\x16.google.protobuf.Empty\":\xda\x41\x04name\x82\xd3\xe4\x93\x02-*+/v1/{name=projects/*/locations/*/backups/*}\x12\xbf\x01\n\x0fRestoreDatabase\x12\x31.google.firestore.admin.v1.RestoreDatabaseRequest\x1a\x1d.google.longrunning.Operation\"Z\xca\x41#\n\x08\x44\x61tabase\x12\x17RestoreDatabaseMetadata\x82\xd3\xe4\x93\x02.\")/v1/{parent=projects/*}/databases:restore:\x01*\x12\xe0\x01\n\x14\x43reateBackupSchedule\x12\x36.google.firestore.admin.v1.CreateBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"e\xda\x41\x16parent,backup_schedule\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/databases/*}/backupSchedules:\x0f\x62\x61\x63kup_schedule\x12\xb7\x01\n\x11GetBackupSchedule\x12\x33.google.firestore.admin.v1.GetBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xca\x01\n\x13ListBackupSchedules\x12\x35.google.firestore.admin.v1.ListBackupSchedulesRequest\x1a\x36.google.firestore.admin.v1.ListBackupSchedulesResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/databases/*}/backupSchedules\x12\xf5\x01\n\x14UpdateBackupSchedule\x12\x36.google.firestore.admin.v1.UpdateBackupScheduleRequest\x1a).google.firestore.admin.v1.BackupSchedule\"z\xda\x41\x1b\x62\x61\x63kup_schedule,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{backup_schedule.name=projects/*/databases/*/backupSchedules/*}:\x0f\x62\x61\x63kup_schedule\x12\xaa\x01\n\x14\x44\x65leteBackupSchedule\x12\x36.google.firestore.admin.v1.DeleteBackupScheduleRequest\x1a\x16.google.protobuf.Empty\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/databases/*/backupSchedules/*}\x12\xb7\x02\n\rCloneDatabase\x12/.google.firestore.admin.v1.CloneDatabaseRequest\x1a\x1d.google.longrunning.Operation\"\xd5\x01\xca\x41!\n\x08\x44\x61tabase\x12\x15\x43loneDatabaseMetadata\x82\xd3\xe4\x93\x02,\"\'/v1/{parent=projects/*}/databases:clone:\x01*\x8a\xd3\xe4\x93\x02y\x12\x34\n\x16pitr_snapshot.database\x12\x1aprojects/{project_id=*}/**\x12\x41\n\x16pitr_snapshot.database\x12\'projects/*/databases/{database_id=*}/**\x1av\xca\x41\x18\x66irestore.googleapis.com\xd2\x41Xhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/datastoreB\xa5\x03\n\x1d\x63om.google.firestore.admin.v1B\x13\x46irestoreAdminProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1\xea\x41L\n!firestore.googleapis.com/Location\x12\'projects/{project}/locations/{location}\xea\x41q\n(firestore.googleapis.com/CollectionGroup\x12\x45projects/{project}/databases/{database}/collectionGroups/{collection}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.firestore.admin.v1.Database", "google/firestore/admin/v1/database.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.firestore.admin.v1.UserCreds", "google/firestore/admin/v1/user_creds.proto"], - ["google.firestore.admin.v1.BackupSchedule", "google/firestore/admin/v1/schedule.proto"], - ["google.firestore.admin.v1.Index", "google/firestore/admin/v1/index.proto"], - ["google.firestore.admin.v1.Field", "google/firestore/admin/v1/field.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.firestore.admin.v1.Backup", "google/firestore/admin/v1/backup.proto"], - ["google.firestore.admin.v1.PitrSnapshot", "google/firestore/admin/v1/snapshot.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module Admin - module V1 - ListDatabasesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListDatabasesRequest").msgclass - CreateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateDatabaseRequest").msgclass - CreateDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateDatabaseMetadata").msgclass - ListDatabasesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListDatabasesResponse").msgclass - GetDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetDatabaseRequest").msgclass - UpdateDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateDatabaseRequest").msgclass - UpdateDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateDatabaseMetadata").msgclass - DeleteDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteDatabaseRequest").msgclass - DeleteDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteDatabaseMetadata").msgclass - CreateUserCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateUserCredsRequest").msgclass - GetUserCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetUserCredsRequest").msgclass - ListUserCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListUserCredsRequest").msgclass - ListUserCredsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListUserCredsResponse").msgclass - EnableUserCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.EnableUserCredsRequest").msgclass - DisableUserCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DisableUserCredsRequest").msgclass - ResetUserPasswordRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ResetUserPasswordRequest").msgclass - DeleteUserCredsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteUserCredsRequest").msgclass - CreateBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateBackupScheduleRequest").msgclass - GetBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetBackupScheduleRequest").msgclass - UpdateBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateBackupScheduleRequest").msgclass - ListBackupSchedulesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListBackupSchedulesRequest").msgclass - ListBackupSchedulesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListBackupSchedulesResponse").msgclass - DeleteBackupScheduleRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteBackupScheduleRequest").msgclass - CreateIndexRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CreateIndexRequest").msgclass - ListIndexesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListIndexesRequest").msgclass - ListIndexesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListIndexesResponse").msgclass - GetIndexRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetIndexRequest").msgclass - DeleteIndexRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteIndexRequest").msgclass - UpdateFieldRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UpdateFieldRequest").msgclass - GetFieldRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetFieldRequest").msgclass - ListFieldsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListFieldsRequest").msgclass - ListFieldsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListFieldsResponse").msgclass - ExportDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ExportDocumentsRequest").msgclass - ImportDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ImportDocumentsRequest").msgclass - BulkDeleteDocumentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.BulkDeleteDocumentsRequest").msgclass - BulkDeleteDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.BulkDeleteDocumentsResponse").msgclass - GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.GetBackupRequest").msgclass - ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListBackupsRequest").msgclass - ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ListBackupsResponse").msgclass - DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DeleteBackupRequest").msgclass - RestoreDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.RestoreDatabaseRequest").msgclass - CloneDatabaseRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CloneDatabaseRequest").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb deleted file mode 100644 index df9cf306ef17..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/firestore_admin_services_pb.rb +++ /dev/null @@ -1,220 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/firestore/admin/v1/firestore_admin.proto for package 'Google.Cloud.Firestore.Admin.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/firestore/admin/v1/firestore_admin_pb' - -module Google - module Cloud - module Firestore - module Admin - module V1 - module FirestoreAdmin - # The Cloud Firestore Admin API. - # - # This API provides several administrative services for Cloud Firestore. - # - # Project, Database, Namespace, Collection, Collection Group, and Document are - # used as defined in the Google Cloud Firestore API. - # - # Operation: An Operation represents work being performed in the background. - # - # The index service manages Cloud Firestore indexes. - # - # Index creation is performed asynchronously. - # An Operation resource is created for each such asynchronous operation. - # The state of the operation (including any errors encountered) - # may be queried via the Operation resource. - # - # The Operations collection provides a record of actions performed for the - # specified Project (including any Operations in progress). Operations are not - # created directly but through calls on other collections or resources. - # - # An Operation that is done may be deleted so that it is no longer listed as - # part of the Operation collection. Operations are garbage collected after - # 30 days. By default, ListOperations will only return in progress and failed - # operations. To list completed operation, issue a ListOperations request with - # the filter `done: true`. - # - # Operations are created by service `FirestoreAdmin`, but are accessed via - # service `google.longrunning.Operations`. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.firestore.admin.v1.FirestoreAdmin' - - # Creates a composite index. This returns a - # [google.longrunning.Operation][google.longrunning.Operation] which may be - # used to track the status of the creation. The metadata for the operation - # will be the type - # [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata]. - rpc :CreateIndex, ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest, ::Google::Longrunning::Operation - # Lists composite indexes. - rpc :ListIndexes, ::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest, ::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse - # Gets a composite index. - rpc :GetIndex, ::Google::Cloud::Firestore::Admin::V1::GetIndexRequest, ::Google::Cloud::Firestore::Admin::V1::Index - # Deletes a composite index. - rpc :DeleteIndex, ::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest, ::Google::Protobuf::Empty - # Gets the metadata and configuration for a Field. - rpc :GetField, ::Google::Cloud::Firestore::Admin::V1::GetFieldRequest, ::Google::Cloud::Firestore::Admin::V1::Field - # Updates a field configuration. Currently, field updates apply only to - # single field index configuration. However, calls to - # [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField] - # should provide a field mask to avoid changing any configuration that the - # caller isn't aware of. The field mask should be specified as: `{ paths: - # "index_config" }`. - # - # This call returns a - # [google.longrunning.Operation][google.longrunning.Operation] which may be - # used to track the status of the field update. The metadata for the - # operation will be the type - # [FieldOperationMetadata][google.firestore.admin.v1.FieldOperationMetadata]. - # - # To configure the default field settings for the database, use - # the special `Field` with resource name: - # `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`. - rpc :UpdateField, ::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest, ::Google::Longrunning::Operation - # Lists the field configuration and metadata for this database. - # - # Currently, - # [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - # only supports listing fields that have been explicitly overridden. To issue - # this query, call - # [FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields] - # with the filter set to `indexConfig.usesAncestorConfig:false` or - # `ttlConfig:*`. - rpc :ListFields, ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, ::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse - # Exports a copy of all or a subset of documents from Google Cloud Firestore - # to another storage system, such as Google Cloud Storage. Recent updates to - # documents may not be reflected in the export. The export occurs in the - # background and its progress can be monitored and managed via the - # Operation resource that is created. The output of an export may only be - # used once the associated operation is done. If an export operation is - # cancelled before completion it may leave partial data behind in Google - # Cloud Storage. - # - # For more details on export behavior and output format, refer to: - # https://cloud.google.com/firestore/docs/manage-data/export-import - rpc :ExportDocuments, ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest, ::Google::Longrunning::Operation - # Imports documents into Google Cloud Firestore. Existing documents with the - # same name are overwritten. The import occurs in the background and its - # progress can be monitored and managed via the Operation resource that is - # created. If an ImportDocuments operation is cancelled, it is possible - # that a subset of the data has already been imported to Cloud Firestore. - rpc :ImportDocuments, ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest, ::Google::Longrunning::Operation - # Bulk deletes a subset of documents from Google Cloud Firestore. - # Documents created or updated after the underlying system starts to process - # the request will not be deleted. The bulk delete occurs in the background - # and its progress can be monitored and managed via the Operation resource - # that is created. - # - # For more details on bulk delete behavior, refer to: - # https://cloud.google.com/firestore/docs/manage-data/bulk-delete - rpc :BulkDeleteDocuments, ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest, ::Google::Longrunning::Operation - # Create a database. - rpc :CreateDatabase, ::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest, ::Google::Longrunning::Operation - # Gets information about a database. - rpc :GetDatabase, ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest, ::Google::Cloud::Firestore::Admin::V1::Database - # List all the databases in the project. - rpc :ListDatabases, ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest, ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse - # Updates a database. - rpc :UpdateDatabase, ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest, ::Google::Longrunning::Operation - # Deletes a database. - rpc :DeleteDatabase, ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest, ::Google::Longrunning::Operation - # Create a user creds. - rpc :CreateUserCreds, ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest, ::Google::Cloud::Firestore::Admin::V1::UserCreds - # Gets a user creds resource. Note that the returned resource does not - # contain the secret value itself. - rpc :GetUserCreds, ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest, ::Google::Cloud::Firestore::Admin::V1::UserCreds - # List all user creds in the database. Note that the returned resource - # does not contain the secret value itself. - rpc :ListUserCreds, ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest, ::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse - # Enables a user creds. No-op if the user creds are already enabled. - rpc :EnableUserCreds, ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest, ::Google::Cloud::Firestore::Admin::V1::UserCreds - # Disables a user creds. No-op if the user creds are already disabled. - rpc :DisableUserCreds, ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest, ::Google::Cloud::Firestore::Admin::V1::UserCreds - # Resets the password of a user creds. - rpc :ResetUserPassword, ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest, ::Google::Cloud::Firestore::Admin::V1::UserCreds - # Deletes a user creds. - rpc :DeleteUserCreds, ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest, ::Google::Protobuf::Empty - # Gets information about a backup. - rpc :GetBackup, ::Google::Cloud::Firestore::Admin::V1::GetBackupRequest, ::Google::Cloud::Firestore::Admin::V1::Backup - # Lists all the backups. - rpc :ListBackups, ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest, ::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse - # Deletes a backup. - rpc :DeleteBackup, ::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest, ::Google::Protobuf::Empty - # Creates a new database by restoring from an existing backup. - # - # The new database must be in the same cloud region or multi-region location - # as the existing backup. This behaves similar to - # [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] - # except instead of creating a new empty database, a new database is created - # with the database type, index configuration, and documents from an existing - # backup. - # - # The [long-running operation][google.longrunning.Operation] can be used to - # track the progress of the restore, with the Operation's - # [metadata][google.longrunning.Operation.metadata] field type being the - # [RestoreDatabaseMetadata][google.firestore.admin.v1.RestoreDatabaseMetadata]. - # The [response][google.longrunning.Operation.response] type is the - # [Database][google.firestore.admin.v1.Database] if the restore was - # successful. The new database is not readable or writeable until the LRO has - # completed. - rpc :RestoreDatabase, ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest, ::Google::Longrunning::Operation - # Creates a backup schedule on a database. - # At most two backup schedules can be configured on a database, one daily - # backup schedule and one weekly backup schedule. - rpc :CreateBackupSchedule, ::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest, ::Google::Cloud::Firestore::Admin::V1::BackupSchedule - # Gets information about a backup schedule. - rpc :GetBackupSchedule, ::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest, ::Google::Cloud::Firestore::Admin::V1::BackupSchedule - # List backup schedules. - rpc :ListBackupSchedules, ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest, ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse - # Updates a backup schedule. - rpc :UpdateBackupSchedule, ::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest, ::Google::Cloud::Firestore::Admin::V1::BackupSchedule - # Deletes a backup schedule. - rpc :DeleteBackupSchedule, ::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest, ::Google::Protobuf::Empty - # Creates a new database by cloning an existing one. - # - # The new database must be in the same cloud region or multi-region location - # as the existing database. This behaves similar to - # [FirestoreAdmin.CreateDatabase][google.firestore.admin.v1.FirestoreAdmin.CreateDatabase] - # except instead of creating a new empty database, a new database is created - # with the database type, index configuration, and documents from an existing - # database. - # - # The [long-running operation][google.longrunning.Operation] can be used to - # track the progress of the clone, with the Operation's - # [metadata][google.longrunning.Operation.metadata] field type being the - # [CloneDatabaseMetadata][google.firestore.admin.v1.CloneDatabaseMetadata]. - # The [response][google.longrunning.Operation.response] type is the - # [Database][google.firestore.admin.v1.Database] if the clone was - # successful. The new database is not readable or writeable until the LRO has - # completed. - rpc :CloneDatabase, ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/index_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/index_pb.rb deleted file mode 100644 index 67a43977198c..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/index_pb.rb +++ /dev/null @@ -1,56 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/admin/v1/index.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n%google/firestore/admin/v1/index.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"\xed\n\n\x05Index\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x0bquery_scope\x18\x02 \x01(\x0e\x32+.google.firestore.admin.v1.Index.QueryScope\x12<\n\tapi_scope\x18\x05 \x01(\x0e\x32).google.firestore.admin.v1.Index.ApiScope\x12;\n\x06\x66ields\x18\x03 \x03(\x0b\x32+.google.firestore.admin.v1.Index.IndexField\x12\x35\n\x05state\x18\x04 \x01(\x0e\x32&.google.firestore.admin.v1.Index.State\x12>\n\x07\x64\x65nsity\x18\x06 \x01(\x0e\x32(.google.firestore.admin.v1.Index.DensityB\x03\xe0\x41\x05\x12\x15\n\x08multikey\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x12\x18\n\x0bshard_count\x18\x08 \x01(\x05\x42\x03\xe0\x41\x01\x1a\xa2\x04\n\nIndexField\x12\x12\n\nfield_path\x18\x01 \x01(\t\x12\x42\n\x05order\x18\x02 \x01(\x0e\x32\x31.google.firestore.admin.v1.Index.IndexField.OrderH\x00\x12O\n\x0c\x61rray_config\x18\x03 \x01(\x0e\x32\x37.google.firestore.admin.v1.Index.IndexField.ArrayConfigH\x00\x12Q\n\rvector_config\x18\x04 \x01(\x0b\x32\x38.google.firestore.admin.v1.Index.IndexField.VectorConfigH\x00\x1a\x8f\x01\n\x0cVectorConfig\x12\x16\n\tdimension\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12R\n\x04\x66lat\x18\x02 \x01(\x0b\x32\x42.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndexH\x00\x1a\x0b\n\tFlatIndexB\x06\n\x04type\"=\n\x05Order\x12\x15\n\x11ORDER_UNSPECIFIED\x10\x00\x12\r\n\tASCENDING\x10\x01\x12\x0e\n\nDESCENDING\x10\x02\"9\n\x0b\x41rrayConfig\x12\x1c\n\x18\x41RRAY_CONFIG_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43ONTAINS\x10\x01\x42\x0c\n\nvalue_mode\"i\n\nQueryScope\x12\x1b\n\x17QUERY_SCOPE_UNSPECIFIED\x10\x00\x12\x0e\n\nCOLLECTION\x10\x01\x12\x14\n\x10\x43OLLECTION_GROUP\x10\x02\x12\x18\n\x14\x43OLLECTION_RECURSIVE\x10\x03\"K\n\x08\x41piScope\x12\x0b\n\x07\x41NY_API\x10\x00\x12\x16\n\x12\x44\x41TASTORE_MODE_API\x10\x01\x12\x1a\n\x16MONGODB_COMPATIBLE_API\x10\x02\"I\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\t\n\x05READY\x10\x02\x12\x10\n\x0cNEEDS_REPAIR\x10\x03\"M\n\x07\x44\x65nsity\x12\x17\n\x13\x44\x45NSITY_UNSPECIFIED\x10\x00\x12\x0e\n\nSPARSE_ALL\x10\x01\x12\x0e\n\nSPARSE_ANY\x10\x02\x12\t\n\x05\x44\x45NSE\x10\x03:z\xea\x41w\n\x1e\x66irestore.googleapis.com/Index\x12Uprojects/{project}/databases/{database}/collectionGroups/{collection}/indexes/{index}B\xd9\x01\n\x1d\x63om.google.firestore.admin.v1B\nIndexProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module Admin - module V1 - Index = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index").msgclass - Index::IndexField = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.IndexField").msgclass - Index::IndexField::VectorConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.IndexField.VectorConfig").msgclass - Index::IndexField::VectorConfig::FlatIndex = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex").msgclass - Index::IndexField::Order = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.IndexField.Order").enummodule - Index::IndexField::ArrayConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.IndexField.ArrayConfig").enummodule - Index::QueryScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.QueryScope").enummodule - Index::ApiScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.ApiScope").enummodule - Index::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.State").enummodule - Index::Density = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Index.Density").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/location_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/location_pb.rb deleted file mode 100644 index 9132e2304719..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/location_pb.rb +++ /dev/null @@ -1,44 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/admin/v1/location.proto - -require 'google/protobuf' - - -descriptor_data = "\n(google/firestore/admin/v1/location.proto\x12\x19google.firestore.admin.v1\"\x12\n\x10LocationMetadataB\xdc\x01\n\x1d\x63om.google.firestore.admin.v1B\rLocationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module Admin - module V1 - LocationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.LocationMetadata").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/operation_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/operation_pb.rb deleted file mode 100644 index 604a6a498bc4..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/operation_pb.rb +++ /dev/null @@ -1,65 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/admin/v1/operation.proto - -require 'google/protobuf' - -require 'google/api/resource_pb' -require 'google/firestore/admin/v1/index_pb' -require 'google/firestore/admin/v1/snapshot_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n)google/firestore/admin/v1/operation.proto\x12\x19google.firestore.admin.v1\x1a\x19google/api/resource.proto\x1a%google/firestore/admin/v1/index.proto\x1a(google/firestore/admin/v1/snapshot.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbd\x02\n\x16IndexOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05index\x18\x03 \x01(\t\x12\x38\n\x05state\x18\x04 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\"\x99\x07\n\x16\x46ieldOperationMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\r\n\x05\x66ield\x18\x03 \x01(\t\x12_\n\x13index_config_deltas\x18\x04 \x03(\x0b\x32\x42.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta\x12\x38\n\x05state\x18\x05 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x07 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12Z\n\x10ttl_config_delta\x18\x08 \x01(\x0b\x32@.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta\x1a\xe7\x01\n\x10IndexConfigDelta\x12\x62\n\x0b\x63hange_type\x18\x01 \x01(\x0e\x32M.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType\x12/\n\x05index\x18\x02 \x01(\x0b\x32 .google.firestore.admin.v1.Index\">\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x1a\xb2\x01\n\x0eTtlConfigDelta\x12`\n\x0b\x63hange_type\x18\x01 \x01(\x0e\x32K.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType\">\n\nChangeType\x12\x1b\n\x17\x43HANGE_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\"\xb6\x03\n\x17\x45xportDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x19\n\x11output_uri_prefix\x18\x07 \x01(\t\x12\x15\n\rnamespace_ids\x18\x08 \x03(\t\x12\x31\n\rsnapshot_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\x82\x03\n\x17ImportDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x18\n\x10input_uri_prefix\x18\x07 \x01(\t\x12\x15\n\rnamespace_ids\x18\x08 \x03(\t\"\x9f\x03\n\x1b\x42ulkDeleteDocumentsMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12?\n\x12progress_documents\x18\x04 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12;\n\x0eprogress_bytes\x18\x05 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\x12\x16\n\x0e\x63ollection_ids\x18\x06 \x03(\t\x12\x15\n\rnamespace_ids\x18\x07 \x03(\t\x12\x31\n\rsnapshot_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"4\n\x17\x45xportDocumentsResponse\x12\x19\n\x11output_uri_prefix\x18\x01 \x01(\t\"\xed\x02\n\x17RestoreDatabaseMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12\x38\n\x08\x64\x61tabase\x18\x04 \x01(\tB&\xfa\x41#\n!firestore.googleapis.com/Database\x12\x34\n\x06\x62\x61\x63kup\x18\x05 \x01(\tB$\xfa\x41!\n\x1f\x66irestore.googleapis.com/Backup\x12@\n\x13progress_percentage\x18\x08 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\"\xf5\x02\n\x15\x43loneDatabaseMetadata\x12.\n\nstart_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x42\n\x0foperation_state\x18\x03 \x01(\x0e\x32).google.firestore.admin.v1.OperationState\x12\x38\n\x08\x64\x61tabase\x18\x04 \x01(\tB&\xfa\x41#\n!firestore.googleapis.com/Database\x12>\n\rpitr_snapshot\x18\x07 \x01(\x0b\x32\'.google.firestore.admin.v1.PitrSnapshot\x12@\n\x13progress_percentage\x18\x06 \x01(\x0b\x32#.google.firestore.admin.v1.Progress\":\n\x08Progress\x12\x16\n\x0e\x65stimated_work\x18\x01 \x01(\x03\x12\x16\n\x0e\x63ompleted_work\x18\x02 \x01(\x03*\x9e\x01\n\x0eOperationState\x12\x1f\n\x1bOPERATION_STATE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINITIALIZING\x10\x01\x12\x0e\n\nPROCESSING\x10\x02\x12\x0e\n\nCANCELLING\x10\x03\x12\x0e\n\nFINALIZING\x10\x04\x12\x0e\n\nSUCCESSFUL\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06\x12\r\n\tCANCELLED\x10\x07\x42\xdd\x01\n\x1d\x63om.google.firestore.admin.v1B\x0eOperationProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.firestore.admin.v1.Index", "google/firestore/admin/v1/index.proto"], - ["google.firestore.admin.v1.PitrSnapshot", "google/firestore/admin/v1/snapshot.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module Admin - module V1 - IndexOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.IndexOperationMetadata").msgclass - FieldOperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata").msgclass - FieldOperationMetadata::IndexConfigDelta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta").msgclass - FieldOperationMetadata::IndexConfigDelta::ChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType").enummodule - FieldOperationMetadata::TtlConfigDelta = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta").msgclass - FieldOperationMetadata::TtlConfigDelta::ChangeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType").enummodule - ExportDocumentsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ExportDocumentsMetadata").msgclass - ImportDocumentsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ImportDocumentsMetadata").msgclass - BulkDeleteDocumentsMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.BulkDeleteDocumentsMetadata").msgclass - ExportDocumentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.ExportDocumentsResponse").msgclass - RestoreDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.RestoreDatabaseMetadata").msgclass - CloneDatabaseMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.CloneDatabaseMetadata").msgclass - Progress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.Progress").msgclass - OperationState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.OperationState").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/schedule_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/schedule_pb.rb deleted file mode 100644 index 9ce18f3264f8..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/schedule_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/admin/v1/schedule.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' -require 'google/type/dayofweek_pb' - - -descriptor_data = "\n(google/firestore/admin/v1/schedule.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1bgoogle/type/dayofweek.proto\"\xd6\x03\n\x0e\x42\x61\x63kupSchedule\x12\x11\n\x04name\x18\x01 \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\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12,\n\tretention\x18\x06 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x46\n\x10\x64\x61ily_recurrence\x18\x07 \x01(\x0b\x32*.google.firestore.admin.v1.DailyRecurrenceH\x00\x12H\n\x11weekly_recurrence\x18\x08 \x01(\x0b\x32+.google.firestore.admin.v1.WeeklyRecurrenceH\x00:w\xea\x41t\n\'firestore.googleapis.com/BackupSchedule\x12Iprojects/{project}/databases/{database}/backupSchedules/{backup_schedule}B\x0c\n\nrecurrence\"\x11\n\x0f\x44\x61ilyRecurrence\"7\n\x10WeeklyRecurrence\x12#\n\x03\x64\x61y\x18\x02 \x01(\x0e\x32\x16.google.type.DayOfWeekB\xdc\x01\n\x1d\x63om.google.firestore.admin.v1B\rScheduleProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module Admin - module V1 - BackupSchedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.BackupSchedule").msgclass - DailyRecurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.DailyRecurrence").msgclass - WeeklyRecurrence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.WeeklyRecurrence").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/snapshot_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/snapshot_pb.rb deleted file mode 100644 index edea876f8875..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/snapshot_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/admin/v1/snapshot.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n(google/firestore/admin/v1/snapshot.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x9e\x01\n\x0cPitrSnapshot\x12;\n\x08\x64\x61tabase\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!firestore.googleapis.com/Database\x12\x19\n\x0c\x64\x61tabase_uid\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x03\x12\x36\n\rsnapshot_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x02\x42\xe0\x01\n\x1d\x63om.google.firestore.admin.v1B\x11PitrSnapshotProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module Admin - module V1 - PitrSnapshot = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.PitrSnapshot").msgclass - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/user_creds_pb.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/user_creds_pb.rb deleted file mode 100644 index 82ff5de9e8fb..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/lib/google/firestore/admin/v1/user_creds_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/admin/v1/user_creds.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n*google/firestore/admin/v1/user_creds.proto\x12\x19google.firestore.admin.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb7\x04\n\tUserCreds\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12>\n\x05state\x18\x04 \x01(\x0e\x32*.google.firestore.admin.v1.UserCreds.StateB\x03\xe0\x41\x03\x12\x1c\n\x0fsecure_password\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12R\n\x11resource_identity\x18\x06 \x01(\x0b\x32\x35.google.firestore.admin.v1.UserCreds.ResourceIdentityH\x00\x1a*\n\x10ResourceIdentity\x12\x16\n\tprincipal\x18\x01 \x01(\tB\x03\xe0\x41\x03\"9\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0b\n\x07\x45NABLED\x10\x01\x12\x0c\n\x08\x44ISABLED\x10\x02:}\xea\x41z\n\"firestore.googleapis.com/UserCreds\x12>projects/{project}/databases/{database}/userCreds/{user_creds}*\tuserCreds2\tuserCredsB\x13\n\x11UserCredsIdentityB\xdd\x01\n\x1d\x63om.google.firestore.admin.v1B\x0eUserCredsProtoP\x01Z9cloud.google.com/go/firestore/apiv1/admin/adminpb;adminpb\xa2\x02\x04GCFS\xaa\x02\x1fGoogle.Cloud.Firestore.Admin.V1\xca\x02\x1fGoogle\\Cloud\\Firestore\\Admin\\V1\xea\x02#Google::Cloud::Firestore::Admin::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module Admin - module V1 - UserCreds = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UserCreds").msgclass - UserCreds::ResourceIdentity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UserCreds.ResourceIdentity").msgclass - UserCreds::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.admin.v1.UserCreds.State").enummodule - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/README.md deleted file mode 100644 index 8973d7337b3b..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Firestore Admin 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-firestore-admin-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/routing.rb deleted file mode 100644 index d777329024e7..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/api/routing.rb +++ /dev/null @@ -1,459 +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 - # Specifies the routing information that should be sent along with the request - # in the form of routing header. - # **NOTE:** All service configuration rules follow the "last one wins" order. - # - # The examples below will apply to an RPC which has the following request type: - # - # Message Definition: - # - # message Request { - # // The name of the Table - # // Values can be of the following formats: - # // - `projects//tables/
` - # // - `projects//instances//tables/
` - # // - `region//zones//tables/
` - # string table_name = 1; - # - # // This value specifies routing for replication. - # // It can be in the following formats: - # // - `profiles/` - # // - a legacy `profile_id` that can be any string - # string app_profile_id = 2; - # } - # - # Example message: - # - # { - # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, - # app_profile_id: profiles/prof_qux - # } - # - # The routing header consists of one or multiple key-value pairs. Every key - # and value must be percent-encoded, and joined together in the format of - # `key1=value1&key2=value2`. - # The examples below skip the percent-encoding for readability. - # - # Example 1 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key equal to the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`. - # routing_parameters { - # field: "app_profile_id" - # } - # }; - # - # result: - # - # x-goog-request-params: app_profile_id=profiles/prof_qux - # - # Example 2 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key different from the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`, but name it `routing_id` in the header. - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 3 - # - # Extracting a field from the request to put into the routing - # header, while matching a path template syntax on the field's value. - # - # NB: it is more useful to send nothing than to send garbage for the purpose - # of dynamic routing, since garbage pollutes cache. Thus the matching. - # - # Sub-example 3a - # - # The field matches the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with project-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Sub-example 3b - # - # The field does not match the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with region-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # }; - # - # result: - # - # - # - # Sub-example 3c - # - # Multiple alternative conflictingly named path templates are - # specified. The one that matches is used to construct the header. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed, whether - # // using the region- or projects-based syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Example 4 - # - # Extracting a single routing header key-value pair by matching a - # template syntax on (a part of) a single request field. - # - # annotation: - # - # option (google.api.routing) = { - # // Take just the project id from the `table_name` field. - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=projects/proj_foo - # - # Example 5 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on (parts of) a single request - # field. The last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // If the `table_name` does not have instances information, - # // take just the project id for routing. - # // Otherwise take project + instance. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*/instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # routing_id=projects/proj_foo/instances/instance_bar - # - # Example 6 - # - # Extracting multiple routing header key-value pairs by matching - # several non-conflicting path templates on (parts of) a single request field. - # - # Sub-example 6a - # - # Make the templates strict, so that if the `table_name` does not - # have an instance information, nothing is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code needs two keys instead of one composite - # // but works only for the tables with the "project-instance" name - # // syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/instances/*/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Sub-example 6b - # - # Make the templates loose, so that if the `table_name` does not - # have an instance information, just the project id part is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code wants two keys instead of one composite - # // but will work with just the `project_id` for tables without - # // an instance in the `table_name`. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result (is the same as 6a for our example message because it has the instance - # information): - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Example 7 - # - # Extracting multiple routing header key-value pairs by matching - # several path templates on multiple request fields. - # - # NB: note that here there is no way to specify sending nothing if one of the - # fields does not match its template. E.g. if the `table_name` is in the wrong - # format, the `project_id` will not be sent, but the `routing_id` will be. - # The backend routing code has to be aware of that and be prepared to not - # receive a full complement of keys if it expects multiple. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing needs both `project_id` and `routing_id` - # // (from the `app_profile_id` field) for routing. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&routing_id=profiles/prof_qux - # - # Example 8 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on several request fields. The - # last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // The `routing_id` can be a project id or a region id depending on - # // the table name format, but only if the `app_profile_id` is not set. - # // If `app_profile_id` is set it should be used instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=regions/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 9 - # - # Bringing it all together. - # - # annotation: - # - # option (google.api.routing) = { - # // For routing both `table_location` and a `routing_id` are needed. - # // - # // table_location can be either an instance id or a region+zone id. - # // - # // For `routing_id`, take the value of `app_profile_id` - # // - If it's in the format `profiles/`, send - # // just the `` part. - # // - If it's any other literal, send it as is. - # // If the `app_profile_id` is empty, and the `table_name` starts with - # // the project_id, send that instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_location=regions/*/zones/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "profiles/{routing_id=*}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_location=instances/instance_bar&routing_id=prof_qux - # @!attribute [rw] routing_parameters - # @return [::Array<::Google::Api::RoutingParameter>] - # A collection of Routing Parameter specifications. - # **NOTE:** If multiple Routing Parameters describe the same key - # (via the `path_template` field or via the `field` field when - # `path_template` is not provided), "last one wins" rule - # determines which Parameter gets used. - # See the examples for more details. - class RoutingRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A projection from an input message to the GRPC or REST header. - # @!attribute [rw] field - # @return [::String] - # A request field to extract the header key-value pair from. - # @!attribute [rw] path_template - # @return [::String] - # A pattern matching the key-value field. Optional. - # If not specified, the whole field specified in the `field` field will be - # taken as value, and its name used as key. If specified, it MUST contain - # exactly one named segment (along with any number of unnamed segments) The - # pattern will be matched over the field specified in the `field` field, then - # if the match is successful: - # - the name of the single named segment will be used as a header name, - # - the match value of the segment will be used as a header value; - # if the match is NOT successful, nothing will be sent. - # - # Example: - # - # -- This is a field in the request message - # | that the header value will be extracted from. - # | - # | -- This is the key name in the - # | | routing header. - # V | - # field: "table_name" v - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # ^ ^ - # | | - # In the {} brackets is the pattern that -- | - # specifies what to extract from the | - # field as a value to be sent. | - # | - # The string in the field must match the whole pattern -- - # before brackets, inside brackets, after brackets. - # - # When looking at this specific example, we can see that: - # - A key-value pair with the key `table_location` - # and the value matching `instances/*` should be added - # to the x-goog-request-params routing header. - # - The value is extracted from the request message's `table_name` field - # if it matches the full pattern specified: - # `projects/*/instances/*/tables/*`. - # - # **NB:** If the `path_template` field is not provided, the key name is - # equal to the field name, and the whole field should be sent as a value. - # This makes the pattern for the field and the value functionally equivalent - # to `**`, and the configuration - # - # { - # field: "table_name" - # } - # - # is a functionally equivalent shorthand to: - # - # { - # field: "table_name" - # path_template: "{table_name=**}" - # } - # - # See Example 1 for more details. - class RoutingParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/backup.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/backup.rb deleted file mode 100644 index e801575a4ec8..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/backup.rb +++ /dev/null @@ -1,99 +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 Firestore - module Admin - module V1 - # A Backup of a Cloud Firestore Database. - # - # The backup contains all documents and index configurations for the given - # database at a specific point in time. - # @!attribute [r] name - # @return [::String] - # Output only. The unique resource name of the Backup. - # - # Format is `projects/{project}/locations/{location}/backups/{backup}`. - # @!attribute [r] database - # @return [::String] - # Output only. Name of the Firestore database that the backup is from. - # - # Format is `projects/{project}/databases/{database}`. - # @!attribute [r] database_uid - # @return [::String] - # Output only. The system-generated UUID4 for the Firestore database that the - # backup is from. - # @!attribute [r] snapshot_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The backup contains an externally consistent copy of the - # database at this time. - # @!attribute [r] expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp at which this backup expires. - # @!attribute [r] stats - # @return [::Google::Cloud::Firestore::Admin::V1::Backup::Stats] - # Output only. Statistics about the backup. - # - # This data only becomes available after the backup is fully materialized to - # secondary storage. This field will be empty till then. - # @!attribute [r] state - # @return [::Google::Cloud::Firestore::Admin::V1::Backup::State] - # Output only. The current state of the backup. - class Backup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Backup specific statistics. - # @!attribute [r] size_bytes - # @return [::Integer] - # Output only. Summation of the size of all documents and index entries in - # the backup, measured in bytes. - # @!attribute [r] document_count - # @return [::Integer] - # Output only. The total number of documents contained in the backup. - # @!attribute [r] index_count - # @return [::Integer] - # Output only. The total number of index entries contained in the backup. - class Stats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Indicate the current state of the backup. - module State - # The state is unspecified. - STATE_UNSPECIFIED = 0 - - # The pending backup is still being created. Operations on the - # backup will be rejected in this state. - CREATING = 1 - - # The backup is complete and ready to use. - READY = 2 - - # The backup is not available at this moment. - NOT_AVAILABLE = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/database.rb deleted file mode 100644 index 73638281854c..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/database.rb +++ /dev/null @@ -1,367 +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 Firestore - module Admin - module V1 - # A Cloud Firestore Database. - # @!attribute [rw] name - # @return [::String] - # The resource name of the Database. - # Format: `projects/{project}/databases/{database}` - # @!attribute [r] uid - # @return [::String] - # Output only. The system-generated UUID4 for this Database. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp at which this database was created. Databases - # created before 2016 do not populate create_time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp at which this database was most recently - # updated. Note this only includes updates to the database resource and not - # data contained by the database. - # @!attribute [r] delete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp at which this database was deleted. Only set if - # the database has been deleted. - # @!attribute [rw] location_id - # @return [::String] - # The location of the database. Available locations are listed at - # https://cloud.google.com/firestore/docs/locations. - # @!attribute [rw] type - # @return [::Google::Cloud::Firestore::Admin::V1::Database::DatabaseType] - # The type of the database. - # See https://cloud.google.com/datastore/docs/firestore-or-datastore for - # information about how to choose. - # @!attribute [rw] concurrency_mode - # @return [::Google::Cloud::Firestore::Admin::V1::Database::ConcurrencyMode] - # The concurrency control mode to use for this database. - # @!attribute [r] version_retention_period - # @return [::Google::Protobuf::Duration] - # Output only. The period during which past versions of data are retained in - # the database. - # - # Any [read][google.firestore.v1.GetDocumentRequest.read_time] - # or [query][google.firestore.v1.ListDocumentsRequest.read_time] can specify - # a `read_time` within this window, and will read the state of the database - # at that time. - # - # If the PITR feature is enabled, the retention period is 7 days. Otherwise, - # the retention period is 1 hour. - # @!attribute [r] earliest_version_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The earliest timestamp at which older versions of the data can - # be read from the database. See [version_retention_period] above; this field - # is populated with `now - version_retention_period`. - # - # This value is continuously updated, and becomes stale the moment it is - # queried. If you are using this value to recover data, make sure to account - # for the time from the moment when the value is queried to the moment when - # you initiate the recovery. - # @!attribute [rw] point_in_time_recovery_enablement - # @return [::Google::Cloud::Firestore::Admin::V1::Database::PointInTimeRecoveryEnablement] - # Whether to enable the PITR feature on this database. - # @!attribute [rw] app_engine_integration_mode - # @return [::Google::Cloud::Firestore::Admin::V1::Database::AppEngineIntegrationMode] - # The App Engine integration mode to use for this database. - # @!attribute [r] key_prefix - # @return [::String] - # Output only. The key_prefix for this database. This key_prefix is used, in - # combination with the project ID ("~") to construct - # the application ID that is returned from the Cloud Datastore APIs in Google - # App Engine first generation runtimes. - # - # This value may be empty in which case the appid to use for URL-encoded keys - # is the project_id (eg: foo instead of v~foo). - # @!attribute [rw] delete_protection_state - # @return [::Google::Cloud::Firestore::Admin::V1::Database::DeleteProtectionState] - # State of delete protection for the database. - # @!attribute [rw] cmek_config - # @return [::Google::Cloud::Firestore::Admin::V1::Database::CmekConfig] - # Optional. Presence indicates CMEK is enabled for this database. - # @!attribute [r] previous_id - # @return [::String] - # Output only. The database resource's prior database ID. This field is only - # populated for deleted databases. - # @!attribute [r] source_info - # @return [::Google::Cloud::Firestore::Admin::V1::Database::SourceInfo] - # Output only. Information about the provenance of this database. - # @!attribute [rw] tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Input only. Immutable. Tag keys/values directly bound to this - # resource. For example: - # "123/environment": "production", - # "123/costCenter": "marketing" - # @!attribute [r] free_tier - # @return [::Boolean] - # Output only. Background: Free tier is the ability of a Firestore database - # to use a small amount of resources every day without being charged. Once - # usage exceeds the free tier limit further usage is charged. - # - # Whether this database can make use of the free tier. Only one database - # per project can be eligible for the free tier. - # - # The first (or next) database that is created in a project without a free - # tier database will be marked as eligible for the free tier. Databases that - # are created while there is a free tier database will not be eligible for - # the free tier. - # @!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] database_edition - # @return [::Google::Cloud::Firestore::Admin::V1::Database::DatabaseEdition] - # Immutable. The edition of the database. - class Database - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The CMEK (Customer Managed Encryption Key) configuration for a Firestore - # database. If not present, the database is secured by the default Google - # encryption key. - # @!attribute [rw] kms_key_name - # @return [::String] - # Required. Only keys in the same location as this database are allowed to - # be used for encryption. - # - # For Firestore's nam5 multi-region, this corresponds to Cloud KMS - # multi-region us. For Firestore's eur3 multi-region, this corresponds to - # Cloud KMS multi-region europe. See - # https://cloud.google.com/kms/docs/locations. - # - # The expected format is - # `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - # @!attribute [r] active_key_version - # @return [::Array<::String>] - # Output only. Currently in-use [KMS key - # versions](https://cloud.google.com/kms/docs/resource-hierarchy#key_versions). - # During [key rotation](https://cloud.google.com/kms/docs/key-rotation), - # there can be multiple in-use key versions. - # - # The expected format is - # `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{key_version}`. - class CmekConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about the provenance of this database. - # @!attribute [rw] backup - # @return [::Google::Cloud::Firestore::Admin::V1::Database::SourceInfo::BackupSource] - # If set, this database was restored from the specified backup (or a - # snapshot thereof). - # @!attribute [rw] operation - # @return [::String] - # The associated long-running operation. This field may not be set after - # the operation has completed. Format: - # `projects/{project}/databases/{database}/operations/{operation}`. - class SourceInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about a backup that was used to restore a database. - # @!attribute [rw] backup - # @return [::String] - # The resource name of the backup that was used to restore this - # database. Format: - # `projects/{project}/locations/{location}/backups/{backup}`. - class BackupSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Encryption configuration for a new database being created from another - # source. - # - # The source could be a {::Google::Cloud::Firestore::Admin::V1::Backup Backup} . - # @!attribute [rw] google_default_encryption - # @return [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig::GoogleDefaultEncryptionOptions] - # Use Google default encryption. - # - # Note: The following fields are mutually exclusive: `google_default_encryption`, `use_source_encryption`, `customer_managed_encryption`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] use_source_encryption - # @return [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig::SourceEncryptionOptions] - # The database will use the same encryption configuration as the source. - # - # Note: The following fields are mutually exclusive: `use_source_encryption`, `google_default_encryption`, `customer_managed_encryption`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] customer_managed_encryption - # @return [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig::CustomerManagedEncryptionOptions] - # Use Customer Managed Encryption Keys (CMEK) for encryption. - # - # Note: The following fields are mutually exclusive: `customer_managed_encryption`, `google_default_encryption`, `use_source_encryption`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class EncryptionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The configuration options for using Google default encryption. - class GoogleDefaultEncryptionOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration options for using the same encryption method as the - # source. - class SourceEncryptionOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The configuration options for using CMEK (Customer Managed Encryption - # Key) encryption. - # @!attribute [rw] kms_key_name - # @return [::String] - # Required. Only keys in the same location as the database are allowed to - # be used for encryption. - # - # For Firestore's nam5 multi-region, this corresponds to Cloud KMS - # multi-region us. For Firestore's eur3 multi-region, this corresponds to - # Cloud KMS multi-region europe. See - # https://cloud.google.com/kms/docs/locations. - # - # The expected format is - # `projects/{project_id}/locations/{kms_location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - class CustomerManagedEncryptionOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class TagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The type of the database. - # See https://cloud.google.com/datastore/docs/firestore-or-datastore for - # information about how to choose. - # - # Mode changes are only allowed if the database is empty. - module DatabaseType - # Not used. - DATABASE_TYPE_UNSPECIFIED = 0 - - # Firestore Native Mode - FIRESTORE_NATIVE = 1 - - # Firestore in Datastore Mode. - DATASTORE_MODE = 2 - end - - # The type of concurrency control mode for transactions. - module ConcurrencyMode - # Not used. - CONCURRENCY_MODE_UNSPECIFIED = 0 - - # Use optimistic concurrency control by default. This mode is available - # for Cloud Firestore databases. - OPTIMISTIC = 1 - - # Use pessimistic concurrency control by default. This mode is available - # for Cloud Firestore databases. - # - # This is the default setting for Cloud Firestore. - PESSIMISTIC = 2 - - # Use optimistic concurrency control with entity groups by default. - # - # This is the only available mode for Cloud Datastore. - # - # This mode is also available for Cloud Firestore with Datastore Mode but - # is not recommended. - OPTIMISTIC_WITH_ENTITY_GROUPS = 3 - end - - # Point In Time Recovery feature enablement. - module PointInTimeRecoveryEnablement - # Not used. - POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED = 0 - - # Reads are supported on selected versions of the data from within the past - # 7 days: - # - # * Reads against any timestamp within the past hour - # * Reads against 1-minute snapshots beyond 1 hour and within 7 days - # - # `version_retention_period` and `earliest_version_time` can be - # used to determine the supported versions. - POINT_IN_TIME_RECOVERY_ENABLED = 1 - - # Reads are supported on any version of the data from within the past 1 - # hour. - POINT_IN_TIME_RECOVERY_DISABLED = 2 - end - - # The type of App Engine integration mode. - module AppEngineIntegrationMode - # Not used. - APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED = 0 - - # If an App Engine application exists in the same region as this database, - # App Engine configuration will impact this database. This includes - # disabling of the application & database, as well as disabling writes to - # the database. - ENABLED = 1 - - # App Engine has no effect on the ability of this database to serve - # requests. - # - # This is the default setting for databases created with the Firestore API. - DISABLED = 2 - end - - # The delete protection state of the database. - module DeleteProtectionState - # The default value. Delete protection type is not specified - DELETE_PROTECTION_STATE_UNSPECIFIED = 0 - - # Delete protection is disabled - DELETE_PROTECTION_DISABLED = 1 - - # Delete protection is enabled - DELETE_PROTECTION_ENABLED = 2 - end - - # The edition of the database. - module DatabaseEdition - # Not used. - DATABASE_EDITION_UNSPECIFIED = 0 - - # Standard edition. - # - # This is the default setting if not specified. - STANDARD = 1 - - # Enterprise edition. - ENTERPRISE = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/field.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/field.rb deleted file mode 100644 index b8c041573d04..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/field.rb +++ /dev/null @@ -1,139 +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 Firestore - module Admin - module V1 - # Represents a single field in the database. - # - # Fields are grouped by their "Collection Group", which represent all - # collections in the database with the same ID. - # @!attribute [rw] name - # @return [::String] - # Required. A field name of the form: - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - # - # A field path can be a simple field name, e.g. `address` or a path to fields - # within `map_value` , e.g. `address.city`, - # or a special field path. The only valid special field is `*`, which - # represents any field. - # - # Field paths can be quoted using `` ` `` (backtick). The only character that - # must be escaped within a quoted field path is the backtick character - # itself, escaped using a backslash. Special characters in field paths that - # must be quoted include: `*`, `.`, - # `` ` `` (backtick), `[`, `]`, as well as any ascii symbolic characters. - # - # Examples: - # `` `address.city` `` represents a field named `address.city`, not the map - # key `city` in the field `address`. `` `*` `` represents a field named `*`, - # not any field. - # - # A special `Field` contains the default indexing settings for all fields. - # This field's resource name is: - # `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*` - # Indexes defined on this `Field` will be applied to all fields which do not - # have their own `Field` index configuration. - # @!attribute [rw] index_config - # @return [::Google::Cloud::Firestore::Admin::V1::Field::IndexConfig] - # The index configuration for this field. If unset, field indexing will - # revert to the configuration defined by the `ancestor_field`. To - # explicitly remove all indexes for this field, specify an index config - # with an empty list of indexes. - # @!attribute [rw] ttl_config - # @return [::Google::Cloud::Firestore::Admin::V1::Field::TtlConfig] - # The TTL configuration for this `Field`. - # Setting or unsetting this will enable or disable the TTL for - # documents that have this `Field`. - class Field - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The index configuration for this field. - # @!attribute [rw] indexes - # @return [::Array<::Google::Cloud::Firestore::Admin::V1::Index>] - # The indexes supported for this field. - # @!attribute [rw] uses_ancestor_config - # @return [::Boolean] - # Output only. When true, the `Field`'s index configuration is set from the - # configuration specified by the `ancestor_field`. - # When false, the `Field`'s index configuration is defined explicitly. - # @!attribute [rw] ancestor_field - # @return [::String] - # Output only. Specifies the resource name of the `Field` from which this - # field's index configuration is set (when `uses_ancestor_config` is true), - # or from which it *would* be set if this field had no index configuration - # (when `uses_ancestor_config` is false). - # @!attribute [rw] reverting - # @return [::Boolean] - # Output only - # When true, the `Field`'s index configuration is in the process of being - # reverted. Once complete, the index config will transition to the same - # state as the field specified by `ancestor_field`, at which point - # `uses_ancestor_config` will be `true` and `reverting` will be `false`. - class IndexConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The TTL (time-to-live) configuration for documents that have this `Field` - # set. - # - # Storing a timestamp value into a TTL-enabled field will be treated as - # the document's absolute expiration time. Timestamp values in the past - # indicate that the document is eligible for immediate expiration. Using any - # other data type or leaving the field absent will disable expiration for the - # individual document. - # @!attribute [r] state - # @return [::Google::Cloud::Firestore::Admin::V1::Field::TtlConfig::State] - # Output only. The state of the TTL configuration. - class TtlConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The state of applying the TTL configuration to all documents. - module State - # The state is unspecified or unknown. - STATE_UNSPECIFIED = 0 - - # The TTL is being applied. There is an active long-running operation to - # track the change. Newly written documents will have TTLs applied as - # requested. Requested TTLs on existing documents are still being - # processed. When TTLs on all existing documents have been processed, the - # state will move to 'ACTIVE'. - CREATING = 1 - - # The TTL is active for all documents. - ACTIVE = 2 - - # The TTL configuration could not be enabled for all existing documents. - # Newly written documents will continue to have their TTL applied. - # The LRO returned when last attempting to enable TTL for this `Field` - # has failed, and may have more details. - NEEDS_REPAIR = 3 - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb deleted file mode 100644 index 46f006d4f0b1..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/firestore_admin.rb +++ /dev/null @@ -1,746 +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 Firestore - module Admin - module V1 - # A request to list the Firestore Databases in all locations for a project. - # @!attribute [rw] parent - # @return [::String] - # Required. A parent name of the form - # `projects/{project_id}` - # @!attribute [rw] show_deleted - # @return [::Boolean] - # If true, also returns deleted resources. - class ListDatabasesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database FirestoreAdmin.CreateDatabase}. - # @!attribute [rw] parent - # @return [::String] - # Required. A parent name of the form - # `projects/{project_id}` - # @!attribute [rw] database - # @return [::Google::Cloud::Firestore::Admin::V1::Database] - # Required. The Database to create. - # @!attribute [rw] database_id - # @return [::String] - # Required. The ID to use for the database, which will become the final - # component of the database's resource name. - # - # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - # with first character a letter and the last a letter or a number. Must not - # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. - # - # "(default)" database ID is also valid. - class CreateDatabaseRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata related to the create database operation. - class CreateDatabaseMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The list of databases for a project. - # @!attribute [rw] databases - # @return [::Array<::Google::Cloud::Firestore::Admin::V1::Database>] - # The databases in the project. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # In the event that data about individual databases cannot be listed they - # will be recorded here. - # - # An example entry might be: projects/some_project/locations/some_location - # This can happen if the Cloud Region that the Database resides in is - # currently unavailable. In this case we can't fetch all the details about - # the database. You may be able to get a more detailed error message - # (or possibly fetch the resource) by sending a 'Get' request for the - # resource or a 'List' request for the specific location. - class ListDatabasesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_database FirestoreAdmin.GetDatabase}. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}` - class GetDatabaseRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_database FirestoreAdmin.UpdateDatabase}. - # @!attribute [rw] database - # @return [::Google::Cloud::Firestore::Admin::V1::Database] - # Required. The database to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - class UpdateDatabaseRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata related to the update database operation. - class UpdateDatabaseMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_database FirestoreAdmin.DeleteDatabase}. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}` - # @!attribute [rw] etag - # @return [::String] - # The current etag of the Database. - # If an etag is provided and does not match the current etag of the database, - # deletion will be blocked and a FAILED_PRECONDITION error will be returned. - class DeleteDatabaseRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata related to the delete database operation. - class DeleteDatabaseMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_user_creds FirestoreAdmin.CreateUserCreds}. - # @!attribute [rw] parent - # @return [::String] - # Required. A parent name of the form - # `projects/{project_id}/databases/{database_id}` - # @!attribute [rw] user_creds - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds] - # Required. The user creds to create. - # @!attribute [rw] user_creds_id - # @return [::String] - # Required. The ID to use for the user creds, which will become the final - # component of the user creds's resource name. - # - # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - # with first character a letter and the last a letter or a number. Must not - # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. - class CreateUserCredsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_user_creds FirestoreAdmin.GetUserCreds}. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - class GetUserCredsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_user_creds FirestoreAdmin.ListUserCreds}. - # @!attribute [rw] parent - # @return [::String] - # Required. A parent database name of the form - # `projects/{project_id}/databases/{database_id}` - class ListUserCredsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_user_creds FirestoreAdmin.ListUserCreds}. - # @!attribute [rw] user_creds - # @return [::Array<::Google::Cloud::Firestore::Admin::V1::UserCreds>] - # The user creds for the database. - class ListUserCredsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#enable_user_creds FirestoreAdmin.EnableUserCreds}. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - class EnableUserCredsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#disable_user_creds FirestoreAdmin.DisableUserCreds}. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - class DisableUserCredsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#reset_user_password FirestoreAdmin.ResetUserPassword}. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - class ResetUserPasswordRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_user_creds FirestoreAdmin.DeleteUserCreds}. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/userCreds/{user_creds_id}` - class DeleteUserCredsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_backup_schedule FirestoreAdmin.CreateBackupSchedule}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent database. - # - # Format `projects/{project}/databases/{database}` - # @!attribute [rw] backup_schedule - # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # Required. The backup schedule to create. - class CreateBackupScheduleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup_schedule FirestoreAdmin.GetBackupSchedule}. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the backup schedule. - # - # Format - # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - class GetBackupScheduleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_backup_schedule FirestoreAdmin.UpdateBackupSchedule}. - # @!attribute [rw] backup_schedule - # @return [::Google::Cloud::Firestore::Admin::V1::BackupSchedule] - # Required. The backup schedule to update. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - class UpdateBackupScheduleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backup_schedules FirestoreAdmin.ListBackupSchedules}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent database. - # - # Format is `projects/{project}/databases/{database}`. - class ListBackupSchedulesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backup_schedules FirestoreAdmin.ListBackupSchedules}. - # @!attribute [rw] backup_schedules - # @return [::Array<::Google::Cloud::Firestore::Admin::V1::BackupSchedule>] - # List of all backup schedules. - class ListBackupSchedulesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for [FirestoreAdmin.DeleteBackupSchedules][]. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the backup schedule. - # - # Format - # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - class DeleteBackupScheduleRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_index FirestoreAdmin.CreateIndex}. - # @!attribute [rw] parent - # @return [::String] - # Required. A parent name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - # @!attribute [rw] index - # @return [::Google::Cloud::Firestore::Admin::V1::Index] - # Required. The composite index to create. - class CreateIndexRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes FirestoreAdmin.ListIndexes}. - # @!attribute [rw] parent - # @return [::String] - # Required. A parent name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - # @!attribute [rw] filter - # @return [::String] - # The filter to apply to list results. - # @!attribute [rw] page_size - # @return [::Integer] - # The number of results to return. - # @!attribute [rw] page_token - # @return [::String] - # A page token, returned from a previous call to - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes FirestoreAdmin.ListIndexes}, - # that may be used to get the next page of results. - class ListIndexesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes FirestoreAdmin.ListIndexes}. - # @!attribute [rw] indexes - # @return [::Array<::Google::Cloud::Firestore::Admin::V1::Index>] - # The requested indexes. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that may be used to request another page of results. If blank, - # this is the last page. - class ListIndexesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_index FirestoreAdmin.GetIndex}. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - class GetIndexRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_index FirestoreAdmin.DeleteIndex}. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - class DeleteIndexRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_field FirestoreAdmin.UpdateField}. - # @!attribute [rw] field - # @return [::Google::Cloud::Firestore::Admin::V1::Field] - # Required. The field to be updated. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # A mask, relative to the field. If specified, only configuration specified - # by this field_mask will be updated in the field. - class UpdateFieldRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_field FirestoreAdmin.GetField}. - # @!attribute [rw] name - # @return [::String] - # Required. A name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}` - class GetFieldRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields}. - # @!attribute [rw] parent - # @return [::String] - # Required. A parent name of the form - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}` - # @!attribute [rw] filter - # @return [::String] - # The filter to apply to list results. Currently, - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} - # only supports listing fields that have been explicitly overridden. To issue - # this query, call - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields} - # with a filter that includes `indexConfig.usesAncestorConfig:false` or - # `ttlConfig:*`. - # @!attribute [rw] page_size - # @return [::Integer] - # The number of results to return. - # @!attribute [rw] page_token - # @return [::String] - # A page token, returned from a previous call to - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields}, - # that may be used to get the next page of results. - class ListFieldsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields FirestoreAdmin.ListFields}. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Firestore::Admin::V1::Field>] - # The requested fields. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that may be used to request another page of results. If blank, - # this is the last page. - class ListFieldsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#export_documents FirestoreAdmin.ExportDocuments}. - # @!attribute [rw] name - # @return [::String] - # Required. Database to export. Should be of the form: - # `projects/{project_id}/databases/{database_id}`. - # @!attribute [rw] collection_ids - # @return [::Array<::String>] - # Which collection IDs to export. Unspecified means all collections. Each - # collection ID in this list must be unique. - # @!attribute [rw] output_uri_prefix - # @return [::String] - # The output URI. Currently only supports Google Cloud Storage URIs of the - # form: `gs://BUCKET_NAME[/NAMESPACE_PATH]`, where `BUCKET_NAME` is the name - # of the Google Cloud Storage bucket and `NAMESPACE_PATH` is an optional - # Google Cloud Storage namespace path. When - # choosing a name, be sure to consider Google Cloud Storage naming - # guidelines: https://cloud.google.com/storage/docs/naming. - # If the URI is a bucket (without a namespace path), a prefix will be - # generated based on the start time. - # @!attribute [rw] namespace_ids - # @return [::Array<::String>] - # An empty list represents all namespaces. This is the preferred - # usage for databases that don't use namespaces. - # - # An empty string element represents the default namespace. This should be - # used if the database has data in non-default namespaces, but doesn't want - # to include them. Each namespace in this list must be unique. - # @!attribute [rw] snapshot_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that corresponds to the version of the database to be - # exported. The timestamp must be in the past, rounded to the minute and not - # older than - # {::Google::Cloud::Firestore::Admin::V1::Database#earliest_version_time earliestVersionTime}. - # If specified, then the exported documents will represent a consistent view - # of the database at the provided time. Otherwise, there are no guarantees - # about the consistency of the exported documents. - class ExportDocumentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#import_documents FirestoreAdmin.ImportDocuments}. - # @!attribute [rw] name - # @return [::String] - # Required. Database to import into. Should be of the form: - # `projects/{project_id}/databases/{database_id}`. - # @!attribute [rw] collection_ids - # @return [::Array<::String>] - # Which collection IDs to import. Unspecified means all collections included - # in the import. Each collection ID in this list must be unique. - # @!attribute [rw] input_uri_prefix - # @return [::String] - # Location of the exported files. - # This must match the output_uri_prefix of an ExportDocumentsResponse from - # an export that has completed successfully. - # See: - # {::Google::Cloud::Firestore::Admin::V1::ExportDocumentsResponse#output_uri_prefix google.firestore.admin.v1.ExportDocumentsResponse.output_uri_prefix}. - # @!attribute [rw] namespace_ids - # @return [::Array<::String>] - # An empty list represents all namespaces. This is the preferred - # usage for databases that don't use namespaces. - # - # An empty string element represents the default namespace. This should be - # used if the database has data in non-default namespaces, but doesn't want - # to include them. Each namespace in this list must be unique. - class ImportDocumentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#bulk_delete_documents FirestoreAdmin.BulkDeleteDocuments}. - # - # When both collection_ids and namespace_ids are set, only documents satisfying - # both conditions will be deleted. - # - # Requests with namespace_ids and collection_ids both empty will be rejected. - # Please use - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_database FirestoreAdmin.DeleteDatabase} - # instead. - # @!attribute [rw] name - # @return [::String] - # Required. Database to operate. Should be of the form: - # `projects/{project_id}/databases/{database_id}`. - # @!attribute [rw] collection_ids - # @return [::Array<::String>] - # Optional. IDs of the collection groups to delete. Unspecified means all - # collection groups. - # - # Each collection group in this list must be unique. - # @!attribute [rw] namespace_ids - # @return [::Array<::String>] - # Optional. Namespaces to delete. - # - # An empty list means all namespaces. This is the recommended - # usage for databases that don't use namespaces. - # - # An empty string element represents the default namespace. This should be - # used if the database has data in non-default namespaces, but doesn't want - # to delete from them. - # - # Each namespace in this list must be unique. - class BulkDeleteDocumentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#bulk_delete_documents FirestoreAdmin.BulkDeleteDocuments}. - class BulkDeleteDocumentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup FirestoreAdmin.GetBackup}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backup to fetch. - # - # Format is `projects/{project}/locations/{location}/backups/{backup}`. - class GetBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backups FirestoreAdmin.ListBackups}. - # @!attribute [rw] parent - # @return [::String] - # Required. The location to list backups from. - # - # Format is `projects/{project}/locations/{location}`. - # Use `{location} = '-'` to list backups from all locations for the given - # project. This allows listing backups from a single location or from all - # locations. - # @!attribute [rw] filter - # @return [::String] - # An expression that filters the list of returned backups. - # - # A filter expression consists of a field name, a comparison operator, and a - # value for filtering. - # The value must be a string, a number, or a boolean. The comparison operator - # must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. - # Colon `:` is the contains operator. Filter rules are not case sensitive. - # - # The following fields in the {::Google::Cloud::Firestore::Admin::V1::Backup Backup} are - # eligible for filtering: - # - # * `database_uid` (supports `=` only) - class ListBackupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backups FirestoreAdmin.ListBackups}. - # @!attribute [rw] backups - # @return [::Array<::Google::Cloud::Firestore::Admin::V1::Backup>] - # List of all backups for the project. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # List of locations that existing backups were not able to be fetched from. - # - # Instead of failing the entire requests when a single location is - # unreachable, this response returns a partial result set and list of - # locations unable to be reached here. The request can be retried against a - # single location to get a concrete error. - class ListBackupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup FirestoreAdmin.DeleteBackup}. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the backup to delete. - # - # format is `projects/{project}/locations/{location}/backups/{backup}`. - class DeleteBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request message for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#restore_database FirestoreAdmin.RestoreDatabase}. - # @!attribute [rw] parent - # @return [::String] - # Required. The project to restore the database in. Format is - # `projects/{project_id}`. - # @!attribute [rw] database_id - # @return [::String] - # Required. The ID to use for the database, which will become the final - # component of the database's resource name. This database ID must not be - # associated with an existing database. - # - # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - # with first character a letter and the last a letter or a number. Must not - # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. - # - # "(default)" database ID is also valid. - # @!attribute [rw] backup - # @return [::String] - # Required. Backup to restore from. Must be from the same project as the - # parent. - # - # The restored database will be created in the same location as the source - # backup. - # - # Format is: `projects/{project_id}/locations/{location}/backups/{backup}` - # @!attribute [rw] encryption_config - # @return [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig] - # Optional. Encryption configuration for the restored database. - # - # If this field is not specified, the restored database will use - # the same encryption configuration as the backup, namely - # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. - # @!attribute [rw] tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Immutable. Tags to be bound to the restored database. - # - # The tags should be provided in the format of - # `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - class RestoreDatabaseRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class TagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The request message for - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#clone_database FirestoreAdmin.CloneDatabase}. - # @!attribute [rw] parent - # @return [::String] - # Required. The project to clone the database in. Format is - # `projects/{project_id}`. - # @!attribute [rw] database_id - # @return [::String] - # Required. The ID to use for the database, which will become the final - # component of the database's resource name. This database ID must not be - # associated with an existing database. - # - # This value should be 4-63 characters. Valid characters are /[a-z][0-9]-/ - # with first character a letter and the last a letter or a number. Must not - # be UUID-like /[0-9a-f]\\{8}(-[0-9a-f]\\{4})\\{3}-[0-9a-f]\\{12}/. - # - # "(default)" database ID is also valid. - # @!attribute [rw] pitr_snapshot - # @return [::Google::Cloud::Firestore::Admin::V1::PitrSnapshot] - # Required. Specification of the PITR data to clone from. The source database - # must exist. - # - # The cloned database will be created in the same location as the source - # database. - # @!attribute [rw] encryption_config - # @return [::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig] - # Optional. Encryption configuration for the cloned database. - # - # If this field is not specified, the cloned database will use - # the same encryption configuration as the source database, namely - # {::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig#use_source_encryption use_source_encryption}. - # @!attribute [rw] tags - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Immutable. Tags to be bound to the cloned database. - # - # The tags should be provided in the format of - # `tagKeys/{tag_key_id} -> tagValues/{tag_value_id}`. - class CloneDatabaseRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class TagsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/index.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/index.rb deleted file mode 100644 index 2c75b41ab996..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/index.rb +++ /dev/null @@ -1,249 +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 Firestore - module Admin - module V1 - # Cloud Firestore indexes enable simple and complex queries against - # documents in a database. - # @!attribute [rw] name - # @return [::String] - # Output only. A server defined name for this index. - # The form of this name for composite indexes will be: - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}` - # For single field indexes, this field will be empty. - # @!attribute [rw] query_scope - # @return [::Google::Cloud::Firestore::Admin::V1::Index::QueryScope] - # Indexes with a collection query scope specified allow queries - # against a collection that is the child of a specific document, specified at - # query time, and that has the same collection ID. - # - # Indexes with a collection group query scope specified allow queries against - # all collections descended from a specific document, specified at query - # time, and that have the same collection ID as this index. - # @!attribute [rw] api_scope - # @return [::Google::Cloud::Firestore::Admin::V1::Index::ApiScope] - # The API scope supported by this index. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Firestore::Admin::V1::Index::IndexField>] - # The fields supported by this index. - # - # For composite indexes, this requires a minimum of 2 and a maximum of 100 - # fields. The last field entry is always for the field path `__name__`. If, - # on creation, `__name__` was not specified as the last field, it will be - # added automatically with the same direction as that of the last field - # defined. If the final field in a composite index is not directional, the - # `__name__` will be ordered ASCENDING (unless explicitly specified). - # - # For single field indexes, this will always be exactly one entry with a - # field path equal to the field path of the associated field. - # @!attribute [rw] state - # @return [::Google::Cloud::Firestore::Admin::V1::Index::State] - # Output only. The serving state of the index. - # @!attribute [rw] density - # @return [::Google::Cloud::Firestore::Admin::V1::Index::Density] - # Immutable. The density configuration of the index. - # @!attribute [rw] multikey - # @return [::Boolean] - # Optional. Whether the index is multikey. By default, the index is not - # multikey. For non-multikey indexes, none of the paths in the index - # definition reach or traverse an array, except via an explicit array index. - # For multikey indexes, at most one of the paths in the index definition - # reach or traverse an array, except via an explicit array index. Violations - # will result in errors. - # - # Note this field only applies to index with MONGODB_COMPATIBLE_API ApiScope. - # @!attribute [rw] shard_count - # @return [::Integer] - # Optional. The number of shards for the index. - class Index - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A field in an index. - # The field_path describes which field is indexed, the value_mode describes - # how the field value is indexed. - # @!attribute [rw] field_path - # @return [::String] - # Can be __name__. - # For single field indexes, this must match the name of the field or may - # be omitted. - # @!attribute [rw] order - # @return [::Google::Cloud::Firestore::Admin::V1::Index::IndexField::Order] - # Indicates that this field supports ordering by the specified order or - # comparing using =, !=, <, <=, >, >=. - # - # Note: The following fields are mutually exclusive: `order`, `array_config`, `vector_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] array_config - # @return [::Google::Cloud::Firestore::Admin::V1::Index::IndexField::ArrayConfig] - # Indicates that this field supports operations on `array_value`s. - # - # Note: The following fields are mutually exclusive: `array_config`, `order`, `vector_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] vector_config - # @return [::Google::Cloud::Firestore::Admin::V1::Index::IndexField::VectorConfig] - # Indicates that this field supports nearest neighbor and distance - # operations on vector. - # - # Note: The following fields are mutually exclusive: `vector_config`, `order`, `array_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class IndexField - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The index configuration to support vector search operations - # @!attribute [rw] dimension - # @return [::Integer] - # Required. The vector dimension this configuration applies to. - # - # The resulting index will only include vectors of this dimension, and - # can be used for vector search with the same dimension. - # @!attribute [rw] flat - # @return [::Google::Cloud::Firestore::Admin::V1::Index::IndexField::VectorConfig::FlatIndex] - # Indicates the vector index is a flat index. - class VectorConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # An index that stores vectors in a flat data structure, and supports - # exhaustive search. - class FlatIndex - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # The supported orderings. - module Order - # The ordering is unspecified. Not a valid option. - ORDER_UNSPECIFIED = 0 - - # The field is ordered by ascending field value. - ASCENDING = 1 - - # The field is ordered by descending field value. - DESCENDING = 2 - end - - # The supported array value configurations. - module ArrayConfig - # The index does not support additional array queries. - ARRAY_CONFIG_UNSPECIFIED = 0 - - # The index supports array containment queries. - CONTAINS = 1 - end - end - - # Query Scope defines the scope at which a query is run. This is specified on - # a StructuredQuery's `from` field. - module QueryScope - # The query scope is unspecified. Not a valid option. - QUERY_SCOPE_UNSPECIFIED = 0 - - # Indexes with a collection query scope specified allow queries - # against a collection that is the child of a specific document, specified - # at query time, and that has the collection ID specified by the index. - COLLECTION = 1 - - # Indexes with a collection group query scope specified allow queries - # against all collections that has the collection ID specified by the - # index. - COLLECTION_GROUP = 2 - - # Include all the collections's ancestor in the index. Only available for - # Datastore Mode databases. - COLLECTION_RECURSIVE = 3 - end - - # API Scope defines the APIs (Firestore Native, or Firestore in - # Datastore Mode) that are supported for queries. - module ApiScope - # The index can only be used by the Firestore Native query API. - # This is the default. - ANY_API = 0 - - # The index can only be used by the Firestore in Datastore Mode query API. - DATASTORE_MODE_API = 1 - - # The index can only be used by the MONGODB_COMPATIBLE_API. - MONGODB_COMPATIBLE_API = 2 - end - - # The state of an index. During index creation, an index will be in the - # `CREATING` state. If the index is created successfully, it will transition - # to the `READY` state. If the index creation encounters a problem, the index - # will transition to the `NEEDS_REPAIR` state. - module State - # The state is unspecified. - STATE_UNSPECIFIED = 0 - - # The index is being created. - # There is an active long-running operation for the index. - # The index is updated when writing a document. - # Some index data may exist. - CREATING = 1 - - # The index is ready to be used. - # The index is updated when writing a document. - # The index is fully populated from all stored documents it applies to. - READY = 2 - - # The index was being created, but something went wrong. - # There is no active long-running operation for the index, - # and the most recently finished long-running operation failed. - # The index is not updated when writing a document. - # Some index data may exist. - # Use the google.longrunning.Operations API to determine why the operation - # that last attempted to create this index failed, then re-create the - # index. - NEEDS_REPAIR = 3 - end - - # The density configuration for the index. - module Density - # Unspecified. It will use database default setting. This value is input - # only. - DENSITY_UNSPECIFIED = 0 - - # In order for an index entry to be added, the document must - # contain all fields specified in the index. - # - # This is the only allowed value for indexes having ApiScope `ANY_API` and - # `DATASTORE_MODE_API`. - SPARSE_ALL = 1 - - # In order for an index entry to be added, the document must - # contain at least one of the fields specified in the index. - # Non-existent fields are treated as having a NULL value when generating - # index entries. - SPARSE_ANY = 2 - - # An index entry will be added regardless of whether the - # document contains any of the fields specified in the index. - # Non-existent fields are treated as having a NULL value when generating - # index entries. - DENSE = 3 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/location.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/location.rb deleted file mode 100644 index 699d03ec3a7c..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/location.rb +++ /dev/null @@ -1,35 +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 Firestore - module Admin - module V1 - # The metadata message for - # [google.cloud.location.Location.metadata][google.cloud.location.Location.metadata]. - class LocationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/operation.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/operation.rb deleted file mode 100644 index d8844cee33ef..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/operation.rb +++ /dev/null @@ -1,349 +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 Firestore - module Admin - module V1 - # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} - # results from - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_index FirestoreAdmin.CreateIndex}. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time this operation started. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time this operation completed. Will be unset if operation still in - # progress. - # @!attribute [rw] index - # @return [::String] - # The index resource that this operation is acting on. For example: - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}` - # @!attribute [rw] state - # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] - # The state of the operation. - # @!attribute [rw] progress_documents - # @return [::Google::Cloud::Firestore::Admin::V1::Progress] - # The progress, in documents, of this operation. - # @!attribute [rw] progress_bytes - # @return [::Google::Cloud::Firestore::Admin::V1::Progress] - # The progress, in bytes, of this operation. - class IndexOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} - # results from - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_field FirestoreAdmin.UpdateField}. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time this operation started. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time this operation completed. Will be unset if operation still in - # progress. - # @!attribute [rw] field - # @return [::String] - # The field resource that this operation is acting on. For example: - # `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}` - # @!attribute [rw] index_config_deltas - # @return [::Array<::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::IndexConfigDelta>] - # A list of - # {::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::IndexConfigDelta IndexConfigDelta}, - # which describe the intent of this operation. - # @!attribute [rw] state - # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] - # The state of the operation. - # @!attribute [rw] progress_documents - # @return [::Google::Cloud::Firestore::Admin::V1::Progress] - # The progress, in documents, of this operation. - # @!attribute [rw] progress_bytes - # @return [::Google::Cloud::Firestore::Admin::V1::Progress] - # The progress, in bytes, of this operation. - # @!attribute [rw] ttl_config_delta - # @return [::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::TtlConfigDelta] - # Describes the deltas of TTL configuration. - class FieldOperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about an index configuration change. - # @!attribute [rw] change_type - # @return [::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::IndexConfigDelta::ChangeType] - # Specifies how the index is changing. - # @!attribute [rw] index - # @return [::Google::Cloud::Firestore::Admin::V1::Index] - # The index being changed. - class IndexConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies how the index is changing. - module ChangeType - # The type of change is not specified or known. - CHANGE_TYPE_UNSPECIFIED = 0 - - # The single field index is being added. - ADD = 1 - - # The single field index is being removed. - REMOVE = 2 - end - end - - # Information about a TTL configuration change. - # @!attribute [rw] change_type - # @return [::Google::Cloud::Firestore::Admin::V1::FieldOperationMetadata::TtlConfigDelta::ChangeType] - # Specifies how the TTL configuration is changing. - class TtlConfigDelta - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Specifies how the TTL config is changing. - module ChangeType - # The type of change is not specified or known. - CHANGE_TYPE_UNSPECIFIED = 0 - - # The TTL config is being added. - ADD = 1 - - # The TTL config is being removed. - REMOVE = 2 - end - end - end - - # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} - # results from - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#export_documents FirestoreAdmin.ExportDocuments}. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time this operation started. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time this operation completed. Will be unset if operation still in - # progress. - # @!attribute [rw] operation_state - # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] - # The state of the export operation. - # @!attribute [rw] progress_documents - # @return [::Google::Cloud::Firestore::Admin::V1::Progress] - # The progress, in documents, of this operation. - # @!attribute [rw] progress_bytes - # @return [::Google::Cloud::Firestore::Admin::V1::Progress] - # The progress, in bytes, of this operation. - # @!attribute [rw] collection_ids - # @return [::Array<::String>] - # Which collection IDs are being exported. - # @!attribute [rw] output_uri_prefix - # @return [::String] - # Where the documents are being exported to. - # @!attribute [rw] namespace_ids - # @return [::Array<::String>] - # Which namespace IDs are being exported. - # @!attribute [rw] snapshot_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that corresponds to the version of the database that is being - # exported. If unspecified, there are no guarantees about the consistency of - # the documents being exported. - class ExportDocumentsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} - # results from - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#import_documents FirestoreAdmin.ImportDocuments}. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time this operation started. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time this operation completed. Will be unset if operation still in - # progress. - # @!attribute [rw] operation_state - # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] - # The state of the import operation. - # @!attribute [rw] progress_documents - # @return [::Google::Cloud::Firestore::Admin::V1::Progress] - # The progress, in documents, of this operation. - # @!attribute [rw] progress_bytes - # @return [::Google::Cloud::Firestore::Admin::V1::Progress] - # The progress, in bytes, of this operation. - # @!attribute [rw] collection_ids - # @return [::Array<::String>] - # Which collection IDs are being imported. - # @!attribute [rw] input_uri_prefix - # @return [::String] - # The location of the documents being imported. - # @!attribute [rw] namespace_ids - # @return [::Array<::String>] - # Which namespace IDs are being imported. - class ImportDocumentsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for {::Google::Longrunning::Operation google.longrunning.Operation} - # results from - # {::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#bulk_delete_documents FirestoreAdmin.BulkDeleteDocuments}. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time this operation started. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time this operation completed. Will be unset if operation still in - # progress. - # @!attribute [rw] operation_state - # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] - # The state of the operation. - # @!attribute [rw] progress_documents - # @return [::Google::Cloud::Firestore::Admin::V1::Progress] - # The progress, in documents, of this operation. - # @!attribute [rw] progress_bytes - # @return [::Google::Cloud::Firestore::Admin::V1::Progress] - # The progress, in bytes, of this operation. - # @!attribute [rw] collection_ids - # @return [::Array<::String>] - # The IDs of the collection groups that are being deleted. - # @!attribute [rw] namespace_ids - # @return [::Array<::String>] - # Which namespace IDs are being deleted. - # @!attribute [rw] snapshot_time - # @return [::Google::Protobuf::Timestamp] - # The timestamp that corresponds to the version of the database that is being - # read to get the list of documents to delete. This time can also be used as - # the timestamp of PITR in case of disaster recovery (subject to PITR window - # limit). - class BulkDeleteDocumentsMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Returned in the {::Google::Longrunning::Operation google.longrunning.Operation} - # response field. - # @!attribute [rw] output_uri_prefix - # @return [::String] - # Location of the output files. This can be used to begin an import - # into Cloud Firestore (this project or another project) after the operation - # completes successfully. - class ExportDocumentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for the {::Google::Longrunning::Operation long-running operation} from - # the [RestoreDatabase][google.firestore.admin.v1.RestoreDatabase] request. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time the restore was started. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time the restore finished, unset for ongoing restores. - # @!attribute [rw] operation_state - # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] - # The operation state of the restore. - # @!attribute [rw] database - # @return [::String] - # The name of the database being restored to. - # @!attribute [rw] backup - # @return [::String] - # The name of the backup restoring from. - # @!attribute [rw] progress_percentage - # @return [::Google::Cloud::Firestore::Admin::V1::Progress] - # How far along the restore is as an estimated percentage of remaining time. - class RestoreDatabaseMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Metadata for the {::Google::Longrunning::Operation long-running operation} from - # the [CloneDatabase][google.firestore.admin.v1.CloneDatabase] request. - # @!attribute [rw] start_time - # @return [::Google::Protobuf::Timestamp] - # The time the clone was started. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time the clone finished, unset for ongoing clones. - # @!attribute [rw] operation_state - # @return [::Google::Cloud::Firestore::Admin::V1::OperationState] - # The operation state of the clone. - # @!attribute [rw] database - # @return [::String] - # The name of the database being cloned to. - # @!attribute [rw] pitr_snapshot - # @return [::Google::Cloud::Firestore::Admin::V1::PitrSnapshot] - # The snapshot from which this database was cloned. - # @!attribute [rw] progress_percentage - # @return [::Google::Cloud::Firestore::Admin::V1::Progress] - # How far along the clone is as an estimated percentage of remaining time. - class CloneDatabaseMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the progress of the operation. - # Unit of work is generic and must be interpreted based on where - # {::Google::Cloud::Firestore::Admin::V1::Progress Progress} is used. - # @!attribute [rw] estimated_work - # @return [::Integer] - # The amount of work estimated. - # @!attribute [rw] completed_work - # @return [::Integer] - # The amount of work completed. - class Progress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the state of the operation. - module OperationState - # Unspecified. - OPERATION_STATE_UNSPECIFIED = 0 - - # Request is being prepared for processing. - INITIALIZING = 1 - - # Request is actively being processed. - PROCESSING = 2 - - # Request is in the process of being cancelled after user called - # google.longrunning.Operations.CancelOperation on the operation. - CANCELLING = 3 - - # Request has been processed and is in its finalization stage. - FINALIZING = 4 - - # Request has completed successfully. - SUCCESSFUL = 5 - - # Request has finished being processed, but encountered an error. - FAILED = 6 - - # Request has finished being cancelled after user called - # google.longrunning.Operations.CancelOperation. - CANCELLED = 7 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/schedule.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/schedule.rb deleted file mode 100644 index dd7558215b30..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/schedule.rb +++ /dev/null @@ -1,94 +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 Firestore - module Admin - module V1 - # A backup schedule for a Cloud Firestore Database. - # - # This resource is owned by the database it is backing up, and is deleted along - # with the database. The actual backups are not though. - # @!attribute [r] name - # @return [::String] - # Output only. The unique backup schedule identifier across all locations and - # databases for the given project. - # - # This will be auto-assigned. - # - # Format is - # `projects/{project}/databases/{database}/backupSchedules/{backup_schedule}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp at which this backup schedule was created and - # effective since. - # - # No backups will be created for this schedule before this time. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp at which this backup schedule was most recently - # updated. When a backup schedule is first created, this is the same as - # create_time. - # @!attribute [rw] retention - # @return [::Google::Protobuf::Duration] - # At what relative time in the future, compared to its creation time, - # the backup should be deleted, e.g. keep backups for 7 days. - # - # The maximum supported retention period is 14 weeks. - # @!attribute [rw] daily_recurrence - # @return [::Google::Cloud::Firestore::Admin::V1::DailyRecurrence] - # For a schedule that runs daily. - # - # Note: The following fields are mutually exclusive: `daily_recurrence`, `weekly_recurrence`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] weekly_recurrence - # @return [::Google::Cloud::Firestore::Admin::V1::WeeklyRecurrence] - # For a schedule that runs weekly on a specific day. - # - # Note: The following fields are mutually exclusive: `weekly_recurrence`, `daily_recurrence`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BackupSchedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a recurring schedule that runs every day. - # - # The time zone is UTC. - class DailyRecurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a recurring schedule that runs on a specified day of the week. - # - # The time zone is UTC. - # @!attribute [rw] day - # @return [::Google::Type::DayOfWeek] - # The day of week to run. - # - # DAY_OF_WEEK_UNSPECIFIED is not allowed. - class WeeklyRecurrence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/snapshot.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/snapshot.rb deleted file mode 100644 index ea1365850daf..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/snapshot.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 Cloud - module Firestore - module Admin - module V1 - # A consistent snapshot of a database at a specific point in time. - # A PITR (Point-in-time recovery) snapshot with previous versions of a - # database's data is available for every minute up to the associated database's - # data retention period. If the PITR feature is enabled, the retention period - # is 7 days; otherwise, it is one hour. - # @!attribute [rw] database - # @return [::String] - # Required. The name of the database that this was a snapshot of. Format: - # `projects/{project}/databases/{database}`. - # @!attribute [r] database_uid - # @return [::String] - # Output only. Public UUID of the database the snapshot was associated with. - # @!attribute [rw] snapshot_time - # @return [::Google::Protobuf::Timestamp] - # Required. Snapshot time of the database. - class PitrSnapshot - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/user_creds.rb deleted file mode 100644 index 7af24fd164ab..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/firestore/admin/v1/user_creds.rb +++ /dev/null @@ -1,78 +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 Firestore - module Admin - module V1 - # A Cloud Firestore User Creds. - # @!attribute [rw] name - # @return [::String] - # Identifier. The resource name of the UserCreds. - # Format: - # `projects/{project}/databases/{database}/userCreds/{user_creds}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the user creds were created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time the user creds were last updated. - # @!attribute [r] state - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds::State] - # Output only. Whether the user creds are enabled or disabled. Defaults to - # ENABLED on creation. - # @!attribute [r] secure_password - # @return [::String] - # Output only. The plaintext server-generated password for the user creds. - # Only populated in responses for CreateUserCreds and ResetUserPassword. - # @!attribute [rw] resource_identity - # @return [::Google::Cloud::Firestore::Admin::V1::UserCreds::ResourceIdentity] - # Resource Identity descriptor. - class UserCreds - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes a Resource Identity principal. - # @!attribute [r] principal - # @return [::String] - # Output only. Principal identifier string. - # See: https://cloud.google.com/iam/docs/principal-identifiers - class ResourceIdentity - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The state of the user creds (ENABLED or DISABLED). - module State - # The default value. Should not be used. - STATE_UNSPECIFIED = 0 - - # The user creds are enabled. - ENABLED = 1 - - # The user creds are disabled. - DISABLED = 2 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/type/dayofweek.rb deleted file mode 100644 index 973211b9ffe7..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/proto_docs/google/type/dayofweek.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! - - -module Google - module Type - # Represents a day of the week. - module DayOfWeek - # The day of the week is unspecified. - DAY_OF_WEEK_UNSPECIFIED = 0 - - # Monday - MONDAY = 1 - - # Tuesday - TUESDAY = 2 - - # Wednesday - WEDNESDAY = 3 - - # Thursday - THURSDAY = 4 - - # Friday - FRIDAY = 5 - - # Saturday - SATURDAY = 6 - - # Sunday - SUNDAY = 7 - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/Gemfile deleted file mode 100644 index 53731d915653..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-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-firestore-admin-v1", path: "../" -else - gem "google-cloud-firestore-admin-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-firestore-admin-v1/snippets/firestore_admin/bulk_delete_documents.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/bulk_delete_documents.rb deleted file mode 100644 index 84e4b2295885..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/bulk_delete_documents.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 firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the bulk_delete_documents call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#bulk_delete_documents. -# -def bulk_delete_documents - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new - - # Call the bulk_delete_documents method. - result = client.bulk_delete_documents request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/clone_database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/clone_database.rb deleted file mode 100644 index 8281526ddc22..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/clone_database.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 firestore_v1_generated_FirestoreAdmin_CloneDatabase_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the clone_database call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#clone_database. -# -def clone_database - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new - - # Call the clone_database method. - result = client.clone_database request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 firestore_v1_generated_FirestoreAdmin_CloneDatabase_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_backup_schedule.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_backup_schedule.rb deleted file mode 100644 index 9163cb60c9d6..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_backup_schedule.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 firestore_v1_generated_FirestoreAdmin_CreateBackupSchedule_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the create_backup_schedule call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_backup_schedule. -# -def create_backup_schedule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new - - # Call the create_backup_schedule method. - result = client.create_backup_schedule request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_CreateBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_database.rb deleted file mode 100644 index 7f82eb093618..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_database.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 firestore_v1_generated_FirestoreAdmin_CreateDatabase_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the create_database call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database. -# -def create_database - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new - - # Call the create_database method. - result = client.create_database request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 firestore_v1_generated_FirestoreAdmin_CreateDatabase_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_index.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_index.rb deleted file mode 100644 index 37fd399ff07a..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_index.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 firestore_v1_generated_FirestoreAdmin_CreateIndex_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the create_index call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_index. -# -def create_index - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new - - # Call the create_index method. - result = client.create_index request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 firestore_v1_generated_FirestoreAdmin_CreateIndex_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_user_creds.rb deleted file mode 100644 index 50822a58e5d8..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/create_user_creds.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 firestore_v1_generated_FirestoreAdmin_CreateUserCreds_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the create_user_creds call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_user_creds. -# -def create_user_creds - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new - - # Call the create_user_creds method. - result = client.create_user_creds request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_CreateUserCreds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup.rb deleted file mode 100644 index 8ce1f50f8af6..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup.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 firestore_v1_generated_FirestoreAdmin_DeleteBackup_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the delete_backup call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup. -# -def delete_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.new - - # Call the delete_backup method. - result = client.delete_backup request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup_schedule.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup_schedule.rb deleted file mode 100644 index 8340ab05ee26..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_backup_schedule.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 firestore_v1_generated_FirestoreAdmin_DeleteBackupSchedule_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the delete_backup_schedule call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup_schedule. -# -def delete_backup_schedule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.new - - # Call the delete_backup_schedule method. - result = client.delete_backup_schedule request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_DeleteBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_database.rb deleted file mode 100644 index 7481765bc545..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_database.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 firestore_v1_generated_FirestoreAdmin_DeleteDatabase_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the delete_database call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_database. -# -def delete_database - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.new - - # Call the delete_database method. - result = client.delete_database request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 firestore_v1_generated_FirestoreAdmin_DeleteDatabase_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_index.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_index.rb deleted file mode 100644 index 7c25a6b6b8df..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_index.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 firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the delete_index call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_index. -# -def delete_index - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.new - - # Call the delete_index method. - result = client.delete_index request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_user_creds.rb deleted file mode 100644 index dfba43aaf5c2..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/delete_user_creds.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 firestore_v1_generated_FirestoreAdmin_DeleteUserCreds_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the delete_user_creds call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_user_creds. -# -def delete_user_creds - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new - - # Call the delete_user_creds method. - result = client.delete_user_creds request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_DeleteUserCreds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/disable_user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/disable_user_creds.rb deleted file mode 100644 index 942477f09484..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/disable_user_creds.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 firestore_v1_generated_FirestoreAdmin_DisableUserCreds_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the disable_user_creds call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#disable_user_creds. -# -def disable_user_creds - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new - - # Call the disable_user_creds method. - result = client.disable_user_creds request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_DisableUserCreds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/enable_user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/enable_user_creds.rb deleted file mode 100644 index 87c57424a5cb..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/enable_user_creds.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 firestore_v1_generated_FirestoreAdmin_EnableUserCreds_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the enable_user_creds call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#enable_user_creds. -# -def enable_user_creds - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new - - # Call the enable_user_creds method. - result = client.enable_user_creds request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_EnableUserCreds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/export_documents.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/export_documents.rb deleted file mode 100644 index bdc0790a43ad..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/export_documents.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 firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the export_documents call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#export_documents. -# -def export_documents - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new - - # Call the export_documents method. - result = client.export_documents request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup.rb deleted file mode 100644 index cb59b2662ae3..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup.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 firestore_v1_generated_FirestoreAdmin_GetBackup_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the get_backup call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup. -# -def get_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::GetBackupRequest.new - - # Call the get_backup method. - result = client.get_backup request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::Backup. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup_schedule.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup_schedule.rb deleted file mode 100644 index 7a4c48b35672..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_backup_schedule.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 firestore_v1_generated_FirestoreAdmin_GetBackupSchedule_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the get_backup_schedule call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup_schedule. -# -def get_backup_schedule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.new - - # Call the get_backup_schedule method. - result = client.get_backup_schedule request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_GetBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_database.rb deleted file mode 100644 index 9aeb3af77d1a..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_database.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 firestore_v1_generated_FirestoreAdmin_GetDatabase_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the get_database call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_database. -# -def get_database - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.new - - # Call the get_database method. - result = client.get_database request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::Database. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_GetDatabase_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_field.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_field.rb deleted file mode 100644 index 9ea356a2397a..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_field.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 firestore_v1_generated_FirestoreAdmin_GetField_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the get_field call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_field. -# -def get_field - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::GetFieldRequest.new - - # Call the get_field method. - result = client.get_field request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::Field. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_GetField_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_index.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_index.rb deleted file mode 100644 index 5321bf09f7c4..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_index.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 firestore_v1_generated_FirestoreAdmin_GetIndex_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the get_index call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_index. -# -def get_index - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::GetIndexRequest.new - - # Call the get_index method. - result = client.get_index request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::Index. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_GetIndex_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_user_creds.rb deleted file mode 100644 index 10bb03bba272..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/get_user_creds.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 firestore_v1_generated_FirestoreAdmin_GetUserCreds_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the get_user_creds call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_user_creds. -# -def get_user_creds - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new - - # Call the get_user_creds method. - result = client.get_user_creds request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_GetUserCreds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/import_documents.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/import_documents.rb deleted file mode 100644 index c149ab6a5f7c..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/import_documents.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 firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the import_documents call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#import_documents. -# -def import_documents - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new - - # Call the import_documents method. - result = client.import_documents request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backup_schedules.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backup_schedules.rb deleted file mode 100644 index 725d8ca52b93..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backup_schedules.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 firestore_v1_generated_FirestoreAdmin_ListBackupSchedules_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the list_backup_schedules call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backup_schedules. -# -def list_backup_schedules - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new - - # Call the list_backup_schedules method. - result = client.list_backup_schedules request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_ListBackupSchedules_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backups.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backups.rb deleted file mode 100644 index d1fae2168425..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_backups.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 firestore_v1_generated_FirestoreAdmin_ListBackups_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the list_backups call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backups. -# -def list_backups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new - - # Call the list_backups method. - result = client.list_backups request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListBackupsResponse. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_databases.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_databases.rb deleted file mode 100644 index 19fba0fdfa95..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_databases.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 firestore_v1_generated_FirestoreAdmin_ListDatabases_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the list_databases call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_databases. -# -def list_databases - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new - - # Call the list_databases method. - result = client.list_databases request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_ListDatabases_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_fields.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_fields.rb deleted file mode 100644 index a6ea7f313b6c..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_fields.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 firestore_v1_generated_FirestoreAdmin_ListFields_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the list_fields call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields. -# -def list_fields - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new - - # Call the list_fields method. - result = client.list_fields request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Field. - p item - end -end -# [END firestore_v1_generated_FirestoreAdmin_ListFields_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_indexes.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_indexes.rb deleted file mode 100644 index 3438feca8085..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_indexes.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 firestore_v1_generated_FirestoreAdmin_ListIndexes_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the list_indexes call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes. -# -def list_indexes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new - - # Call the list_indexes method. - result = client.list_indexes request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Firestore::Admin::V1::Index. - p item - end -end -# [END firestore_v1_generated_FirestoreAdmin_ListIndexes_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_user_creds.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_user_creds.rb deleted file mode 100644 index 2d850bc1773e..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/list_user_creds.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 firestore_v1_generated_FirestoreAdmin_ListUserCreds_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the list_user_creds call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_user_creds. -# -def list_user_creds - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new - - # Call the list_user_creds method. - result = client.list_user_creds request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_ListUserCreds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/reset_user_password.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/reset_user_password.rb deleted file mode 100644 index df78cf028233..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/reset_user_password.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 firestore_v1_generated_FirestoreAdmin_ResetUserPassword_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the reset_user_password call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#reset_user_password. -# -def reset_user_password - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new - - # Call the reset_user_password method. - result = client.reset_user_password request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::UserCreds. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_ResetUserPassword_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/restore_database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/restore_database.rb deleted file mode 100644 index 18b4bc584eaa..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/restore_database.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 firestore_v1_generated_FirestoreAdmin_RestoreDatabase_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the restore_database call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#restore_database. -# -def restore_database - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new - - # Call the restore_database method. - result = client.restore_database request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 firestore_v1_generated_FirestoreAdmin_RestoreDatabase_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_backup_schedule.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_backup_schedule.rb deleted file mode 100644 index 190273262c47..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_backup_schedule.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 firestore_v1_generated_FirestoreAdmin_UpdateBackupSchedule_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the update_backup_schedule call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_backup_schedule. -# -def update_backup_schedule - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new - - # Call the update_backup_schedule method. - result = client.update_backup_schedule request - - # The returned object is of type Google::Cloud::Firestore::Admin::V1::BackupSchedule. - p result -end -# [END firestore_v1_generated_FirestoreAdmin_UpdateBackupSchedule_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_database.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_database.rb deleted file mode 100644 index 11ac0b76a38b..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_database.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 firestore_v1_generated_FirestoreAdmin_UpdateDatabase_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the update_database call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_database. -# -def update_database - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new - - # Call the update_database method. - result = client.update_database request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 firestore_v1_generated_FirestoreAdmin_UpdateDatabase_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_field.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_field.rb deleted file mode 100644 index a1023f2c2fe4..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/firestore_admin/update_field.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 firestore_v1_generated_FirestoreAdmin_UpdateField_sync] -require "google/cloud/firestore/admin/v1" - -## -# Snippet for the update_field call in the FirestoreAdmin service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_field. -# -def update_field - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new - - # Call the update_field method. - result = client.update_field request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 firestore_v1_generated_FirestoreAdmin_UpdateField_sync] diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json b/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json deleted file mode 100644 index 8837190d2735..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/snippets/snippet_metadata_google.firestore.admin.v1.json +++ /dev/null @@ -1,1295 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-firestore-admin-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.firestore.admin.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_CreateIndex_sync", - "title": "Snippet for the create_index call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_index.", - "file": "firestore_admin/create_index.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_index", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_index", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "CreateIndex", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.CreateIndex", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_ListIndexes_sync", - "title": "Snippet for the list_indexes call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes.", - "file": "firestore_admin/list_indexes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_indexes", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_indexes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "ListIndexes", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.ListIndexes", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_GetIndex_sync", - "title": "Snippet for the get_index call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_index.", - "file": "firestore_admin/get_index.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_index", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_index", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::GetIndexRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::Index", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "GetIndex", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.GetIndex", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_DeleteIndex_sync", - "title": "Snippet for the delete_index call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_index.", - "file": "firestore_admin/delete_index.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_index", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_index", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "DeleteIndex", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.DeleteIndex", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_GetField_sync", - "title": "Snippet for the get_field call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_field.", - "file": "firestore_admin/get_field.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_field", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_field", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::GetFieldRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::Field", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "GetField", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.GetField", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_UpdateField_sync", - "title": "Snippet for the update_field call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_field.", - "file": "firestore_admin/update_field.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_field", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_field", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "UpdateField", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.UpdateField", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_ListFields_sync", - "title": "Snippet for the list_fields call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields.", - "file": "firestore_admin/list_fields.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_fields", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_fields", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "ListFields", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.ListFields", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_ExportDocuments_sync", - "title": "Snippet for the export_documents call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#export_documents.", - "file": "firestore_admin/export_documents.rb", - "language": "RUBY", - "client_method": { - "short_name": "export_documents", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#export_documents", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "ExportDocuments", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.ExportDocuments", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_ImportDocuments_sync", - "title": "Snippet for the import_documents call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#import_documents.", - "file": "firestore_admin/import_documents.rb", - "language": "RUBY", - "client_method": { - "short_name": "import_documents", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#import_documents", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "ImportDocuments", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.ImportDocuments", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_BulkDeleteDocuments_sync", - "title": "Snippet for the bulk_delete_documents call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#bulk_delete_documents.", - "file": "firestore_admin/bulk_delete_documents.rb", - "language": "RUBY", - "client_method": { - "short_name": "bulk_delete_documents", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#bulk_delete_documents", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "BulkDeleteDocuments", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.BulkDeleteDocuments", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_CreateDatabase_sync", - "title": "Snippet for the create_database call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database.", - "file": "firestore_admin/create_database.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_database", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_database", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "CreateDatabase", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.CreateDatabase", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_GetDatabase_sync", - "title": "Snippet for the get_database call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_database.", - "file": "firestore_admin/get_database.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_database", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_database", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::Database", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "GetDatabase", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.GetDatabase", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_ListDatabases_sync", - "title": "Snippet for the list_databases call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_databases.", - "file": "firestore_admin/list_databases.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_databases", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_databases", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "ListDatabases", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.ListDatabases", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_UpdateDatabase_sync", - "title": "Snippet for the update_database call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_database.", - "file": "firestore_admin/update_database.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_database", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_database", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "UpdateDatabase", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.UpdateDatabase", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_DeleteDatabase_sync", - "title": "Snippet for the delete_database call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_database.", - "file": "firestore_admin/delete_database.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_database", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_database", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "DeleteDatabase", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.DeleteDatabase", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_CreateUserCreds_sync", - "title": "Snippet for the create_user_creds call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_user_creds.", - "file": "firestore_admin/create_user_creds.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_user_creds", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_user_creds", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::UserCreds", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "CreateUserCreds", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.CreateUserCreds", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_GetUserCreds_sync", - "title": "Snippet for the get_user_creds call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_user_creds.", - "file": "firestore_admin/get_user_creds.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_user_creds", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_user_creds", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::UserCreds", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "GetUserCreds", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.GetUserCreds", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_ListUserCreds_sync", - "title": "Snippet for the list_user_creds call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_user_creds.", - "file": "firestore_admin/list_user_creds.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_user_creds", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_user_creds", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "ListUserCreds", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.ListUserCreds", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_EnableUserCreds_sync", - "title": "Snippet for the enable_user_creds call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#enable_user_creds.", - "file": "firestore_admin/enable_user_creds.rb", - "language": "RUBY", - "client_method": { - "short_name": "enable_user_creds", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#enable_user_creds", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::UserCreds", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "EnableUserCreds", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.EnableUserCreds", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_DisableUserCreds_sync", - "title": "Snippet for the disable_user_creds call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#disable_user_creds.", - "file": "firestore_admin/disable_user_creds.rb", - "language": "RUBY", - "client_method": { - "short_name": "disable_user_creds", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#disable_user_creds", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::UserCreds", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "DisableUserCreds", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.DisableUserCreds", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_ResetUserPassword_sync", - "title": "Snippet for the reset_user_password call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#reset_user_password.", - "file": "firestore_admin/reset_user_password.rb", - "language": "RUBY", - "client_method": { - "short_name": "reset_user_password", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#reset_user_password", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::UserCreds", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "ResetUserPassword", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.ResetUserPassword", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_DeleteUserCreds_sync", - "title": "Snippet for the delete_user_creds call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_user_creds.", - "file": "firestore_admin/delete_user_creds.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_user_creds", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_user_creds", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "DeleteUserCreds", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.DeleteUserCreds", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_GetBackup_sync", - "title": "Snippet for the get_backup call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup.", - "file": "firestore_admin/get_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::GetBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::Backup", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "GetBackup", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.GetBackup", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_ListBackups_sync", - "title": "Snippet for the list_backups call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backups.", - "file": "firestore_admin/list_backups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backups", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "ListBackups", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.ListBackups", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_DeleteBackup_sync", - "title": "Snippet for the delete_backup call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup.", - "file": "firestore_admin/delete_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "DeleteBackup", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.DeleteBackup", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_RestoreDatabase_sync", - "title": "Snippet for the restore_database call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#restore_database.", - "file": "firestore_admin/restore_database.rb", - "language": "RUBY", - "client_method": { - "short_name": "restore_database", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#restore_database", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "RestoreDatabase", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.RestoreDatabase", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_CreateBackupSchedule_sync", - "title": "Snippet for the create_backup_schedule call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_backup_schedule.", - "file": "firestore_admin/create_backup_schedule.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup_schedule", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#create_backup_schedule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::BackupSchedule", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "CreateBackupSchedule", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.CreateBackupSchedule", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_GetBackupSchedule_sync", - "title": "Snippet for the get_backup_schedule call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup_schedule.", - "file": "firestore_admin/get_backup_schedule.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_schedule", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#get_backup_schedule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::BackupSchedule", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "GetBackupSchedule", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.GetBackupSchedule", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_ListBackupSchedules_sync", - "title": "Snippet for the list_backup_schedules call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backup_schedules.", - "file": "firestore_admin/list_backup_schedules.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_schedules", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#list_backup_schedules", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "ListBackupSchedules", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.ListBackupSchedules", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_UpdateBackupSchedule_sync", - "title": "Snippet for the update_backup_schedule call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_backup_schedule.", - "file": "firestore_admin/update_backup_schedule.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup_schedule", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#update_backup_schedule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::Admin::V1::BackupSchedule", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "UpdateBackupSchedule", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.UpdateBackupSchedule", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_DeleteBackupSchedule_sync", - "title": "Snippet for the delete_backup_schedule call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup_schedule.", - "file": "firestore_admin/delete_backup_schedule.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup_schedule", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#delete_backup_schedule", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "DeleteBackupSchedule", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.DeleteBackupSchedule", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_FirestoreAdmin_CloneDatabase_sync", - "title": "Snippet for the clone_database call in the FirestoreAdmin service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#clone_database.", - "file": "firestore_admin/clone_database.rb", - "language": "RUBY", - "client_method": { - "short_name": "clone_database", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client#clone_database", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "FirestoreAdmin::Client", - "full_name": "::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client" - }, - "method": { - "short_name": "CloneDatabase", - "full_name": "google.firestore.admin.v1.FirestoreAdmin.CloneDatabase", - "service": { - "short_name": "FirestoreAdmin", - "full_name": "google.firestore.admin.v1.FirestoreAdmin" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_operations_test.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_operations_test.rb deleted file mode 100644 index e35067220aca..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_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/firestore/admin/v1/firestore_admin_pb" -require "google/firestore/admin/v1/firestore_admin_services_pb" -require "google/cloud/firestore/admin/v1/firestore_admin" - -class ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_paths_test.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_paths_test.rb deleted file mode 100644 index b432f6211d22..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_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/firestore/admin/v1/firestore_admin" - -class ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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_backup_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_path project: "value0", location: "value1", backup: "value2" - assert_equal "projects/value0/locations/value1/backups/value2", path - end - end - - def test_backup_schedule_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_schedule_path project: "value0", database: "value1", backup_schedule: "value2" - assert_equal "projects/value0/databases/value1/backupSchedules/value2", path - end - end - - def test_collection_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::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.collection_group_path project: "value0", database: "value1", collection: "value2" - assert_equal "projects/value0/databases/value1/collectionGroups/value2", path - end - end - - def test_database_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.database_path project: "value0", database: "value1" - assert_equal "projects/value0/databases/value1", path - end - end - - def test_field_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.field_path project: "value0", database: "value1", collection: "value2", field: "value3" - assert_equal "projects/value0/databases/value1/collectionGroups/value2/fields/value3", path - end - end - - def test_index_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.index_path project: "value0", database: "value1", collection: "value2", index: "value3" - assert_equal "projects/value0/databases/value1/collectionGroups/value2/indexes/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::Firestore::Admin::V1::FirestoreAdmin::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_operation_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.operation_path project: "value0", database: "value1", operation: "value2" - assert_equal "projects/value0/databases/value1/operations/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::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.project_path project: "value0" - assert_equal "projects/value0", path - end - end - - def test_user_creds_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.user_creds_path project: "value0", database: "value1", user_creds: "value2" - assert_equal "projects/value0/databases/value1/userCreds/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb deleted file mode 100644 index c2fd8d735cb1..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_rest_test.rb +++ /dev/null @@ -1,1862 +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/firestore/admin/v1/firestore_admin_pb" -require "google/cloud/firestore/admin/v1/firestore_admin/rest" - - -class ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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_index - # 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" - index = {} - - create_index_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_create_index_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_index_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_index({ parent: parent, index: index }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_index parent: parent, index: index do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_index ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new(parent: parent, index: index) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_index({ parent: parent, index: index }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_index(::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new(parent: parent, index: index), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_index_client_stub.call_count - end - end - end - - def test_list_indexes - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse.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" - - list_indexes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_list_indexes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_indexes_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_indexes({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_indexes parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_indexes ::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new(parent: parent, filter: filter, 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_indexes({ parent: parent, filter: filter, 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_indexes(::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new(parent: parent, filter: filter, 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_indexes_client_stub.call_count - end - end - end - - def test_get_index - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::Index.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_index_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_get_index_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_index_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_index({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_index name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_index ::Google::Cloud::Firestore::Admin::V1::GetIndexRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_index({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_index(::Google::Cloud::Firestore::Admin::V1::GetIndexRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_index_client_stub.call_count - end - end - end - - def test_delete_index - # 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_index_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_delete_index_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_index_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_index({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_index name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_index ::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_index({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_index(::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_index_client_stub.call_count - end - end - end - - def test_get_field - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::Field.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_field_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_get_field_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_field_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_field({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_field name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_field ::Google::Cloud::Firestore::Admin::V1::GetFieldRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_field({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_field(::Google::Cloud::Firestore::Admin::V1::GetFieldRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_field_client_stub.call_count - end - end - end - - def test_update_field - # 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. - field = {} - update_mask = {} - - update_field_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_update_field_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_field_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_field({ field: field, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_field field: field, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_field ::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new(field: field, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_field({ field: field, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_field(::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new(field: field, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_field_client_stub.call_count - end - end - end - - def test_list_fields - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse.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" - - list_fields_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_list_fields_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_fields_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_fields({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_fields parent: parent, filter: filter, page_size: page_size, page_token: page_token do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_fields ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new(parent: parent, filter: filter, 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_fields({ parent: parent, filter: filter, 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_fields(::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new(parent: parent, filter: filter, 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_fields_client_stub.call_count - end - end - end - - def test_export_documents - # 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" - collection_ids = ["hello world"] - output_uri_prefix = "hello world" - namespace_ids = ["hello world"] - snapshot_time = {} - - export_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_export_documents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, export_documents_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.export_documents({ name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.export_documents name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.export_documents ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new(name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.export_documents({ name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.export_documents(::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new(name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, export_documents_client_stub.call_count - end - end - end - - def test_import_documents - # 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" - collection_ids = ["hello world"] - input_uri_prefix = "hello world" - namespace_ids = ["hello world"] - - import_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_import_documents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, import_documents_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.import_documents({ name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.import_documents name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.import_documents ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new(name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.import_documents({ name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.import_documents(::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new(name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, import_documents_client_stub.call_count - end - end - end - - def test_bulk_delete_documents - # 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" - collection_ids = ["hello world"] - namespace_ids = ["hello world"] - - bulk_delete_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_bulk_delete_documents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, bulk_delete_documents_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.bulk_delete_documents({ name: name, collection_ids: collection_ids, namespace_ids: namespace_ids }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.bulk_delete_documents name: name, collection_ids: collection_ids, namespace_ids: namespace_ids do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.bulk_delete_documents ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new(name: name, collection_ids: collection_ids, namespace_ids: namespace_ids) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.bulk_delete_documents({ name: name, collection_ids: collection_ids, namespace_ids: namespace_ids }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.bulk_delete_documents(::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new(name: name, collection_ids: collection_ids, namespace_ids: namespace_ids), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, bulk_delete_documents_client_stub.call_count - end - end - end - - def test_create_database - # 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" - database = {} - database_id = "hello world" - - create_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_create_database_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_database_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_database({ parent: parent, database: database, database_id: database_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_database parent: parent, database: database, database_id: database_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_database ::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new(parent: parent, database: database, database_id: database_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_database({ parent: parent, database: database, database_id: database_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_database(::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new(parent: parent, database: database, database_id: database_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_database_client_stub.call_count - end - end - end - - def test_get_database - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::Database.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_get_database_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_database_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_database({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_database name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_database ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_database({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_database(::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_database_client_stub.call_count - end - end - end - - def test_list_databases - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - show_deleted = true - - list_databases_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_list_databases_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_databases_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_databases({ parent: parent, show_deleted: show_deleted }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_databases parent: parent, show_deleted: show_deleted do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_databases ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new(parent: parent, show_deleted: show_deleted) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_databases({ parent: parent, show_deleted: show_deleted }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_databases(::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new(parent: parent, show_deleted: show_deleted), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_databases_client_stub.call_count - end - end - end - - def test_update_database - # 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. - database = {} - update_mask = {} - - update_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_update_database_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_database_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_database({ database: database, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_database database: database, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_database ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new(database: database, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_database({ database: database, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_database(::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new(database: database, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_database_client_stub.call_count - end - end - end - - def test_delete_database - # 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_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_delete_database_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_database_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_database({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_database name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_database ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_database({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_database(::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.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_database_client_stub.call_count - end - end - end - - def test_create_user_creds - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - user_creds = {} - user_creds_id = "hello world" - - create_user_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_create_user_creds_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_user_creds_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_user_creds({ parent: parent, user_creds: user_creds, user_creds_id: user_creds_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_user_creds parent: parent, user_creds: user_creds, user_creds_id: user_creds_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_user_creds ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new(parent: parent, user_creds: user_creds, user_creds_id: user_creds_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_user_creds({ parent: parent, user_creds: user_creds, user_creds_id: user_creds_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_user_creds(::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new(parent: parent, user_creds: user_creds, user_creds_id: user_creds_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_user_creds_client_stub.call_count - end - end - end - - def test_get_user_creds - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_user_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_get_user_creds_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_user_creds_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_user_creds({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_user_creds name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_user_creds ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_user_creds({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_user_creds(::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_user_creds_client_stub.call_count - end - end - end - - def test_list_user_creds - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - list_user_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_list_user_creds_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_user_creds_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_user_creds({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_user_creds parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_user_creds ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new(parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_user_creds({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_user_creds(::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new(parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_user_creds_client_stub.call_count - end - end - end - - def test_enable_user_creds - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_user_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_enable_user_creds_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, enable_user_creds_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.enable_user_creds({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.enable_user_creds name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.enable_user_creds ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.enable_user_creds({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.enable_user_creds(::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, enable_user_creds_client_stub.call_count - end - end - end - - def test_disable_user_creds - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_user_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_disable_user_creds_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, disable_user_creds_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.disable_user_creds({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.disable_user_creds name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.disable_user_creds ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.disable_user_creds({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.disable_user_creds(::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, disable_user_creds_client_stub.call_count - end - end - end - - def test_reset_user_password - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - reset_user_password_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_reset_user_password_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, reset_user_password_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.reset_user_password({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.reset_user_password name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.reset_user_password ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.reset_user_password({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.reset_user_password(::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, reset_user_password_client_stub.call_count - end - end - end - - def test_delete_user_creds - # 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_user_creds_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_delete_user_creds_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_user_creds_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_user_creds({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_user_creds name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_user_creds ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_user_creds({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_user_creds(::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_user_creds_client_stub.call_count - end - end - end - - def test_get_backup - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::Backup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup ::Google::Cloud::Firestore::Admin::V1::GetBackupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup(::Google::Cloud::Firestore::Admin::V1::GetBackupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_client_stub.call_count - end - end - end - - def test_list_backups - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse.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" - - list_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backups({ parent: parent, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backups parent: parent, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backups ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backups({ parent: parent, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backups(::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backups_client_stub.call_count - end - end - end - - def test_delete_backup - # 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_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup ::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup(::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_client_stub.call_count - end - end - end - - def test_restore_database - # 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" - database_id = "hello world" - backup = "hello world" - encryption_config = {} - tags = {} - - restore_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_restore_database_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, restore_database_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.restore_database parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.restore_database ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.restore_database(::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, restore_database_client_stub.call_count - end - end - end - - def test_create_backup_schedule - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_schedule = {} - - create_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_create_backup_schedule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_schedule_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_backup_schedule({ parent: parent, backup_schedule: backup_schedule }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_backup_schedule parent: parent, backup_schedule: backup_schedule do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_backup_schedule ::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule: backup_schedule) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_backup_schedule({ parent: parent, backup_schedule: backup_schedule }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_backup_schedule(::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule: backup_schedule), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_schedule_client_stub.call_count - end - end - end - - def test_get_backup_schedule - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_get_backup_schedule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_schedule_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_schedule({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_schedule name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_schedule ::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_schedule({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_schedule(::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_schedule_client_stub.call_count - end - end - end - - def test_list_backup_schedules - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - list_backup_schedules_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_list_backup_schedules_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_schedules_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backup_schedules({ parent: parent }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backup_schedules parent: parent do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backup_schedules ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new(parent: parent) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backup_schedules({ parent: parent }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backup_schedules(::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new(parent: parent), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backup_schedules_client_stub.call_count - end - end - end - - def test_update_backup_schedule - # Create test objects. - client_result = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - backup_schedule = {} - update_mask = {} - - update_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_update_backup_schedule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_schedule_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backup_schedule backup_schedule: backup_schedule, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backup_schedule ::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backup_schedule(::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_schedule_client_stub.call_count - end - end - end - - def test_delete_backup_schedule - # 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_backup_schedule_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_delete_backup_schedule_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_schedule_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup_schedule({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup_schedule name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup_schedule ::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup_schedule({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup_schedule(::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_schedule_client_stub.call_count - end - end - end - - def test_clone_database - # 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" - database_id = "hello world" - pitr_snapshot = {} - encryption_config = {} - tags = {} - - clone_database_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::ServiceStub.stub :transcode_clone_database_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, clone_database_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.clone_database({ parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.clone_database parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.clone_database ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new(parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.clone_database({ parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.clone_database(::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new(parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, clone_database_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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb deleted file mode 100644 index 802c5ac9c59b..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/test/google/cloud/firestore/admin/v1/firestore_admin_test.rb +++ /dev/null @@ -1,2104 +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/firestore/admin/v1/firestore_admin_pb" -require "google/cloud/firestore/admin/v1/firestore_admin" - -class ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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_index - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - index = {} - - create_index_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_index, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Index), request["index"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_index_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_index({ parent: parent, index: index }) do |response, 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_index parent: parent, index: index do |response, 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_index ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new(parent: parent, index: index) do |response, operation| - assert_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_index({ parent: parent, index: index }, grpc_options) do |response, operation| - assert_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_index(::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new(parent: parent, index: index), grpc_options) do |response, operation| - assert_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_index_client_stub.call_rpc_count - end - end - - def test_list_indexes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::ListIndexesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - list_indexes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_indexes, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_indexes_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_indexes({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_indexes parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_indexes ::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_indexes({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_indexes(::Google::Cloud::Firestore::Admin::V1::ListIndexesRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_indexes_client_stub.call_rpc_count - end - end - - def test_get_index - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::Index.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_index_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_index, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::GetIndexRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_index_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_index({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_index name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_index ::Google::Cloud::Firestore::Admin::V1::GetIndexRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_index({ 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_index(::Google::Cloud::Firestore::Admin::V1::GetIndexRequest.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_index_client_stub.call_rpc_count - end - end - - def test_delete_index - # 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_index_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_index, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_index_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_index({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_index name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_index ::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_index({ 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_index(::Google::Cloud::Firestore::Admin::V1::DeleteIndexRequest.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_index_client_stub.call_rpc_count - end - end - - def test_get_field - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::Field.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_field_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_field, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::GetFieldRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_field_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_field({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_field name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_field ::Google::Cloud::Firestore::Admin::V1::GetFieldRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_field({ 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_field(::Google::Cloud::Firestore::Admin::V1::GetFieldRequest.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_field_client_stub.call_rpc_count - end - end - - def test_update_field - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - field = {} - update_mask = {} - - update_field_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_field, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Field), request["field"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_field_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_field({ field: field, 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_field field: field, 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_field ::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new(field: field, 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_field({ field: field, 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_field(::Google::Cloud::Firestore::Admin::V1::UpdateFieldRequest.new(field: field, 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_field_client_stub.call_rpc_count - end - end - - def test_list_fields - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::ListFieldsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - list_fields_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_fields, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest, 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"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_fields_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_fields({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_fields parent: parent, filter: filter, page_size: page_size, page_token: page_token do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_fields ::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_fields({ parent: parent, filter: filter, page_size: page_size, page_token: page_token }, grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_fields(::Google::Cloud::Firestore::Admin::V1::ListFieldsRequest.new(parent: parent, filter: filter, page_size: page_size, page_token: page_token), grpc_options) do |response, operation| - assert_kind_of Gapic::PagedEnumerable, response - assert_equal grpc_response, response.response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_fields_client_stub.call_rpc_count - end - end - - def test_export_documents - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - collection_ids = ["hello world"] - output_uri_prefix = "hello world" - namespace_ids = ["hello world"] - snapshot_time = {} - - export_documents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :export_documents, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["collection_ids"] - assert_equal "hello world", request["output_uri_prefix"] - assert_equal ["hello world"], request["namespace_ids"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["snapshot_time"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, export_documents_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.export_documents({ name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.export_documents name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.export_documents ::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new(name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.export_documents({ name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.export_documents(::Google::Cloud::Firestore::Admin::V1::ExportDocumentsRequest.new(name: name, collection_ids: collection_ids, output_uri_prefix: output_uri_prefix, namespace_ids: namespace_ids, snapshot_time: snapshot_time), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, export_documents_client_stub.call_rpc_count - end - end - - def test_import_documents - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - collection_ids = ["hello world"] - input_uri_prefix = "hello world" - namespace_ids = ["hello world"] - - import_documents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :import_documents, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["collection_ids"] - assert_equal "hello world", request["input_uri_prefix"] - assert_equal ["hello world"], request["namespace_ids"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, import_documents_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.import_documents({ name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.import_documents name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.import_documents ::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new(name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.import_documents({ name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.import_documents(::Google::Cloud::Firestore::Admin::V1::ImportDocumentsRequest.new(name: name, collection_ids: collection_ids, input_uri_prefix: input_uri_prefix, namespace_ids: namespace_ids), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, import_documents_client_stub.call_rpc_count - end - end - - def test_bulk_delete_documents - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - collection_ids = ["hello world"] - namespace_ids = ["hello world"] - - bulk_delete_documents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :bulk_delete_documents, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest, request - assert_equal "hello world", request["name"] - assert_equal ["hello world"], request["collection_ids"] - assert_equal ["hello world"], request["namespace_ids"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, bulk_delete_documents_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.bulk_delete_documents({ name: name, collection_ids: collection_ids, namespace_ids: namespace_ids }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.bulk_delete_documents name: name, collection_ids: collection_ids, namespace_ids: namespace_ids do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.bulk_delete_documents ::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new(name: name, collection_ids: collection_ids, namespace_ids: namespace_ids) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.bulk_delete_documents({ name: name, collection_ids: collection_ids, namespace_ids: namespace_ids }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.bulk_delete_documents(::Google::Cloud::Firestore::Admin::V1::BulkDeleteDocumentsRequest.new(name: name, collection_ids: collection_ids, namespace_ids: namespace_ids), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, bulk_delete_documents_client_stub.call_rpc_count - end - end - - def test_create_database - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - database = {} - database_id = "hello world" - - create_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_database, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Database), request["database"] - assert_equal "hello world", request["database_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_database_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_database({ parent: parent, database: database, database_id: database_id }) do |response, 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_database parent: parent, database: database, database_id: database_id do |response, 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_database ::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new(parent: parent, database: database, database_id: database_id) do |response, operation| - assert_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_database({ parent: parent, database: database, database_id: database_id }, grpc_options) do |response, operation| - assert_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_database(::Google::Cloud::Firestore::Admin::V1::CreateDatabaseRequest.new(parent: parent, database: database, database_id: database_id), grpc_options) do |response, operation| - assert_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_database_client_stub.call_rpc_count - end - end - - def test_get_database - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::Database.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_database, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_database_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_database({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_database name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_database ::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_database({ 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_database(::Google::Cloud::Firestore::Admin::V1::GetDatabaseRequest.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_database_client_stub.call_rpc_count - end - end - - def test_list_databases - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::ListDatabasesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - show_deleted = true - - list_databases_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_databases, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest, request - assert_equal "hello world", request["parent"] - assert_equal true, request["show_deleted"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_databases_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_databases({ parent: parent, show_deleted: show_deleted }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_databases parent: parent, show_deleted: show_deleted do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_databases ::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new(parent: parent, show_deleted: show_deleted) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_databases({ parent: parent, show_deleted: show_deleted }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_databases(::Google::Cloud::Firestore::Admin::V1::ListDatabasesRequest.new(parent: parent, show_deleted: show_deleted), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_databases_client_stub.call_rpc_count - end - end - - def test_update_database - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - database = {} - update_mask = {} - - update_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_database, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Database), request["database"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_database_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_database({ database: database, 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_database database: database, 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_database ::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new(database: database, 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_database({ database: database, 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_database(::Google::Cloud::Firestore::Admin::V1::UpdateDatabaseRequest.new(database: database, 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_database_client_stub.call_rpc_count - end - end - - def test_delete_database - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_database, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_database_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_database({ 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_database 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_database ::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.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_database({ 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_database(::Google::Cloud::Firestore::Admin::V1::DeleteDatabaseRequest.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_database_client_stub.call_rpc_count - end - end - - def test_create_user_creds - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - user_creds = {} - user_creds_id = "hello world" - - create_user_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_user_creds, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::UserCreds), request["user_creds"] - assert_equal "hello world", request["user_creds_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_user_creds_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_user_creds({ parent: parent, user_creds: user_creds, user_creds_id: user_creds_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_user_creds parent: parent, user_creds: user_creds, user_creds_id: user_creds_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_user_creds ::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new(parent: parent, user_creds: user_creds, user_creds_id: user_creds_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_user_creds({ parent: parent, user_creds: user_creds, user_creds_id: user_creds_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_user_creds(::Google::Cloud::Firestore::Admin::V1::CreateUserCredsRequest.new(parent: parent, user_creds: user_creds, user_creds_id: user_creds_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_user_creds_client_stub.call_rpc_count - end - end - - def test_get_user_creds - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_user_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_user_creds, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_user_creds_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_user_creds({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_user_creds name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_user_creds ::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_user_creds({ 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_user_creds(::Google::Cloud::Firestore::Admin::V1::GetUserCredsRequest.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_user_creds_client_stub.call_rpc_count - end - end - - def test_list_user_creds - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::ListUserCredsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - list_user_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_user_creds, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest, request - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_user_creds_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_user_creds({ parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_user_creds parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_user_creds ::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new(parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_user_creds({ parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_user_creds(::Google::Cloud::Firestore::Admin::V1::ListUserCredsRequest.new(parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_user_creds_client_stub.call_rpc_count - end - end - - def test_enable_user_creds - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - enable_user_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :enable_user_creds, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, enable_user_creds_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.enable_user_creds({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.enable_user_creds name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.enable_user_creds ::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.enable_user_creds({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.enable_user_creds(::Google::Cloud::Firestore::Admin::V1::EnableUserCredsRequest.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, enable_user_creds_client_stub.call_rpc_count - end - end - - def test_disable_user_creds - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - disable_user_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :disable_user_creds, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, disable_user_creds_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.disable_user_creds({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.disable_user_creds name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.disable_user_creds ::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.disable_user_creds({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.disable_user_creds(::Google::Cloud::Firestore::Admin::V1::DisableUserCredsRequest.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, disable_user_creds_client_stub.call_rpc_count - end - end - - def test_reset_user_password - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::UserCreds.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - reset_user_password_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :reset_user_password, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, reset_user_password_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.reset_user_password({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.reset_user_password name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.reset_user_password ::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.reset_user_password({ name: name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.reset_user_password(::Google::Cloud::Firestore::Admin::V1::ResetUserPasswordRequest.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, reset_user_password_client_stub.call_rpc_count - end - end - - def test_delete_user_creds - # 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_user_creds_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_user_creds, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_user_creds_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_user_creds({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_user_creds name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_user_creds ::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_user_creds({ 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_user_creds(::Google::Cloud::Firestore::Admin::V1::DeleteUserCredsRequest.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_user_creds_client_stub.call_rpc_count - end - end - - def test_get_backup - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::Backup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::GetBackupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup ::Google::Cloud::Firestore::Admin::V1::GetBackupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup({ 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_backup(::Google::Cloud::Firestore::Admin::V1::GetBackupRequest.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_backup_client_stub.call_rpc_count - end - end - - def test_list_backups - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::ListBackupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backups, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backups_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backups({ parent: parent, filter: filter }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_backups parent: parent, filter: filter do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_backups ::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent, filter: filter) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_backups({ parent: parent, filter: filter }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_backups(::Google::Cloud::Firestore::Admin::V1::ListBackupsRequest.new(parent: parent, filter: filter), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backups_client_stub.call_rpc_count - end - end - - def test_delete_backup - # 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_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_backup name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_backup ::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_backup({ 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_backup(::Google::Cloud::Firestore::Admin::V1::DeleteBackupRequest.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_backup_client_stub.call_rpc_count - end - end - - def test_restore_database - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - database_id = "hello world" - backup = "hello world" - encryption_config = {} - tags = {} - - restore_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :restore_database, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["database_id"] - assert_equal "hello world", request["backup"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig), request["encryption_config"] - assert_equal({}, request["tags"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, restore_database_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.restore_database parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.restore_database ::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.restore_database({ parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.restore_database(::Google::Cloud::Firestore::Admin::V1::RestoreDatabaseRequest.new(parent: parent, database_id: database_id, backup: backup, encryption_config: encryption_config, tags: tags), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, restore_database_client_stub.call_rpc_count - end - end - - def test_create_backup_schedule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_schedule = {} - - create_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup_schedule, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::BackupSchedule), request["backup_schedule"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_schedule_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_backup_schedule({ parent: parent, backup_schedule: backup_schedule }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_backup_schedule parent: parent, backup_schedule: backup_schedule do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_backup_schedule ::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule: backup_schedule) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_backup_schedule({ parent: parent, backup_schedule: backup_schedule }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_backup_schedule(::Google::Cloud::Firestore::Admin::V1::CreateBackupScheduleRequest.new(parent: parent, backup_schedule: backup_schedule), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_backup_schedule_client_stub.call_rpc_count - end - end - - def test_get_backup_schedule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_schedule, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_schedule_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup_schedule({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup_schedule name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup_schedule ::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup_schedule({ 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_backup_schedule(::Google::Cloud::Firestore::Admin::V1::GetBackupScheduleRequest.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_backup_schedule_client_stub.call_rpc_count - end - end - - def test_list_backup_schedules - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - - list_backup_schedules_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_schedules, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest, request - assert_equal "hello world", request["parent"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backup_schedules_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backup_schedules({ parent: parent }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_backup_schedules parent: parent do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_backup_schedules ::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new(parent: parent) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_backup_schedules({ parent: parent }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_backup_schedules(::Google::Cloud::Firestore::Admin::V1::ListBackupSchedulesRequest.new(parent: parent), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_backup_schedules_client_stub.call_rpc_count - end - end - - def test_update_backup_schedule - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::Admin::V1::BackupSchedule.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - backup_schedule = {} - update_mask = {} - - update_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup_schedule, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::BackupSchedule), request["backup_schedule"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_schedule_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backup_schedule({ backup_schedule: backup_schedule, update_mask: update_mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_backup_schedule backup_schedule: backup_schedule, update_mask: update_mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_backup_schedule ::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, 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_backup_schedule({ backup_schedule: backup_schedule, 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_backup_schedule(::Google::Cloud::Firestore::Admin::V1::UpdateBackupScheduleRequest.new(backup_schedule: backup_schedule, 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_backup_schedule_client_stub.call_rpc_count - end - end - - def test_delete_backup_schedule - # 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_backup_schedule_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup_schedule, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_schedule_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup_schedule({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_backup_schedule name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_backup_schedule ::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_backup_schedule({ 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_backup_schedule(::Google::Cloud::Firestore::Admin::V1::DeleteBackupScheduleRequest.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_backup_schedule_client_stub.call_rpc_count - end - end - - def test_clone_database - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - database_id = "hello world" - pitr_snapshot = {} - encryption_config = {} - tags = {} - - clone_database_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :clone_database, name - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["database_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::PitrSnapshot), request["pitr_snapshot"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::Admin::V1::Database::EncryptionConfig), request["encryption_config"] - assert_equal({}, request["tags"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, clone_database_client_stub do - # Create client - client = ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.clone_database({ parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.clone_database parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.clone_database ::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new(parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.clone_database({ parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.clone_database(::Google::Cloud::Firestore::Admin::V1::CloneDatabaseRequest.new(parent: parent, database_id: database_id, pitr_snapshot: pitr_snapshot, encryption_config: encryption_config, tags: tags), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, clone_database_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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::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::Firestore::Admin::V1::FirestoreAdmin::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin-v1/test/helper.rb b/owl-bot-staging/google-cloud-firestore-admin-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin-v1/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-firestore-admin/.gitignore b/owl-bot-staging/google-cloud-firestore-admin/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/.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-firestore-admin/.repo-metadata.json b/owl-bot-staging/google-cloud-firestore-admin/.repo-metadata.json deleted file mode 100644 index 5d4b0e1335ab..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "firestore.googleapis.com", - "api_shortname": "firestore", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin/latest", - "distribution_name": "google-cloud-firestore-admin", - "is_cloud": true, - "language": "ruby", - "name": "firestore", - "name_pretty": "Cloud Firestore Admin API", - "product_documentation": "https://cloud.google.com/firestore", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development.", - "ruby-cloud-env-prefix": "FIRESTORE", - "ruby-cloud-product-url": "https://cloud.google.com/firestore", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-firestore-admin/.rubocop.yml b/owl-bot-staging/google-cloud-firestore-admin/.rubocop.yml deleted file mode 100644 index d578d69a5ee7..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-firestore-admin.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-firestore-admin.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-firestore-admin/.toys.rb b/owl-bot-staging/google-cloud-firestore-admin/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/.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-firestore-admin/.yardopts b/owl-bot-staging/google-cloud-firestore-admin/.yardopts deleted file mode 100644 index 5fedc380c4b8..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Cloud Firestore Admin API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-firestore-admin/AUTHENTICATION.md b/owl-bot-staging/google-cloud-firestore-admin/AUTHENTICATION.md deleted file mode 100644 index 3477215a6592..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-firestore-admin 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-firestore-admin 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/firestore/admin" - -client = Google::Cloud::Firestore::Admin.firestore_admin do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/firestore/admin" - -Google::Cloud::Firestore::Admin.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Firestore::Admin.firestore_admin -``` - -### 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-firestore-admin -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/firestore/admin" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Firestore::Admin.firestore_admin -``` - -### 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-firestore-admin/CHANGELOG.md b/owl-bot-staging/google-cloud-firestore-admin/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-firestore-admin/Gemfile b/owl-bot-staging/google-cloud-firestore-admin/Gemfile deleted file mode 100644 index fdcff34a6bfc..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-firestore-admin-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-firestore-admin.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-firestore-admin/LICENSE.md b/owl-bot-staging/google-cloud-firestore-admin/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/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-firestore-admin/README.md b/owl-bot-staging/google-cloud-firestore-admin/README.md deleted file mode 100644 index 869363f67725..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Cloud Firestore Admin API - -API Client library for the Cloud Firestore Admin API - -Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-firestore-admin-v*`. -The gem `google-cloud-firestore-admin` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin/latest) -for this library, google-cloud-firestore-admin, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-firestore-admin-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/firestore) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-firestore-admin -``` - -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/firestore.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/firestore/admin" - -client = Google::Cloud::Firestore::Admin.firestore_admin -request = ::Google::Cloud::Firestore::Admin::V1::CreateIndexRequest.new # (request fields as keyword arguments...) -response = client.create_index request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-firestore-admin-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin-v1/latest). - -## 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-firestore-admin`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-firestore-admin-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-firestore-admin`. -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-firestore-admin-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-firestore-admin/Rakefile b/owl-bot-staging/google-cloud-firestore-admin/Rakefile deleted file mode 100644 index 9ac2e661bd76..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/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 = true -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-firestore-admin acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["FIRESTORE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["FIRESTORE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["FIRESTORE_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 FIRESTORE_TEST_PROJECT=test123 FIRESTORE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/firestore/admin/v1/firestore_admin/credentials" - ::Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["FIRESTORE_PROJECT"] = project - ENV["FIRESTORE_TEST_PROJECT"] = project - ENV["FIRESTORE_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-firestore-admin 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-firestore-admin 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-firestore-admin 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-firestore-admin gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-firestore-admin" - header "google-cloud-firestore-admin rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-firestore-admin yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-firestore-admin 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-firestore-admin 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-firestore-admin 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-firestore-admin/google-cloud-firestore-admin.gemspec b/owl-bot-staging/google-cloud-firestore-admin/google-cloud-firestore-admin.gemspec deleted file mode 100644 index a9be5c27a475..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/google-cloud-firestore-admin.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/firestore/admin/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-firestore-admin" - gem.version = Google::Cloud::Firestore::Admin::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development." - gem.summary = "API Client library for the Cloud Firestore Admin API" - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-firestore-admin-v1", ">= 0.14", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-firestore-admin/lib/google-cloud-firestore-admin.rb b/owl-bot-staging/google-cloud-firestore-admin/lib/google-cloud-firestore-admin.rb deleted file mode 100644 index 7abf27599e3e..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/lib/google-cloud-firestore-admin.rb +++ /dev/null @@ -1,19 +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/firestore/admin" unless defined? Google::Cloud::Firestore::Admin::VERSION diff --git a/owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin.rb b/owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin.rb deleted file mode 100644 index 6f107e28ca38..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin.rb +++ /dev/null @@ -1,185 +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 this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/firestore/admin/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :firestore_admin do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Firestore - module Admin - ## - # Create a new client object for FirestoreAdmin. - # - # By default, this returns an instance of - # [Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-admin-v1/latest/Google-Cloud-Firestore-Admin-V1-FirestoreAdmin-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the FirestoreAdmin service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the FirestoreAdmin service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Firestore::Admin.firestore_admin_available?}. - # - # ## About FirestoreAdmin - # - # The Cloud Firestore Admin API. - # - # This API provides several administrative services for Cloud Firestore. - # - # Project, Database, Namespace, Collection, Collection Group, and Document are - # used as defined in the Google Cloud Firestore API. - # - # Operation: An Operation represents work being performed in the background. - # - # The index service manages Cloud Firestore indexes. - # - # Index creation is performed asynchronously. - # An Operation resource is created for each such asynchronous operation. - # The state of the operation (including any errors encountered) - # may be queried via the Operation resource. - # - # The Operations collection provides a record of actions performed for the - # specified Project (including any Operations in progress). Operations are not - # created directly but through calls on other collections or resources. - # - # An Operation that is done may be deleted so that it is no longer listed as - # part of the Operation collection. Operations are garbage collected after - # 30 days. By default, ListOperations will only return in progress and failed - # operations. To list completed operation, issue a ListOperations request with - # the filter `done: true`. - # - # Operations are created by service `FirestoreAdmin`, but are accessed via - # service `google.longrunning.Operations`. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.firestore_admin version: :v1, transport: :grpc, &block - require "google/cloud/firestore/admin/#{version.to_s.downcase}" - - package_name = Google::Cloud::Firestore::Admin - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Firestore::Admin.const_get(package_name).const_get(:FirestoreAdmin) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the FirestoreAdmin service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Firestore::Admin.firestore_admin}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the FirestoreAdmin service, - # or if the versioned client gem needs an update to support the FirestoreAdmin service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.firestore_admin_available? version: :v1, transport: :grpc - require "google/cloud/firestore/admin/#{version.to_s.downcase}" - package_name = Google::Cloud::Firestore::Admin - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Firestore::Admin.const_get package_name - return false unless service_module.const_defined? :FirestoreAdmin - service_module = service_module.const_get :FirestoreAdmin - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-firestore-admin library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # 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 [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.firestore_admin if block_given? - - ::Google::Cloud.configure.firestore_admin - end - end - end - end -end - -helper_path = ::File.join __dir__, "admin", "helpers.rb" -require "google/cloud/firestore/admin/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin/version.rb b/owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin/version.rb deleted file mode 100644 index 3727753d766a..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/lib/google/cloud/firestore/admin/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 Firestore - module Admin - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/client_test.rb b/owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/client_test.rb deleted file mode 100644 index 4cb98a6cc051..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/client_test.rb +++ /dev/null @@ -1,64 +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 "google/cloud/firestore/admin" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Firestore::Admin::ClientConstructionMinitest < 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_firestore_admin_grpc - skip unless Google::Cloud::Firestore::Admin.firestore_admin_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Firestore::Admin.firestore_admin transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Client, client - end - end - - def test_firestore_admin_rest - skip unless Google::Cloud::Firestore::Admin.firestore_admin_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Firestore::Admin.firestore_admin transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Firestore::Admin::V1::FirestoreAdmin::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/version_test.rb b/owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/version_test.rb deleted file mode 100644 index 21d044f6c489..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/test/google/cloud/firestore/admin/version_test.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 "helper" -require "google/cloud/firestore/admin/version" - -class Google::Cloud::Firestore::Admin::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Firestore::Admin::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-firestore-admin/test/helper.rb b/owl-bot-staging/google-cloud-firestore-admin/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-firestore-admin/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-firestore-v1/.gitignore b/owl-bot-staging/google-cloud-firestore-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-firestore-v1/.repo-metadata.json deleted file mode 100644 index 195e6cac6d41..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "firestore.googleapis.com", - "api_shortname": "firestore", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest", - "distribution_name": "google-cloud-firestore-v1", - "is_cloud": true, - "language": "ruby", - "name": "firestore", - "name_pretty": "Cloud Firestore V1 API", - "product_documentation": "https://cloud.google.com/firestore", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Note that google-cloud-firestore-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-firestore instead. See the readme for more details.", - "ruby-cloud-env-prefix": "FIRESTORE", - "ruby-cloud-product-url": "https://cloud.google.com/firestore", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-firestore-v1/.rubocop.yml b/owl-bot-staging/google-cloud-firestore-v1/.rubocop.yml deleted file mode 100644 index b39192458484..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-firestore-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-firestore-v1.rb" diff --git a/owl-bot-staging/google-cloud-firestore-v1/.toys.rb b/owl-bot-staging/google-cloud-firestore-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1/.yardopts b/owl-bot-staging/google-cloud-firestore-v1/.yardopts deleted file mode 100644 index 3ca29a5a2e96..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Firestore 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-firestore-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-firestore-v1/AUTHENTICATION.md deleted file mode 100644 index 928670fe30c0..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-firestore-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-firestore-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/firestore/v1" - -client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/firestore/v1" - -::Google::Cloud::Firestore::V1::Firestore::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Firestore::V1::Firestore::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-firestore-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/firestore/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Firestore::V1::Firestore::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-firestore-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-firestore-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-firestore-v1/Gemfile b/owl-bot-staging/google-cloud-firestore-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-firestore-v1/LICENSE.md b/owl-bot-staging/google-cloud-firestore-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1/README.md b/owl-bot-staging/google-cloud-firestore-v1/README.md deleted file mode 100644 index f635e3ad0443..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Firestore V1 API - -Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development. - -Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Firestore V1 API. Most users should consider using -the main client gem, -[google-cloud-firestore](https://rubygems.org/gems/google-cloud-firestore). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-firestore-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/firestore.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/firestore/v1" - -client = ::Google::Cloud::Firestore::V1::Firestore::Client.new -request = ::Google::Cloud::Firestore::V1::GetDocumentRequest.new # (request fields as keyword arguments...) -response = client.get_document request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-firestore-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/firestore) -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/firestore/v1" -require "logger" - -client = ::Google::Cloud::Firestore::V1::Firestore::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-firestore`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-firestore-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-firestore`. -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-firestore-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-firestore-v1/Rakefile b/owl-bot-staging/google-cloud-firestore-v1/Rakefile deleted file mode 100644 index 070c05371228..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["FIRESTORE_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["FIRESTORE_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["FIRESTORE_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 FIRESTORE_TEST_PROJECT=test123 FIRESTORE_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/firestore/v1/firestore/credentials" - ::Google::Cloud::Firestore::V1::Firestore::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["FIRESTORE_PROJECT"] = project - ENV["FIRESTORE_TEST_PROJECT"] = project - ENV["FIRESTORE_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-firestore-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-firestore-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-firestore-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-firestore-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-firestore-v1" - header "google-cloud-firestore-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-firestore-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-firestore-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-firestore-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-firestore-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-firestore-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-firestore-v1/gapic_metadata.json deleted file mode 100644 index 46f4f6d27b0b..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/gapic_metadata.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.firestore.v1", - "libraryPackage": "::Google::Cloud::Firestore::V1", - "services": { - "Firestore": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Firestore::V1::Firestore::Client", - "rpcs": { - "GetDocument": { - "methods": [ - "get_document" - ] - }, - "ListDocuments": { - "methods": [ - "list_documents" - ] - }, - "UpdateDocument": { - "methods": [ - "update_document" - ] - }, - "DeleteDocument": { - "methods": [ - "delete_document" - ] - }, - "BatchGetDocuments": { - "methods": [ - "batch_get_documents" - ] - }, - "BeginTransaction": { - "methods": [ - "begin_transaction" - ] - }, - "Commit": { - "methods": [ - "commit" - ] - }, - "Rollback": { - "methods": [ - "rollback" - ] - }, - "RunQuery": { - "methods": [ - "run_query" - ] - }, - "ExecutePipeline": { - "methods": [ - "execute_pipeline" - ] - }, - "RunAggregationQuery": { - "methods": [ - "run_aggregation_query" - ] - }, - "PartitionQuery": { - "methods": [ - "partition_query" - ] - }, - "Write": { - "methods": [ - "write" - ] - }, - "Listen": { - "methods": [ - "listen" - ] - }, - "ListCollectionIds": { - "methods": [ - "list_collection_ids" - ] - }, - "BatchWrite": { - "methods": [ - "batch_write" - ] - }, - "CreateDocument": { - "methods": [ - "create_document" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-firestore-v1/google-cloud-firestore-v1.gemspec b/owl-bot-staging/google-cloud-firestore-v1/google-cloud-firestore-v1.gemspec deleted file mode 100644 index 9821a35b2173..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/google-cloud-firestore-v1.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/firestore/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-firestore-v1" - gem.version = Google::Cloud::Firestore::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development. Note that google-cloud-firestore-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-firestore instead. See the readme for more details." - gem.summary = "Accesses the NoSQL document database built for automatic scaling, high performance, and ease of application development." - 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.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google-cloud-firestore-v1.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google-cloud-firestore-v1.rb deleted file mode 100644 index a06d65d7c71a..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google-cloud-firestore-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/firestore/v1" diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1.rb deleted file mode 100644 index b062b442952c..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1.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/firestore/v1/firestore" -require "google/cloud/firestore/v1/version" - -module Google - module Cloud - module Firestore - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/firestore/v1" - # client = ::Google::Cloud::Firestore::V1::Firestore::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/firestore/v1" - # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/firestore/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore.rb deleted file mode 100644 index 839d1e4340f2..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore.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/firestore/v1/version" - -require "google/cloud/firestore/v1/firestore/credentials" -require "google/cloud/firestore/v1/firestore/client" -require "google/cloud/firestore/v1/firestore/rest" - -module Google - module Cloud - module Firestore - module V1 - ## - # The Cloud Firestore service. - # - # Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL - # document database that simplifies storing, syncing, and querying data for - # your mobile, web, and IoT apps at global scale. Its client libraries provide - # live synchronization and offline support, while its security features and - # integrations with Firebase and Google Cloud Platform accelerate building - # truly serverless apps. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/firestore/v1/firestore" - # client = ::Google::Cloud::Firestore::V1::Firestore::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/firestore/v1/firestore/rest" - # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - module Firestore - end - end - end - end -end - -helper_path = ::File.join __dir__, "firestore", "helpers.rb" -require "google/cloud/firestore/v1/firestore/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb deleted file mode 100644 index 30b933631d21..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/client.rb +++ /dev/null @@ -1,2413 +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/firestore/v1/firestore_pb" -require "google/cloud/location" - -module Google - module Cloud - module Firestore - module V1 - module Firestore - ## - # Client for the Firestore service. - # - # The Cloud Firestore service. - # - # Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL - # document database that simplifies storing, syncing, and querying data for - # your mobile, web, and IoT apps at global scale. Its client libraries provide - # live synchronization and offline support, while its security features and - # integrations with Firebase and Google Cloud Platform accelerate building - # truly serverless apps. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :firestore_stub - - ## - # Configure the Firestore Client class. - # - # See {::Google::Cloud::Firestore::V1::Firestore::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Firestore clients - # ::Google::Cloud::Firestore::V1::Firestore::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", "Firestore", "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.get_document.timeout = 60.0 - default_config.rpcs.get_document.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.list_documents.timeout = 60.0 - default_config.rpcs.list_documents.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.update_document.timeout = 60.0 - default_config.rpcs.update_document.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14] - } - - default_config.rpcs.delete_document.timeout = 60.0 - default_config.rpcs.delete_document.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.batch_get_documents.timeout = 300.0 - default_config.rpcs.batch_get_documents.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.begin_transaction.timeout = 60.0 - default_config.rpcs.begin_transaction.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.commit.timeout = 60.0 - default_config.rpcs.commit.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14] - } - - default_config.rpcs.rollback.timeout = 60.0 - default_config.rpcs.rollback.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.run_query.timeout = 300.0 - default_config.rpcs.run_query.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.execute_pipeline.timeout = 300.0 - default_config.rpcs.execute_pipeline.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.run_aggregation_query.timeout = 300.0 - default_config.rpcs.run_aggregation_query.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.partition_query.timeout = 300.0 - default_config.rpcs.partition_query.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.write.timeout = 86_400.0 - - default_config.rpcs.listen.timeout = 86_400.0 - default_config.rpcs.listen.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.list_collection_ids.timeout = 60.0 - default_config.rpcs.list_collection_ids.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.batch_write.timeout = 60.0 - default_config.rpcs.batch_write.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 10] - } - - default_config.rpcs.create_document.timeout = 60.0 - default_config.rpcs.create_document.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Firestore 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::Firestore::V1::Firestore::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 - @firestore_stub.universe_domain - end - - ## - # Create a new Firestore client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Firestore 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/firestore/v1/firestore_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 - - @firestore_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Firestore::V1::Firestore::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 - ) - - @firestore_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 = @firestore_stub.endpoint - config.universe_domain = @firestore_stub.universe_domain - config.logger = @firestore_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @firestore_stub.logger - end - - # Service calls - - ## - # Gets a single document. - # - # @overload get_document(request, options = nil) - # Pass arguments to `get_document` via a request object, either of type - # {::Google::Cloud::Firestore::V1::GetDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::GetDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_document(name: nil, mask: nil, transaction: nil, read_time: nil) - # Pass arguments to `get_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Document to get. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] - # The fields to return. If not set, returns all fields. - # - # If the document has a field that is not present in this mask, that field - # will not be returned in the response. - # @param transaction [::String] - # Reads the document in a transaction. - # - # Note: The following parameters are mutually exclusive: `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Reads the version of the document at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::V1::Document] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::V1::Document] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::GetDocumentRequest.new - # - # # Call the get_document method. - # result = client.get_document request - # - # # The returned object is of type Google::Cloud::Firestore::V1::Document. - # p result - # - def get_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::GetDocumentRequest - - # Converts hash and nil to 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_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-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_document.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :get_document, 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 documents. - # - # @overload list_documents(request, options = nil) - # Pass arguments to `list_documents` via a request object, either of type - # {::Google::Cloud::Firestore::V1::ListDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::ListDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_documents(parent: nil, collection_id: nil, page_size: nil, page_token: nil, order_by: nil, mask: nil, transaction: nil, read_time: nil, show_missing: nil) - # Pass arguments to `list_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. In the format: - # `projects/{project_id}/databases/{database_id}/documents` or - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # - # For example: - # `projects/my-project/databases/my-database/documents` or - # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - # @param collection_id [::String] - # Optional. The collection ID, relative to `parent`, to list. - # - # For example: `chatrooms` or `messages`. - # - # This is optional, and when not provided, Firestore will list documents - # from all collections under the provided `parent`. - # @param page_size [::Integer] - # Optional. The maximum number of documents to return in a single response. - # - # Firestore may return fewer than this value. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDocuments` response. - # - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters (with the exception of `page_size`) must match the values set - # in the request that generated the page token. - # @param order_by [::String] - # Optional. The optional ordering of the documents to return. - # - # For example: `priority desc, __name__ desc`. - # - # This mirrors the {::Google::Cloud::Firestore::V1::StructuredQuery#order_by `ORDER BY`} - # used in Firestore queries but in a string representation. When absent, - # documents are ordered based on `__name__ ASC`. - # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] - # Optional. The fields to return. If not set, returns all fields. - # - # If a document has a field that is not present in this mask, that field - # will not be returned in the response. - # @param transaction [::String] - # Perform the read as part of an already active transaction. - # - # Note: The following parameters are mutually exclusive: `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Perform the read at the provided time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param show_missing [::Boolean] - # If the list should show missing documents. - # - # A document is missing if it does not exist, but there are sub-documents - # nested underneath it. When true, such missing documents will be returned - # with a key but will not have fields, - # {::Google::Cloud::Firestore::V1::Document#create_time `create_time`}, or - # {::Google::Cloud::Firestore::V1::Document#update_time `update_time`} set. - # - # Requests with `show_missing` may not specify `where` or `order_by`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::V1::Document>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::V1::Document>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::ListDocumentsRequest.new - # - # # Call the list_documents method. - # result = client.list_documents request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Firestore::V1::Document. - # p item - # end - # - def list_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::ListDocumentsRequest - - # Converts hash and nil to 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_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-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 - if request.collection_id - header_params["collection_id"] = request.collection_id - end - - request_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_documents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :list_documents, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @firestore_stub, :list_documents, 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 or inserts a document. - # - # @overload update_document(request, options = nil) - # Pass arguments to `update_document` via a request object, either of type - # {::Google::Cloud::Firestore::V1::UpdateDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::UpdateDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_document(document: nil, update_mask: nil, mask: nil, current_document: nil) - # Pass arguments to `update_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param document [::Google::Cloud::Firestore::V1::Document, ::Hash] - # Required. The updated document. - # Creates the document if it does not already exist. - # @param update_mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] - # The fields to update. - # None of the field paths in the mask may contain a reserved name. - # - # If the document exists on the server and has fields not referenced in the - # mask, they are left unchanged. - # Fields referenced in the mask, but not present in the input document, are - # deleted from the document on the server. - # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] - # The fields to return. If not set, returns all fields. - # - # If the document has a field that is not present in this mask, that field - # will not be returned in the response. - # @param current_document [::Google::Cloud::Firestore::V1::Precondition, ::Hash] - # An optional precondition on the document. - # The request will fail if this is set and not met by the target document. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::V1::Document] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::V1::Document] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::UpdateDocumentRequest.new - # - # # Call the update_document method. - # result = client.update_document request - # - # # The returned object is of type Google::Cloud::Firestore::V1::Document. - # p result - # - def update_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::UpdateDocumentRequest - - # Converts hash and nil to 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_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.document&.name - header_params["document.name"] = request.document.name - end - - request_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_document.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :update_document, 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 document. - # - # @overload delete_document(request, options = nil) - # Pass arguments to `delete_document` via a request object, either of type - # {::Google::Cloud::Firestore::V1::DeleteDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::DeleteDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_document(name: nil, current_document: nil) - # Pass arguments to `delete_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Document to delete. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # @param current_document [::Google::Cloud::Firestore::V1::Precondition, ::Hash] - # An optional precondition on the document. - # The request will fail if this is set and not met by the target document. - # - # @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/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::DeleteDocumentRequest.new - # - # # Call the delete_document method. - # result = client.delete_document request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::DeleteDocumentRequest - - # Converts hash and nil to 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_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-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_document.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :delete_document, 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 multiple documents. - # - # Documents returned by this method are not guaranteed to be returned in the - # same order that they were requested. - # - # @overload batch_get_documents(request, options = nil) - # Pass arguments to `batch_get_documents` via a request object, either of type - # {::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_get_documents(database: nil, documents: nil, mask: nil, transaction: nil, new_transaction: nil, read_time: nil) - # Pass arguments to `batch_get_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @param documents [::Array<::String>] - # The names of the documents to retrieve. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # The request will fail if any of the document is not a child resource of the - # given `database`. Duplicate names will be elided. - # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] - # The fields to return. If not set, returns all fields. - # - # If a document has a field that is not present in this mask, that field will - # not be returned in the response. - # @param transaction [::String] - # Reads documents in a transaction. - # - # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] - # Starts a new transaction and reads the documents. - # Defaults to a read-only transaction. - # The new transaction ID will be returned as the first response in the - # stream. - # - # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Reads documents as they were at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new - # - # # Call the batch_get_documents method to start streaming. - # output = client.batch_get_documents request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse - # output.each do |current_response| - # p current_response - # end - # - def batch_get_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_get_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - header_params["database"] = request.database - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_get_documents.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_get_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :batch_get_documents, 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 a new transaction. - # - # @overload begin_transaction(request, options = nil) - # Pass arguments to `begin_transaction` via a request object, either of type - # {::Google::Cloud::Firestore::V1::BeginTransactionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::BeginTransactionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload begin_transaction(database: nil, options: nil) - # Pass arguments to `begin_transaction` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @param options [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] - # The options for the transaction. - # Defaults to a read-write transaction. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::V1::BeginTransactionResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::V1::BeginTransactionResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::BeginTransactionRequest.new - # - # # Call the begin_transaction method. - # result = client.begin_transaction request - # - # # The returned object is of type Google::Cloud::Firestore::V1::BeginTransactionResponse. - # p result - # - def begin_transaction request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::BeginTransactionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.begin_transaction.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - header_params["database"] = request.database - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.begin_transaction.timeout, - metadata: metadata, - retry_policy: @config.rpcs.begin_transaction.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :begin_transaction, 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 - - ## - # Commits a transaction, while optionally updating documents. - # - # @overload commit(request, options = nil) - # Pass arguments to `commit` via a request object, either of type - # {::Google::Cloud::Firestore::V1::CommitRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::CommitRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload commit(database: nil, writes: nil, transaction: nil) - # Pass arguments to `commit` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @param writes [::Array<::Google::Cloud::Firestore::V1::Write, ::Hash>] - # The writes to apply. - # - # Always executed atomically and in order. - # @param transaction [::String] - # If set, applies all writes in this transaction, and commits it. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::V1::CommitResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::V1::CommitResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::CommitRequest.new - # - # # Call the commit method. - # result = client.commit request - # - # # The returned object is of type Google::Cloud::Firestore::V1::CommitResponse. - # p result - # - def commit request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::CommitRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.commit.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - header_params["database"] = request.database - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.commit.timeout, - metadata: metadata, - retry_policy: @config.rpcs.commit.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :commit, 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 - - ## - # Rolls back a transaction. - # - # @overload rollback(request, options = nil) - # Pass arguments to `rollback` via a request object, either of type - # {::Google::Cloud::Firestore::V1::RollbackRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::RollbackRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload rollback(database: nil, transaction: nil) - # Pass arguments to `rollback` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @param transaction [::String] - # Required. The transaction to roll back. - # - # @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/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::RollbackRequest.new - # - # # Call the rollback method. - # result = client.rollback request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def rollback request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::RollbackRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.rollback.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - header_params["database"] = request.database - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.rollback.timeout, - metadata: metadata, - retry_policy: @config.rpcs.rollback.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :rollback, 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 - - ## - # Runs a query. - # - # @overload run_query(request, options = nil) - # Pass arguments to `run_query` via a request object, either of type - # {::Google::Cloud::Firestore::V1::RunQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::RunQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_query(parent: nil, structured_query: nil, transaction: nil, new_transaction: nil, read_time: nil, explain_options: nil) - # Pass arguments to `run_query` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. In the format: - # `projects/{project_id}/databases/{database_id}/documents` or - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # For example: - # `projects/my-project/databases/my-database/documents` or - # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - # @param structured_query [::Google::Cloud::Firestore::V1::StructuredQuery, ::Hash] - # A structured query. - # @param transaction [::String] - # Run the query within an already active transaction. - # - # The value here is the opaque transaction ID to execute the query in. - # - # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] - # Starts a new transaction and reads the documents. - # Defaults to a read-only transaction. - # The new transaction ID will be returned as the first response in the - # stream. - # - # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Reads documents as they were at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param explain_options [::Google::Cloud::Firestore::V1::ExplainOptions, ::Hash] - # Optional. Explain options for the query. If set, additional query - # statistics will be returned. If not, only query results will be returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Firestore::V1::RunQueryResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Firestore::V1::RunQueryResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::RunQueryRequest.new - # - # # Call the run_query method to start streaming. - # output = client.run_query request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Firestore::V1::RunQueryResponse - # output.each do |current_response| - # p current_response - # end - # - def run_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::RunQueryRequest - - # Converts hash and nil to 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_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-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.run_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :run_query, 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 - - ## - # Executes a pipeline query. - # - # @overload execute_pipeline(request, options = nil) - # Pass arguments to `execute_pipeline` via a request object, either of type - # {::Google::Cloud::Firestore::V1::ExecutePipelineRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::ExecutePipelineRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload execute_pipeline(database: nil, structured_pipeline: nil, transaction: nil, new_transaction: nil, read_time: nil) - # Pass arguments to `execute_pipeline` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. Database identifier, in the form - # `projects/{project}/databases/{database}`. - # @param structured_pipeline [::Google::Cloud::Firestore::V1::StructuredPipeline, ::Hash] - # A pipelined operation. - # @param transaction [::String] - # Run the query within an already active transaction. - # - # The value here is the opaque transaction ID to execute the query in. - # - # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] - # Execute the pipeline in a new transaction. - # - # The identifier of the newly created transaction will be returned in the - # first response on the stream. This defaults to a read-only transaction. - # - # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Execute the pipeline in a snapshot transaction at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Firestore::V1::ExecutePipelineResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Firestore::V1::ExecutePipelineResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::ExecutePipelineRequest.new - # - # # Call the execute_pipeline method to start streaming. - # output = client.execute_pipeline request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Firestore::V1::ExecutePipelineResponse - # output.each do |current_response| - # p current_response - # end - # - def execute_pipeline request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::ExecutePipelineRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.execute_pipeline.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - regex_match = %r{^projects/(?[^/]+)(?:/.*)?$}.match request.database - if regex_match - header_params["project_id"] = regex_match["project_id".to_s] - end - end - if request.database - regex_match = %r{^projects/[^/]+/databases/(?[^/]+)(?:/.*)?$}.match request.database - if regex_match - header_params["database_id"] = regex_match["database_id".to_s] - end - end - - request_params_header = URI.encode_www_form header_params - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.execute_pipeline.timeout, - metadata: metadata, - retry_policy: @config.rpcs.execute_pipeline.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :execute_pipeline, 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 - - ## - # Runs an aggregation query. - # - # Rather than producing {::Google::Cloud::Firestore::V1::Document Document} results like - # {::Google::Cloud::Firestore::V1::Firestore::Client#run_query Firestore.RunQuery}, this API - # allows running an aggregation to produce a series of - # {::Google::Cloud::Firestore::V1::AggregationResult AggregationResult} server-side. - # - # High-Level Example: - # - # ``` - # -- Return the number of documents in table given a filter. - # SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); - # ``` - # - # @overload run_aggregation_query(request, options = nil) - # Pass arguments to `run_aggregation_query` via a request object, either of type - # {::Google::Cloud::Firestore::V1::RunAggregationQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::RunAggregationQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_aggregation_query(parent: nil, structured_aggregation_query: nil, transaction: nil, new_transaction: nil, read_time: nil, explain_options: nil) - # Pass arguments to `run_aggregation_query` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. In the format: - # `projects/{project_id}/databases/{database_id}/documents` or - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # For example: - # `projects/my-project/databases/my-database/documents` or - # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - # @param structured_aggregation_query [::Google::Cloud::Firestore::V1::StructuredAggregationQuery, ::Hash] - # An aggregation query. - # @param transaction [::String] - # Run the aggregation within an already active transaction. - # - # The value here is the opaque transaction ID to execute the query in. - # - # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] - # Starts a new transaction as part of the query, defaulting to read-only. - # - # The new transaction ID will be returned as the first response in the - # stream. - # - # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Executes the query at the given timestamp. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param explain_options [::Google::Cloud::Firestore::V1::ExplainOptions, ::Hash] - # Optional. Explain options for the query. If set, additional query - # statistics will be returned. If not, only query results will be returned. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Firestore::V1::RunAggregationQueryResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Firestore::V1::RunAggregationQueryResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new - # - # # Call the run_aggregation_query method to start streaming. - # output = client.run_aggregation_query request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse - # output.each do |current_response| - # p current_response - # end - # - def run_aggregation_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::RunAggregationQueryRequest - - # Converts hash and nil to 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_aggregation_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-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.run_aggregation_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.run_aggregation_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :run_aggregation_query, 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 - - ## - # Partitions a query by returning partition cursors that can be used to run - # the query in parallel. The returned partition cursors are split points that - # can be used by RunQuery as starting/end points for the query results. - # - # @overload partition_query(request, options = nil) - # Pass arguments to `partition_query` via a request object, either of type - # {::Google::Cloud::Firestore::V1::PartitionQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::PartitionQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload partition_query(parent: nil, structured_query: nil, partition_count: nil, page_token: nil, page_size: nil, read_time: nil) - # Pass arguments to `partition_query` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. In the format: - # `projects/{project_id}/databases/{database_id}/documents`. - # Document resource names are not supported; only database resource names - # can be specified. - # @param structured_query [::Google::Cloud::Firestore::V1::StructuredQuery, ::Hash] - # A structured query. - # Query must specify collection with all descendants and be ordered by name - # ascending. Other filters, order bys, limits, offsets, and start/end - # cursors are not supported. - # @param partition_count [::Integer] - # The desired maximum number of partition points. - # The partitions may be returned across multiple pages of results. - # The number must be positive. The actual number of partitions - # returned may be fewer. - # - # For example, this may be set to one fewer than the number of parallel - # queries to be run, or in running a data pipeline job, one fewer than the - # number of workers or compute instances available. - # @param page_token [::String] - # The `next_page_token` value returned from a previous call to - # PartitionQuery that may be used to get an additional set of results. - # There are no ordering guarantees between sets of results. Thus, using - # multiple sets of results will require merging the different result sets. - # - # For example, two subsequent calls using a page_token may return: - # - # * cursor B, cursor M, cursor Q - # * cursor A, cursor U, cursor W - # - # To obtain a complete result set ordered with respect to the results of the - # query supplied to PartitionQuery, the results sets should be merged: - # cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - # @param page_size [::Integer] - # The maximum number of partitions to return in this call, subject to - # `partition_count`. - # - # For example, if `partition_count` = 10 and `page_size` = 8, the first call - # to PartitionQuery will return up to 8 partitions and a `next_page_token` - # if more results exist. A second call to PartitionQuery will return up to - # 2 partitions, to complete the total of 10 specified in `partition_count`. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Reads documents as they were at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::V1::Cursor>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Firestore::V1::Cursor>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::PartitionQueryRequest.new - # - # # Call the partition_query method. - # result = client.partition_query request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Firestore::V1::Cursor. - # p item - # end - # - def partition_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::PartitionQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.partition_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-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.partition_query.timeout, - metadata: metadata, - retry_policy: @config.rpcs.partition_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :partition_query, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @firestore_stub, :partition_query, 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 - - ## - # Streams batches of document updates and deletes, in order. This method is - # only available via gRPC or WebChannel (not REST). - # - # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Firestore::V1::WriteRequest, ::Hash>] - # An enumerable of {::Google::Cloud::Firestore::V1::WriteRequest} instances. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Firestore::V1::WriteResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Firestore::V1::WriteResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create an input stream. - # input = Gapic::StreamInput.new - # - # # Call the write method to start streaming. - # output = client.write input - # - # # Send requests on the stream. For each request object, set fields by - # # passing keyword arguments. Be sure to close the stream when done. - # input << Google::Cloud::Firestore::V1::WriteRequest.new - # input << Google::Cloud::Firestore::V1::WriteRequest.new - # input.close - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Firestore::V1::WriteResponse - # output.each do |current_response| - # p current_response - # end - # - def write request, options = nil - unless request.is_a? ::Enumerable - raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum - request = request.to_enum - end - - request = request.lazy.map do |req| - ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Firestore::V1::WriteRequest - end - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.write.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::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.write.timeout, - metadata: metadata, - retry_policy: @config.rpcs.write.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :write, 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 - - ## - # Listens to changes. This method is only available via gRPC or WebChannel - # (not REST). - # - # @param request [::Gapic::StreamInput, ::Enumerable<::Google::Cloud::Firestore::V1::ListenRequest, ::Hash>] - # An enumerable of {::Google::Cloud::Firestore::V1::ListenRequest} instances. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Enumerable<::Google::Cloud::Firestore::V1::ListenResponse>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Enumerable<::Google::Cloud::Firestore::V1::ListenResponse>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create an input stream. - # input = Gapic::StreamInput.new - # - # # Call the listen method to start streaming. - # output = client.listen input - # - # # Send requests on the stream. For each request object, set fields by - # # passing keyword arguments. Be sure to close the stream when done. - # input << Google::Cloud::Firestore::V1::ListenRequest.new - # input << Google::Cloud::Firestore::V1::ListenRequest.new - # input.close - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Firestore::V1::ListenResponse - # output.each do |current_response| - # p current_response - # end - # - def listen request, options = nil - unless request.is_a? ::Enumerable - raise ::ArgumentError, "request must be an Enumerable" unless request.respond_to? :to_enum - request = request.to_enum - end - - request = request.lazy.map do |req| - ::Gapic::Protobuf.coerce req, to: ::Google::Cloud::Firestore::V1::ListenRequest - end - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.listen.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::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.listen.timeout, - metadata: metadata, - retry_policy: @config.rpcs.listen.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :listen, 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 all the collection IDs underneath a document. - # - # @overload list_collection_ids(request, options = nil) - # Pass arguments to `list_collection_ids` via a request object, either of type - # {::Google::Cloud::Firestore::V1::ListCollectionIdsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::ListCollectionIdsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_collection_ids(parent: nil, page_size: nil, page_token: nil, read_time: nil) - # Pass arguments to `list_collection_ids` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 document. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # For example: - # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - # @param page_size [::Integer] - # The maximum number of results to return. - # @param page_token [::String] - # A page token. Must be a value from - # {::Google::Cloud::Firestore::V1::ListCollectionIdsResponse ListCollectionIdsResponse}. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Reads documents as they were at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::V1::ListCollectionIdsResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::V1::ListCollectionIdsResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new - # - # # Call the list_collection_ids method. - # result = client.list_collection_ids request - # - # # The returned object is of type Google::Cloud::Firestore::V1::ListCollectionIdsResponse. - # p result - # - def list_collection_ids request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::ListCollectionIdsRequest - - # Converts hash and nil to 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_collection_ids.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-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_collection_ids.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_collection_ids.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :list_collection_ids, 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 - - ## - # Applies a batch of write operations. - # - # The BatchWrite method does not apply the write operations atomically - # and can apply them out of order. Method does not allow more than one write - # per document. Each write succeeds or fails independently. See the - # {::Google::Cloud::Firestore::V1::BatchWriteResponse BatchWriteResponse} for the - # success status of each write. - # - # If you require an atomically applied set of writes, use - # {::Google::Cloud::Firestore::V1::Firestore::Client#commit Commit} instead. - # - # @overload batch_write(request, options = nil) - # Pass arguments to `batch_write` via a request object, either of type - # {::Google::Cloud::Firestore::V1::BatchWriteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::BatchWriteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload batch_write(database: nil, writes: nil, labels: nil) - # Pass arguments to `batch_write` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @param writes [::Array<::Google::Cloud::Firestore::V1::Write, ::Hash>] - # The writes to apply. - # - # Method does not apply writes atomically and does not guarantee ordering. - # Each write succeeds or fails independently. You cannot write to the same - # document more than once per request. - # @param labels [::Hash{::String => ::String}] - # Labels associated with this batch write. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::V1::BatchWriteResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::V1::BatchWriteResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::BatchWriteRequest.new - # - # # Call the batch_write method. - # result = client.batch_write request - # - # # The returned object is of type Google::Cloud::Firestore::V1::BatchWriteResponse. - # p result - # - def batch_write request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::BatchWriteRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.batch_write.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.database - header_params["database"] = request.database - end - - request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&") - metadata[:"x-goog-request-params"] ||= request_params_header - - options.apply_defaults timeout: @config.rpcs.batch_write.timeout, - metadata: metadata, - retry_policy: @config.rpcs.batch_write.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :batch_write, 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 new document. - # - # @overload create_document(request, options = nil) - # Pass arguments to `create_document` via a request object, either of type - # {::Google::Cloud::Firestore::V1::CreateDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::CreateDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_document(parent: nil, collection_id: nil, document_id: nil, document: nil, mask: nil) - # Pass arguments to `create_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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. For example: - # `projects/{project_id}/databases/{database_id}/documents` or - # `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - # @param collection_id [::String] - # Required. The collection ID, relative to `parent`, to list. For example: - # `chatrooms`. - # @param document_id [::String] - # The client-assigned document ID to use for this document. - # - # Optional. If not specified, an ID will be assigned by the service. - # @param document [::Google::Cloud::Firestore::V1::Document, ::Hash] - # Required. The document to create. `name` must not be set. - # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] - # The fields to return. If not set, returns all fields. - # - # If the document has a field that is not present in this mask, that field - # will not be returned in the response. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Firestore::V1::Document] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Firestore::V1::Document] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::CreateDocumentRequest.new - # - # # Call the create_document method. - # result = client.create_document request - # - # # The returned object is of type Google::Cloud::Firestore::V1::Document. - # p result - # - def create_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::CreateDocumentRequest - - # Converts hash and nil to 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_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION - metadata[:"x-goog-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 - if request.collection_id - header_params["collection_id"] = request.collection_id - end - - request_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_document.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.call_rpc :create_document, 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 Firestore API. - # - # This class represents the configuration for Firestore, - # 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::Firestore::V1::Firestore::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 - # # get_document to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Firestore::V1::Firestore::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_document.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_document.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::Firestore::V1::Firestore::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 = "firestore.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 Firestore 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 `get_document` - # @return [::Gapic::Config::Method] - # - attr_reader :get_document - ## - # RPC-specific configuration for `list_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :list_documents - ## - # RPC-specific configuration for `update_document` - # @return [::Gapic::Config::Method] - # - attr_reader :update_document - ## - # RPC-specific configuration for `delete_document` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_document - ## - # RPC-specific configuration for `batch_get_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_documents - ## - # RPC-specific configuration for `begin_transaction` - # @return [::Gapic::Config::Method] - # - attr_reader :begin_transaction - ## - # RPC-specific configuration for `commit` - # @return [::Gapic::Config::Method] - # - attr_reader :commit - ## - # RPC-specific configuration for `rollback` - # @return [::Gapic::Config::Method] - # - attr_reader :rollback - ## - # RPC-specific configuration for `run_query` - # @return [::Gapic::Config::Method] - # - attr_reader :run_query - ## - # RPC-specific configuration for `execute_pipeline` - # @return [::Gapic::Config::Method] - # - attr_reader :execute_pipeline - ## - # RPC-specific configuration for `run_aggregation_query` - # @return [::Gapic::Config::Method] - # - attr_reader :run_aggregation_query - ## - # RPC-specific configuration for `partition_query` - # @return [::Gapic::Config::Method] - # - attr_reader :partition_query - ## - # RPC-specific configuration for `write` - # @return [::Gapic::Config::Method] - # - attr_reader :write - ## - # RPC-specific configuration for `listen` - # @return [::Gapic::Config::Method] - # - attr_reader :listen - ## - # RPC-specific configuration for `list_collection_ids` - # @return [::Gapic::Config::Method] - # - attr_reader :list_collection_ids - ## - # RPC-specific configuration for `batch_write` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_write - ## - # RPC-specific configuration for `create_document` - # @return [::Gapic::Config::Method] - # - attr_reader :create_document - - # @private - def initialize parent_rpcs = nil - get_document_config = parent_rpcs.get_document if parent_rpcs.respond_to? :get_document - @get_document = ::Gapic::Config::Method.new get_document_config - list_documents_config = parent_rpcs.list_documents if parent_rpcs.respond_to? :list_documents - @list_documents = ::Gapic::Config::Method.new list_documents_config - update_document_config = parent_rpcs.update_document if parent_rpcs.respond_to? :update_document - @update_document = ::Gapic::Config::Method.new update_document_config - delete_document_config = parent_rpcs.delete_document if parent_rpcs.respond_to? :delete_document - @delete_document = ::Gapic::Config::Method.new delete_document_config - batch_get_documents_config = parent_rpcs.batch_get_documents if parent_rpcs.respond_to? :batch_get_documents - @batch_get_documents = ::Gapic::Config::Method.new batch_get_documents_config - begin_transaction_config = parent_rpcs.begin_transaction if parent_rpcs.respond_to? :begin_transaction - @begin_transaction = ::Gapic::Config::Method.new begin_transaction_config - commit_config = parent_rpcs.commit if parent_rpcs.respond_to? :commit - @commit = ::Gapic::Config::Method.new commit_config - rollback_config = parent_rpcs.rollback if parent_rpcs.respond_to? :rollback - @rollback = ::Gapic::Config::Method.new rollback_config - run_query_config = parent_rpcs.run_query if parent_rpcs.respond_to? :run_query - @run_query = ::Gapic::Config::Method.new run_query_config - execute_pipeline_config = parent_rpcs.execute_pipeline if parent_rpcs.respond_to? :execute_pipeline - @execute_pipeline = ::Gapic::Config::Method.new execute_pipeline_config - run_aggregation_query_config = parent_rpcs.run_aggregation_query if parent_rpcs.respond_to? :run_aggregation_query - @run_aggregation_query = ::Gapic::Config::Method.new run_aggregation_query_config - partition_query_config = parent_rpcs.partition_query if parent_rpcs.respond_to? :partition_query - @partition_query = ::Gapic::Config::Method.new partition_query_config - write_config = parent_rpcs.write if parent_rpcs.respond_to? :write - @write = ::Gapic::Config::Method.new write_config - listen_config = parent_rpcs.listen if parent_rpcs.respond_to? :listen - @listen = ::Gapic::Config::Method.new listen_config - list_collection_ids_config = parent_rpcs.list_collection_ids if parent_rpcs.respond_to? :list_collection_ids - @list_collection_ids = ::Gapic::Config::Method.new list_collection_ids_config - batch_write_config = parent_rpcs.batch_write if parent_rpcs.respond_to? :batch_write - @batch_write = ::Gapic::Config::Method.new batch_write_config - create_document_config = parent_rpcs.create_document if parent_rpcs.respond_to? :create_document - @create_document = ::Gapic::Config::Method.new create_document_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/credentials.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/credentials.rb deleted file mode 100644 index b86cdeb94a6f..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Firestore - module V1 - module Firestore - # Credentials for the Firestore API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform", - "https://www.googleapis.com/auth/datastore" - ] - self.env_vars = [ - "FIRESTORE_CREDENTIALS", - "FIRESTORE_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "FIRESTORE_CREDENTIALS_JSON", - "FIRESTORE_KEYFILE_JSON", - "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-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest.rb deleted file mode 100644 index a26df12bed6b..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/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/firestore/v1/version" - -require "google/cloud/firestore/v1/firestore/credentials" -require "google/cloud/firestore/v1/firestore/rest/client" - -module Google - module Cloud - module Firestore - module V1 - ## - # The Cloud Firestore service. - # - # Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL - # document database that simplifies storing, syncing, and querying data for - # your mobile, web, and IoT apps at global scale. Its client libraries provide - # live synchronization and offline support, while its security features and - # integrations with Firebase and Google Cloud Platform accelerate building - # truly serverless apps. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/firestore/v1/firestore/rest" - # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - module Firestore - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/firestore/v1/firestore/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb deleted file mode 100644 index 5daa2a36cf5a..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/client.rb +++ /dev/null @@ -1,2079 +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/firestore/v1/firestore_pb" -require "google/cloud/firestore/v1/firestore/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module Firestore - module V1 - module Firestore - module Rest - ## - # REST client for the Firestore service. - # - # The Cloud Firestore service. - # - # Cloud Firestore is a fast, fully managed, serverless, cloud-native NoSQL - # document database that simplifies storing, syncing, and querying data for - # your mobile, web, and IoT apps at global scale. Its client libraries provide - # live synchronization and offline support, while its security features and - # integrations with Firebase and Google Cloud Platform accelerate building - # truly serverless apps. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "firestore.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :firestore_stub - - ## - # Configure the Firestore Client class. - # - # See {::Google::Cloud::Firestore::V1::Firestore::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all Firestore clients - # ::Google::Cloud::Firestore::V1::Firestore::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", "Firestore", "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.get_document.timeout = 60.0 - default_config.rpcs.get_document.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.list_documents.timeout = 60.0 - default_config.rpcs.list_documents.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.update_document.timeout = 60.0 - default_config.rpcs.update_document.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14] - } - - default_config.rpcs.delete_document.timeout = 60.0 - default_config.rpcs.delete_document.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.batch_get_documents.timeout = 300.0 - default_config.rpcs.batch_get_documents.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.begin_transaction.timeout = 60.0 - default_config.rpcs.begin_transaction.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.commit.timeout = 60.0 - default_config.rpcs.commit.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14] - } - - default_config.rpcs.rollback.timeout = 60.0 - default_config.rpcs.rollback.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.run_query.timeout = 300.0 - default_config.rpcs.run_query.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.execute_pipeline.timeout = 300.0 - default_config.rpcs.execute_pipeline.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.run_aggregation_query.timeout = 300.0 - default_config.rpcs.run_aggregation_query.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.partition_query.timeout = 300.0 - default_config.rpcs.partition_query.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.list_collection_ids.timeout = 60.0 - default_config.rpcs.list_collection_ids.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 13, 4] - } - - default_config.rpcs.batch_write.timeout = 60.0 - default_config.rpcs.batch_write.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14, 10] - } - - default_config.rpcs.create_document.timeout = 60.0 - default_config.rpcs.create_document.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [8, 14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the Firestore 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::Firestore::V1::Firestore::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 - @firestore_stub.universe_domain - end - - ## - # Create a new Firestore REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the Firestore 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 - - @firestore_stub = ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @firestore_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 = @firestore_stub.endpoint - config.universe_domain = @firestore_stub.universe_domain - config.logger = @firestore_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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @firestore_stub.logger - end - - # Service calls - - ## - # Gets a single document. - # - # @overload get_document(request, options = nil) - # Pass arguments to `get_document` via a request object, either of type - # {::Google::Cloud::Firestore::V1::GetDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::GetDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_document(name: nil, mask: nil, transaction: nil, read_time: nil) - # Pass arguments to `get_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Document to get. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] - # The fields to return. If not set, returns all fields. - # - # If the document has a field that is not present in this mask, that field - # will not be returned in the response. - # @param transaction [::String] - # Reads the document in a transaction. - # - # Note: The following parameters are mutually exclusive: `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Reads the version of the document at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::Document] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::Document] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::GetDocumentRequest.new - # - # # Call the get_document method. - # result = client.get_document request - # - # # The returned object is of type Google::Cloud::Firestore::V1::Document. - # p result - # - def get_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::GetDocumentRequest - - # Converts hash and nil to an 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_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_document.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.get_document 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 documents. - # - # @overload list_documents(request, options = nil) - # Pass arguments to `list_documents` via a request object, either of type - # {::Google::Cloud::Firestore::V1::ListDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::ListDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_documents(parent: nil, collection_id: nil, page_size: nil, page_token: nil, order_by: nil, mask: nil, transaction: nil, read_time: nil, show_missing: nil) - # Pass arguments to `list_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. In the format: - # `projects/{project_id}/databases/{database_id}/documents` or - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # - # For example: - # `projects/my-project/databases/my-database/documents` or - # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - # @param collection_id [::String] - # Optional. The collection ID, relative to `parent`, to list. - # - # For example: `chatrooms` or `messages`. - # - # This is optional, and when not provided, Firestore will list documents - # from all collections under the provided `parent`. - # @param page_size [::Integer] - # Optional. The maximum number of documents to return in a single response. - # - # Firestore may return fewer than this value. - # @param page_token [::String] - # Optional. A page token, received from a previous `ListDocuments` response. - # - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters (with the exception of `page_size`) must match the values set - # in the request that generated the page token. - # @param order_by [::String] - # Optional. The optional ordering of the documents to return. - # - # For example: `priority desc, __name__ desc`. - # - # This mirrors the {::Google::Cloud::Firestore::V1::StructuredQuery#order_by `ORDER BY`} - # used in Firestore queries but in a string representation. When absent, - # documents are ordered based on `__name__ ASC`. - # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] - # Optional. The fields to return. If not set, returns all fields. - # - # If a document has a field that is not present in this mask, that field - # will not be returned in the response. - # @param transaction [::String] - # Perform the read as part of an already active transaction. - # - # Note: The following parameters are mutually exclusive: `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Perform the read at the provided time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time`, `transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param show_missing [::Boolean] - # If the list should show missing documents. - # - # A document is missing if it does not exist, but there are sub-documents - # nested underneath it. When true, such missing documents will be returned - # with a key but will not have fields, - # {::Google::Cloud::Firestore::V1::Document#create_time `create_time`}, or - # {::Google::Cloud::Firestore::V1::Document#update_time `update_time`} set. - # - # Requests with `show_missing` may not specify `where` or `order_by`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::V1::Document>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::V1::Document>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::ListDocumentsRequest.new - # - # # Call the list_documents method. - # result = client.list_documents request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Firestore::V1::Document. - # p item - # end - # - def list_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::ListDocumentsRequest - - # Converts hash and nil to an 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_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_documents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.list_documents request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @firestore_stub, :list_documents, "documents", 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 or inserts a document. - # - # @overload update_document(request, options = nil) - # Pass arguments to `update_document` via a request object, either of type - # {::Google::Cloud::Firestore::V1::UpdateDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::UpdateDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_document(document: nil, update_mask: nil, mask: nil, current_document: nil) - # Pass arguments to `update_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param document [::Google::Cloud::Firestore::V1::Document, ::Hash] - # Required. The updated document. - # Creates the document if it does not already exist. - # @param update_mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] - # The fields to update. - # None of the field paths in the mask may contain a reserved name. - # - # If the document exists on the server and has fields not referenced in the - # mask, they are left unchanged. - # Fields referenced in the mask, but not present in the input document, are - # deleted from the document on the server. - # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] - # The fields to return. If not set, returns all fields. - # - # If the document has a field that is not present in this mask, that field - # will not be returned in the response. - # @param current_document [::Google::Cloud::Firestore::V1::Precondition, ::Hash] - # An optional precondition on the document. - # The request will fail if this is set and not met by the target document. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::Document] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::Document] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::UpdateDocumentRequest.new - # - # # Call the update_document method. - # result = client.update_document request - # - # # The returned object is of type Google::Cloud::Firestore::V1::Document. - # p result - # - def update_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::UpdateDocumentRequest - - # Converts hash and nil to an 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_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_document.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.update_document 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 document. - # - # @overload delete_document(request, options = nil) - # Pass arguments to `delete_document` via a request object, either of type - # {::Google::Cloud::Firestore::V1::DeleteDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::DeleteDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_document(name: nil, current_document: nil) - # Pass arguments to `delete_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. The resource name of the Document to delete. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # @param current_document [::Google::Cloud::Firestore::V1::Precondition, ::Hash] - # An optional precondition on the document. - # The request will fail if this is set and not met by the target document. - # @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/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::DeleteDocumentRequest.new - # - # # Call the delete_document method. - # result = client.delete_document request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def delete_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::DeleteDocumentRequest - - # Converts hash and nil to an 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_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_document.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.delete_document 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 multiple documents. - # - # Documents returned by this method are not guaranteed to be returned in the - # same order that they were requested. - # - # @overload batch_get_documents(request, options = nil) - # Pass arguments to `batch_get_documents` via a request object, either of type - # {::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_get_documents(database: nil, documents: nil, mask: nil, transaction: nil, new_transaction: nil, read_time: nil) - # Pass arguments to `batch_get_documents` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @param documents [::Array<::String>] - # The names of the documents to retrieve. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # The request will fail if any of the document is not a child resource of the - # given `database`. Duplicate names will be elided. - # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] - # The fields to return. If not set, returns all fields. - # - # If a document has a field that is not present in this mask, that field will - # not be returned in the response. - # @param transaction [::String] - # Reads documents in a transaction. - # - # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] - # Starts a new transaction and reads the documents. - # Defaults to a read-only transaction. - # The new transaction ID will be returned as the first response in the - # stream. - # - # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Reads documents as they were at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @return [::Enumerable<::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new - # - # # Call the batch_get_documents method to start streaming. - # output = client.batch_get_documents request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse - # output.each do |current_response| - # p current_response - # end - # - def batch_get_documents request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_get_documents.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_get_documents.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_get_documents.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - ::Gapic::Rest::ServerStream.new( - ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse, - ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q| - @firestore_stub.batch_get_documents request, options do |chunk| - in_q.deq - out_q.enq chunk - end - end - ) - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Starts a new transaction. - # - # @overload begin_transaction(request, options = nil) - # Pass arguments to `begin_transaction` via a request object, either of type - # {::Google::Cloud::Firestore::V1::BeginTransactionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::BeginTransactionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload begin_transaction(database: nil, options: nil) - # Pass arguments to `begin_transaction` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @param options [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] - # The options for the transaction. - # Defaults to a read-write transaction. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::BeginTransactionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::BeginTransactionResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::BeginTransactionRequest.new - # - # # Call the begin_transaction method. - # result = client.begin_transaction request - # - # # The returned object is of type Google::Cloud::Firestore::V1::BeginTransactionResponse. - # p result - # - def begin_transaction request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::BeginTransactionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.begin_transaction.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.begin_transaction.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.begin_transaction.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.begin_transaction 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 - - ## - # Commits a transaction, while optionally updating documents. - # - # @overload commit(request, options = nil) - # Pass arguments to `commit` via a request object, either of type - # {::Google::Cloud::Firestore::V1::CommitRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::CommitRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload commit(database: nil, writes: nil, transaction: nil) - # Pass arguments to `commit` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @param writes [::Array<::Google::Cloud::Firestore::V1::Write, ::Hash>] - # The writes to apply. - # - # Always executed atomically and in order. - # @param transaction [::String] - # If set, applies all writes in this transaction, and commits it. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::CommitResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::CommitResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::CommitRequest.new - # - # # Call the commit method. - # result = client.commit request - # - # # The returned object is of type Google::Cloud::Firestore::V1::CommitResponse. - # p result - # - def commit request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::CommitRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.commit.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.commit.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.commit.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.commit 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 - - ## - # Rolls back a transaction. - # - # @overload rollback(request, options = nil) - # Pass arguments to `rollback` via a request object, either of type - # {::Google::Cloud::Firestore::V1::RollbackRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::RollbackRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload rollback(database: nil, transaction: nil) - # Pass arguments to `rollback` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @param transaction [::String] - # Required. The transaction to roll back. - # @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/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::RollbackRequest.new - # - # # Call the rollback method. - # result = client.rollback request - # - # # The returned object is of type Google::Protobuf::Empty. - # p result - # - def rollback request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::RollbackRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.rollback.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.rollback.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.rollback.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.rollback 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 - - ## - # Runs a query. - # - # @overload run_query(request, options = nil) - # Pass arguments to `run_query` via a request object, either of type - # {::Google::Cloud::Firestore::V1::RunQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::RunQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_query(parent: nil, structured_query: nil, transaction: nil, new_transaction: nil, read_time: nil, explain_options: nil) - # Pass arguments to `run_query` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. In the format: - # `projects/{project_id}/databases/{database_id}/documents` or - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # For example: - # `projects/my-project/databases/my-database/documents` or - # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - # @param structured_query [::Google::Cloud::Firestore::V1::StructuredQuery, ::Hash] - # A structured query. - # @param transaction [::String] - # Run the query within an already active transaction. - # - # The value here is the opaque transaction ID to execute the query in. - # - # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] - # Starts a new transaction and reads the documents. - # Defaults to a read-only transaction. - # The new transaction ID will be returned as the first response in the - # stream. - # - # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Reads documents as they were at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param explain_options [::Google::Cloud::Firestore::V1::ExplainOptions, ::Hash] - # Optional. Explain options for the query. If set, additional query - # statistics will be returned. If not, only query results will be returned. - # @return [::Enumerable<::Google::Cloud::Firestore::V1::RunQueryResponse>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::RunQueryRequest.new - # - # # Call the run_query method to start streaming. - # output = client.run_query request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Firestore::V1::RunQueryResponse - # output.each do |current_response| - # p current_response - # end - # - def run_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::RunQueryRequest - - # Converts hash and nil to an 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_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_query.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - ::Gapic::Rest::ServerStream.new( - ::Google::Cloud::Firestore::V1::RunQueryResponse, - ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q| - @firestore_stub.run_query request, options do |chunk| - in_q.deq - out_q.enq chunk - end - end - ) - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Executes a pipeline query. - # - # @overload execute_pipeline(request, options = nil) - # Pass arguments to `execute_pipeline` via a request object, either of type - # {::Google::Cloud::Firestore::V1::ExecutePipelineRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::ExecutePipelineRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload execute_pipeline(database: nil, structured_pipeline: nil, transaction: nil, new_transaction: nil, read_time: nil) - # Pass arguments to `execute_pipeline` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. Database identifier, in the form - # `projects/{project}/databases/{database}`. - # @param structured_pipeline [::Google::Cloud::Firestore::V1::StructuredPipeline, ::Hash] - # A pipelined operation. - # @param transaction [::String] - # Run the query within an already active transaction. - # - # The value here is the opaque transaction ID to execute the query in. - # - # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] - # Execute the pipeline in a new transaction. - # - # The identifier of the newly created transaction will be returned in the - # first response on the stream. This defaults to a read-only transaction. - # - # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Execute the pipeline in a snapshot transaction at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @return [::Enumerable<::Google::Cloud::Firestore::V1::ExecutePipelineResponse>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::ExecutePipelineRequest.new - # - # # Call the execute_pipeline method to start streaming. - # output = client.execute_pipeline request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Firestore::V1::ExecutePipelineResponse - # output.each do |current_response| - # p current_response - # end - # - def execute_pipeline request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::ExecutePipelineRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.execute_pipeline.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.execute_pipeline.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.execute_pipeline.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - ::Gapic::Rest::ServerStream.new( - ::Google::Cloud::Firestore::V1::ExecutePipelineResponse, - ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q| - @firestore_stub.execute_pipeline request, options do |chunk| - in_q.deq - out_q.enq chunk - end - end - ) - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Runs an aggregation query. - # - # Rather than producing {::Google::Cloud::Firestore::V1::Document Document} results like - # {::Google::Cloud::Firestore::V1::Firestore::Rest::Client#run_query Firestore.RunQuery}, this API - # allows running an aggregation to produce a series of - # {::Google::Cloud::Firestore::V1::AggregationResult AggregationResult} server-side. - # - # High-Level Example: - # - # ``` - # -- Return the number of documents in table given a filter. - # SELECT COUNT(*) FROM ( SELECT * FROM k where a = true ); - # ``` - # - # @overload run_aggregation_query(request, options = nil) - # Pass arguments to `run_aggregation_query` via a request object, either of type - # {::Google::Cloud::Firestore::V1::RunAggregationQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::RunAggregationQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_aggregation_query(parent: nil, structured_aggregation_query: nil, transaction: nil, new_transaction: nil, read_time: nil, explain_options: nil) - # Pass arguments to `run_aggregation_query` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. In the format: - # `projects/{project_id}/databases/{database_id}/documents` or - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # For example: - # `projects/my-project/databases/my-database/documents` or - # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - # @param structured_aggregation_query [::Google::Cloud::Firestore::V1::StructuredAggregationQuery, ::Hash] - # An aggregation query. - # @param transaction [::String] - # Run the aggregation within an already active transaction. - # - # The value here is the opaque transaction ID to execute the query in. - # - # Note: The following parameters are mutually exclusive: `transaction`, `new_transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param new_transaction [::Google::Cloud::Firestore::V1::TransactionOptions, ::Hash] - # Starts a new transaction as part of the query, defaulting to read-only. - # - # The new transaction ID will be returned as the first response in the - # stream. - # - # Note: The following parameters are mutually exclusive: `new_transaction`, `transaction`, `read_time`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Executes the query at the given timestamp. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following parameters are mutually exclusive: `read_time`, `transaction`, `new_transaction`. At most one of these parameters can be set. If more than one is set, only one will be used, and it is not defined which one. - # @param explain_options [::Google::Cloud::Firestore::V1::ExplainOptions, ::Hash] - # Optional. Explain options for the query. If set, additional query - # statistics will be returned. If not, only query results will be returned. - # @return [::Enumerable<::Google::Cloud::Firestore::V1::RunAggregationQueryResponse>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new - # - # # Call the run_aggregation_query method to start streaming. - # output = client.run_aggregation_query request - # - # # The returned object is a streamed enumerable yielding elements of type - # # ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse - # output.each do |current_response| - # p current_response - # end - # - def run_aggregation_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::RunAggregationQueryRequest - - # Converts hash and nil to an 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_aggregation_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_aggregation_query.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.run_aggregation_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - ::Gapic::Rest::ServerStream.new( - ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse, - ::Gapic::Rest::ThreadedEnumerator.new do |in_q, out_q| - @firestore_stub.run_aggregation_query request, options do |chunk| - in_q.deq - out_q.enq chunk - end - end - ) - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Partitions a query by returning partition cursors that can be used to run - # the query in parallel. The returned partition cursors are split points that - # can be used by RunQuery as starting/end points for the query results. - # - # @overload partition_query(request, options = nil) - # Pass arguments to `partition_query` via a request object, either of type - # {::Google::Cloud::Firestore::V1::PartitionQueryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::PartitionQueryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload partition_query(parent: nil, structured_query: nil, partition_count: nil, page_token: nil, page_size: nil, read_time: nil) - # Pass arguments to `partition_query` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 name. In the format: - # `projects/{project_id}/databases/{database_id}/documents`. - # Document resource names are not supported; only database resource names - # can be specified. - # @param structured_query [::Google::Cloud::Firestore::V1::StructuredQuery, ::Hash] - # A structured query. - # Query must specify collection with all descendants and be ordered by name - # ascending. Other filters, order bys, limits, offsets, and start/end - # cursors are not supported. - # @param partition_count [::Integer] - # The desired maximum number of partition points. - # The partitions may be returned across multiple pages of results. - # The number must be positive. The actual number of partitions - # returned may be fewer. - # - # For example, this may be set to one fewer than the number of parallel - # queries to be run, or in running a data pipeline job, one fewer than the - # number of workers or compute instances available. - # @param page_token [::String] - # The `next_page_token` value returned from a previous call to - # PartitionQuery that may be used to get an additional set of results. - # There are no ordering guarantees between sets of results. Thus, using - # multiple sets of results will require merging the different result sets. - # - # For example, two subsequent calls using a page_token may return: - # - # * cursor B, cursor M, cursor Q - # * cursor A, cursor U, cursor W - # - # To obtain a complete result set ordered with respect to the results of the - # query supplied to PartitionQuery, the results sets should be merged: - # cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - # @param page_size [::Integer] - # The maximum number of partitions to return in this call, subject to - # `partition_count`. - # - # For example, if `partition_count` = 10 and `page_size` = 8, the first call - # to PartitionQuery will return up to 8 partitions and a `next_page_token` - # if more results exist. A second call to PartitionQuery will return up to - # 2 partitions, to complete the total of 10 specified in `partition_count`. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Reads documents as they were at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::V1::Cursor>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Firestore::V1::Cursor>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::PartitionQueryRequest.new - # - # # Call the partition_query method. - # result = client.partition_query request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Firestore::V1::Cursor. - # p item - # end - # - def partition_query request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::PartitionQueryRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.partition_query.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.partition_query.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.partition_query.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.partition_query request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @firestore_stub, :partition_query, "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 - - ## - # Lists all the collection IDs underneath a document. - # - # @overload list_collection_ids(request, options = nil) - # Pass arguments to `list_collection_ids` via a request object, either of type - # {::Google::Cloud::Firestore::V1::ListCollectionIdsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::ListCollectionIdsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_collection_ids(parent: nil, page_size: nil, page_token: nil, read_time: nil) - # Pass arguments to `list_collection_ids` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 document. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # For example: - # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - # @param page_size [::Integer] - # The maximum number of results to return. - # @param page_token [::String] - # A page token. Must be a value from - # {::Google::Cloud::Firestore::V1::ListCollectionIdsResponse ListCollectionIdsResponse}. - # @param read_time [::Google::Protobuf::Timestamp, ::Hash] - # Reads documents as they were at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::ListCollectionIdsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::ListCollectionIdsResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new - # - # # Call the list_collection_ids method. - # result = client.list_collection_ids request - # - # # The returned object is of type Google::Cloud::Firestore::V1::ListCollectionIdsResponse. - # p result - # - def list_collection_ids request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::ListCollectionIdsRequest - - # Converts hash and nil to an 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_collection_ids.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_collection_ids.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_collection_ids.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.list_collection_ids 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 - - ## - # Applies a batch of write operations. - # - # The BatchWrite method does not apply the write operations atomically - # and can apply them out of order. Method does not allow more than one write - # per document. Each write succeeds or fails independently. See the - # {::Google::Cloud::Firestore::V1::BatchWriteResponse BatchWriteResponse} for the - # success status of each write. - # - # If you require an atomically applied set of writes, use - # {::Google::Cloud::Firestore::V1::Firestore::Rest::Client#commit Commit} instead. - # - # @overload batch_write(request, options = nil) - # Pass arguments to `batch_write` via a request object, either of type - # {::Google::Cloud::Firestore::V1::BatchWriteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::BatchWriteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload batch_write(database: nil, writes: nil, labels: nil) - # Pass arguments to `batch_write` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param database [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @param writes [::Array<::Google::Cloud::Firestore::V1::Write, ::Hash>] - # The writes to apply. - # - # Method does not apply writes atomically and does not guarantee ordering. - # Each write succeeds or fails independently. You cannot write to the same - # document more than once per request. - # @param labels [::Hash{::String => ::String}] - # Labels associated with this batch write. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::BatchWriteResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::BatchWriteResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::BatchWriteRequest.new - # - # # Call the batch_write method. - # result = client.batch_write request - # - # # The returned object is of type Google::Cloud::Firestore::V1::BatchWriteResponse. - # p result - # - def batch_write request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::BatchWriteRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.batch_write.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.batch_write.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.batch_write.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.batch_write 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 new document. - # - # @overload create_document(request, options = nil) - # Pass arguments to `create_document` via a request object, either of type - # {::Google::Cloud::Firestore::V1::CreateDocumentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Firestore::V1::CreateDocumentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_document(parent: nil, collection_id: nil, document_id: nil, document: nil, mask: nil) - # Pass arguments to `create_document` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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. For example: - # `projects/{project_id}/databases/{database_id}/documents` or - # `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - # @param collection_id [::String] - # Required. The collection ID, relative to `parent`, to list. For example: - # `chatrooms`. - # @param document_id [::String] - # The client-assigned document ID to use for this document. - # - # Optional. If not specified, an ID will be assigned by the service. - # @param document [::Google::Cloud::Firestore::V1::Document, ::Hash] - # Required. The document to create. `name` must not be set. - # @param mask [::Google::Cloud::Firestore::V1::DocumentMask, ::Hash] - # The fields to return. If not set, returns all fields. - # - # If the document has a field that is not present in this mask, that field - # will not be returned in the response. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::Document] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::Document] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/firestore/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Firestore::V1::CreateDocumentRequest.new - # - # # Call the create_document method. - # result = client.create_document request - # - # # The returned object is of type Google::Cloud::Firestore::V1::Document. - # p result - # - def create_document request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Firestore::V1::CreateDocumentRequest - - # Converts hash and nil to an 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_document.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Firestore::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_document.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_document.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @firestore_stub.create_document 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 Firestore REST API. - # - # This class represents the configuration for Firestore 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::Firestore::V1::Firestore::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 - # # get_document to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_document.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_document.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 = "firestore.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 Firestore 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 `get_document` - # @return [::Gapic::Config::Method] - # - attr_reader :get_document - ## - # RPC-specific configuration for `list_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :list_documents - ## - # RPC-specific configuration for `update_document` - # @return [::Gapic::Config::Method] - # - attr_reader :update_document - ## - # RPC-specific configuration for `delete_document` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_document - ## - # RPC-specific configuration for `batch_get_documents` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_get_documents - ## - # RPC-specific configuration for `begin_transaction` - # @return [::Gapic::Config::Method] - # - attr_reader :begin_transaction - ## - # RPC-specific configuration for `commit` - # @return [::Gapic::Config::Method] - # - attr_reader :commit - ## - # RPC-specific configuration for `rollback` - # @return [::Gapic::Config::Method] - # - attr_reader :rollback - ## - # RPC-specific configuration for `run_query` - # @return [::Gapic::Config::Method] - # - attr_reader :run_query - ## - # RPC-specific configuration for `execute_pipeline` - # @return [::Gapic::Config::Method] - # - attr_reader :execute_pipeline - ## - # RPC-specific configuration for `run_aggregation_query` - # @return [::Gapic::Config::Method] - # - attr_reader :run_aggregation_query - ## - # RPC-specific configuration for `partition_query` - # @return [::Gapic::Config::Method] - # - attr_reader :partition_query - ## - # RPC-specific configuration for `list_collection_ids` - # @return [::Gapic::Config::Method] - # - attr_reader :list_collection_ids - ## - # RPC-specific configuration for `batch_write` - # @return [::Gapic::Config::Method] - # - attr_reader :batch_write - ## - # RPC-specific configuration for `create_document` - # @return [::Gapic::Config::Method] - # - attr_reader :create_document - - # @private - def initialize parent_rpcs = nil - get_document_config = parent_rpcs.get_document if parent_rpcs.respond_to? :get_document - @get_document = ::Gapic::Config::Method.new get_document_config - list_documents_config = parent_rpcs.list_documents if parent_rpcs.respond_to? :list_documents - @list_documents = ::Gapic::Config::Method.new list_documents_config - update_document_config = parent_rpcs.update_document if parent_rpcs.respond_to? :update_document - @update_document = ::Gapic::Config::Method.new update_document_config - delete_document_config = parent_rpcs.delete_document if parent_rpcs.respond_to? :delete_document - @delete_document = ::Gapic::Config::Method.new delete_document_config - batch_get_documents_config = parent_rpcs.batch_get_documents if parent_rpcs.respond_to? :batch_get_documents - @batch_get_documents = ::Gapic::Config::Method.new batch_get_documents_config - begin_transaction_config = parent_rpcs.begin_transaction if parent_rpcs.respond_to? :begin_transaction - @begin_transaction = ::Gapic::Config::Method.new begin_transaction_config - commit_config = parent_rpcs.commit if parent_rpcs.respond_to? :commit - @commit = ::Gapic::Config::Method.new commit_config - rollback_config = parent_rpcs.rollback if parent_rpcs.respond_to? :rollback - @rollback = ::Gapic::Config::Method.new rollback_config - run_query_config = parent_rpcs.run_query if parent_rpcs.respond_to? :run_query - @run_query = ::Gapic::Config::Method.new run_query_config - execute_pipeline_config = parent_rpcs.execute_pipeline if parent_rpcs.respond_to? :execute_pipeline - @execute_pipeline = ::Gapic::Config::Method.new execute_pipeline_config - run_aggregation_query_config = parent_rpcs.run_aggregation_query if parent_rpcs.respond_to? :run_aggregation_query - @run_aggregation_query = ::Gapic::Config::Method.new run_aggregation_query_config - partition_query_config = parent_rpcs.partition_query if parent_rpcs.respond_to? :partition_query - @partition_query = ::Gapic::Config::Method.new partition_query_config - list_collection_ids_config = parent_rpcs.list_collection_ids if parent_rpcs.respond_to? :list_collection_ids - @list_collection_ids = ::Gapic::Config::Method.new list_collection_ids_config - batch_write_config = parent_rpcs.batch_write if parent_rpcs.respond_to? :batch_write - @batch_write = ::Gapic::Config::Method.new batch_write_config - create_document_config = parent_rpcs.create_document if parent_rpcs.respond_to? :create_document - @create_document = ::Gapic::Config::Method.new create_document_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/service_stub.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/service_stub.rb deleted file mode 100644 index 0cac6fe2306c..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/firestore/rest/service_stub.rb +++ /dev/null @@ -1,1026 +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/firestore/v1/firestore_pb" - -module Google - module Cloud - module Firestore - module V1 - module Firestore - module Rest - ## - # REST service stub for the Firestore 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 get_document REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::GetDocumentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::Document] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::Document] - # A result object deserialized from the server's reply - def get_document request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_document_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_document", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::V1::Document.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_documents REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::ListDocumentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::ListDocumentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::ListDocumentsResponse] - # A result object deserialized from the server's reply - def list_documents request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_documents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_documents", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::V1::ListDocumentsResponse.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_document REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::UpdateDocumentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::Document] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::Document] - # A result object deserialized from the server's reply - def update_document request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_document_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_document", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::V1::Document.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_document REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::DeleteDocumentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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_document request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_document_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_document", - 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 batch_get_documents REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yieldparam chunk [::String] The chunk of data received during server streaming. - # - # @return [::Gapic::Rest::TransportOperation] - def batch_get_documents(request_pb, options = nil, &) - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_get_documents_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_get_documents", - options: options, - is_server_streaming: true, - & - ) - ::Gapic::Rest::TransportOperation.new response - end - - ## - # Baseline implementation for the begin_transaction REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::BeginTransactionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::BeginTransactionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::BeginTransactionResponse] - # A result object deserialized from the server's reply - def begin_transaction request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_begin_transaction_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "begin_transaction", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::V1::BeginTransactionResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the commit REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::CommitRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::CommitResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::CommitResponse] - # A result object deserialized from the server's reply - def commit request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_commit_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "commit", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::V1::CommitResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the rollback REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::RollbackRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default 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 rollback request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_rollback_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "rollback", - 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 run_query REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::RunQueryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yieldparam chunk [::String] The chunk of data received during server streaming. - # - # @return [::Gapic::Rest::TransportOperation] - def run_query(request_pb, options = nil, &) - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_query_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_query", - options: options, - is_server_streaming: true, - & - ) - ::Gapic::Rest::TransportOperation.new response - end - - ## - # Baseline implementation for the execute_pipeline REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::ExecutePipelineRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yieldparam chunk [::String] The chunk of data received during server streaming. - # - # @return [::Gapic::Rest::TransportOperation] - def execute_pipeline(request_pb, options = nil, &) - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_execute_pipeline_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "execute_pipeline", - options: options, - is_server_streaming: true, - & - ) - ::Gapic::Rest::TransportOperation.new response - end - - ## - # Baseline implementation for the run_aggregation_query REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::RunAggregationQueryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yieldparam chunk [::String] The chunk of data received during server streaming. - # - # @return [::Gapic::Rest::TransportOperation] - def run_aggregation_query(request_pb, options = nil, &) - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_run_aggregation_query_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_aggregation_query", - options: options, - is_server_streaming: true, - & - ) - ::Gapic::Rest::TransportOperation.new response - end - - ## - # Baseline implementation for the partition_query REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::PartitionQueryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::PartitionQueryResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::PartitionQueryResponse] - # A result object deserialized from the server's reply - def partition_query request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_partition_query_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "partition_query", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::V1::PartitionQueryResponse.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_collection_ids REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::ListCollectionIdsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::ListCollectionIdsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::ListCollectionIdsResponse] - # A result object deserialized from the server's reply - def list_collection_ids request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_collection_ids_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_collection_ids", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::V1::ListCollectionIdsResponse.decode_json response.body, ignore_unknown_fields: true - catch :response do - yield result, operation if block_given? - result - end - end - - ## - # Baseline implementation for the batch_write REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::BatchWriteRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::BatchWriteResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::BatchWriteResponse] - # A result object deserialized from the server's reply - def batch_write request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_batch_write_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "batch_write", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::V1::BatchWriteResponse.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_document REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::CreateDocumentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Firestore::V1::Document] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Firestore::V1::Document] - # A result object deserialized from the server's reply - def create_document request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_document_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_document", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Firestore::V1::Document.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 get_document REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::GetDocumentRequest] - # 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_document_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_documents REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::ListDocumentsRequest] - # 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_documents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/{collection_id}", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true], - ["collection_id", %r{^[^/]+/?$}, false] - ] - ) - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/{collection_id}", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/?$}, false], - ["collection_id", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_document REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::UpdateDocumentRequest] - # 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_document_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{document.name}", - body: "document", - matches: [ - ["document.name", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_document REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::DeleteDocumentRequest] - # 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_document_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_get_documents REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_get_documents_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{database}/documents:batchGet", - body: "*", - matches: [ - ["database", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the begin_transaction REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::BeginTransactionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_begin_transaction_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{database}/documents:beginTransaction", - body: "*", - matches: [ - ["database", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the commit REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::CommitRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_commit_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{database}/documents:commit", - body: "*", - matches: [ - ["database", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the rollback REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::RollbackRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_rollback_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{database}/documents:rollback", - body: "*", - matches: [ - ["database", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_query REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::RunQueryRequest] - # 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_query_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:runQuery", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:runQuery", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the execute_pipeline REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::ExecutePipelineRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_execute_pipeline_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{database}/documents:executePipeline", - body: "*", - matches: [ - ["database", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the run_aggregation_query REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::RunAggregationQueryRequest] - # 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_aggregation_query_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:runAggregationQuery", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:runAggregationQuery", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the partition_query REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::PartitionQueryRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_partition_query_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:partitionQuery", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:partitionQuery", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_collection_ids REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::ListCollectionIdsRequest] - # 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_collection_ids_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:listCollectionIds", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/?$}, false] - ] - ) - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}:listCollectionIds", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/documents/[^/]+(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the batch_write REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::BatchWriteRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_batch_write_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{database}/documents:batchWrite", - body: "*", - matches: [ - ["database", %r{^projects/[^/]+/databases/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_document REST call - # - # @param request_pb [::Google::Cloud::Firestore::V1::CreateDocumentRequest] - # 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_document_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/{collection_id}", - body: "document", - matches: [ - ["parent", %r{^projects/[^/]+/databases/[^/]+/documents(?:/.*)?$}, true], - ["collection_id", %r{^[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/rest.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/rest.rb deleted file mode 100644 index 8498e99136a4..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/rest.rb +++ /dev/null @@ -1,37 +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/firestore/v1/firestore/rest" -require "google/cloud/firestore/v1/version" - -module Google - module Cloud - module Firestore - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/firestore/v1/rest" - # client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/version.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/v1/version.rb deleted file mode 100644 index 6398d674ba15..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/cloud/firestore/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 Firestore - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/aggregation_result_pb.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/aggregation_result_pb.rb deleted file mode 100644 index 910e6f9fe80f..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/aggregation_result_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/v1/aggregation_result.proto - -require 'google/protobuf' - -require 'google/firestore/v1/document_pb' - - -descriptor_data = "\n,google/firestore/v1/aggregation_result.proto\x12\x13google.firestore.v1\x1a\"google/firestore/v1/document.proto\"\xbe\x01\n\x11\x41ggregationResult\x12U\n\x10\x61ggregate_fields\x18\x02 \x03(\x0b\x32;.google.firestore.v1.AggregationResult.AggregateFieldsEntry\x1aR\n\x14\x41ggregateFieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.Value:\x02\x38\x01\x42\xce\x01\n\x17\x63om.google.firestore.v1B\x16\x41ggregationResultProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xa2\x02\x04GCFS\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.firestore.v1.Value", "google/firestore/v1/document.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module V1 - AggregationResult = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.AggregationResult").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/bloom_filter_pb.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/bloom_filter_pb.rb deleted file mode 100644 index a633a3ae5e40..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/bloom_filter_pb.rb +++ /dev/null @@ -1,43 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/v1/bloom_filter.proto - -require 'google/protobuf' - - -descriptor_data = "\n&google/firestore/v1/bloom_filter.proto\x12\x13google.firestore.v1\".\n\x0b\x42itSequence\x12\x0e\n\x06\x62itmap\x18\x01 \x01(\x0c\x12\x0f\n\x07padding\x18\x02 \x01(\x05\"Q\n\x0b\x42loomFilter\x12.\n\x04\x62its\x18\x01 \x01(\x0b\x32 .google.firestore.v1.BitSequence\x12\x12\n\nhash_count\x18\x02 \x01(\x05\x42\xc8\x01\n\x17\x63om.google.firestore.v1B\x10\x42loomFilterProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xa2\x02\x04GCFS\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module V1 - BitSequence = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.BitSequence").msgclass - BloomFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.BloomFilter").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/common_pb.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/common_pb.rb deleted file mode 100644 index e8950cc89c76..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/common_pb.rb +++ /dev/null @@ -1,49 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/v1/common.proto - -require 'google/protobuf' - -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n google/firestore/v1/common.proto\x12\x13google.firestore.v1\x1a\x1fgoogle/protobuf/timestamp.proto\"#\n\x0c\x44ocumentMask\x12\x13\n\x0b\x66ield_paths\x18\x01 \x03(\t\"e\n\x0cPrecondition\x12\x10\n\x06\x65xists\x18\x01 \x01(\x08H\x00\x12\x31\n\x0bupdate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x10\n\x0e\x63ondition_type\"\xa9\x02\n\x12TransactionOptions\x12\x45\n\tread_only\x18\x02 \x01(\x0b\x32\x30.google.firestore.v1.TransactionOptions.ReadOnlyH\x00\x12G\n\nread_write\x18\x03 \x01(\x0b\x32\x31.google.firestore.v1.TransactionOptions.ReadWriteH\x00\x1a&\n\tReadWrite\x12\x19\n\x11retry_transaction\x18\x01 \x01(\x0c\x1aS\n\x08ReadOnly\x12/\n\tread_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x16\n\x14\x63onsistency_selectorB\x06\n\x04modeB\xc3\x01\n\x17\x63om.google.firestore.v1B\x0b\x43ommonProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xa2\x02\x04GCFS\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module V1 - DocumentMask = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.DocumentMask").msgclass - Precondition = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Precondition").msgclass - TransactionOptions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.TransactionOptions").msgclass - TransactionOptions::ReadWrite = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.TransactionOptions.ReadWrite").msgclass - TransactionOptions::ReadOnly = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.TransactionOptions.ReadOnly").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/document_pb.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/document_pb.rb deleted file mode 100644 index b8d6b31b5d00..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/document_pb.rb +++ /dev/null @@ -1,55 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/v1/document.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/protobuf/struct_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/latlng_pb' - - -descriptor_data = "\n\"google/firestore/v1/document.proto\x12\x13google.firestore.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x18google/type/latlng.proto\"\x80\x02\n\x08\x44ocument\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x39\n\x06\x66ields\x18\x02 \x03(\x0b\x32).google.firestore.v1.Document.FieldsEntry\x12/\n\x0b\x63reate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12/\n\x0bupdate_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x1aI\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.Value:\x02\x38\x01\"\xc1\x04\n\x05Value\x12\x30\n\nnull_value\x18\x0b \x01(\x0e\x32\x1a.google.protobuf.NullValueH\x00\x12\x17\n\rboolean_value\x18\x01 \x01(\x08H\x00\x12\x17\n\rinteger_value\x18\x02 \x01(\x03H\x00\x12\x16\n\x0c\x64ouble_value\x18\x03 \x01(\x01H\x00\x12\x35\n\x0ftimestamp_value\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x16\n\x0cstring_value\x18\x11 \x01(\tH\x00\x12\x15\n\x0b\x62ytes_value\x18\x12 \x01(\x0cH\x00\x12\x19\n\x0freference_value\x18\x05 \x01(\tH\x00\x12.\n\x0fgeo_point_value\x18\x08 \x01(\x0b\x32\x13.google.type.LatLngH\x00\x12\x36\n\x0b\x61rray_value\x18\t \x01(\x0b\x32\x1f.google.firestore.v1.ArrayValueH\x00\x12\x32\n\tmap_value\x18\x06 \x01(\x0b\x32\x1d.google.firestore.v1.MapValueH\x00\x12\x1f\n\x15\x66ield_reference_value\x18\x13 \x01(\tH\x00\x12\x37\n\x0e\x66unction_value\x18\x14 \x01(\x0b\x32\x1d.google.firestore.v1.FunctionH\x00\x12\x37\n\x0epipeline_value\x18\x15 \x01(\x0b\x32\x1d.google.firestore.v1.PipelineH\x00\x42\x0c\n\nvalue_type\"8\n\nArrayValue\x12*\n\x06values\x18\x01 \x03(\x0b\x32\x1a.google.firestore.v1.Value\"\x90\x01\n\x08MapValue\x12\x39\n\x06\x66ields\x18\x01 \x03(\x0b\x32).google.firestore.v1.MapValue.FieldsEntry\x1aI\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.Value:\x02\x38\x01\"\xda\x01\n\x08\x46unction\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12-\n\x04\x61rgs\x18\x02 \x03(\x0b\x32\x1a.google.firestore.v1.ValueB\x03\xe0\x41\x01\x12@\n\x07options\x18\x03 \x03(\x0b\x32*.google.firestore.v1.Function.OptionsEntryB\x03\xe0\x41\x01\x1aJ\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.Value:\x02\x38\x01\"\xa4\x02\n\x08Pipeline\x12\x38\n\x06stages\x18\x01 \x03(\x0b\x32#.google.firestore.v1.Pipeline.StageB\x03\xe0\x41\x02\x1a\xdd\x01\n\x05Stage\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12-\n\x04\x61rgs\x18\x02 \x03(\x0b\x32\x1a.google.firestore.v1.ValueB\x03\xe0\x41\x01\x12\x46\n\x07options\x18\x03 \x03(\x0b\x32\x30.google.firestore.v1.Pipeline.Stage.OptionsEntryB\x03\xe0\x41\x01\x1aJ\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12)\n\x05value\x18\x02 \x01(\x0b\x32\x1a.google.firestore.v1.Value:\x02\x38\x01\x42\xc5\x01\n\x17\x63om.google.firestore.v1B\rDocumentProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xa2\x02\x04GCFS\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.type.LatLng", "google/type/latlng.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module V1 - Document = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Document").msgclass - Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Value").msgclass - ArrayValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.ArrayValue").msgclass - MapValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.MapValue").msgclass - Function = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Function").msgclass - Pipeline = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Pipeline").msgclass - Pipeline::Stage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.Pipeline.Stage").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/explain_stats_pb.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/explain_stats_pb.rb deleted file mode 100644 index 8502d71e7acf..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/explain_stats_pb.rb +++ /dev/null @@ -1,45 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/v1/explain_stats.proto - -require 'google/protobuf' - -require 'google/protobuf/any_pb' - - -descriptor_data = "\n\'google/firestore/v1/explain_stats.proto\x12\x13google.firestore.v1\x1a\x19google/protobuf/any.proto\"2\n\x0c\x45xplainStats\x12\"\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x14.google.protobuf.AnyB\xc2\x01\n\x17\x63om.google.firestore.v1B\x11\x45xplainStatsProtoP\x01Z;cloud.google.com/go/firestore/apiv1/firestorepb;firestorepb\xaa\x02\x19Google.Cloud.Firestore.V1\xca\x02\x19Google\\Cloud\\Firestore\\V1\xea\x02\x1cGoogle::Cloud::Firestore::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Any", "google/protobuf/any.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Firestore - module V1 - ExplainStats = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.firestore.v1.ExplainStats").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/firestore_pb.rb b/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/firestore_pb.rb deleted file mode 100644 index ac0e1b9e7e37..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/lib/google/firestore/v1/firestore_pb.rb +++ /dev/null @@ -1,103 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/firestore/v1/firestore.proto - -require 'google/protobuf' - -require 'google/api/annotations_pb' -require 'google/api/client_pb' -require 'google/api/field_behavior_pb' -require 'google/api/routing_pb' -require 'google/firestore/v1/aggregation_result_pb' -require 'google/firestore/v1/common_pb' -require 'google/firestore/v1/document_pb' -require 'google/firestore/v1/explain_stats_pb' -require 'google/firestore/v1/pipeline_pb' -require 'google/firestore/v1/query_pb' -require 'google/firestore/v1/query_profile_pb' -require 'google/firestore/v1/write_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/timestamp_pb' -require 'google/protobuf/wrappers_pb' -require 'google/rpc/status_pb' - - -descriptor_data = "\n#google/firestore/v1/firestore.proto\x12\x13google.firestore.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x18google/api/routing.proto\x1a,google/firestore/v1/aggregation_result.proto\x1a google/firestore/v1/common.proto\x1a\"google/firestore/v1/document.proto\x1a\'google/firestore/v1/explain_stats.proto\x1a\"google/firestore/v1/pipeline.proto\x1a\x1fgoogle/firestore/v1/query.proto\x1a\'google/firestore/v1/query_profile.proto\x1a\x1fgoogle/firestore/v1/write.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x17google/rpc/status.proto\"\xb8\x01\n\x12GetDocumentRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12/\n\x04mask\x18\x02 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\x12\x15\n\x0btransaction\x18\x03 \x01(\x0cH\x00\x12/\n\tread_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x16\n\x14\x63onsistency_selector\"\xbb\x02\n\x14ListDocumentsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcollection_id\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\x06 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x04mask\x18\x07 \x01(\x0b\x32!.google.firestore.v1.DocumentMaskB\x03\xe0\x41\x01\x12\x15\n\x0btransaction\x18\x08 \x01(\x0cH\x00\x12/\n\tread_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x14\n\x0cshow_missing\x18\x0c \x01(\x08\x42\x16\n\x14\x63onsistency_selector\"b\n\x15ListDocumentsResponse\x12\x30\n\tdocuments\x18\x01 \x03(\x0b\x32\x1d.google.firestore.v1.Document\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc4\x01\n\x15\x43reateDocumentRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x1a\n\rcollection_id\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x13\n\x0b\x64ocument_id\x18\x03 \x01(\t\x12\x34\n\x08\x64ocument\x18\x04 \x01(\x0b\x32\x1d.google.firestore.v1.DocumentB\x03\xe0\x41\x02\x12/\n\x04mask\x18\x05 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\"\xf3\x01\n\x15UpdateDocumentRequest\x12\x34\n\x08\x64ocument\x18\x01 \x01(\x0b\x32\x1d.google.firestore.v1.DocumentB\x03\xe0\x41\x02\x12\x36\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\x12/\n\x04mask\x18\x03 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\x12;\n\x10\x63urrent_document\x18\x04 \x01(\x0b\x32!.google.firestore.v1.Precondition\"g\n\x15\x44\x65leteDocumentRequest\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12;\n\x10\x63urrent_document\x18\x02 \x01(\x0b\x32!.google.firestore.v1.Precondition\"\x99\x02\n\x18\x42\x61tchGetDocumentsRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tdocuments\x18\x02 \x03(\t\x12/\n\x04mask\x18\x03 \x01(\x0b\x32!.google.firestore.v1.DocumentMask\x12\x15\n\x0btransaction\x18\x04 \x01(\x0cH\x00\x12\x42\n\x0fnew_transaction\x18\x05 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptionsH\x00\x12/\n\tread_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x16\n\x14\x63onsistency_selector\"\xac\x01\n\x19\x42\x61tchGetDocumentsResponse\x12.\n\x05\x66ound\x18\x01 \x01(\x0b\x32\x1d.google.firestore.v1.DocumentH\x00\x12\x11\n\x07missing\x18\x02 \x01(\tH\x00\x12\x13\n\x0btransaction\x18\x03 \x01(\x0c\x12-\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x08\n\x06result\"j\n\x17\x42\x65ginTransactionRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x38\n\x07options\x18\x02 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptions\"/\n\x18\x42\x65ginTransactionResponse\x12\x13\n\x0btransaction\x18\x01 \x01(\x0c\"g\n\rCommitRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x06writes\x18\x02 \x03(\x0b\x32\x1a.google.firestore.v1.Write\x12\x13\n\x0btransaction\x18\x03 \x01(\x0c\"z\n\x0e\x43ommitResponse\x12\x37\n\rwrite_results\x18\x01 \x03(\x0b\x32 .google.firestore.v1.WriteResult\x12/\n\x0b\x63ommit_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"B\n\x0fRollbackRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0btransaction\x18\x02 \x01(\x0c\x42\x03\xe0\x41\x02\"\xdd\x02\n\x0fRunQueryRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12@\n\x10structured_query\x18\x02 \x01(\x0b\x32$.google.firestore.v1.StructuredQueryH\x00\x12\x15\n\x0btransaction\x18\x05 \x01(\x0cH\x01\x12\x42\n\x0fnew_transaction\x18\x06 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptionsH\x01\x12/\n\tread_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x41\n\x0f\x65xplain_options\x18\n \x01(\x0b\x32#.google.firestore.v1.ExplainOptionsB\x03\xe0\x41\x01\x42\x0c\n\nquery_typeB\x16\n\x14\x63onsistency_selector\"\x87\x02\n\x10RunQueryResponse\x12\x13\n\x0btransaction\x18\x02 \x01(\x0c\x12/\n\x08\x64ocument\x18\x01 \x01(\x0b\x32\x1d.google.firestore.v1.Document\x12-\n\tread_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x17\n\x0fskipped_results\x18\x04 \x01(\x05\x12\x0e\n\x04\x64one\x18\x06 \x01(\x08H\x00\x12<\n\x0f\x65xplain_metrics\x18\x0b \x01(\x0b\x32#.google.firestore.v1.ExplainMetricsB\x17\n\x15\x63ontinuation_selector\"\xac\x02\n\x16\x45xecutePipelineRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x46\n\x13structured_pipeline\x18\x02 \x01(\x0b\x32\'.google.firestore.v1.StructuredPipelineH\x00\x12\x15\n\x0btransaction\x18\x05 \x01(\x0cH\x01\x12\x42\n\x0fnew_transaction\x18\x06 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptionsH\x01\x12/\n\tread_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x42\x0f\n\rpipeline_typeB\x16\n\x14\x63onsistency_selector\"\xcc\x01\n\x17\x45xecutePipelineResponse\x12\x13\n\x0btransaction\x18\x01 \x01(\x0c\x12.\n\x07results\x18\x02 \x03(\x0b\x32\x1d.google.firestore.v1.Document\x12\x32\n\x0e\x65xecution_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x38\n\rexplain_stats\x18\x04 \x01(\x0b\x32!.google.firestore.v1.ExplainStats\"\xff\x02\n\x1aRunAggregationQueryRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12W\n\x1cstructured_aggregation_query\x18\x02 \x01(\x0b\x32/.google.firestore.v1.StructuredAggregationQueryH\x00\x12\x15\n\x0btransaction\x18\x04 \x01(\x0cH\x01\x12\x42\n\x0fnew_transaction\x18\x05 \x01(\x0b\x32\'.google.firestore.v1.TransactionOptionsH\x01\x12/\n\tread_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x41\n\x0f\x65xplain_options\x18\x08 \x01(\x0b\x32#.google.firestore.v1.ExplainOptionsB\x03\xe0\x41\x01\x42\x0c\n\nquery_typeB\x16\n\x14\x63onsistency_selector\"\xd7\x01\n\x1bRunAggregationQueryResponse\x12\x36\n\x06result\x18\x01 \x01(\x0b\x32&.google.firestore.v1.AggregationResult\x12\x13\n\x0btransaction\x18\x02 \x01(\x0c\x12-\n\tread_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12<\n\x0f\x65xplain_metrics\x18\n \x01(\x0b\x32#.google.firestore.v1.ExplainMetrics\"\x85\x02\n\x15PartitionQueryRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12@\n\x10structured_query\x18\x02 \x01(\x0b\x32$.google.firestore.v1.StructuredQueryH\x00\x12\x17\n\x0fpartition_count\x18\x03 \x01(\x03\x12\x12\n\npage_token\x18\x04 \x01(\t\x12\x11\n\tpage_size\x18\x05 \x01(\x05\x12/\n\tread_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x42\x0c\n\nquery_typeB\x16\n\x14\x63onsistency_selector\"b\n\x16PartitionQueryResponse\x12/\n\npartitions\x18\x01 \x03(\x0b\x32\x1b.google.firestore.v1.Cursor\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xe8\x01\n\x0cWriteRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tstream_id\x18\x02 \x01(\t\x12*\n\x06writes\x18\x03 \x03(\x0b\x32\x1a.google.firestore.v1.Write\x12\x14\n\x0cstream_token\x18\x04 \x01(\x0c\x12=\n\x06labels\x18\x05 \x03(\x0b\x32-.google.firestore.v1.WriteRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xa2\x01\n\rWriteResponse\x12\x11\n\tstream_id\x18\x01 \x01(\t\x12\x14\n\x0cstream_token\x18\x02 \x01(\x0c\x12\x37\n\rwrite_results\x18\x03 \x03(\x0b\x32 .google.firestore.v1.WriteResult\x12/\n\x0b\x63ommit_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"\xf2\x01\n\rListenRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x31\n\nadd_target\x18\x02 \x01(\x0b\x32\x1b.google.firestore.v1.TargetH\x00\x12\x17\n\rremove_target\x18\x03 \x01(\x05H\x00\x12>\n\x06labels\x18\x04 \x03(\x0b\x32..google.firestore.v1.ListenRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x0f\n\rtarget_change\"\xd5\x02\n\x0eListenResponse\x12:\n\rtarget_change\x18\x02 \x01(\x0b\x32!.google.firestore.v1.TargetChangeH\x00\x12>\n\x0f\x64ocument_change\x18\x03 \x01(\x0b\x32#.google.firestore.v1.DocumentChangeH\x00\x12>\n\x0f\x64ocument_delete\x18\x04 \x01(\x0b\x32#.google.firestore.v1.DocumentDeleteH\x00\x12>\n\x0f\x64ocument_remove\x18\x06 \x01(\x0b\x32#.google.firestore.v1.DocumentRemoveH\x00\x12\x36\n\x06\x66ilter\x18\x05 \x01(\x0b\x32$.google.firestore.v1.ExistenceFilterH\x00\x42\x0f\n\rresponse_type\"\xd6\x03\n\x06Target\x12\x38\n\x05query\x18\x02 \x01(\x0b\x32\'.google.firestore.v1.Target.QueryTargetH\x00\x12@\n\tdocuments\x18\x03 \x01(\x0b\x32+.google.firestore.v1.Target.DocumentsTargetH\x00\x12\x16\n\x0cresume_token\x18\x04 \x01(\x0cH\x01\x12/\n\tread_time\x18\x0b \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x12\x11\n\ttarget_id\x18\x05 \x01(\x05\x12\x0c\n\x04once\x18\x06 \x01(\x08\x12\x33\n\x0e\x65xpected_count\x18\x0c \x01(\x0b\x32\x1b.google.protobuf.Int32Value\x1a$\n\x0f\x44ocumentsTarget\x12\x11\n\tdocuments\x18\x02 \x03(\t\x1am\n\x0bQueryTarget\x12\x0e\n\x06parent\x18\x01 \x01(\t\x12@\n\x10structured_query\x18\x02 \x01(\x0b\x32$.google.firestore.v1.StructuredQueryH\x00\x42\x0c\n\nquery_typeB\r\n\x0btarget_typeB\r\n\x0bresume_type\"\xaa\x02\n\x0cTargetChange\x12N\n\x12target_change_type\x18\x01 \x01(\x0e\x32\x32.google.firestore.v1.TargetChange.TargetChangeType\x12\x12\n\ntarget_ids\x18\x02 \x03(\x05\x12!\n\x05\x63\x61use\x18\x03 \x01(\x0b\x32\x12.google.rpc.Status\x12\x14\n\x0cresume_token\x18\x04 \x01(\x0c\x12-\n\tread_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\"N\n\x10TargetChangeType\x12\r\n\tNO_CHANGE\x10\x00\x12\x07\n\x03\x41\x44\x44\x10\x01\x12\n\n\x06REMOVE\x10\x02\x12\x0b\n\x07\x43URRENT\x10\x03\x12\t\n\x05RESET\x10\x04\"\x9f\x01\n\x18ListCollectionIdsRequest\x12\x13\n\x06parent\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12/\n\tread_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x16\n\x14\x63onsistency_selector\"L\n\x19ListCollectionIdsResponse\x12\x16\n\x0e\x63ollection_ids\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"\xc9\x01\n\x11\x42\x61tchWriteRequest\x12\x15\n\x08\x64\x61tabase\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12*\n\x06writes\x18\x02 \x03(\x0b\x32\x1a.google.firestore.v1.Write\x12\x42\n\x06labels\x18\x03 \x03(\x0b\x32\x32.google.firestore.v1.BatchWriteRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"q\n\x12\x42\x61tchWriteResponse\x12\x37\n\rwrite_results\x18\x01 \x03(\x0b\x32 .google.firestore.v1.WriteResult\x12\"\n\x06status\x18\x02 \x03(\x0b\x32\x12.google.rpc.Status2\xfb\x1b\n\tFirestore\x12\x8f\x01\n\x0bGetDocument\x12\'.google.firestore.v1.GetDocumentRequest\x1a\x1d.google.firestore.v1.Document\"8\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/databases/*/documents/*/**}\x12\xf5\x01\n\rListDocuments\x12).google.firestore.v1.ListDocumentsRequest\x1a*.google.firestore.v1.ListDocumentsResponse\"\x8c\x01\x82\xd3\xe4\x93\x02\x85\x01\x12\x42/v1/{parent=projects/*/databases/*/documents/*/**}/{collection_id}Z?\x12=/v1/{parent=projects/*/databases/*/documents}/{collection_id}\x12\xbf\x01\n\x0eUpdateDocument\x12*.google.firestore.v1.UpdateDocumentRequest\x1a\x1d.google.firestore.v1.Document\"b\xda\x41\x14\x64ocument,update_mask\x82\xd3\xe4\x93\x02\x45\x32\x39/v1/{document.name=projects/*/databases/*/documents/*/**}:\x08\x64ocument\x12\x95\x01\n\x0e\x44\x65leteDocument\x12*.google.firestore.v1.DeleteDocumentRequest\x1a\x16.google.protobuf.Empty\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32*0/v1/{name=projects/*/databases/*/documents/*/**}\x12\xb9\x01\n\x11\x42\x61tchGetDocuments\x12-.google.firestore.v1.BatchGetDocumentsRequest\x1a..google.firestore.v1.BatchGetDocumentsResponse\"C\x82\xd3\xe4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:batchGet:\x01*0\x01\x12\xc7\x01\n\x10\x42\x65ginTransaction\x12,.google.firestore.v1.BeginTransactionRequest\x1a-.google.firestore.v1.BeginTransactionResponse\"V\xda\x41\x08\x64\x61tabase\x82\xd3\xe4\x93\x02\x45\"@/v1/{database=projects/*/databases/*}/documents:beginTransaction:\x01*\x12\xa6\x01\n\x06\x43ommit\x12\".google.firestore.v1.CommitRequest\x1a#.google.firestore.v1.CommitResponse\"S\xda\x41\x0f\x64\x61tabase,writes\x82\xd3\xe4\x93\x02;\"6/v1/{database=projects/*/databases/*}/documents:commit:\x01*\x12\xa4\x01\n\x08Rollback\x12$.google.firestore.v1.RollbackRequest\x1a\x16.google.protobuf.Empty\"Z\xda\x41\x14\x64\x61tabase,transaction\x82\xd3\xe4\x93\x02=\"8/v1/{database=projects/*/databases/*}/documents:rollback:\x01*\x12\xdf\x01\n\x08RunQuery\x12$.google.firestore.v1.RunQueryRequest\x1a%.google.firestore.v1.RunQueryResponse\"\x83\x01\x82\xd3\xe4\x93\x02}\"6/v1/{parent=projects/*/databases/*/documents}:runQuery:\x01*Z@\";/v1/{parent=projects/*/databases/*/documents/*/**}:runQuery:\x01*0\x01\x12\x9e\x02\n\x0f\x45xecutePipeline\x12+.google.firestore.v1.ExecutePipelineRequest\x1a,.google.firestore.v1.ExecutePipelineResponse\"\xad\x01\x82\xd3\xe4\x93\x02\x44\"?/v1/{database=projects/*/databases/*}/documents:executePipeline:\x01*\x8a\xd3\xe4\x93\x02]\x12&\n\x08\x64\x61tabase\x12\x1aprojects/{project_id=*}/**\x12\x33\n\x08\x64\x61tabase\x12\'projects/*/databases/{database_id=*}/**0\x01\x12\x97\x02\n\x13RunAggregationQuery\x12/.google.firestore.v1.RunAggregationQueryRequest\x1a\x30.google.firestore.v1.RunAggregationQueryResponse\"\x9a\x01\x82\xd3\xe4\x93\x02\x93\x01\"A/v1/{parent=projects/*/databases/*/documents}:runAggregationQuery:\x01*ZK\"F/v1/{parent=projects/*/databases/*/documents/*/**}:runAggregationQuery:\x01*0\x01\x12\xfc\x01\n\x0ePartitionQuery\x12*.google.firestore.v1.PartitionQueryRequest\x1a+.google.firestore.v1.PartitionQueryResponse\"\x90\x01\x82\xd3\xe4\x93\x02\x89\x01\"] - # 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-firestore-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/api/routing.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/routing.rb deleted file mode 100644 index d777329024e7..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/api/routing.rb +++ /dev/null @@ -1,459 +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 - # Specifies the routing information that should be sent along with the request - # in the form of routing header. - # **NOTE:** All service configuration rules follow the "last one wins" order. - # - # The examples below will apply to an RPC which has the following request type: - # - # Message Definition: - # - # message Request { - # // The name of the Table - # // Values can be of the following formats: - # // - `projects//tables/
` - # // - `projects//instances//tables/
` - # // - `region//zones//tables/
` - # string table_name = 1; - # - # // This value specifies routing for replication. - # // It can be in the following formats: - # // - `profiles/` - # // - a legacy `profile_id` that can be any string - # string app_profile_id = 2; - # } - # - # Example message: - # - # { - # table_name: projects/proj_foo/instances/instance_bar/table/table_baz, - # app_profile_id: profiles/prof_qux - # } - # - # The routing header consists of one or multiple key-value pairs. Every key - # and value must be percent-encoded, and joined together in the format of - # `key1=value1&key2=value2`. - # The examples below skip the percent-encoding for readability. - # - # Example 1 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key equal to the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`. - # routing_parameters { - # field: "app_profile_id" - # } - # }; - # - # result: - # - # x-goog-request-params: app_profile_id=profiles/prof_qux - # - # Example 2 - # - # Extracting a field from the request to put into the routing header - # unchanged, with the key different from the field name. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `app_profile_id`, but name it `routing_id` in the header. - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 3 - # - # Extracting a field from the request to put into the routing - # header, while matching a path template syntax on the field's value. - # - # NB: it is more useful to send nothing than to send garbage for the purpose - # of dynamic routing, since garbage pollutes cache. Thus the matching. - # - # Sub-example 3a - # - # The field matches the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with project-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Sub-example 3b - # - # The field does not match the template. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed (with region-based - # // syntax). - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # }; - # - # result: - # - # - # - # Sub-example 3c - # - # Multiple alternative conflictingly named path templates are - # specified. The one that matches is used to construct the header. - # - # annotation: - # - # option (google.api.routing) = { - # // Take the `table_name`, if it's well-formed, whether - # // using the region- or projects-based syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=regions/*/zones/*/**}" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_name=projects/*/instances/*/**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_name=projects/proj_foo/instances/instance_bar/table/table_baz - # - # Example 4 - # - # Extracting a single routing header key-value pair by matching a - # template syntax on (a part of) a single request field. - # - # annotation: - # - # option (google.api.routing) = { - # // Take just the project id from the `table_name` field. - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=projects/proj_foo - # - # Example 5 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on (parts of) a single request - # field. The last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // If the `table_name` does not have instances information, - # // take just the project id for routing. - # // Otherwise take project + instance. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*/instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # routing_id=projects/proj_foo/instances/instance_bar - # - # Example 6 - # - # Extracting multiple routing header key-value pairs by matching - # several non-conflicting path templates on (parts of) a single request field. - # - # Sub-example 6a - # - # Make the templates strict, so that if the `table_name` does not - # have an instance information, nothing is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code needs two keys instead of one composite - # // but works only for the tables with the "project-instance" name - # // syntax. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/instances/*/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Sub-example 6b - # - # Make the templates loose, so that if the `table_name` does not - # have an instance information, just the project id part is sent. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing code wants two keys instead of one composite - # // but will work with just the `project_id` for tables without - # // an instance in the `table_name`. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{instance_id=instances/*}/**" - # } - # }; - # - # result (is the same as 6a for our example message because it has the instance - # information): - # - # x-goog-request-params: - # project_id=projects/proj_foo&instance_id=instances/instance_bar - # - # Example 7 - # - # Extracting multiple routing header key-value pairs by matching - # several path templates on multiple request fields. - # - # NB: note that here there is no way to specify sending nothing if one of the - # fields does not match its template. E.g. if the `table_name` is in the wrong - # format, the `project_id` will not be sent, but the `routing_id` will be. - # The backend routing code has to be aware of that and be prepared to not - # receive a full complement of keys if it expects multiple. - # - # annotation: - # - # option (google.api.routing) = { - # // The routing needs both `project_id` and `routing_id` - # // (from the `app_profile_id` field) for routing. - # - # routing_parameters { - # field: "table_name" - # path_template: "{project_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # project_id=projects/proj_foo&routing_id=profiles/prof_qux - # - # Example 8 - # - # Extracting a single routing header key-value pair by matching - # several conflictingly named path templates on several request fields. The - # last template to match "wins" the conflict. - # - # annotation: - # - # option (google.api.routing) = { - # // The `routing_id` can be a project id or a region id depending on - # // the table name format, but only if the `app_profile_id` is not set. - # // If `app_profile_id` is set it should be used instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=regions/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # }; - # - # result: - # - # x-goog-request-params: routing_id=profiles/prof_qux - # - # Example 9 - # - # Bringing it all together. - # - # annotation: - # - # option (google.api.routing) = { - # // For routing both `table_location` and a `routing_id` are needed. - # // - # // table_location can be either an instance id or a region+zone id. - # // - # // For `routing_id`, take the value of `app_profile_id` - # // - If it's in the format `profiles/`, send - # // just the `` part. - # // - If it's any other literal, send it as is. - # // If the `app_profile_id` is empty, and the `table_name` starts with - # // the project_id, send that instead. - # - # routing_parameters { - # field: "table_name" - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{table_location=regions/*/zones/*}/tables/*" - # } - # routing_parameters { - # field: "table_name" - # path_template: "{routing_id=projects/*}/**" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "{routing_id=**}" - # } - # routing_parameters { - # field: "app_profile_id" - # path_template: "profiles/{routing_id=*}" - # } - # }; - # - # result: - # - # x-goog-request-params: - # table_location=instances/instance_bar&routing_id=prof_qux - # @!attribute [rw] routing_parameters - # @return [::Array<::Google::Api::RoutingParameter>] - # A collection of Routing Parameter specifications. - # **NOTE:** If multiple Routing Parameters describe the same key - # (via the `path_template` field or via the `field` field when - # `path_template` is not provided), "last one wins" rule - # determines which Parameter gets used. - # See the examples for more details. - class RoutingRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A projection from an input message to the GRPC or REST header. - # @!attribute [rw] field - # @return [::String] - # A request field to extract the header key-value pair from. - # @!attribute [rw] path_template - # @return [::String] - # A pattern matching the key-value field. Optional. - # If not specified, the whole field specified in the `field` field will be - # taken as value, and its name used as key. If specified, it MUST contain - # exactly one named segment (along with any number of unnamed segments) The - # pattern will be matched over the field specified in the `field` field, then - # if the match is successful: - # - the name of the single named segment will be used as a header name, - # - the match value of the segment will be used as a header value; - # if the match is NOT successful, nothing will be sent. - # - # Example: - # - # -- This is a field in the request message - # | that the header value will be extracted from. - # | - # | -- This is the key name in the - # | | routing header. - # V | - # field: "table_name" v - # path_template: "projects/*/{table_location=instances/*}/tables/*" - # ^ ^ - # | | - # In the {} brackets is the pattern that -- | - # specifies what to extract from the | - # field as a value to be sent. | - # | - # The string in the field must match the whole pattern -- - # before brackets, inside brackets, after brackets. - # - # When looking at this specific example, we can see that: - # - A key-value pair with the key `table_location` - # and the value matching `instances/*` should be added - # to the x-goog-request-params routing header. - # - The value is extracted from the request message's `table_name` field - # if it matches the full pattern specified: - # `projects/*/instances/*/tables/*`. - # - # **NB:** If the `path_template` field is not provided, the key name is - # equal to the field name, and the whole field should be sent as a value. - # This makes the pattern for the field and the value functionally equivalent - # to `**`, and the configuration - # - # { - # field: "table_name" - # } - # - # is a functionally equivalent shorthand to: - # - # { - # field: "table_name" - # path_template: "{table_name=**}" - # } - # - # See Example 1 for more details. - class RoutingParameter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/aggregation_result.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/aggregation_result.rb deleted file mode 100644 index cbb83ff369da..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/aggregation_result.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! - - -module Google - module Cloud - module Firestore - module V1 - # The result of a single bucket from a Firestore aggregation query. - # - # The keys of `aggregate_fields` are the same for all results in an aggregation - # query, unlike document queries which can have different fields present for - # each result. - # @!attribute [rw] aggregate_fields - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Firestore::V1::Value}] - # The result of the aggregation functions, ex: `COUNT(*) AS total_docs`. - # - # The key is the - # {::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation#alias alias} - # assigned to the aggregation function on input and the size of this map - # equals the number of aggregation functions in the query. - class AggregationResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Firestore::V1::Value] - class AggregateFieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/bloom_filter.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/bloom_filter.rb deleted file mode 100644 index dd4118168b2c..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/bloom_filter.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! - - -module Google - module Cloud - module Firestore - module V1 - # A sequence of bits, encoded in a byte array. - # - # Each byte in the `bitmap` byte array stores 8 bits of the sequence. The only - # exception is the last byte, which may store 8 _or fewer_ bits. The `padding` - # defines the number of bits of the last byte to be ignored as "padding". The - # values of these "padding" bits are unspecified and must be ignored. - # - # To retrieve the first bit, bit 0, calculate: `(bitmap[0] & 0x01) != 0`. - # To retrieve the second bit, bit 1, calculate: `(bitmap[0] & 0x02) != 0`. - # To retrieve the third bit, bit 2, calculate: `(bitmap[0] & 0x04) != 0`. - # To retrieve the fourth bit, bit 3, calculate: `(bitmap[0] & 0x08) != 0`. - # To retrieve bit n, calculate: `(bitmap[n / 8] & (0x01 << (n % 8))) != 0`. - # - # The "size" of a `BitSequence` (the number of bits it contains) is calculated - # by this formula: `(bitmap.length * 8) - padding`. - # @!attribute [rw] bitmap - # @return [::String] - # The bytes that encode the bit sequence. - # May have a length of zero. - # @!attribute [rw] padding - # @return [::Integer] - # The number of bits of the last byte in `bitmap` to ignore as "padding". - # If the length of `bitmap` is zero, then this value must be `0`. - # Otherwise, this value must be between 0 and 7, inclusive. - class BitSequence - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A bloom filter (https://en.wikipedia.org/wiki/Bloom_filter). - # - # The bloom filter hashes the entries with MD5 and treats the resulting 128-bit - # hash as 2 distinct 64-bit hash values, interpreted as unsigned integers - # using 2's complement encoding. - # - # These two hash values, named `h1` and `h2`, are then used to compute the - # `hash_count` hash values using the formula, starting at `i=0`: - # - # h(i) = h1 + (i * h2) - # - # These resulting values are then taken modulo the number of bits in the bloom - # filter to get the bits of the bloom filter to test for the given entry. - # @!attribute [rw] bits - # @return [::Google::Cloud::Firestore::V1::BitSequence] - # The bloom filter data. - # @!attribute [rw] hash_count - # @return [::Integer] - # The number of hashes used by the algorithm. - class BloomFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/common.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/common.rb deleted file mode 100644 index aa8ef8a9180c..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/common.rb +++ /dev/null @@ -1,101 +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 Firestore - module V1 - # A set of field paths on a document. - # Used to restrict a get or update operation on a document to a subset of its - # fields. - # This is different from standard field masks, as this is always scoped to a - # {::Google::Cloud::Firestore::V1::Document Document}, and takes in account the dynamic - # nature of {::Google::Cloud::Firestore::V1::Value Value}. - # @!attribute [rw] field_paths - # @return [::Array<::String>] - # The list of field paths in the mask. See - # {::Google::Cloud::Firestore::V1::Document#fields Document.fields} for a field path - # syntax reference. - class DocumentMask - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A precondition on a document, used for conditional operations. - # @!attribute [rw] exists - # @return [::Boolean] - # When set to `true`, the target document must exist. - # When set to `false`, the target document must not exist. - # - # Note: The following fields are mutually exclusive: `exists`, `update_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # When set, the target document must exist and have been last updated at - # that time. Timestamp must be microsecond aligned. - # - # Note: The following fields are mutually exclusive: `update_time`, `exists`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Precondition - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options for creating a new transaction. - # @!attribute [rw] read_only - # @return [::Google::Cloud::Firestore::V1::TransactionOptions::ReadOnly] - # The transaction can only be used for read operations. - # - # Note: The following fields are mutually exclusive: `read_only`, `read_write`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] read_write - # @return [::Google::Cloud::Firestore::V1::TransactionOptions::ReadWrite] - # The transaction can be used for both read and write operations. - # - # Note: The following fields are mutually exclusive: `read_write`, `read_only`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class TransactionOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Options for a transaction that can be used to read and write documents. - # - # Firestore does not allow 3rd party auth requests to create read-write. - # transactions. - # @!attribute [rw] retry_transaction - # @return [::String] - # An optional transaction to retry. - class ReadWrite - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Options for a transaction that can only be used to read documents. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Reads documents at the given time. - # - # This must be a microsecond precision timestamp within the past one - # hour, or if Point-in-Time Recovery is enabled, can additionally be a - # whole minute timestamp within the past 7 days. - class ReadOnly - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/document.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/document.rb deleted file mode 100644 index c42e0dce26f3..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/document.rb +++ /dev/null @@ -1,317 +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 Firestore - module V1 - # A Firestore document. - # - # Must not exceed 1 MiB - 4 bytes. - # @!attribute [rw] name - # @return [::String] - # The resource name of the document, for example - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Firestore::V1::Value}] - # The document's fields. - # - # The map keys represent field names. - # - # Field names matching the regular expression `__.*__` are reserved. Reserved - # field names are forbidden except in certain documented contexts. The field - # names, represented as UTF-8, must not exceed 1,500 bytes and cannot be - # empty. - # - # Field paths may be used in other contexts to refer to structured fields - # defined here. For `map_value`, the field path is represented by a - # dot-delimited (`.`) string of segments. Each segment is either a simple - # field name (defined below) or a quoted field name. For example, the - # structured field `"foo" : { map_value: { "x&y" : { string_value: "hello" - # }}}` would be represented by the field path `` foo.`x&y` ``. - # - # A simple field name contains only characters `a` to `z`, `A` to `Z`, - # `0` to `9`, or `_`, and must not start with `0` to `9`. For example, - # `foo_bar_17`. - # - # A quoted field name starts and ends with `` ` `` and - # may contain any character. Some characters, including `` ` ``, must be - # escaped using a `\`. For example, `` `x&y` `` represents `x&y` and - # `` `bak\`tik` `` represents `` bak`tik ``. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the document was created. - # - # This value increases monotonically when a document is deleted then - # recreated. It can also be compared to values from other documents and - # the `read_time` of a query. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which the document was last changed. - # - # This value is initially set to the `create_time` then increases - # monotonically with each change to the document. It can also be - # compared to values from other documents and the `read_time` of a query. - class Document - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Firestore::V1::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A message that can hold any of the supported value types. - # @!attribute [rw] null_value - # @return [::Google::Protobuf::NullValue] - # A null value. - # - # Note: The following fields are mutually exclusive: `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] boolean_value - # @return [::Boolean] - # A boolean value. - # - # Note: The following fields are mutually exclusive: `boolean_value`, `null_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] integer_value - # @return [::Integer] - # An integer value. - # - # Note: The following fields are mutually exclusive: `integer_value`, `null_value`, `boolean_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] double_value - # @return [::Float] - # A double value. - # - # Note: The following fields are mutually exclusive: `double_value`, `null_value`, `boolean_value`, `integer_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] timestamp_value - # @return [::Google::Protobuf::Timestamp] - # A timestamp value. - # - # Precise only to microseconds. When stored, any additional precision is - # rounded down. - # - # Note: The following fields are mutually exclusive: `timestamp_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_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] - # A string value. - # - # The string, represented as UTF-8, must not exceed 1 MiB - 89 bytes. - # Only the first 1,500 bytes of the UTF-8 representation are considered by - # queries. - # - # Note: The following fields are mutually exclusive: `string_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] bytes_value - # @return [::String] - # A bytes value. - # - # Must not exceed 1 MiB - 89 bytes. - # Only the first 1,500 bytes are considered by queries. - # - # Note: The following fields are mutually exclusive: `bytes_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] reference_value - # @return [::String] - # A reference to a document. For example: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # - # Note: The following fields are mutually exclusive: `reference_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] geo_point_value - # @return [::Google::Type::LatLng] - # A geo point value representing a point on the surface of Earth. - # - # Note: The following fields are mutually exclusive: `geo_point_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `array_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] array_value - # @return [::Google::Cloud::Firestore::V1::ArrayValue] - # An array value. - # - # Cannot directly contain another array value, though can contain a - # map which contains another array. - # - # Note: The following fields are mutually exclusive: `array_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `map_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] map_value - # @return [::Google::Cloud::Firestore::V1::MapValue] - # A map value. - # - # Note: The following fields are mutually exclusive: `map_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `field_reference_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] field_reference_value - # @return [::String] - # Value which references a field. - # - # This is considered relative (vs absolute) since it only refers to a field - # and not a field within a particular document. - # - # **Requires:** - # - # * Must follow [field reference][FieldReference.field_path] limitations. - # - # * Not allowed to be used when writing documents. - # - # Note: The following fields are mutually exclusive: `field_reference_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `function_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] function_value - # @return [::Google::Cloud::Firestore::V1::Function] - # A value that represents an unevaluated expression. - # - # **Requires:** - # - # * Not allowed to be used when writing documents. - # - # Note: The following fields are mutually exclusive: `function_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `pipeline_value`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] pipeline_value - # @return [::Google::Cloud::Firestore::V1::Pipeline] - # A value that represents an unevaluated pipeline. - # - # **Requires:** - # - # * Not allowed to be used when writing documents. - # - # Note: The following fields are mutually exclusive: `pipeline_value`, `null_value`, `boolean_value`, `integer_value`, `double_value`, `timestamp_value`, `string_value`, `bytes_value`, `reference_value`, `geo_point_value`, `array_value`, `map_value`, `field_reference_value`, `function_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 - - # An array value. - # @!attribute [rw] values - # @return [::Array<::Google::Cloud::Firestore::V1::Value>] - # Values in the array. - class ArrayValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A map value. - # @!attribute [rw] fields - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Firestore::V1::Value}] - # The map's fields. - # - # The map keys represent field names. Field names matching the regular - # expression `__.*__` are reserved. Reserved field names are forbidden except - # in certain documented contexts. The map keys, represented as UTF-8, must - # not exceed 1,500 bytes and cannot be empty. - class MapValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Firestore::V1::Value] - class FieldsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Represents an unevaluated scalar expression. - # - # For example, the expression `like(user_name, "%alice%")` is represented as: - # - # ``` - # name: "like" - # args { field_reference: "user_name" } - # args { string_value: "%alice%" } - # ``` - # @!attribute [rw] name - # @return [::String] - # Required. The name of the function to evaluate. - # - # **Requires:** - # - # * must be in snake case (lower case with underscore separator). - # @!attribute [rw] args - # @return [::Array<::Google::Cloud::Firestore::V1::Value>] - # Optional. Ordered list of arguments the given function expects. - # @!attribute [rw] options - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Firestore::V1::Value}] - # Optional. Optional named arguments that certain functions may support. - class Function - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Firestore::V1::Value] - class OptionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # A Firestore query represented as an ordered list of operations / stages. - # @!attribute [rw] stages - # @return [::Array<::Google::Cloud::Firestore::V1::Pipeline::Stage>] - # Required. Ordered list of stages to evaluate. - class Pipeline - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A single operation within a pipeline. - # - # A stage is made up of a unique name, and a list of arguments. The exact - # number of arguments & types is dependent on the stage type. - # - # To give an example, the stage `filter(state = "MD")` would be encoded as: - # - # ``` - # name: "filter" - # args { - # function_value { - # name: "eq" - # args { field_reference_value: "state" } - # args { string_value: "MD" } - # } - # } - # ``` - # - # See public documentation for the full list. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the stage to evaluate. - # - # **Requires:** - # - # * must be in snake case (lower case with underscore separator). - # @!attribute [rw] args - # @return [::Array<::Google::Cloud::Firestore::V1::Value>] - # Optional. Ordered list of arguments the given stage expects. - # @!attribute [rw] options - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Firestore::V1::Value}] - # Optional. Optional named arguments that certain functions may support. - class Stage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Firestore::V1::Value] - class OptionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/explain_stats.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/explain_stats.rb deleted file mode 100644 index 1ef7dad15f8c..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/explain_stats.rb +++ /dev/null @@ -1,41 +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 Firestore - module V1 - # Pipeline explain stats. - # - # Depending on the explain options in the original request, this can contain - # the optimized plan and / or execution stats. - # @!attribute [rw] data - # @return [::Google::Protobuf::Any] - # The format depends on the `output_format` options in the request. - # - # Currently there are two supported options: `TEXT` and `JSON`. - # Both supply a `google.protobuf.StringValue`. - class ExplainStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/firestore.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/firestore.rb deleted file mode 100644 index a070482dd304..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/firestore.rb +++ /dev/null @@ -1,1110 +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 Firestore - module V1 - # The request for - # {::Google::Cloud::Firestore::V1::Firestore::Client#get_document Firestore.GetDocument}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Document to get. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # @!attribute [rw] mask - # @return [::Google::Cloud::Firestore::V1::DocumentMask] - # The fields to return. If not set, returns all fields. - # - # If the document has a field that is not present in this mask, that field - # will not be returned in the response. - # @!attribute [rw] transaction - # @return [::String] - # Reads the document in a transaction. - # - # Note: The following fields are mutually exclusive: `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Reads the version of the document at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class GetDocumentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::V1::Firestore::Client#list_documents Firestore.ListDocuments}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. In the format: - # `projects/{project_id}/databases/{database_id}/documents` or - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # - # For example: - # `projects/my-project/databases/my-database/documents` or - # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - # @!attribute [rw] collection_id - # @return [::String] - # Optional. The collection ID, relative to `parent`, to list. - # - # For example: `chatrooms` or `messages`. - # - # This is optional, and when not provided, Firestore will list documents - # from all collections under the provided `parent`. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The maximum number of documents to return in a single response. - # - # Firestore may return fewer than this value. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A page token, received from a previous `ListDocuments` response. - # - # Provide this to retrieve the subsequent page. When paginating, all other - # parameters (with the exception of `page_size`) must match the values set - # in the request that generated the page token. - # @!attribute [rw] order_by - # @return [::String] - # Optional. The optional ordering of the documents to return. - # - # For example: `priority desc, __name__ desc`. - # - # This mirrors the {::Google::Cloud::Firestore::V1::StructuredQuery#order_by `ORDER BY`} - # used in Firestore queries but in a string representation. When absent, - # documents are ordered based on `__name__ ASC`. - # @!attribute [rw] mask - # @return [::Google::Cloud::Firestore::V1::DocumentMask] - # Optional. The fields to return. If not set, returns all fields. - # - # If a document has a field that is not present in this mask, that field - # will not be returned in the response. - # @!attribute [rw] transaction - # @return [::String] - # Perform the read as part of an already active transaction. - # - # Note: The following fields are mutually exclusive: `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Perform the read at the provided time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] show_missing - # @return [::Boolean] - # If the list should show missing documents. - # - # A document is missing if it does not exist, but there are sub-documents - # nested underneath it. When true, such missing documents will be returned - # with a key but will not have fields, - # {::Google::Cloud::Firestore::V1::Document#create_time `create_time`}, or - # {::Google::Cloud::Firestore::V1::Document#update_time `update_time`} set. - # - # Requests with `show_missing` may not specify `where` or `order_by`. - class ListDocumentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Firestore::V1::Firestore::Client#list_documents Firestore.ListDocuments}. - # @!attribute [rw] documents - # @return [::Array<::Google::Cloud::Firestore::V1::Document>] - # The Documents found. - # @!attribute [rw] next_page_token - # @return [::String] - # A token to retrieve the next page of documents. - # - # If this field is omitted, there are no subsequent pages. - class ListDocumentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::V1::Firestore::Client#create_document Firestore.CreateDocument}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource. For example: - # `projects/{project_id}/databases/{database_id}/documents` or - # `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}` - # @!attribute [rw] collection_id - # @return [::String] - # Required. The collection ID, relative to `parent`, to list. For example: - # `chatrooms`. - # @!attribute [rw] document_id - # @return [::String] - # The client-assigned document ID to use for this document. - # - # Optional. If not specified, an ID will be assigned by the service. - # @!attribute [rw] document - # @return [::Google::Cloud::Firestore::V1::Document] - # Required. The document to create. `name` must not be set. - # @!attribute [rw] mask - # @return [::Google::Cloud::Firestore::V1::DocumentMask] - # The fields to return. If not set, returns all fields. - # - # If the document has a field that is not present in this mask, that field - # will not be returned in the response. - class CreateDocumentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::V1::Firestore::Client#update_document Firestore.UpdateDocument}. - # @!attribute [rw] document - # @return [::Google::Cloud::Firestore::V1::Document] - # Required. The updated document. - # Creates the document if it does not already exist. - # @!attribute [rw] update_mask - # @return [::Google::Cloud::Firestore::V1::DocumentMask] - # The fields to update. - # None of the field paths in the mask may contain a reserved name. - # - # If the document exists on the server and has fields not referenced in the - # mask, they are left unchanged. - # Fields referenced in the mask, but not present in the input document, are - # deleted from the document on the server. - # @!attribute [rw] mask - # @return [::Google::Cloud::Firestore::V1::DocumentMask] - # The fields to return. If not set, returns all fields. - # - # If the document has a field that is not present in this mask, that field - # will not be returned in the response. - # @!attribute [rw] current_document - # @return [::Google::Cloud::Firestore::V1::Precondition] - # An optional precondition on the document. - # The request will fail if this is set and not met by the target document. - class UpdateDocumentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::V1::Firestore::Client#delete_document Firestore.DeleteDocument}. - # @!attribute [rw] name - # @return [::String] - # Required. The resource name of the Document to delete. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # @!attribute [rw] current_document - # @return [::Google::Cloud::Firestore::V1::Precondition] - # An optional precondition on the document. - # The request will fail if this is set and not met by the target document. - class DeleteDocumentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents Firestore.BatchGetDocuments}. - # @!attribute [rw] database - # @return [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @!attribute [rw] documents - # @return [::Array<::String>] - # The names of the documents to retrieve. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # The request will fail if any of the document is not a child resource of the - # given `database`. Duplicate names will be elided. - # @!attribute [rw] mask - # @return [::Google::Cloud::Firestore::V1::DocumentMask] - # The fields to return. If not set, returns all fields. - # - # If a document has a field that is not present in this mask, that field will - # not be returned in the response. - # @!attribute [rw] transaction - # @return [::String] - # Reads documents in a transaction. - # - # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] new_transaction - # @return [::Google::Cloud::Firestore::V1::TransactionOptions] - # Starts a new transaction and reads the documents. - # Defaults to a read-only transaction. - # The new transaction ID will be returned as the first response in the - # stream. - # - # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Reads documents as they were at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class BatchGetDocumentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The streamed response for - # {::Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents Firestore.BatchGetDocuments}. - # @!attribute [rw] found - # @return [::Google::Cloud::Firestore::V1::Document] - # A document that was requested. - # - # Note: The following fields are mutually exclusive: `found`, `missing`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] missing - # @return [::String] - # A document name that was requested but does not exist. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # - # Note: The following fields are mutually exclusive: `missing`, `found`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] transaction - # @return [::String] - # The transaction that was started as part of this request. - # Will only be set in the first response, and only if - # {::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest#new_transaction BatchGetDocumentsRequest.new_transaction} - # was set in the request. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the document was read. - # This may be monotically increasing, in this case the previous documents in - # the result stream are guaranteed not to have changed between their - # read_time and this one. - class BatchGetDocumentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction Firestore.BeginTransaction}. - # @!attribute [rw] database - # @return [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @!attribute [rw] options - # @return [::Google::Cloud::Firestore::V1::TransactionOptions] - # The options for the transaction. - # Defaults to a read-write transaction. - class BeginTransactionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction Firestore.BeginTransaction}. - # @!attribute [rw] transaction - # @return [::String] - # The transaction that was started. - class BeginTransactionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#commit Firestore.Commit}. - # @!attribute [rw] database - # @return [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @!attribute [rw] writes - # @return [::Array<::Google::Cloud::Firestore::V1::Write>] - # The writes to apply. - # - # Always executed atomically and in order. - # @!attribute [rw] transaction - # @return [::String] - # If set, applies all writes in this transaction, and commits it. - class CommitRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for {::Google::Cloud::Firestore::V1::Firestore::Client#commit Firestore.Commit}. - # @!attribute [rw] write_results - # @return [::Array<::Google::Cloud::Firestore::V1::WriteResult>] - # The result of applying the writes. - # - # This i-th write result corresponds to the i-th write in the - # request. - # @!attribute [rw] commit_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the commit occurred. Any read with an equal or greater - # `read_time` is guaranteed to see the effects of the commit. - class CommitResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#rollback Firestore.Rollback}. - # @!attribute [rw] database - # @return [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @!attribute [rw] transaction - # @return [::String] - # Required. The transaction to roll back. - class RollbackRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#run_query Firestore.RunQuery}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. In the format: - # `projects/{project_id}/databases/{database_id}/documents` or - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # For example: - # `projects/my-project/databases/my-database/documents` or - # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - # @!attribute [rw] structured_query - # @return [::Google::Cloud::Firestore::V1::StructuredQuery] - # A structured query. - # @!attribute [rw] transaction - # @return [::String] - # Run the query within an already active transaction. - # - # The value here is the opaque transaction ID to execute the query in. - # - # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] new_transaction - # @return [::Google::Cloud::Firestore::V1::TransactionOptions] - # Starts a new transaction and reads the documents. - # Defaults to a read-only transaction. - # The new transaction ID will be returned as the first response in the - # stream. - # - # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Reads documents as they were at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] explain_options - # @return [::Google::Cloud::Firestore::V1::ExplainOptions] - # Optional. Explain options for the query. If set, additional query - # statistics will be returned. If not, only query results will be returned. - class RunQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Firestore::V1::Firestore::Client#run_query Firestore.RunQuery}. - # @!attribute [rw] transaction - # @return [::String] - # The transaction that was started as part of this request. - # Can only be set in the first response, and only if - # {::Google::Cloud::Firestore::V1::RunQueryRequest#new_transaction RunQueryRequest.new_transaction} - # was set in the request. If set, no other fields will be set in this - # response. - # @!attribute [rw] document - # @return [::Google::Cloud::Firestore::V1::Document] - # A query result, not set when reporting partial progress. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the document was read. This may be monotonically - # increasing; in this case, the previous documents in the result stream are - # guaranteed not to have changed between their `read_time` and this one. - # - # If the query returns no results, a response with `read_time` and no - # `document` will be sent, and this represents the time at which the query - # was run. - # @!attribute [rw] skipped_results - # @return [::Integer] - # The number of results that have been skipped due to an offset between - # the last response and the current response. - # @!attribute [rw] done - # @return [::Boolean] - # If present, Firestore has completely finished the request and no more - # documents will be returned. - # @!attribute [rw] explain_metrics - # @return [::Google::Cloud::Firestore::V1::ExplainMetrics] - # Query explain metrics. This is only present when the - # {::Google::Cloud::Firestore::V1::RunQueryRequest#explain_options RunQueryRequest.explain_options} - # is provided, and it is sent only once with the last response in the stream. - class RunQueryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::V1::Firestore::Client#execute_pipeline Firestore.ExecutePipeline}. - # @!attribute [rw] database - # @return [::String] - # Required. Database identifier, in the form - # `projects/{project}/databases/{database}`. - # @!attribute [rw] structured_pipeline - # @return [::Google::Cloud::Firestore::V1::StructuredPipeline] - # A pipelined operation. - # @!attribute [rw] transaction - # @return [::String] - # Run the query within an already active transaction. - # - # The value here is the opaque transaction ID to execute the query in. - # - # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] new_transaction - # @return [::Google::Cloud::Firestore::V1::TransactionOptions] - # Execute the pipeline in a new transaction. - # - # The identifier of the newly created transaction will be returned in the - # first response on the stream. This defaults to a read-only transaction. - # - # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Execute the pipeline in a snapshot transaction at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExecutePipelineRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for [Firestore.Execute][]. - # @!attribute [rw] transaction - # @return [::String] - # Newly created transaction identifier. - # - # This field is only specified as part of the first response from the server, - # alongside the `results` field when the original request specified - # [ExecuteRequest.new_transaction][]. - # @!attribute [rw] results - # @return [::Array<::Google::Cloud::Firestore::V1::Document>] - # An ordered batch of results returned executing a pipeline. - # - # The batch size is variable, and can even be zero for when only a partial - # progress message is returned. - # - # The fields present in the returned documents are only those that were - # explicitly requested in the pipeline, this includes those like - # {::Google::Cloud::Firestore::V1::Document#name `__name__`} and - # {::Google::Cloud::Firestore::V1::Document#update_time `__update_time__`}. This is - # explicitly a divergence from `Firestore.RunQuery` / `Firestore.GetDocument` - # RPCs which always return such fields even when they are not specified in - # the {::Google::Cloud::Firestore::V1::DocumentMask `mask`}. - # @!attribute [rw] execution_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the results are valid. - # - # This is a (not strictly) monotonically increasing value across multiple - # responses in the same stream. The API guarantees that all previously - # returned results are still valid at the latest `execution_time`. This - # allows the API consumer to treat the query if it ran at the latest - # `execution_time` returned. - # - # If the query returns no results, a response with `execution_time` and no - # `results` will be sent, and this represents the time at which the operation - # was run. - # @!attribute [rw] explain_stats - # @return [::Google::Cloud::Firestore::V1::ExplainStats] - # Query explain stats. - # - # This is present on the **last** response if the request configured explain - # to run in 'analyze' or 'explain' mode in the pipeline options. If the query - # does not return any results, a response with `explain_stats` and no - # `results` will still be sent. - class ExecutePipelineResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query Firestore.RunAggregationQuery}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. In the format: - # `projects/{project_id}/databases/{database_id}/documents` or - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # For example: - # `projects/my-project/databases/my-database/documents` or - # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - # @!attribute [rw] structured_aggregation_query - # @return [::Google::Cloud::Firestore::V1::StructuredAggregationQuery] - # An aggregation query. - # @!attribute [rw] transaction - # @return [::String] - # Run the aggregation within an already active transaction. - # - # The value here is the opaque transaction ID to execute the query in. - # - # Note: The following fields are mutually exclusive: `transaction`, `new_transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] new_transaction - # @return [::Google::Cloud::Firestore::V1::TransactionOptions] - # Starts a new transaction as part of the query, defaulting to read-only. - # - # The new transaction ID will be returned as the first response in the - # stream. - # - # Note: The following fields are mutually exclusive: `new_transaction`, `transaction`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Executes the query at the given timestamp. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - # - # Note: The following fields are mutually exclusive: `read_time`, `transaction`, `new_transaction`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] explain_options - # @return [::Google::Cloud::Firestore::V1::ExplainOptions] - # Optional. Explain options for the query. If set, additional query - # statistics will be returned. If not, only query results will be returned. - class RunAggregationQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query Firestore.RunAggregationQuery}. - # @!attribute [rw] result - # @return [::Google::Cloud::Firestore::V1::AggregationResult] - # A single aggregation result. - # - # Not present when reporting partial progress. - # @!attribute [rw] transaction - # @return [::String] - # The transaction that was started as part of this request. - # - # Only present on the first response when the request requested to start - # a new transaction. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the aggregate result was computed. This is always - # monotonically increasing; in this case, the previous AggregationResult in - # the result stream are guaranteed not to have changed between their - # `read_time` and this one. - # - # If the query returns no results, a response with `read_time` and no - # `result` will be sent, and this represents the time at which the query - # was run. - # @!attribute [rw] explain_metrics - # @return [::Google::Cloud::Firestore::V1::ExplainMetrics] - # Query explain metrics. This is only present when the - # {::Google::Cloud::Firestore::V1::RunAggregationQueryRequest#explain_options RunAggregationQueryRequest.explain_options} - # is provided, and it is sent only once with the last response in the stream. - class RunAggregationQueryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::V1::Firestore::Client#partition_query Firestore.PartitionQuery}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent resource name. In the format: - # `projects/{project_id}/databases/{database_id}/documents`. - # Document resource names are not supported; only database resource names - # can be specified. - # @!attribute [rw] structured_query - # @return [::Google::Cloud::Firestore::V1::StructuredQuery] - # A structured query. - # Query must specify collection with all descendants and be ordered by name - # ascending. Other filters, order bys, limits, offsets, and start/end - # cursors are not supported. - # @!attribute [rw] partition_count - # @return [::Integer] - # The desired maximum number of partition points. - # The partitions may be returned across multiple pages of results. - # The number must be positive. The actual number of partitions - # returned may be fewer. - # - # For example, this may be set to one fewer than the number of parallel - # queries to be run, or in running a data pipeline job, one fewer than the - # number of workers or compute instances available. - # @!attribute [rw] page_token - # @return [::String] - # The `next_page_token` value returned from a previous call to - # PartitionQuery that may be used to get an additional set of results. - # There are no ordering guarantees between sets of results. Thus, using - # multiple sets of results will require merging the different result sets. - # - # For example, two subsequent calls using a page_token may return: - # - # * cursor B, cursor M, cursor Q - # * cursor A, cursor U, cursor W - # - # To obtain a complete result set ordered with respect to the results of the - # query supplied to PartitionQuery, the results sets should be merged: - # cursor A, cursor B, cursor M, cursor Q, cursor U, cursor W - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of partitions to return in this call, subject to - # `partition_count`. - # - # For example, if `partition_count` = 10 and `page_size` = 8, the first call - # to PartitionQuery will return up to 8 partitions and a `next_page_token` - # if more results exist. A second call to PartitionQuery will return up to - # 2 partitions, to complete the total of 10 specified in `partition_count`. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Reads documents as they were at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - class PartitionQueryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response for - # {::Google::Cloud::Firestore::V1::Firestore::Client#partition_query Firestore.PartitionQuery}. - # @!attribute [rw] partitions - # @return [::Array<::Google::Cloud::Firestore::V1::Cursor>] - # Partition results. - # Each partition is a split point that can be used by RunQuery as a starting - # or end point for the query results. The RunQuery requests must be made with - # the same query supplied to this PartitionQuery request. The partition - # cursors will be ordered according to same ordering as the results of the - # query supplied to PartitionQuery. - # - # For example, if a PartitionQuery request returns partition cursors A and B, - # running the following three queries will return the entire result set of - # the original query: - # - # * query, end_at A - # * query, start_at A, end_at B - # * query, start_at B - # - # An empty result may indicate that the query has too few results to be - # partitioned, or that the query is not yet supported for partitioning. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that may be used to request an additional set of results, up - # to the number specified by `partition_count` in the PartitionQuery request. - # If blank, there are no more results. - class PartitionQueryResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for {::Google::Cloud::Firestore::V1::Firestore::Client#write Firestore.Write}. - # - # The first request creates a stream, or resumes an existing one from a token. - # - # When creating a new stream, the server replies with a response containing - # only an ID and a token, to use in the next request. - # - # When resuming a stream, the server first streams any responses later than the - # given token, then a response containing only an up-to-date token, to use in - # the next request. - # @!attribute [rw] database - # @return [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # This is only required in the first message. - # @!attribute [rw] stream_id - # @return [::String] - # The ID of the write stream to resume. - # This may only be set in the first message. When left empty, a new write - # stream will be created. - # @!attribute [rw] writes - # @return [::Array<::Google::Cloud::Firestore::V1::Write>] - # The writes to apply. - # - # Always executed atomically and in order. - # This must be empty on the first request. - # This may be empty on the last request. - # This must not be empty on all other requests. - # @!attribute [rw] stream_token - # @return [::String] - # A stream token that was previously sent by the server. - # - # The client should set this field to the token from the most recent - # {::Google::Cloud::Firestore::V1::WriteResponse WriteResponse} it has received. This - # acknowledges that the client has received responses up to this token. After - # sending this token, earlier tokens may not be used anymore. - # - # The server may close the stream if there are too many unacknowledged - # responses. - # - # Leave this field unset when creating a new stream. To resume a stream at - # a specific point, set this field and the `stream_id` field. - # - # Leave this field unset when creating a new stream. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels associated with this write request. - class WriteRequest - 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 - - # The response for {::Google::Cloud::Firestore::V1::Firestore::Client#write Firestore.Write}. - # @!attribute [rw] stream_id - # @return [::String] - # The ID of the stream. - # Only set on the first message, when a new stream was created. - # @!attribute [rw] stream_token - # @return [::String] - # A token that represents the position of this response in the stream. - # This can be used by a client to resume the stream at this point. - # - # This field is always set. - # @!attribute [rw] write_results - # @return [::Array<::Google::Cloud::Firestore::V1::WriteResult>] - # The result of applying the writes. - # - # This i-th write result corresponds to the i-th write in the - # request. - # @!attribute [rw] commit_time - # @return [::Google::Protobuf::Timestamp] - # The time at which the commit occurred. Any read with an equal or greater - # `read_time` is guaranteed to see the effects of the write. - class WriteResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request for {::Google::Cloud::Firestore::V1::Firestore::Client#listen Firestore.Listen} - # @!attribute [rw] database - # @return [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @!attribute [rw] add_target - # @return [::Google::Cloud::Firestore::V1::Target] - # A target to add to this stream. - # - # Note: The following fields are mutually exclusive: `add_target`, `remove_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] remove_target - # @return [::Integer] - # The ID of a target to remove from this stream. - # - # Note: The following fields are mutually exclusive: `remove_target`, `add_target`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels associated with this target change. - class ListenRequest - 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 - - # The response for {::Google::Cloud::Firestore::V1::Firestore::Client#listen Firestore.Listen}. - # @!attribute [rw] target_change - # @return [::Google::Cloud::Firestore::V1::TargetChange] - # Targets have changed. - # - # Note: The following fields are mutually exclusive: `target_change`, `document_change`, `document_delete`, `document_remove`, `filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] document_change - # @return [::Google::Cloud::Firestore::V1::DocumentChange] - # A {::Google::Cloud::Firestore::V1::Document Document} has changed. - # - # Note: The following fields are mutually exclusive: `document_change`, `target_change`, `document_delete`, `document_remove`, `filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] document_delete - # @return [::Google::Cloud::Firestore::V1::DocumentDelete] - # A {::Google::Cloud::Firestore::V1::Document Document} has been deleted. - # - # Note: The following fields are mutually exclusive: `document_delete`, `target_change`, `document_change`, `document_remove`, `filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] document_remove - # @return [::Google::Cloud::Firestore::V1::DocumentRemove] - # A {::Google::Cloud::Firestore::V1::Document Document} has been removed from a target - # (because it is no longer relevant to that target). - # - # Note: The following fields are mutually exclusive: `document_remove`, `target_change`, `document_change`, `document_delete`, `filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] filter - # @return [::Google::Cloud::Firestore::V1::ExistenceFilter] - # A filter to apply to the set of documents previously returned for the - # given target. - # - # Returned when documents may have been removed from the given target, but - # the exact documents are unknown. - # - # Note: The following fields are mutually exclusive: `filter`, `target_change`, `document_change`, `document_delete`, `document_remove`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ListenResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A specification of a set of documents to listen to. - # @!attribute [rw] query - # @return [::Google::Cloud::Firestore::V1::Target::QueryTarget] - # A target specified by a query. - # - # Note: The following fields are mutually exclusive: `query`, `documents`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] documents - # @return [::Google::Cloud::Firestore::V1::Target::DocumentsTarget] - # A target specified by a set of document names. - # - # Note: The following fields are mutually exclusive: `documents`, `query`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] resume_token - # @return [::String] - # A resume token from a prior - # {::Google::Cloud::Firestore::V1::TargetChange TargetChange} for an identical target. - # - # Using a resume token with a different target is unsupported and may fail. - # - # Note: The following fields are mutually exclusive: `resume_token`, `read_time`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Start listening after a specific `read_time`. - # - # The client must know the state of matching documents at this time. - # - # Note: The following fields are mutually exclusive: `read_time`, `resume_token`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] target_id - # @return [::Integer] - # The target ID that identifies the target on the stream. Must be a positive - # number and non-zero. - # - # If `target_id` is 0 (or unspecified), the server will assign an ID for this - # target and return that in a `TargetChange::ADD` event. Once a target with - # `target_id=0` is added, all subsequent targets must also have - # `target_id=0`. If an `AddTarget` request with `target_id != 0` is - # sent to the server after a target with `target_id=0` is added, the server - # will immediately send a response with a `TargetChange::Remove` event. - # - # Note that if the client sends multiple `AddTarget` requests - # without an ID, the order of IDs returned in `TargetChange.target_ids` are - # undefined. Therefore, clients should provide a target ID instead of relying - # on the server to assign one. - # - # If `target_id` is non-zero, there must not be an existing active target on - # this stream with the same ID. - # @!attribute [rw] once - # @return [::Boolean] - # If the target should be removed once it is current and consistent. - # @!attribute [rw] expected_count - # @return [::Google::Protobuf::Int32Value] - # The number of documents that last matched the query at the resume token or - # read time. - # - # This value is only relevant when a `resume_type` is provided. This value - # being present and greater than zero signals that the client wants - # `ExistenceFilter.unchanged_names` to be included in the response. - class Target - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A target specified by a set of documents names. - # @!attribute [rw] documents - # @return [::Array<::String>] - # The names of the documents to retrieve. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # The request will fail if any of the document is not a child resource of - # the given `database`. Duplicate names will be elided. - class DocumentsTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A target specified by a query. - # @!attribute [rw] parent - # @return [::String] - # The parent resource name. In the format: - # `projects/{project_id}/databases/{database_id}/documents` or - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # For example: - # `projects/my-project/databases/my-database/documents` or - # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - # @!attribute [rw] structured_query - # @return [::Google::Cloud::Firestore::V1::StructuredQuery] - # A structured query. - class QueryTarget - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Targets being watched have changed. - # @!attribute [rw] target_change_type - # @return [::Google::Cloud::Firestore::V1::TargetChange::TargetChangeType] - # The type of change that occurred. - # @!attribute [rw] target_ids - # @return [::Array<::Integer>] - # The target IDs of targets that have changed. - # - # If empty, the change applies to all targets. - # - # The order of the target IDs is not defined. - # @!attribute [rw] cause - # @return [::Google::Rpc::Status] - # The error that resulted in this change, if applicable. - # @!attribute [rw] resume_token - # @return [::String] - # A token that can be used to resume the stream for the given `target_ids`, - # or all targets if `target_ids` is empty. - # - # Not set on every target change. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # The consistent `read_time` for the given `target_ids` (omitted when the - # target_ids are not at a consistent snapshot). - # - # The stream is guaranteed to send a `read_time` with `target_ids` empty - # whenever the entire stream reaches a new consistent snapshot. ADD, - # CURRENT, and RESET messages are guaranteed to (eventually) result in a - # new consistent snapshot (while NO_CHANGE and REMOVE messages are not). - # - # For a given stream, `read_time` is guaranteed to be monotonically - # increasing. - class TargetChange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The type of change. - module TargetChangeType - # No change has occurred. Used only to send an updated `resume_token`. - NO_CHANGE = 0 - - # The targets have been added. - ADD = 1 - - # The targets have been removed. - REMOVE = 2 - - # The targets reflect all changes committed before the targets were added - # to the stream. - # - # This will be sent after or with a `read_time` that is greater than or - # equal to the time at which the targets were added. - # - # Listeners can wait for this change if read-after-write semantics - # are desired. - CURRENT = 3 - - # The targets have been reset, and a new initial state for the targets - # will be returned in subsequent changes. - # - # After the initial state is complete, `CURRENT` will be returned even - # if the target was previously indicated to be `CURRENT`. - RESET = 4 - end - end - - # The request for - # {::Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids Firestore.ListCollectionIds}. - # @!attribute [rw] parent - # @return [::String] - # Required. The parent document. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # For example: - # `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom` - # @!attribute [rw] page_size - # @return [::Integer] - # The maximum number of results to return. - # @!attribute [rw] page_token - # @return [::String] - # A page token. Must be a value from - # {::Google::Cloud::Firestore::V1::ListCollectionIdsResponse ListCollectionIdsResponse}. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # Reads documents as they were at the given time. - # - # This must be a microsecond precision timestamp within the past one hour, - # or if Point-in-Time Recovery is enabled, can additionally be a whole - # minute timestamp within the past 7 days. - class ListCollectionIdsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The response from - # {::Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids Firestore.ListCollectionIds}. - # @!attribute [rw] collection_ids - # @return [::Array<::String>] - # The collection ids. - # @!attribute [rw] next_page_token - # @return [::String] - # A page token that may be used to continue the list. - class ListCollectionIdsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The request for - # {::Google::Cloud::Firestore::V1::Firestore::Client#batch_write Firestore.BatchWrite}. - # @!attribute [rw] database - # @return [::String] - # Required. The database name. In the format: - # `projects/{project_id}/databases/{database_id}`. - # @!attribute [rw] writes - # @return [::Array<::Google::Cloud::Firestore::V1::Write>] - # The writes to apply. - # - # Method does not apply writes atomically and does not guarantee ordering. - # Each write succeeds or fails independently. You cannot write to the same - # document more than once per request. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels associated with this batch write. - class BatchWriteRequest - 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 - - # The response from - # {::Google::Cloud::Firestore::V1::Firestore::Client#batch_write Firestore.BatchWrite}. - # @!attribute [rw] write_results - # @return [::Array<::Google::Cloud::Firestore::V1::WriteResult>] - # The result of applying the writes. - # - # This i-th write result corresponds to the i-th write in the - # request. - # @!attribute [rw] status - # @return [::Array<::Google::Rpc::Status>] - # The status of applying the writes. - # - # This i-th write status corresponds to the i-th write in the - # request. - class BatchWriteResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/pipeline.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/pipeline.rb deleted file mode 100644 index f46ac594fed8..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/pipeline.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! - - -module Google - module Cloud - module Firestore - module V1 - # A Firestore query represented as an ordered list of operations / stages. - # - # This is considered the top-level function which plans and executes a query. - # It is logically equivalent to `query(stages, options)`, but prevents the - # client from having to build a function wrapper. - # @!attribute [rw] pipeline - # @return [::Google::Cloud::Firestore::V1::Pipeline] - # Required. The pipeline query to execute. - # @!attribute [rw] options - # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Firestore::V1::Value}] - # Optional. Optional query-level arguments. - class StructuredPipeline - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::Google::Cloud::Firestore::V1::Value] - class OptionsEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query.rb deleted file mode 100644 index 88beb633529b..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query.rb +++ /dev/null @@ -1,629 +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 Firestore - module V1 - # A Firestore query. - # - # The query stages are executed in the following order: - # 1. from - # 2. where - # 3. select - # 4. order_by + start_at + end_at - # 5. offset - # 6. limit - # 7. find_nearest - # @!attribute [rw] select - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::Projection] - # Optional sub-set of the fields to return. - # - # This acts as a {::Google::Cloud::Firestore::V1::DocumentMask DocumentMask} over the - # documents returned from a query. When not set, assumes that the caller - # wants all fields returned. - # @!attribute [rw] from - # @return [::Array<::Google::Cloud::Firestore::V1::StructuredQuery::CollectionSelector>] - # The collections to query. - # @!attribute [rw] where - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::Filter] - # The filter to apply. - # @!attribute [rw] order_by - # @return [::Array<::Google::Cloud::Firestore::V1::StructuredQuery::Order>] - # The order to apply to the query results. - # - # Firestore allows callers to provide a full ordering, a partial ordering, or - # no ordering at all. In all cases, Firestore guarantees a stable ordering - # through the following rules: - # - # * The `order_by` is required to reference all fields used with an - # inequality filter. - # * All fields that are required to be in the `order_by` but are not already - # present are appended in lexicographical ordering of the field name. - # * If an order on `__name__` is not specified, it is appended by default. - # - # Fields are appended with the same sort direction as the last order - # specified, or 'ASCENDING' if no order was specified. For example: - # - # * `ORDER BY a` becomes `ORDER BY a ASC, __name__ ASC` - # * `ORDER BY a DESC` becomes `ORDER BY a DESC, __name__ DESC` - # * `WHERE a > 1` becomes `WHERE a > 1 ORDER BY a ASC, __name__ ASC` - # * `WHERE __name__ > ... AND a > 1` becomes - # `WHERE __name__ > ... AND a > 1 ORDER BY a ASC, __name__ ASC` - # @!attribute [rw] start_at - # @return [::Google::Cloud::Firestore::V1::Cursor] - # A potential prefix of a position in the result set to start the query at. - # - # The ordering of the result set is based on the `ORDER BY` clause of the - # original query. - # - # ``` - # SELECT * FROM k WHERE a = 1 AND b > 2 ORDER BY b ASC, __name__ ASC; - # ``` - # - # This query's results are ordered by `(b ASC, __name__ ASC)`. - # - # Cursors can reference either the full ordering or a prefix of the location, - # though it cannot reference more fields than what are in the provided - # `ORDER BY`. - # - # Continuing off the example above, attaching the following start cursors - # will have varying impact: - # - # - `START BEFORE (2, /k/123)`: start the query right before `a = 1 AND - # b > 2 AND __name__ > /k/123`. - # - `START AFTER (10)`: start the query right after `a = 1 AND b > 10`. - # - # Unlike `OFFSET` which requires scanning over the first N results to skip, - # a start cursor allows the query to begin at a logical position. This - # position is not required to match an actual result, it will scan forward - # from this position to find the next document. - # - # Requires: - # - # * The number of values cannot be greater than the number of fields - # specified in the `ORDER BY` clause. - # @!attribute [rw] end_at - # @return [::Google::Cloud::Firestore::V1::Cursor] - # A potential prefix of a position in the result set to end the query at. - # - # This is similar to `START_AT` but with it controlling the end position - # rather than the start position. - # - # Requires: - # - # * The number of values cannot be greater than the number of fields - # specified in the `ORDER BY` clause. - # @!attribute [rw] offset - # @return [::Integer] - # The number of documents to skip before returning the first result. - # - # This applies after the constraints specified by the `WHERE`, `START AT`, & - # `END AT` but before the `LIMIT` clause. - # - # Requires: - # - # * The value must be greater than or equal to zero if specified. - # @!attribute [rw] limit - # @return [::Google::Protobuf::Int32Value] - # The maximum number of results to return. - # - # Applies after all other constraints. - # - # Requires: - # - # * The value must be greater than or equal to zero if specified. - # @!attribute [rw] find_nearest - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FindNearest] - # Optional. A potential nearest neighbors search. - # - # Applies after all other filters and ordering. - # - # Finds the closest vector embeddings to the given query vector. - class StructuredQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A selection of a collection, such as `messages as m1`. - # @!attribute [rw] collection_id - # @return [::String] - # The collection ID. - # When set, selects only collections with this ID. - # @!attribute [rw] all_descendants - # @return [::Boolean] - # When false, selects only collections that are immediate children of - # the `parent` specified in the containing `RunQueryRequest`. - # When true, selects all descendant collections. - class CollectionSelector - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A filter. - # @!attribute [rw] composite_filter - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::CompositeFilter] - # A composite filter. - # - # Note: The following fields are mutually exclusive: `composite_filter`, `field_filter`, `unary_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] field_filter - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldFilter] - # A filter on a document field. - # - # Note: The following fields are mutually exclusive: `field_filter`, `composite_filter`, `unary_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] unary_filter - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::UnaryFilter] - # A filter that takes exactly one argument. - # - # Note: The following fields are mutually exclusive: `unary_filter`, `composite_filter`, `field_filter`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Filter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A filter that merges multiple other filters using the given operator. - # @!attribute [rw] op - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::CompositeFilter::Operator] - # The operator for combining multiple filters. - # @!attribute [rw] filters - # @return [::Array<::Google::Cloud::Firestore::V1::StructuredQuery::Filter>] - # The list of filters to combine. - # - # Requires: - # - # * At least one filter is present. - class CompositeFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A composite filter operator. - module Operator - # Unspecified. This value must not be used. - OPERATOR_UNSPECIFIED = 0 - - # Documents are required to satisfy all of the combined filters. - AND = 1 - - # Documents are required to satisfy at least one of the combined filters. - OR = 2 - end - end - - # A filter on a specific field. - # @!attribute [rw] field - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference] - # The field to filter by. - # @!attribute [rw] op - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldFilter::Operator] - # The operator to filter by. - # @!attribute [rw] value - # @return [::Google::Cloud::Firestore::V1::Value] - # The value to compare to. - class FieldFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A field filter operator. - module Operator - # Unspecified. This value must not be used. - OPERATOR_UNSPECIFIED = 0 - - # The given `field` is less than the given `value`. - # - # Requires: - # - # * That `field` come first in `order_by`. - LESS_THAN = 1 - - # The given `field` is less than or equal to the given `value`. - # - # Requires: - # - # * That `field` come first in `order_by`. - LESS_THAN_OR_EQUAL = 2 - - # The given `field` is greater than the given `value`. - # - # Requires: - # - # * That `field` come first in `order_by`. - GREATER_THAN = 3 - - # The given `field` is greater than or equal to the given `value`. - # - # Requires: - # - # * That `field` come first in `order_by`. - GREATER_THAN_OR_EQUAL = 4 - - # The given `field` is equal to the given `value`. - EQUAL = 5 - - # The given `field` is not equal to the given `value`. - # - # Requires: - # - # * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - # * That `field` comes first in the `order_by`. - NOT_EQUAL = 6 - - # The given `field` is an array that contains the given `value`. - ARRAY_CONTAINS = 7 - - # The given `field` is equal to at least one value in the given array. - # - # Requires: - # - # * That `value` is a non-empty `ArrayValue`, subject to disjunction - # limits. - # * No `NOT_IN` filters in the same query. - IN = 8 - - # The given `field` is an array that contains any of the values in the - # given array. - # - # Requires: - # - # * That `value` is a non-empty `ArrayValue`, subject to disjunction - # limits. - # * No other `ARRAY_CONTAINS_ANY` filters within the same disjunction. - # * No `NOT_IN` filters in the same query. - ARRAY_CONTAINS_ANY = 9 - - # The value of the `field` is not in the given array. - # - # Requires: - # - # * That `value` is a non-empty `ArrayValue` with at most 10 values. - # * No other `OR`, `IN`, `ARRAY_CONTAINS_ANY`, `NOT_IN`, `NOT_EQUAL`, - # `IS_NOT_NULL`, or `IS_NOT_NAN`. - # * That `field` comes first in the `order_by`. - NOT_IN = 10 - end - end - - # A filter with a single operand. - # @!attribute [rw] op - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::UnaryFilter::Operator] - # The unary operator to apply. - # @!attribute [rw] field - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference] - # The field to which to apply the operator. - class UnaryFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A unary operator. - module Operator - # Unspecified. This value must not be used. - OPERATOR_UNSPECIFIED = 0 - - # The given `field` is equal to `NaN`. - IS_NAN = 2 - - # The given `field` is equal to `NULL`. - IS_NULL = 3 - - # The given `field` is not equal to `NaN`. - # - # Requires: - # - # * No other `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - # * That `field` comes first in the `order_by`. - IS_NOT_NAN = 4 - - # The given `field` is not equal to `NULL`. - # - # Requires: - # - # * A single `NOT_EQUAL`, `NOT_IN`, `IS_NOT_NULL`, or `IS_NOT_NAN`. - # * That `field` comes first in the `order_by`. - IS_NOT_NULL = 5 - end - end - - # An order on a field. - # @!attribute [rw] field - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference] - # The field to order by. - # @!attribute [rw] direction - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::Direction] - # The direction to order by. Defaults to `ASCENDING`. - class Order - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A reference to a field in a document, ex: `stats.operations`. - # @!attribute [rw] field_path - # @return [::String] - # A reference to a field in a document. - # - # Requires: - # - # * MUST be a dot-delimited (`.`) string of segments, where each segment - # conforms to {::Google::Cloud::Firestore::V1::Document#fields document field name} - # limitations. - class FieldReference - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The projection of document's fields to return. - # @!attribute [rw] fields - # @return [::Array<::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference>] - # The fields to return. - # - # If empty, all fields are returned. To only return the name - # of the document, use `['__name__']`. - class Projection - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Nearest Neighbors search config. The ordering provided by FindNearest - # supersedes the order_by stage. If multiple documents have the same vector - # distance, the returned document order is not guaranteed to be stable - # between queries. - # @!attribute [rw] vector_field - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference] - # Required. An indexed vector field to search upon. Only documents which - # contain vectors whose dimensionality match the query_vector can be - # returned. - # @!attribute [rw] query_vector - # @return [::Google::Cloud::Firestore::V1::Value] - # Required. The query vector that we are searching on. Must be a vector of - # no more than 2048 dimensions. - # @!attribute [rw] distance_measure - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FindNearest::DistanceMeasure] - # Required. The distance measure to use, required. - # @!attribute [rw] limit - # @return [::Google::Protobuf::Int32Value] - # Required. The number of nearest neighbors to return. Must be a positive - # integer of no more than 1000. - # @!attribute [rw] distance_result_field - # @return [::String] - # Optional. Optional name of the field to output the result of the vector - # distance calculation. Must conform to [document field - # name][google.firestore.v1.Document.fields] limitations. - # @!attribute [rw] distance_threshold - # @return [::Google::Protobuf::DoubleValue] - # Optional. Option to specify a threshold for which no less similar - # documents will be returned. The behavior of the specified - # `distance_measure` will affect the meaning of the distance threshold. - # Since DOT_PRODUCT distances increase when the vectors are more similar, - # the comparison is inverted. - # - # * For EUCLIDEAN, COSINE: `WHERE distance <= distance_threshold` - # * For DOT_PRODUCT: `WHERE distance >= distance_threshold` - class FindNearest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # The distance measure to use when comparing vectors. - module DistanceMeasure - # Should not be set. - DISTANCE_MEASURE_UNSPECIFIED = 0 - - # Measures the EUCLIDEAN distance between the vectors. See - # [Euclidean](https://en.wikipedia.org/wiki/Euclidean_distance) to learn - # more. The resulting distance decreases the more similar two vectors - # are. - EUCLIDEAN = 1 - - # COSINE distance compares vectors based on the angle between them, which - # allows you to measure similarity that isn't based on the vectors - # magnitude. We recommend using DOT_PRODUCT with unit normalized vectors - # instead of COSINE distance, which is mathematically equivalent with - # better performance. See [Cosine - # Similarity](https://en.wikipedia.org/wiki/Cosine_similarity) to learn - # more about COSINE similarity and COSINE distance. The resulting - # COSINE distance decreases the more similar two vectors are. - COSINE = 2 - - # Similar to cosine but is affected by the magnitude of the vectors. See - # [Dot Product](https://en.wikipedia.org/wiki/Dot_product) to learn more. - # The resulting distance increases the more similar two vectors are. - DOT_PRODUCT = 3 - end - end - - # A sort direction. - module Direction - # Unspecified. - DIRECTION_UNSPECIFIED = 0 - - # Ascending. - ASCENDING = 1 - - # Descending. - DESCENDING = 2 - end - end - - # Firestore query for running an aggregation over a - # {::Google::Cloud::Firestore::V1::StructuredQuery StructuredQuery}. - # @!attribute [rw] structured_query - # @return [::Google::Cloud::Firestore::V1::StructuredQuery] - # Nested structured query. - # @!attribute [rw] aggregations - # @return [::Array<::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation>] - # Optional. Series of aggregations to apply over the results of the - # `structured_query`. - # - # Requires: - # - # * A minimum of one and maximum of five aggregations per query. - class StructuredAggregationQuery - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines an aggregation that produces a single result. - # @!attribute [rw] count - # @return [::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation::Count] - # Count aggregator. - # - # Note: The following fields are mutually exclusive: `count`, `sum`, `avg`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] sum - # @return [::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation::Sum] - # Sum aggregator. - # - # Note: The following fields are mutually exclusive: `sum`, `count`, `avg`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] avg - # @return [::Google::Cloud::Firestore::V1::StructuredAggregationQuery::Aggregation::Avg] - # Average aggregator. - # - # Note: The following fields are mutually exclusive: `avg`, `count`, `sum`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] alias - # @return [::String] - # Optional. Optional name of the field to store the result of the - # aggregation into. - # - # If not provided, Firestore will pick a default name following the format - # `field_`. For example: - # - # ``` - # AGGREGATE - # COUNT_UP_TO(1) AS count_up_to_1, - # COUNT_UP_TO(2), - # COUNT_UP_TO(3) AS count_up_to_3, - # COUNT(*) - # OVER ( - # ... - # ); - # ``` - # - # becomes: - # - # ``` - # AGGREGATE - # COUNT_UP_TO(1) AS count_up_to_1, - # COUNT_UP_TO(2) AS field_1, - # COUNT_UP_TO(3) AS count_up_to_3, - # COUNT(*) AS field_2 - # OVER ( - # ... - # ); - # ``` - # - # Requires: - # - # * Must be unique across all aggregation aliases. - # * Conform to {::Google::Cloud::Firestore::V1::Document#fields document field name} - # limitations. - class Aggregation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Count of documents that match the query. - # - # The `COUNT(*)` aggregation function operates on the entire document - # so it does not require a field reference. - # @!attribute [rw] up_to - # @return [::Google::Protobuf::Int64Value] - # Optional. Optional constraint on the maximum number of documents to - # count. - # - # This provides a way to set an upper bound on the number of documents - # to scan, limiting latency, and cost. - # - # Unspecified is interpreted as no bound. - # - # High-Level Example: - # - # ``` - # AGGREGATE COUNT_UP_TO(1000) OVER ( SELECT * FROM k ); - # ``` - # - # Requires: - # - # * Must be greater than zero when present. - class Count - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Sum of the values of the requested field. - # - # * Only numeric values will be aggregated. All non-numeric values - # including `NULL` are skipped. - # - # * If the aggregated values contain `NaN`, returns `NaN`. Infinity math - # follows IEEE-754 standards. - # - # * If the aggregated value set is empty, returns 0. - # - # * Returns a 64-bit integer if all aggregated numbers are integers and the - # sum result does not overflow. Otherwise, the result is returned as a - # double. Note that even if all the aggregated values are integers, the - # result is returned as a double if it cannot fit within a 64-bit signed - # integer. When this occurs, the returned value will lose precision. - # - # * When underflow occurs, floating-point aggregation is non-deterministic. - # This means that running the same query repeatedly without any changes to - # the underlying values could produce slightly different results each - # time. In those cases, values should be stored as integers over - # floating-point numbers. - # @!attribute [rw] field - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference] - # The field to aggregate on. - class Sum - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Average of the values of the requested field. - # - # * Only numeric values will be aggregated. All non-numeric values - # including `NULL` are skipped. - # - # * If the aggregated values contain `NaN`, returns `NaN`. Infinity math - # follows IEEE-754 standards. - # - # * If the aggregated value set is empty, returns `NULL`. - # - # * Always returns the result as a double. - # @!attribute [rw] field - # @return [::Google::Cloud::Firestore::V1::StructuredQuery::FieldReference] - # The field to aggregate on. - class Avg - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - - # A position in a query result set. - # @!attribute [rw] values - # @return [::Array<::Google::Cloud::Firestore::V1::Value>] - # The values that represent a position, in the order they appear in - # the order by clause of a query. - # - # Can contain fewer values than specified in the order by clause. - # @!attribute [rw] before - # @return [::Boolean] - # If the position is just before or just after the given values, relative - # to the sort order defined by the query. - class Cursor - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query_profile.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query_profile.rb deleted file mode 100644 index 2c04e4f0a820..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/query_profile.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 Cloud - module Firestore - module V1 - # Explain options for the query. - # @!attribute [rw] analyze - # @return [::Boolean] - # Optional. Whether to execute this query. - # - # When false (the default), the query will be planned, returning only - # metrics from the planning stages. - # - # When true, the query will be planned and executed, returning the full - # query results along with both planning and execution stage metrics. - class ExplainOptions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Explain metrics for the query. - # @!attribute [rw] plan_summary - # @return [::Google::Cloud::Firestore::V1::PlanSummary] - # Planning phase information for the query. - # @!attribute [rw] execution_stats - # @return [::Google::Cloud::Firestore::V1::ExecutionStats] - # Aggregated stats from the execution of the query. Only present when - # {::Google::Cloud::Firestore::V1::ExplainOptions#analyze ExplainOptions.analyze} is set - # to true. - class ExplainMetrics - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Planning phase information for the query. - # @!attribute [rw] indexes_used - # @return [::Array<::Google::Protobuf::Struct>] - # The indexes selected for the query. For example: - # [ - # \\{"query_scope": "Collection", "properties": "(foo ASC, __name__ ASC)"}, - # \\{"query_scope": "Collection", "properties": "(bar ASC, __name__ ASC)"} - # ] - class PlanSummary - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Execution statistics for the query. - # @!attribute [rw] results_returned - # @return [::Integer] - # Total number of results returned, including documents, projections, - # aggregation results, keys. - # @!attribute [rw] execution_duration - # @return [::Google::Protobuf::Duration] - # Total time to execute the query in the backend. - # @!attribute [rw] read_operations - # @return [::Integer] - # Total billable read operations. - # @!attribute [rw] debug_stats - # @return [::Google::Protobuf::Struct] - # Debugging statistics from the execution of the query. Note that the - # debugging stats are subject to change as Firestore evolves. It could - # include: - # { - # "indexes_entries_scanned": "1000", - # "documents_scanned": "20", - # "billing_details" : { - # "documents_billable": "20", - # "index_entries_billable": "1000", - # "min_query_cost": "0" - # } - # } - class ExecutionStats - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/write.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/write.rb deleted file mode 100644 index ee5975f34b2c..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/firestore/v1/write.rb +++ /dev/null @@ -1,317 +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 Firestore - module V1 - # A write on a document. - # @!attribute [rw] update - # @return [::Google::Cloud::Firestore::V1::Document] - # A document to write. - # - # Note: The following fields are mutually exclusive: `update`, `delete`, `transform`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] delete - # @return [::String] - # A document name to delete. In the format: - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # - # Note: The following fields are mutually exclusive: `delete`, `update`, `transform`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] transform - # @return [::Google::Cloud::Firestore::V1::DocumentTransform] - # Applies a transformation to a document. - # - # Note: The following fields are mutually exclusive: `transform`, `update`, `delete`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] update_mask - # @return [::Google::Cloud::Firestore::V1::DocumentMask] - # The fields to update in this write. - # - # This field can be set only when the operation is `update`. - # If the mask is not set for an `update` and the document exists, any - # existing data will be overwritten. - # If the mask is set and the document on the server has fields not covered by - # the mask, they are left unchanged. - # Fields referenced in the mask, but not present in the input document, are - # deleted from the document on the server. - # The field paths in this mask must not contain a reserved field name. - # @!attribute [rw] update_transforms - # @return [::Array<::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform>] - # The transforms to perform after update. - # - # This field can be set only when the operation is `update`. If present, this - # write is equivalent to performing `update` and `transform` to the same - # document atomically and in order. - # @!attribute [rw] current_document - # @return [::Google::Cloud::Firestore::V1::Precondition] - # An optional precondition on the document. - # - # The write will fail if this is set and not met by the target document. - class Write - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A transformation of a document. - # @!attribute [rw] document - # @return [::String] - # The name of the document to transform. - # @!attribute [rw] field_transforms - # @return [::Array<::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform>] - # The list of transformations to apply to the fields of the document, in - # order. - # This must not be empty. - class DocumentTransform - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A transformation of a field of the document. - # @!attribute [rw] field_path - # @return [::String] - # The path of the field. See - # {::Google::Cloud::Firestore::V1::Document#fields Document.fields} for the field path - # syntax reference. - # @!attribute [rw] set_to_server_value - # @return [::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform::ServerValue] - # Sets the field to the given server value. - # - # Note: The following fields are mutually exclusive: `set_to_server_value`, `increment`, `maximum`, `minimum`, `append_missing_elements`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] increment - # @return [::Google::Cloud::Firestore::V1::Value] - # Adds the given value to the field's current value. - # - # This must be an integer or a double value. - # If the field is not an integer or double, or if the field does not yet - # exist, the transformation will set the field to the given value. - # If either of the given value or the current field value are doubles, - # both values will be interpreted as doubles. Double arithmetic and - # representation of double values follow IEEE 754 semantics. - # If there is positive/negative integer overflow, the field is resolved - # to the largest magnitude positive/negative integer. - # - # Note: The following fields are mutually exclusive: `increment`, `set_to_server_value`, `maximum`, `minimum`, `append_missing_elements`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] maximum - # @return [::Google::Cloud::Firestore::V1::Value] - # Sets the field to the maximum of its current value and the given value. - # - # This must be an integer or a double value. - # If the field is not an integer or double, or if the field does not yet - # exist, the transformation will set the field to the given value. - # If a maximum operation is applied where the field and the input value - # are of mixed types (that is - one is an integer and one is a double) - # the field takes on the type of the larger operand. If the operands are - # equivalent (e.g. 3 and 3.0), the field does not change. - # 0, 0.0, and -0.0 are all zero. The maximum of a zero stored value and - # zero input value is always the stored value. - # The maximum of any numeric value x and NaN is NaN. - # - # Note: The following fields are mutually exclusive: `maximum`, `set_to_server_value`, `increment`, `minimum`, `append_missing_elements`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] minimum - # @return [::Google::Cloud::Firestore::V1::Value] - # Sets the field to the minimum of its current value and the given value. - # - # This must be an integer or a double value. - # If the field is not an integer or double, or if the field does not yet - # exist, the transformation will set the field to the input value. - # If a minimum operation is applied where the field and the input value - # are of mixed types (that is - one is an integer and one is a double) - # the field takes on the type of the smaller operand. If the operands are - # equivalent (e.g. 3 and 3.0), the field does not change. - # 0, 0.0, and -0.0 are all zero. The minimum of a zero stored value and - # zero input value is always the stored value. - # The minimum of any numeric value x and NaN is NaN. - # - # Note: The following fields are mutually exclusive: `minimum`, `set_to_server_value`, `increment`, `maximum`, `append_missing_elements`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] append_missing_elements - # @return [::Google::Cloud::Firestore::V1::ArrayValue] - # Append the given elements in order if they are not already present in - # the current field value. - # If the field is not an array, or if the field does not yet exist, it is - # first set to the empty array. - # - # Equivalent numbers of different types (e.g. 3L and 3.0) are - # considered equal when checking if a value is missing. - # NaN is equal to NaN, and Null is equal to Null. - # If the input contains multiple equivalent values, only the first will - # be considered. - # - # The corresponding transform_result will be the null value. - # - # Note: The following fields are mutually exclusive: `append_missing_elements`, `set_to_server_value`, `increment`, `maximum`, `minimum`, `remove_all_from_array`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] remove_all_from_array - # @return [::Google::Cloud::Firestore::V1::ArrayValue] - # Remove all of the given elements from the array in the field. - # If the field is not an array, or if the field does not yet exist, it is - # set to the empty array. - # - # Equivalent numbers of the different types (e.g. 3L and 3.0) are - # considered equal when deciding whether an element should be removed. - # NaN is equal to NaN, and Null is equal to Null. - # This will remove all equivalent values if there are duplicates. - # - # The corresponding transform_result will be the null value. - # - # Note: The following fields are mutually exclusive: `remove_all_from_array`, `set_to_server_value`, `increment`, `maximum`, `minimum`, `append_missing_elements`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class FieldTransform - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # A value that is calculated by the server. - module ServerValue - # Unspecified. This value must not be used. - SERVER_VALUE_UNSPECIFIED = 0 - - # The time at which the server processed the request, with millisecond - # precision. If used on multiple fields (same or different documents) in - # a transaction, all the fields will get the same server timestamp. - REQUEST_TIME = 1 - end - end - end - - # The result of applying a write. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The last update time of the document after applying the write. Not set - # after a `delete`. - # - # If the write did not actually change the document, this will be the - # previous update_time. - # @!attribute [rw] transform_results - # @return [::Array<::Google::Cloud::Firestore::V1::Value>] - # The results of applying each - # {::Google::Cloud::Firestore::V1::DocumentTransform::FieldTransform DocumentTransform.FieldTransform}, - # in the same order. - class WriteResult - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A {::Google::Cloud::Firestore::V1::Document Document} has changed. - # - # May be the result of multiple {::Google::Cloud::Firestore::V1::Write writes}, including - # deletes, that ultimately resulted in a new value for the - # {::Google::Cloud::Firestore::V1::Document Document}. - # - # Multiple {::Google::Cloud::Firestore::V1::DocumentChange DocumentChange} messages may be - # returned for the same logical change, if multiple targets are affected. - # @!attribute [rw] document - # @return [::Google::Cloud::Firestore::V1::Document] - # The new state of the {::Google::Cloud::Firestore::V1::Document Document}. - # - # If `mask` is set, contains only fields that were updated or added. - # @!attribute [rw] target_ids - # @return [::Array<::Integer>] - # A set of target IDs of targets that match this document. - # @!attribute [rw] removed_target_ids - # @return [::Array<::Integer>] - # A set of target IDs for targets that no longer match this document. - class DocumentChange - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A {::Google::Cloud::Firestore::V1::Document Document} has been deleted. - # - # May be the result of multiple {::Google::Cloud::Firestore::V1::Write writes}, including - # updates, the last of which deleted the - # {::Google::Cloud::Firestore::V1::Document Document}. - # - # Multiple {::Google::Cloud::Firestore::V1::DocumentDelete DocumentDelete} messages may be - # returned for the same logical delete, if multiple targets are affected. - # @!attribute [rw] document - # @return [::String] - # The resource name of the {::Google::Cloud::Firestore::V1::Document Document} that was - # deleted. - # @!attribute [rw] removed_target_ids - # @return [::Array<::Integer>] - # A set of target IDs for targets that previously matched this entity. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # The read timestamp at which the delete was observed. - # - # Greater or equal to the `commit_time` of the delete. - class DocumentDelete - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A {::Google::Cloud::Firestore::V1::Document Document} has been removed from the view of - # the targets. - # - # Sent if the document is no longer relevant to a target and is out of view. - # Can be sent instead of a DocumentDelete or a DocumentChange if the server - # can not send the new value of the document. - # - # Multiple {::Google::Cloud::Firestore::V1::DocumentRemove DocumentRemove} messages may be - # returned for the same logical write or delete, if multiple targets are - # affected. - # @!attribute [rw] document - # @return [::String] - # The resource name of the {::Google::Cloud::Firestore::V1::Document Document} that has - # gone out of view. - # @!attribute [rw] removed_target_ids - # @return [::Array<::Integer>] - # A set of target IDs for targets that previously matched this document. - # @!attribute [rw] read_time - # @return [::Google::Protobuf::Timestamp] - # The read timestamp at which the remove was observed. - # - # Greater or equal to the `commit_time` of the change/delete/remove. - class DocumentRemove - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A digest of all the documents that match a given target. - # @!attribute [rw] target_id - # @return [::Integer] - # The target ID to which this filter applies. - # @!attribute [rw] count - # @return [::Integer] - # The total count of documents that match - # {::Google::Cloud::Firestore::V1::ExistenceFilter#target_id target_id}. - # - # If different from the count of documents in the client that match, the - # client must manually determine which documents no longer match the target. - # - # The client can use the `unchanged_names` bloom filter to assist with - # this determination by testing ALL the document names against the filter; - # if the document name is NOT in the filter, it means the document no - # longer matches the target. - # @!attribute [rw] unchanged_names - # @return [::Google::Cloud::Firestore::V1::BloomFilter] - # A bloom filter that, despite its name, contains the UTF-8 byte encodings of - # the resource names of ALL the documents that match - # {::Google::Cloud::Firestore::V1::ExistenceFilter#target_id target_id}, in the form - # `projects/{project_id}/databases/{database_id}/documents/{document_path}`. - # - # This bloom filter may be omitted at the server's discretion, such as if it - # is deemed that the client will not make use of it or if it is too - # computationally expensive to calculate or transmit. Clients must gracefully - # handle this field being absent by falling back to the logic used before - # this field existed; that is, re-add the target without a resume token to - # figure out which documents in the client's cache are out of sync. - class ExistenceFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/protobuf/struct.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/struct.rb deleted file mode 100644 index 39e1aca868d2..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/protobuf/wrappers.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/wrappers.rb deleted file mode 100644 index 1b485b0c3456..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/protobuf/wrappers.rb +++ /dev/null @@ -1,121 +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 - # Wrapper message for `double`. - # - # The JSON representation for `DoubleValue` is JSON number. - # @!attribute [rw] value - # @return [::Float] - # The double value. - class DoubleValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `float`. - # - # The JSON representation for `FloatValue` is JSON number. - # @!attribute [rw] value - # @return [::Float] - # The float value. - class FloatValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int64`. - # - # The JSON representation for `Int64Value` is JSON string. - # @!attribute [rw] value - # @return [::Integer] - # The int64 value. - class Int64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint64`. - # - # The JSON representation for `UInt64Value` is JSON string. - # @!attribute [rw] value - # @return [::Integer] - # The uint64 value. - class UInt64Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `int32`. - # - # The JSON representation for `Int32Value` is JSON number. - # @!attribute [rw] value - # @return [::Integer] - # The int32 value. - class Int32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `uint32`. - # - # The JSON representation for `UInt32Value` is JSON number. - # @!attribute [rw] value - # @return [::Integer] - # The uint32 value. - class UInt32Value - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bool`. - # - # The JSON representation for `BoolValue` is JSON `true` and `false`. - # @!attribute [rw] value - # @return [::Boolean] - # The bool value. - class BoolValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `string`. - # - # The JSON representation for `StringValue` is JSON string. - # @!attribute [rw] value - # @return [::String] - # The string value. - class StringValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Wrapper message for `bytes`. - # - # The JSON representation for `BytesValue` is JSON string. - # @!attribute [rw] value - # @return [::String] - # The bytes value. - class BytesValue - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1/proto_docs/google/type/latlng.rb b/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/type/latlng.rb deleted file mode 100644 index c15e78a39a56..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/proto_docs/google/type/latlng.rb +++ /dev/null @@ -1,38 +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 - # An object that represents a latitude/longitude pair. This is expressed as a - # pair of doubles to represent degrees latitude and degrees longitude. Unless - # specified otherwise, this must conform to the - # WGS84 - # standard. Values must be within normalized ranges. - # @!attribute [rw] latitude - # @return [::Float] - # The latitude in degrees. It must be in the range [-90.0, +90.0]. - # @!attribute [rw] longitude - # @return [::Float] - # The longitude in degrees. It must be in the range [-180.0, +180.0]. - class LatLng - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-firestore-v1/snippets/Gemfile deleted file mode 100644 index 6aafafebdfaa..000000000000 --- a/owl-bot-staging/google-cloud-firestore-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-firestore-v1", path: "../" -else - gem "google-cloud-firestore-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-firestore-v1/snippets/firestore/batch_get_documents.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_get_documents.rb deleted file mode 100644 index f71efdc2f1b1..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_get_documents.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! - -# [START firestore_v1_generated_Firestore_BatchGetDocuments_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the batch_get_documents call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents. -# -def batch_get_documents - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new - - # Call the batch_get_documents method to start streaming. - output = client.batch_get_documents request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse - output.each do |current_response| - p current_response - end -end -# [END firestore_v1_generated_Firestore_BatchGetDocuments_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_write.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_write.rb deleted file mode 100644 index 93e3a3f3ac99..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/batch_write.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 firestore_v1_generated_Firestore_BatchWrite_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the batch_write call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#batch_write. -# -def batch_write - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::BatchWriteRequest.new - - # Call the batch_write method. - result = client.batch_write request - - # The returned object is of type Google::Cloud::Firestore::V1::BatchWriteResponse. - p result -end -# [END firestore_v1_generated_Firestore_BatchWrite_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/begin_transaction.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/begin_transaction.rb deleted file mode 100644 index 110bf9f094b8..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/begin_transaction.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 firestore_v1_generated_Firestore_BeginTransaction_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the begin_transaction call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction. -# -def begin_transaction - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::BeginTransactionRequest.new - - # Call the begin_transaction method. - result = client.begin_transaction request - - # The returned object is of type Google::Cloud::Firestore::V1::BeginTransactionResponse. - p result -end -# [END firestore_v1_generated_Firestore_BeginTransaction_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/commit.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/commit.rb deleted file mode 100644 index 728f621b5c42..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/commit.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 firestore_v1_generated_Firestore_Commit_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the commit call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#commit. -# -def commit - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::CommitRequest.new - - # Call the commit method. - result = client.commit request - - # The returned object is of type Google::Cloud::Firestore::V1::CommitResponse. - p result -end -# [END firestore_v1_generated_Firestore_Commit_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/create_document.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/create_document.rb deleted file mode 100644 index 91b0ca458e0b..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/create_document.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 firestore_v1_generated_Firestore_CreateDocument_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the create_document call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#create_document. -# -def create_document - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::CreateDocumentRequest.new - - # Call the create_document method. - result = client.create_document request - - # The returned object is of type Google::Cloud::Firestore::V1::Document. - p result -end -# [END firestore_v1_generated_Firestore_CreateDocument_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/delete_document.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/delete_document.rb deleted file mode 100644 index 58f88b2364df..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/delete_document.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 firestore_v1_generated_Firestore_DeleteDocument_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the delete_document call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#delete_document. -# -def delete_document - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::DeleteDocumentRequest.new - - # Call the delete_document method. - result = client.delete_document request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END firestore_v1_generated_Firestore_DeleteDocument_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/execute_pipeline.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/execute_pipeline.rb deleted file mode 100644 index 2113693e5c50..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/execute_pipeline.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! - -# [START firestore_v1_generated_Firestore_ExecutePipeline_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the execute_pipeline call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#execute_pipeline. -# -def execute_pipeline - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::ExecutePipelineRequest.new - - # Call the execute_pipeline method to start streaming. - output = client.execute_pipeline request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Firestore::V1::ExecutePipelineResponse - output.each do |current_response| - p current_response - end -end -# [END firestore_v1_generated_Firestore_ExecutePipeline_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/get_document.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/get_document.rb deleted file mode 100644 index 6b7bb9690798..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/get_document.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 firestore_v1_generated_Firestore_GetDocument_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the get_document call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#get_document. -# -def get_document - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::GetDocumentRequest.new - - # Call the get_document method. - result = client.get_document request - - # The returned object is of type Google::Cloud::Firestore::V1::Document. - p result -end -# [END firestore_v1_generated_Firestore_GetDocument_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_collection_ids.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_collection_ids.rb deleted file mode 100644 index 9fd9635f9731..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_collection_ids.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 firestore_v1_generated_Firestore_ListCollectionIds_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the list_collection_ids call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids. -# -def list_collection_ids - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new - - # Call the list_collection_ids method. - result = client.list_collection_ids request - - # The returned object is of type Google::Cloud::Firestore::V1::ListCollectionIdsResponse. - p result -end -# [END firestore_v1_generated_Firestore_ListCollectionIds_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_documents.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_documents.rb deleted file mode 100644 index 50b574e03e61..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/list_documents.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 firestore_v1_generated_Firestore_ListDocuments_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the list_documents call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#list_documents. -# -def list_documents - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::ListDocumentsRequest.new - - # Call the list_documents method. - result = client.list_documents request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Firestore::V1::Document. - p item - end -end -# [END firestore_v1_generated_Firestore_ListDocuments_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/listen.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/listen.rb deleted file mode 100644 index d704f8f68040..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/listen.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! - -# [START firestore_v1_generated_Firestore_Listen_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the listen call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#listen. -# -def listen - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create an input stream. - input = Gapic::StreamInput.new - - # Call the listen method to start streaming. - output = client.listen input - - # Send requests on the stream. For each request object, set fields by - # passing keyword arguments. Be sure to close the stream when done. - input << Google::Cloud::Firestore::V1::ListenRequest.new - input << Google::Cloud::Firestore::V1::ListenRequest.new - input.close - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Firestore::V1::ListenResponse - output.each do |current_response| - p current_response - end -end -# [END firestore_v1_generated_Firestore_Listen_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/partition_query.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/partition_query.rb deleted file mode 100644 index 3b642ca7464a..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/partition_query.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 firestore_v1_generated_Firestore_PartitionQuery_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the partition_query call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#partition_query. -# -def partition_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::PartitionQueryRequest.new - - # Call the partition_query method. - result = client.partition_query request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Firestore::V1::Cursor. - p item - end -end -# [END firestore_v1_generated_Firestore_PartitionQuery_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/rollback.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/rollback.rb deleted file mode 100644 index 5a48928fa963..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/rollback.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 firestore_v1_generated_Firestore_Rollback_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the rollback call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#rollback. -# -def rollback - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::RollbackRequest.new - - # Call the rollback method. - result = client.rollback request - - # The returned object is of type Google::Protobuf::Empty. - p result -end -# [END firestore_v1_generated_Firestore_Rollback_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_aggregation_query.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_aggregation_query.rb deleted file mode 100644 index feb15a4d908f..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_aggregation_query.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! - -# [START firestore_v1_generated_Firestore_RunAggregationQuery_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the run_aggregation_query call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query. -# -def run_aggregation_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new - - # Call the run_aggregation_query method to start streaming. - output = client.run_aggregation_query request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse - output.each do |current_response| - p current_response - end -end -# [END firestore_v1_generated_Firestore_RunAggregationQuery_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_query.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_query.rb deleted file mode 100644 index 741c1e754894..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/run_query.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! - -# [START firestore_v1_generated_Firestore_RunQuery_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the run_query call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#run_query. -# -def run_query - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::RunQueryRequest.new - - # Call the run_query method to start streaming. - output = client.run_query request - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Firestore::V1::RunQueryResponse - output.each do |current_response| - p current_response - end -end -# [END firestore_v1_generated_Firestore_RunQuery_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/update_document.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/update_document.rb deleted file mode 100644 index c1c4d96bad4b..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/update_document.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 firestore_v1_generated_Firestore_UpdateDocument_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the update_document call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#update_document. -# -def update_document - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Firestore::V1::UpdateDocumentRequest.new - - # Call the update_document method. - result = client.update_document request - - # The returned object is of type Google::Cloud::Firestore::V1::Document. - p result -end -# [END firestore_v1_generated_Firestore_UpdateDocument_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/write.rb b/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/write.rb deleted file mode 100644 index 55103736dd0e..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/firestore/write.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! - -# [START firestore_v1_generated_Firestore_Write_sync] -require "google/cloud/firestore/v1" - -## -# Snippet for the write call in the Firestore service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Firestore::V1::Firestore::Client#write. -# -def write - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Firestore::V1::Firestore::Client.new - - # Create an input stream. - input = Gapic::StreamInput.new - - # Call the write method to start streaming. - output = client.write input - - # Send requests on the stream. For each request object, set fields by - # passing keyword arguments. Be sure to close the stream when done. - input << Google::Cloud::Firestore::V1::WriteRequest.new - input << Google::Cloud::Firestore::V1::WriteRequest.new - input.close - - # The returned object is a streamed enumerable yielding elements of type - # ::Google::Cloud::Firestore::V1::WriteResponse - output.each do |current_response| - p current_response - end -end -# [END firestore_v1_generated_Firestore_Write_sync] diff --git a/owl-bot-staging/google-cloud-firestore-v1/snippets/snippet_metadata_google.firestore.v1.json b/owl-bot-staging/google-cloud-firestore-v1/snippets/snippet_metadata_google.firestore.v1.json deleted file mode 100644 index 87be441de1ce..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/snippets/snippet_metadata_google.firestore.v1.json +++ /dev/null @@ -1,695 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-firestore-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.firestore.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "firestore_v1_generated_Firestore_GetDocument_sync", - "title": "Snippet for the get_document call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#get_document.", - "file": "firestore/get_document.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_document", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#get_document", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::GetDocumentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::Document", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "GetDocument", - "full_name": "google.firestore.v1.Firestore.GetDocument", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_ListDocuments_sync", - "title": "Snippet for the list_documents call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#list_documents.", - "file": "firestore/list_documents.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_documents", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#list_documents", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::ListDocumentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::ListDocumentsResponse", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "ListDocuments", - "full_name": "google.firestore.v1.Firestore.ListDocuments", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_UpdateDocument_sync", - "title": "Snippet for the update_document call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#update_document.", - "file": "firestore/update_document.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_document", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#update_document", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::UpdateDocumentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::Document", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "UpdateDocument", - "full_name": "google.firestore.v1.Firestore.UpdateDocument", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_DeleteDocument_sync", - "title": "Snippet for the delete_document call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#delete_document.", - "file": "firestore/delete_document.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_document", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#delete_document", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::DeleteDocumentRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "DeleteDocument", - "full_name": "google.firestore.v1.Firestore.DeleteDocument", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_BatchGetDocuments_sync", - "title": "Snippet for the batch_get_documents call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents.", - "file": "firestore/batch_get_documents.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_get_documents", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#batch_get_documents", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "BatchGetDocuments", - "full_name": "google.firestore.v1.Firestore.BatchGetDocuments", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_BeginTransaction_sync", - "title": "Snippet for the begin_transaction call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction.", - "file": "firestore/begin_transaction.rb", - "language": "RUBY", - "client_method": { - "short_name": "begin_transaction", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#begin_transaction", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::BeginTransactionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::BeginTransactionResponse", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "BeginTransaction", - "full_name": "google.firestore.v1.Firestore.BeginTransaction", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_Commit_sync", - "title": "Snippet for the commit call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#commit.", - "file": "firestore/commit.rb", - "language": "RUBY", - "client_method": { - "short_name": "commit", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#commit", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::CommitRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::CommitResponse", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "Commit", - "full_name": "google.firestore.v1.Firestore.Commit", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_Rollback_sync", - "title": "Snippet for the rollback call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#rollback.", - "file": "firestore/rollback.rb", - "language": "RUBY", - "client_method": { - "short_name": "rollback", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#rollback", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::RollbackRequest", - "name": "request" - } - ], - "result_type": "::Google::Protobuf::Empty", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "Rollback", - "full_name": "google.firestore.v1.Firestore.Rollback", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_RunQuery_sync", - "title": "Snippet for the run_query call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#run_query.", - "file": "firestore/run_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_query", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#run_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::RunQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::RunQueryResponse", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "RunQuery", - "full_name": "google.firestore.v1.Firestore.RunQuery", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_ExecutePipeline_sync", - "title": "Snippet for the execute_pipeline call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#execute_pipeline.", - "file": "firestore/execute_pipeline.rb", - "language": "RUBY", - "client_method": { - "short_name": "execute_pipeline", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#execute_pipeline", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::ExecutePipelineRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::ExecutePipelineResponse", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "ExecutePipeline", - "full_name": "google.firestore.v1.Firestore.ExecutePipeline", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_RunAggregationQuery_sync", - "title": "Snippet for the run_aggregation_query call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query.", - "file": "firestore/run_aggregation_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "run_aggregation_query", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#run_aggregation_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::RunAggregationQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::RunAggregationQueryResponse", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "RunAggregationQuery", - "full_name": "google.firestore.v1.Firestore.RunAggregationQuery", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 49, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_PartitionQuery_sync", - "title": "Snippet for the partition_query call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#partition_query.", - "file": "firestore/partition_query.rb", - "language": "RUBY", - "client_method": { - "short_name": "partition_query", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#partition_query", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::PartitionQueryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::PartitionQueryResponse", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "PartitionQuery", - "full_name": "google.firestore.v1.Firestore.PartitionQuery", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_Write_sync", - "title": "Snippet for the write call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#write.", - "file": "firestore/write.rb", - "language": "RUBY", - "client_method": { - "short_name": "write", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#write", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::WriteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::WriteResponse", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "Write", - "full_name": "google.firestore.v1.Firestore.Write", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 55, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_Listen_sync", - "title": "Snippet for the listen call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#listen.", - "file": "firestore/listen.rb", - "language": "RUBY", - "client_method": { - "short_name": "listen", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#listen", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::ListenRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::ListenResponse", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "Listen", - "full_name": "google.firestore.v1.Firestore.Listen", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 55, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_ListCollectionIds_sync", - "title": "Snippet for the list_collection_ids call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids.", - "file": "firestore/list_collection_ids.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_collection_ids", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#list_collection_ids", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::ListCollectionIdsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::ListCollectionIdsResponse", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "ListCollectionIds", - "full_name": "google.firestore.v1.Firestore.ListCollectionIds", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_BatchWrite_sync", - "title": "Snippet for the batch_write call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#batch_write.", - "file": "firestore/batch_write.rb", - "language": "RUBY", - "client_method": { - "short_name": "batch_write", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#batch_write", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::BatchWriteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::BatchWriteResponse", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "BatchWrite", - "full_name": "google.firestore.v1.Firestore.BatchWrite", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "firestore_v1_generated_Firestore_CreateDocument_sync", - "title": "Snippet for the create_document call in the Firestore service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Firestore::V1::Firestore::Client#create_document.", - "file": "firestore/create_document.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_document", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client#create_document", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Firestore::V1::CreateDocumentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Firestore::V1::Document", - "client": { - "short_name": "Firestore::Client", - "full_name": "::Google::Cloud::Firestore::V1::Firestore::Client" - }, - "method": { - "short_name": "CreateDocument", - "full_name": "google.firestore.v1.Firestore.CreateDocument", - "service": { - "short_name": "Firestore", - "full_name": "google.firestore.v1.Firestore" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_rest_test.rb b/owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_rest_test.rb deleted file mode 100644 index f743e99d9d50..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_rest_test.rb +++ /dev/null @@ -1,951 +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/firestore/v1/firestore_pb" -require "google/cloud/firestore/v1/firestore/rest" - - -class ::Google::Cloud::Firestore::V1::Firestore::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_get_document - # Create test objects. - client_result = ::Google::Cloud::Firestore::V1::Document.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - mask = {} - transaction = "hello world" - - get_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_get_document_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_document_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_document({ name: name, mask: mask, transaction: transaction }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_document name: name, mask: mask, transaction: transaction do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_document ::Google::Cloud::Firestore::V1::GetDocumentRequest.new(name: name, mask: mask, transaction: transaction) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_document({ name: name, mask: mask, transaction: transaction }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_document(::Google::Cloud::Firestore::V1::GetDocumentRequest.new(name: name, mask: mask, transaction: transaction), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_document_client_stub.call_count - end - end - end - - def test_list_documents - # Create test objects. - client_result = ::Google::Cloud::Firestore::V1::ListDocumentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - collection_id = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - mask = {} - transaction = "hello world" - show_missing = true - - list_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_list_documents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_documents_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_documents({ parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_documents parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_documents ::Google::Cloud::Firestore::V1::ListDocumentsRequest.new(parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_documents({ parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_documents(::Google::Cloud::Firestore::V1::ListDocumentsRequest.new(parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_documents_client_stub.call_count - end - end - end - - def test_update_document - # Create test objects. - client_result = ::Google::Cloud::Firestore::V1::Document.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - document = {} - update_mask = {} - mask = {} - current_document = {} - - update_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_update_document_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_document_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_document({ document: document, update_mask: update_mask, mask: mask, current_document: current_document }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_document document: document, update_mask: update_mask, mask: mask, current_document: current_document do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_document ::Google::Cloud::Firestore::V1::UpdateDocumentRequest.new(document: document, update_mask: update_mask, mask: mask, current_document: current_document) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_document({ document: document, update_mask: update_mask, mask: mask, current_document: current_document }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_document(::Google::Cloud::Firestore::V1::UpdateDocumentRequest.new(document: document, update_mask: update_mask, mask: mask, current_document: current_document), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_document_client_stub.call_count - end - end - end - - def test_delete_document - # 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" - current_document = {} - - delete_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_delete_document_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_document_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_document({ name: name, current_document: current_document }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_document name: name, current_document: current_document do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_document ::Google::Cloud::Firestore::V1::DeleteDocumentRequest.new(name: name, current_document: current_document) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_document({ name: name, current_document: current_document }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_document(::Google::Cloud::Firestore::V1::DeleteDocumentRequest.new(name: name, current_document: current_document), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_document_client_stub.call_count - end - end - end - - def test_batch_get_documents - # Create test objects. - client_result = ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - database = "hello world" - documents = ["hello world"] - mask = {} - transaction = "hello world" - - batch_get_documents_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, is_server_streaming:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_batch_get_documents_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_get_documents_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_get_documents({ database: database, documents: documents, mask: mask, transaction: transaction }) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use named arguments - client.batch_get_documents database: database, documents: documents, mask: mask, transaction: transaction do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use protobuf object - client.batch_get_documents ::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new(database: database, documents: documents, mask: mask, transaction: transaction) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use hash object with options - client.batch_get_documents({ database: database, documents: documents, mask: mask, transaction: transaction }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use protobuf object with options - client.batch_get_documents(::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new(database: database, documents: documents, mask: mask, transaction: transaction), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Verify method calls - assert_equal 5, batch_get_documents_client_stub.call_count - end - end - end - - def test_begin_transaction - # Create test objects. - client_result = ::Google::Cloud::Firestore::V1::BeginTransactionResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - database = "hello world" - options = {} - - begin_transaction_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_begin_transaction_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, begin_transaction_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.begin_transaction({ database: database, options: options }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.begin_transaction database: database, options: options do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.begin_transaction ::Google::Cloud::Firestore::V1::BeginTransactionRequest.new(database: database, options: options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.begin_transaction({ database: database, options: options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.begin_transaction(::Google::Cloud::Firestore::V1::BeginTransactionRequest.new(database: database, options: options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, begin_transaction_client_stub.call_count - end - end - end - - def test_commit - # Create test objects. - client_result = ::Google::Cloud::Firestore::V1::CommitResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - database = "hello world" - writes = [{}] - transaction = "hello world" - - commit_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_commit_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, commit_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.commit({ database: database, writes: writes, transaction: transaction }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.commit database: database, writes: writes, transaction: transaction do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.commit ::Google::Cloud::Firestore::V1::CommitRequest.new(database: database, writes: writes, transaction: transaction) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.commit({ database: database, writes: writes, transaction: transaction }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.commit(::Google::Cloud::Firestore::V1::CommitRequest.new(database: database, writes: writes, transaction: transaction), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, commit_client_stub.call_count - end - end - end - - def test_rollback - # 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. - database = "hello world" - transaction = "hello world" - - rollback_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_rollback_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, rollback_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.rollback({ database: database, transaction: transaction }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.rollback database: database, transaction: transaction do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.rollback ::Google::Cloud::Firestore::V1::RollbackRequest.new(database: database, transaction: transaction) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.rollback({ database: database, transaction: transaction }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.rollback(::Google::Cloud::Firestore::V1::RollbackRequest.new(database: database, transaction: transaction), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, rollback_client_stub.call_count - end - end - end - - def test_run_query - # Create test objects. - client_result = ::Google::Cloud::Firestore::V1::RunQueryResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - structured_query = {} - transaction = "hello world" - explain_options = {} - - run_query_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, is_server_streaming:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_run_query_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_query_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_query({ parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options }) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use named arguments - client.run_query parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use protobuf object - client.run_query ::Google::Cloud::Firestore::V1::RunQueryRequest.new(parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use hash object with options - client.run_query({ parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use protobuf object with options - client.run_query(::Google::Cloud::Firestore::V1::RunQueryRequest.new(parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Verify method calls - assert_equal 5, run_query_client_stub.call_count - end - end - end - - def test_execute_pipeline - # Create test objects. - client_result = ::Google::Cloud::Firestore::V1::ExecutePipelineResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - database = "hello world" - structured_pipeline = {} - transaction = "hello world" - - execute_pipeline_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, is_server_streaming:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_execute_pipeline_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, execute_pipeline_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.execute_pipeline({ database: database, structured_pipeline: structured_pipeline, transaction: transaction }) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use named arguments - client.execute_pipeline database: database, structured_pipeline: structured_pipeline, transaction: transaction do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use protobuf object - client.execute_pipeline ::Google::Cloud::Firestore::V1::ExecutePipelineRequest.new(database: database, structured_pipeline: structured_pipeline, transaction: transaction) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use hash object with options - client.execute_pipeline({ database: database, structured_pipeline: structured_pipeline, transaction: transaction }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use protobuf object with options - client.execute_pipeline(::Google::Cloud::Firestore::V1::ExecutePipelineRequest.new(database: database, structured_pipeline: structured_pipeline, transaction: transaction), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Verify method calls - assert_equal 5, execute_pipeline_client_stub.call_count - end - end - end - - def test_run_aggregation_query - # Create test objects. - client_result = ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - structured_aggregation_query = {} - transaction = "hello world" - explain_options = {} - - run_aggregation_query_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, is_server_streaming:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_run_aggregation_query_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, run_aggregation_query_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.run_aggregation_query({ parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options }) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use named arguments - client.run_aggregation_query parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use protobuf object - client.run_aggregation_query ::Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new(parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use hash object with options - client.run_aggregation_query({ parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Use protobuf object with options - client.run_aggregation_query(::Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new(parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end.first - - # Verify method calls - assert_equal 5, run_aggregation_query_client_stub.call_count - end - end - end - - def test_partition_query - # Create test objects. - client_result = ::Google::Cloud::Firestore::V1::PartitionQueryResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - structured_query = {} - partition_count = 42 - page_token = "hello world" - page_size = 42 - read_time = {} - - partition_query_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_partition_query_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, partition_query_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.partition_query({ parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.partition_query parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.partition_query ::Google::Cloud::Firestore::V1::PartitionQueryRequest.new(parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.partition_query({ parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.partition_query(::Google::Cloud::Firestore::V1::PartitionQueryRequest.new(parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, partition_query_client_stub.call_count - end - end - end - - def test_list_collection_ids - # Create test objects. - client_result = ::Google::Cloud::Firestore::V1::ListCollectionIdsResponse.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" - read_time = {} - - list_collection_ids_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_list_collection_ids_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_collection_ids_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_collection_ids({ parent: parent, page_size: page_size, page_token: page_token, read_time: read_time }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_collection_ids parent: parent, page_size: page_size, page_token: page_token, read_time: read_time do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_collection_ids ::Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new(parent: parent, page_size: page_size, page_token: page_token, read_time: read_time) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_collection_ids({ parent: parent, page_size: page_size, page_token: page_token, read_time: read_time }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_collection_ids(::Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new(parent: parent, page_size: page_size, page_token: page_token, read_time: read_time), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_collection_ids_client_stub.call_count - end - end - end - - def test_batch_write - # Create test objects. - client_result = ::Google::Cloud::Firestore::V1::BatchWriteResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - database = "hello world" - writes = [{}] - labels = {} - - batch_write_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_batch_write_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, batch_write_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.batch_write({ database: database, writes: writes, labels: labels }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.batch_write database: database, writes: writes, labels: labels do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.batch_write ::Google::Cloud::Firestore::V1::BatchWriteRequest.new(database: database, writes: writes, labels: labels) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.batch_write({ database: database, writes: writes, labels: labels }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.batch_write(::Google::Cloud::Firestore::V1::BatchWriteRequest.new(database: database, writes: writes, labels: labels), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, batch_write_client_stub.call_count - end - end - end - - def test_create_document - # Create test objects. - client_result = ::Google::Cloud::Firestore::V1::Document.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - collection_id = "hello world" - document_id = "hello world" - document = {} - mask = {} - - create_document_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Firestore::V1::Firestore::Rest::ServiceStub.stub :transcode_create_document_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_document_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_document({ parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_document parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_document ::Google::Cloud::Firestore::V1::CreateDocumentRequest.new(parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_document({ parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_document(::Google::Cloud::Firestore::V1::CreateDocumentRequest.new(parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_document_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::Firestore::V1::Firestore::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::Firestore::V1::Firestore::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_test.rb b/owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_test.rb deleted file mode 100644 index 2c489e91476d..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/test/google/cloud/firestore/v1/firestore_test.rb +++ /dev/null @@ -1,1329 +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/firestore/v1/firestore_pb" -require "google/cloud/firestore/v1/firestore" - -class ::Google::Cloud::Firestore::V1::Firestore::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_get_document - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::Document.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - mask = {} - transaction = "hello world" - - get_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_document, name - assert_kind_of ::Google::Cloud::Firestore::V1::GetDocumentRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::DocumentMask), request["mask"] - assert_equal "hello world", request["transaction"] - assert_equal :transaction, request.consistency_selector - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_document_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_document({ name: name, mask: mask, transaction: transaction }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_document name: name, mask: mask, transaction: transaction do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_document ::Google::Cloud::Firestore::V1::GetDocumentRequest.new(name: name, mask: mask, transaction: transaction) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_document({ name: name, mask: mask, transaction: transaction }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_document(::Google::Cloud::Firestore::V1::GetDocumentRequest.new(name: name, mask: mask, transaction: transaction), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_document_client_stub.call_rpc_count - end - end - - def test_list_documents - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::ListDocumentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - collection_id = "hello world" - page_size = 42 - page_token = "hello world" - order_by = "hello world" - mask = {} - transaction = "hello world" - show_missing = true - - list_documents_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_documents, name - assert_kind_of ::Google::Cloud::Firestore::V1::ListDocumentsRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["collection_id"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal "hello world", request["order_by"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::DocumentMask), request["mask"] - assert_equal "hello world", request["transaction"] - assert_equal :transaction, request.consistency_selector - assert_equal true, request["show_missing"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_documents_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_documents({ parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing }) 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_documents parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing 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_documents ::Google::Cloud::Firestore::V1::ListDocumentsRequest.new(parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing) 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_documents({ parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing }, 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_documents(::Google::Cloud::Firestore::V1::ListDocumentsRequest.new(parent: parent, collection_id: collection_id, page_size: page_size, page_token: page_token, order_by: order_by, mask: mask, transaction: transaction, show_missing: show_missing), 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_documents_client_stub.call_rpc_count - end - end - - def test_update_document - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::Document.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - document = {} - update_mask = {} - mask = {} - current_document = {} - - update_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_document, name - assert_kind_of ::Google::Cloud::Firestore::V1::UpdateDocumentRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::Document), request["document"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::DocumentMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::DocumentMask), request["mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::Precondition), request["current_document"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_document_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_document({ document: document, update_mask: update_mask, mask: mask, current_document: current_document }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.update_document document: document, update_mask: update_mask, mask: mask, current_document: current_document do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.update_document ::Google::Cloud::Firestore::V1::UpdateDocumentRequest.new(document: document, update_mask: update_mask, mask: mask, current_document: current_document) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.update_document({ document: document, update_mask: update_mask, mask: mask, current_document: current_document }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.update_document(::Google::Cloud::Firestore::V1::UpdateDocumentRequest.new(document: document, update_mask: update_mask, mask: mask, current_document: current_document), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, update_document_client_stub.call_rpc_count - end - end - - def test_delete_document - # 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" - current_document = {} - - delete_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_document, name - assert_kind_of ::Google::Cloud::Firestore::V1::DeleteDocumentRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::Precondition), request["current_document"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_document_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_document({ name: name, current_document: current_document }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.delete_document name: name, current_document: current_document do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.delete_document ::Google::Cloud::Firestore::V1::DeleteDocumentRequest.new(name: name, current_document: current_document) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.delete_document({ name: name, current_document: current_document }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.delete_document(::Google::Cloud::Firestore::V1::DeleteDocumentRequest.new(name: name, current_document: current_document), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, delete_document_client_stub.call_rpc_count - end - end - - def test_batch_get_documents - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a server streaming method. - database = "hello world" - documents = ["hello world"] - mask = {} - transaction = "hello world" - - batch_get_documents_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :batch_get_documents, name - assert_kind_of ::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest, request - assert_equal "hello world", request["database"] - assert_equal ["hello world"], request["documents"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::DocumentMask), request["mask"] - assert_equal "hello world", request["transaction"] - assert_equal :transaction, request.consistency_selector - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_get_documents_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_get_documents({ database: database, documents: documents, mask: mask, transaction: transaction }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_get_documents database: database, documents: documents, mask: mask, transaction: transaction do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_get_documents ::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new(database: database, documents: documents, mask: mask, transaction: transaction) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_get_documents({ database: database, documents: documents, mask: mask, transaction: transaction }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_get_documents(::Google::Cloud::Firestore::V1::BatchGetDocumentsRequest.new(database: database, documents: documents, mask: mask, transaction: transaction), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::BatchGetDocumentsResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_get_documents_client_stub.call_rpc_count - end - end - - def test_begin_transaction - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::BeginTransactionResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - database = "hello world" - options = {} - - begin_transaction_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :begin_transaction, name - assert_kind_of ::Google::Cloud::Firestore::V1::BeginTransactionRequest, request - assert_equal "hello world", request["database"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::TransactionOptions), request["options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, begin_transaction_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.begin_transaction({ database: database, options: options }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.begin_transaction database: database, options: options do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.begin_transaction ::Google::Cloud::Firestore::V1::BeginTransactionRequest.new(database: database, options: options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.begin_transaction({ database: database, options: options }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.begin_transaction(::Google::Cloud::Firestore::V1::BeginTransactionRequest.new(database: database, options: options), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, begin_transaction_client_stub.call_rpc_count - end - end - - def test_commit - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::CommitResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - database = "hello world" - writes = [{}] - transaction = "hello world" - - commit_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :commit, name - assert_kind_of ::Google::Cloud::Firestore::V1::CommitRequest, request - assert_equal "hello world", request["database"] - assert_kind_of ::Google::Cloud::Firestore::V1::Write, request["writes"].first - assert_equal "hello world", request["transaction"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, commit_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.commit({ database: database, writes: writes, transaction: transaction }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.commit database: database, writes: writes, transaction: transaction do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.commit ::Google::Cloud::Firestore::V1::CommitRequest.new(database: database, writes: writes, transaction: transaction) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.commit({ database: database, writes: writes, transaction: transaction }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.commit(::Google::Cloud::Firestore::V1::CommitRequest.new(database: database, writes: writes, transaction: transaction), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, commit_client_stub.call_rpc_count - end - end - - def test_rollback - # 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. - database = "hello world" - transaction = "hello world" - - rollback_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :rollback, name - assert_kind_of ::Google::Cloud::Firestore::V1::RollbackRequest, request - assert_equal "hello world", request["database"] - assert_equal "hello world", request["transaction"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, rollback_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.rollback({ database: database, transaction: transaction }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.rollback database: database, transaction: transaction do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.rollback ::Google::Cloud::Firestore::V1::RollbackRequest.new(database: database, transaction: transaction) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.rollback({ database: database, transaction: transaction }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.rollback(::Google::Cloud::Firestore::V1::RollbackRequest.new(database: database, transaction: transaction), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, rollback_client_stub.call_rpc_count - end - end - - def test_run_query - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::RunQueryResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a server streaming method. - parent = "hello world" - structured_query = {} - transaction = "hello world" - explain_options = {} - - run_query_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :run_query, name - assert_kind_of ::Google::Cloud::Firestore::V1::RunQueryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::StructuredQuery), request["structured_query"] - assert_equal :structured_query, request.query_type - assert_equal "hello world", request["transaction"] - assert_equal :transaction, request.consistency_selector - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::ExplainOptions), request["explain_options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_query_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_query({ parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::RunQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - client.run_query parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::RunQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.run_query ::Google::Cloud::Firestore::V1::RunQueryRequest.new(parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::RunQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.run_query({ parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::RunQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.run_query(::Google::Cloud::Firestore::V1::RunQueryRequest.new(parent: parent, structured_query: structured_query, transaction: transaction, explain_options: explain_options), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::RunQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_query_client_stub.call_rpc_count - end - end - - def test_execute_pipeline - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::ExecutePipelineResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a server streaming method. - database = "hello world" - structured_pipeline = {} - transaction = "hello world" - - execute_pipeline_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :execute_pipeline, name - assert_kind_of ::Google::Cloud::Firestore::V1::ExecutePipelineRequest, request - assert_equal "hello world", request["database"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::StructuredPipeline), request["structured_pipeline"] - assert_equal :structured_pipeline, request.pipeline_type - assert_equal "hello world", request["transaction"] - assert_equal :transaction, request.consistency_selector - refute_nil options - end - - Gapic::ServiceStub.stub :new, execute_pipeline_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.execute_pipeline({ database: database, structured_pipeline: structured_pipeline, transaction: transaction }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::ExecutePipelineResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - client.execute_pipeline database: database, structured_pipeline: structured_pipeline, transaction: transaction do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::ExecutePipelineResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.execute_pipeline ::Google::Cloud::Firestore::V1::ExecutePipelineRequest.new(database: database, structured_pipeline: structured_pipeline, transaction: transaction) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::ExecutePipelineResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.execute_pipeline({ database: database, structured_pipeline: structured_pipeline, transaction: transaction }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::ExecutePipelineResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.execute_pipeline(::Google::Cloud::Firestore::V1::ExecutePipelineRequest.new(database: database, structured_pipeline: structured_pipeline, transaction: transaction), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::ExecutePipelineResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, execute_pipeline_client_stub.call_rpc_count - end - end - - def test_run_aggregation_query - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a server streaming method. - parent = "hello world" - structured_aggregation_query = {} - transaction = "hello world" - explain_options = {} - - run_aggregation_query_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :run_aggregation_query, name - assert_kind_of ::Google::Cloud::Firestore::V1::RunAggregationQueryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::StructuredAggregationQuery), request["structured_aggregation_query"] - assert_equal :structured_aggregation_query, request.query_type - assert_equal "hello world", request["transaction"] - assert_equal :transaction, request.consistency_selector - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::ExplainOptions), request["explain_options"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, run_aggregation_query_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.run_aggregation_query({ parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options }) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Use named arguments - client.run_aggregation_query parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.run_aggregation_query ::Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new(parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.run_aggregation_query({ parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options }, grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.run_aggregation_query(::Google::Cloud::Firestore::V1::RunAggregationQueryRequest.new(parent: parent, structured_aggregation_query: structured_aggregation_query, transaction: transaction, explain_options: explain_options), grpc_options) do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::RunAggregationQueryResponse, r - end - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, run_aggregation_query_client_stub.call_rpc_count - end - end - - def test_partition_query - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::PartitionQueryResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - structured_query = {} - partition_count = 42 - page_token = "hello world" - page_size = 42 - read_time = {} - - partition_query_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :partition_query, name - assert_kind_of ::Google::Cloud::Firestore::V1::PartitionQueryRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::StructuredQuery), request["structured_query"] - assert_equal :structured_query, request.query_type - assert_equal 42, request["partition_count"] - assert_equal "hello world", request["page_token"] - assert_equal 42, request["page_size"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal :read_time, request.consistency_selector - refute_nil options - end - - Gapic::ServiceStub.stub :new, partition_query_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.partition_query({ parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time }) 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.partition_query parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time 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.partition_query ::Google::Cloud::Firestore::V1::PartitionQueryRequest.new(parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time) 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.partition_query({ parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time }, 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.partition_query(::Google::Cloud::Firestore::V1::PartitionQueryRequest.new(parent: parent, structured_query: structured_query, partition_count: partition_count, page_token: page_token, page_size: page_size, read_time: read_time), 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, partition_query_client_stub.call_rpc_count - end - end - - def test_write - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::WriteResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a bidi streaming method. - database = "hello world" - stream_id = "hello world" - writes = [{}] - stream_token = "hello world" - labels = {} - - write_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :write, name - assert_kind_of Enumerable, request - refute_nil options - request - end - - Gapic::ServiceStub.stub :new, write_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use enumerable object with hash and protobuf object. - request_hash = { database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels } - request_proto = ::Google::Cloud::Firestore::V1::WriteRequest.new database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels - enum_input = [request_hash, request_proto].to_enum - client.write enum_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::WriteResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common). - request_hash = { database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels } - request_proto = ::Google::Cloud::Firestore::V1::WriteRequest.new database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels - stream_input = Gapic::StreamInput.new - client.write stream_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::WriteResponse, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Use enumerable object with hash and protobuf object with options. - request_hash = { database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels } - request_proto = ::Google::Cloud::Firestore::V1::WriteRequest.new database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels - enum_input = [request_hash, request_proto].to_enum - client.write enum_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::WriteResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common) with options. - request_hash = { database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels } - request_proto = ::Google::Cloud::Firestore::V1::WriteRequest.new database: database, stream_id: stream_id, writes: writes, stream_token: stream_token, labels: labels - stream_input = Gapic::StreamInput.new - client.write stream_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::WriteResponse, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Verify method calls - assert_equal 4, write_client_stub.call_rpc_count - write_client_stub.requests.each do |request| - request.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::WriteRequest, r - assert_equal "hello world", r["database"] - assert_equal "hello world", r["stream_id"] - assert_kind_of ::Google::Cloud::Firestore::V1::Write, r["writes"].first - assert_equal "hello world", r["stream_token"] - assert_equal({}, r["labels"].to_h) - end - end - end - end - - def test_listen - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::ListenResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a bidi streaming method. - database = "hello world" - add_target = {} - labels = {} - - listen_client_stub = ClientStub.new [grpc_response].to_enum, grpc_operation do |name, request, options:| - assert_equal :listen, name - assert_kind_of Enumerable, request - refute_nil options - request - end - - Gapic::ServiceStub.stub :new, listen_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use enumerable object with hash and protobuf object. - request_hash = { database: database, add_target: add_target, labels: labels } - request_proto = ::Google::Cloud::Firestore::V1::ListenRequest.new database: database, add_target: add_target, labels: labels - enum_input = [request_hash, request_proto].to_enum - client.listen enum_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::ListenResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common). - request_hash = { database: database, add_target: add_target, labels: labels } - request_proto = ::Google::Cloud::Firestore::V1::ListenRequest.new database: database, add_target: add_target, labels: labels - stream_input = Gapic::StreamInput.new - client.listen stream_input do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::ListenResponse, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Use enumerable object with hash and protobuf object with options. - request_hash = { database: database, add_target: add_target, labels: labels } - request_proto = ::Google::Cloud::Firestore::V1::ListenRequest.new database: database, add_target: add_target, labels: labels - enum_input = [request_hash, request_proto].to_enum - client.listen enum_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::ListenResponse, r - end - assert_equal grpc_operation, operation - end - - # Use stream input object (from gapic-common) with options. - request_hash = { database: database, add_target: add_target, labels: labels } - request_proto = ::Google::Cloud::Firestore::V1::ListenRequest.new database: database, add_target: add_target, labels: labels - stream_input = Gapic::StreamInput.new - client.listen stream_input, grpc_options do |response, operation| - assert_kind_of Enumerable, response - response.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::ListenResponse, r - end - assert_equal grpc_operation, operation - end - stream_input << request_hash - stream_input << request_proto - stream_input.close - - # Verify method calls - assert_equal 4, listen_client_stub.call_rpc_count - listen_client_stub.requests.each do |request| - request.to_a.each do |r| - assert_kind_of ::Google::Cloud::Firestore::V1::ListenRequest, r - assert_equal "hello world", r["database"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::Target), r["add_target"] - assert_equal :add_target, r.target_change - assert_equal({}, r["labels"].to_h) - end - end - end - end - - def test_list_collection_ids - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::ListCollectionIdsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - read_time = {} - - list_collection_ids_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_collection_ids, name - assert_kind_of ::Google::Cloud::Firestore::V1::ListCollectionIdsRequest, request - assert_equal "hello world", request["parent"] - assert_equal 42, request["page_size"] - assert_equal "hello world", request["page_token"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::Timestamp), request["read_time"] - assert_equal :read_time, request.consistency_selector - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_collection_ids_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_collection_ids({ parent: parent, page_size: page_size, page_token: page_token, read_time: read_time }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_collection_ids parent: parent, page_size: page_size, page_token: page_token, read_time: read_time do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_collection_ids ::Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new(parent: parent, page_size: page_size, page_token: page_token, read_time: read_time) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_collection_ids({ parent: parent, page_size: page_size, page_token: page_token, read_time: read_time }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_collection_ids(::Google::Cloud::Firestore::V1::ListCollectionIdsRequest.new(parent: parent, page_size: page_size, page_token: page_token, read_time: read_time), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_collection_ids_client_stub.call_rpc_count - end - end - - def test_batch_write - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::BatchWriteResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - database = "hello world" - writes = [{}] - labels = {} - - batch_write_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :batch_write, name - assert_kind_of ::Google::Cloud::Firestore::V1::BatchWriteRequest, request - assert_equal "hello world", request["database"] - assert_kind_of ::Google::Cloud::Firestore::V1::Write, request["writes"].first - assert_equal({}, request["labels"].to_h) - refute_nil options - end - - Gapic::ServiceStub.stub :new, batch_write_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.batch_write({ database: database, writes: writes, labels: labels }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.batch_write database: database, writes: writes, labels: labels do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.batch_write ::Google::Cloud::Firestore::V1::BatchWriteRequest.new(database: database, writes: writes, labels: labels) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.batch_write({ database: database, writes: writes, labels: labels }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.batch_write(::Google::Cloud::Firestore::V1::BatchWriteRequest.new(database: database, writes: writes, labels: labels), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, batch_write_client_stub.call_rpc_count - end - end - - def test_create_document - # Create GRPC objects. - grpc_response = ::Google::Cloud::Firestore::V1::Document.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - collection_id = "hello world" - document_id = "hello world" - document = {} - mask = {} - - create_document_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_document, name - assert_kind_of ::Google::Cloud::Firestore::V1::CreateDocumentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["collection_id"] - assert_equal "hello world", request["document_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::Document), request["document"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Firestore::V1::DocumentMask), request["mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_document_client_stub do - # Create client - client = ::Google::Cloud::Firestore::V1::Firestore::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_document({ parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.create_document parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.create_document ::Google::Cloud::Firestore::V1::CreateDocumentRequest.new(parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.create_document({ parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.create_document(::Google::Cloud::Firestore::V1::CreateDocumentRequest.new(parent: parent, collection_id: collection_id, document_id: document_id, document: document, mask: mask), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, create_document_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::Firestore::V1::Firestore::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::Firestore::V1::Firestore::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::Firestore::V1::Firestore::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Firestore::V1::Firestore::Client, client - assert_equal creds, client.configure.credentials - end - end -end diff --git a/owl-bot-staging/google-cloud-firestore-v1/test/helper.rb b/owl-bot-staging/google-cloud-firestore-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-firestore-v1/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-functions-v1/.gitignore b/owl-bot-staging/google-cloud-functions-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-functions-v1/.repo-metadata.json deleted file mode 100644 index 2a8c7f5edb4e..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudfunctions.googleapis.com", - "api_shortname": "cloudfunctions", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v1/latest", - "distribution_name": "google-cloud-functions-v1", - "is_cloud": true, - "language": "ruby", - "name": "cloudfunctions", - "name_pretty": "Cloud Functions V1 API", - "product_documentation": "https://cloud.google.com/functions", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Cloud Functions API manages lightweight user-provided functions executed in response to events. Note that google-cloud-functions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-functions instead. See the readme for more details.", - "ruby-cloud-env-prefix": "FUNCTIONS", - "ruby-cloud-product-url": "https://cloud.google.com/functions", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-functions-v1/.rubocop.yml b/owl-bot-staging/google-cloud-functions-v1/.rubocop.yml deleted file mode 100644 index 4a540ce1fbcf..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-functions-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-functions-v1.rb" diff --git a/owl-bot-staging/google-cloud-functions-v1/.toys.rb b/owl-bot-staging/google-cloud-functions-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/.yardopts b/owl-bot-staging/google-cloud-functions-v1/.yardopts deleted file mode 100644 index 1b753a8c44a6..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Functions 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-functions-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-functions-v1/AUTHENTICATION.md deleted file mode 100644 index 593505e94f8d..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-functions-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-functions-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/functions/v1" - -client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/functions/v1" - -::Google::Cloud::Functions::V1::CloudFunctionsService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Functions::V1::CloudFunctionsService::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-functions-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/functions/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Functions::V1::CloudFunctionsService::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-functions-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-functions-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-functions-v1/Gemfile b/owl-bot-staging/google-cloud-functions-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-functions-v1/LICENSE.md b/owl-bot-staging/google-cloud-functions-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/README.md b/owl-bot-staging/google-cloud-functions-v1/README.md deleted file mode 100644 index 02b8c3d4d377..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Functions V1 API - -Manages lightweight user-provided functions executed in response to events. - -The Cloud Functions API manages lightweight user-provided functions executed in response to events. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Functions V1 API. Most users should consider using -the main client gem, -[google-cloud-functions](https://rubygems.org/gems/google-cloud-functions). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-functions-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/cloudfunctions.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/functions/v1" - -client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new -request = ::Google::Cloud::Functions::V1::ListFunctionsRequest.new # (request fields as keyword arguments...) -response = client.list_functions request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/functions) -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/functions/v1" -require "logger" - -client = ::Google::Cloud::Functions::V1::CloudFunctionsService::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-functions`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-functions-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-functions`. -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-functions-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-functions-v1/Rakefile b/owl-bot-staging/google-cloud-functions-v1/Rakefile deleted file mode 100644 index 5ad2a500c44b..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["FUNCTIONS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["FUNCTIONS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["FUNCTIONS_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 FUNCTIONS_TEST_PROJECT=test123 FUNCTIONS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/functions/v1/cloud_functions_service/credentials" - ::Google::Cloud::Functions::V1::CloudFunctionsService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["FUNCTIONS_PROJECT"] = project - ENV["FUNCTIONS_TEST_PROJECT"] = project - ENV["FUNCTIONS_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-functions-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-functions-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-functions-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-functions-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-functions-v1" - header "google-cloud-functions-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-functions-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-functions-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-functions-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-functions-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-functions-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-functions-v1/gapic_metadata.json deleted file mode 100644 index efed26695e1f..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/gapic_metadata.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.functions.v1", - "libraryPackage": "::Google::Cloud::Functions::V1", - "services": { - "CloudFunctionsService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client", - "rpcs": { - "ListFunctions": { - "methods": [ - "list_functions" - ] - }, - "GetFunction": { - "methods": [ - "get_function" - ] - }, - "CreateFunction": { - "methods": [ - "create_function" - ] - }, - "UpdateFunction": { - "methods": [ - "update_function" - ] - }, - "DeleteFunction": { - "methods": [ - "delete_function" - ] - }, - "CallFunction": { - "methods": [ - "call_function" - ] - }, - "GenerateUploadUrl": { - "methods": [ - "generate_upload_url" - ] - }, - "GenerateDownloadUrl": { - "methods": [ - "generate_download_url" - ] - }, - "SetIamPolicy": { - "methods": [ - "set_iam_policy" - ] - }, - "GetIamPolicy": { - "methods": [ - "get_iam_policy" - ] - }, - "TestIamPermissions": { - "methods": [ - "test_iam_permissions" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-functions-v1/google-cloud-functions-v1.gemspec b/owl-bot-staging/google-cloud-functions-v1/google-cloud-functions-v1.gemspec deleted file mode 100644 index 864e659253bd..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/google-cloud-functions-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/functions/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-functions-v1" - gem.version = Google::Cloud::Functions::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Cloud Functions API manages lightweight user-provided functions executed in response to events. Note that google-cloud-functions-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-functions instead. See the readme for more details." - gem.summary = "Manages lightweight user-provided functions executed in response to events." - 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.1" - - 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-functions-v1/lib/google-cloud-functions-v1.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google-cloud-functions-v1.rb deleted file mode 100644 index 613e87341848..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google-cloud-functions-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/functions/v1" diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1.rb deleted file mode 100644 index a402fa182c2c..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1.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/functions/v1/cloud_functions_service" -require "google/cloud/functions/v1/version" - -module Google - module Cloud - module Functions - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/functions/v1" - # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/functions/v1" - # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/functions/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/bindings_override.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/bindings_override.rb deleted file mode 100644 index 0b74fa564e8f..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/bindings_override.rb +++ /dev/null @@ -1,64 +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 Functions - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/functions/v1/rest" - # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Functions"] - 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.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 - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service.rb deleted file mode 100644 index 7a1c82286200..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_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/functions/v1/version" - -require "google/cloud/functions/v1/cloud_functions_service/credentials" -require "google/cloud/functions/v1/cloud_functions_service/paths" -require "google/cloud/functions/v1/cloud_functions_service/operations" -require "google/cloud/functions/v1/cloud_functions_service/client" -require "google/cloud/functions/v1/cloud_functions_service/rest" - -module Google - module Cloud - module Functions - module V1 - ## - # A service that application uses to manipulate triggers and functions. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/functions/v1/cloud_functions_service" - # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/functions/v1/cloud_functions_service/rest" - # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - module CloudFunctionsService - end - end - end - end -end - -helper_path = ::File.join __dir__, "cloud_functions_service", "helpers.rb" -require "google/cloud/functions/v1/cloud_functions_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/client.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/client.rb deleted file mode 100644 index 5e42cd2dbb87..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/client.rb +++ /dev/null @@ -1,1609 +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/functions/v1/functions_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Functions - module V1 - module CloudFunctionsService - ## - # Client for the CloudFunctionsService service. - # - # A service that application uses to manipulate triggers and functions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_functions_service_stub - - ## - # Configure the CloudFunctionsService Client class. - # - # See {::Google::Cloud::Functions::V1::CloudFunctionsService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudFunctionsService clients - # ::Google::Cloud::Functions::V1::CloudFunctionsService::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", "Functions", "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.list_functions.timeout = 600.0 - default_config.rpcs.list_functions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_function.timeout = 600.0 - default_config.rpcs.get_function.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_function.timeout = 600.0 - - default_config.rpcs.update_function.timeout = 600.0 - default_config.rpcs.update_function.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_function.timeout = 600.0 - default_config.rpcs.delete_function.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.call_function.timeout = 600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudFunctionsService 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::Functions::V1::CloudFunctionsService::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 - @cloud_functions_service_stub.universe_domain - end - - ## - # Create a new CloudFunctionsService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudFunctionsService 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/functions/v1/functions_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 - - @cloud_functions_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Functions::V1::CloudFunctionsService::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 - ) - - @cloud_functions_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 = @cloud_functions_service_stub.endpoint - config.universe_domain = @cloud_functions_service_stub.universe_domain - config.logger = @cloud_functions_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 = @cloud_functions_service_stub.endpoint - config.universe_domain = @cloud_functions_service_stub.universe_domain - config.logger = @cloud_functions_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Functions::V1::CloudFunctionsService::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 - @cloud_functions_service_stub.logger - end - - # Service calls - - ## - # Returns a list of functions that belong to the requested project. - # - # @overload list_functions(request, options = nil) - # Pass arguments to `list_functions` via a request object, either of type - # {::Google::Cloud::Functions::V1::ListFunctionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::ListFunctionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_functions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_functions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The project and location from which the function should be listed, - # specified in the format `projects/*/locations/*` - # If you want to list functions in all locations, use "-" in place of a - # location. When listing functions in all locations, if one or more - # location(s) are unreachable, the response will contain functions from all - # reachable locations along with the names of any unreachable locations. - # @param page_size [::Integer] - # Maximum number of functions to return per call. - # @param page_token [::String] - # The value returned by the last - # `ListFunctionsResponse`; indicates that - # this is a continuation of a prior `ListFunctions` call, and that the - # system should return the next page of data. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Functions::V1::CloudFunction>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Functions::V1::CloudFunction>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::ListFunctionsRequest.new - # - # # Call the list_functions method. - # result = client.list_functions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Functions::V1::CloudFunction. - # p item - # end - # - def list_functions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::ListFunctionsRequest - - # Converts hash and nil to 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_functions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION - metadata[:"x-goog-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_functions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_functions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.call_rpc :list_functions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @cloud_functions_service_stub, :list_functions, 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 - - ## - # Returns a function with the given name from the requested project. - # - # @overload get_function(request, options = nil) - # Pass arguments to `get_function` via a request object, either of type - # {::Google::Cloud::Functions::V1::GetFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::GetFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_function(name: nil, version_id: nil) - # Pass arguments to `get_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 function which details should be obtained. - # @param version_id [::Integer] - # Optional. The optional version of the function whose details should be - # obtained. The version of a 1st Gen function is an integer that starts from - # 1 and gets incremented on redeployments. Each deployment creates a config - # version of the underlying function. GCF may keep historical configs for old - # versions. This field can be specified to fetch the historical configs. - # Leave it blank or set to 0 to get the latest version of the function. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Functions::V1::CloudFunction] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Functions::V1::CloudFunction] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::GetFunctionRequest.new - # - # # Call the get_function method. - # result = client.get_function request - # - # # The returned object is of type Google::Cloud::Functions::V1::CloudFunction. - # p result - # - def get_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::GetFunctionRequest - - # Converts hash and nil to 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION - metadata[:"x-goog-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_function.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.call_rpc :get_function, 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 new function. If a function with the given name already exists in - # the specified project, the long running operation will return - # `ALREADY_EXISTS` error. - # - # @overload create_function(request, options = nil) - # Pass arguments to `create_function` via a request object, either of type - # {::Google::Cloud::Functions::V1::CreateFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::CreateFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_function(location: nil, function: nil) - # Pass arguments to `create_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param location [::String] - # Required. The project and location in which the function should be created, - # specified in the format `projects/*/locations/*` - # @param function [::Google::Cloud::Functions::V1::CloudFunction, ::Hash] - # Required. Function to be created. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::CreateFunctionRequest.new - # - # # Call the create_function method. - # result = client.create_function request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::CreateFunctionRequest - - # Converts hash and nil to 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.location - header_params["location"] = request.location - end - - request_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_function.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.call_rpc :create_function, 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 existing function. - # - # @overload update_function(request, options = nil) - # Pass arguments to `update_function` via a request object, either of type - # {::Google::Cloud::Functions::V1::UpdateFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::UpdateFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_function(function: nil, update_mask: nil) - # Pass arguments to `update_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param function [::Google::Cloud::Functions::V1::CloudFunction, ::Hash] - # Required. New version of the function. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields in `CloudFunction` that have to be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::UpdateFunctionRequest.new - # - # # Call the update_function method. - # result = client.update_function request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::UpdateFunctionRequest - - # Converts hash and nil to 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.function&.name - header_params["function.name"] = request.function.name - end - - request_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_function.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.call_rpc :update_function, 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 function with the given name from the specified project. If the - # given function is used by some trigger, the trigger will be updated to - # remove this function. - # - # @overload delete_function(request, options = nil) - # Pass arguments to `delete_function` via a request object, either of type - # {::Google::Cloud::Functions::V1::DeleteFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::DeleteFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_function(name: nil) - # Pass arguments to `delete_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 function which should be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::DeleteFunctionRequest.new - # - # # Call the delete_function method. - # result = client.delete_function request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::DeleteFunctionRequest - - # Converts hash and nil to 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION - metadata[:"x-goog-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_function.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.call_rpc :delete_function, 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 - - ## - # Synchronously invokes a deployed Cloud Function. To be used for testing - # purposes as very limited traffic is allowed. For more information on - # the actual limits, refer to - # [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits). - # - # @overload call_function(request, options = nil) - # Pass arguments to `call_function` via a request object, either of type - # {::Google::Cloud::Functions::V1::CallFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::CallFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload call_function(name: nil, data: nil) - # Pass arguments to `call_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 function to be called. - # @param data [::String] - # Required. Input to be passed to the function. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Functions::V1::CallFunctionResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Functions::V1::CallFunctionResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::CallFunctionRequest.new - # - # # Call the call_function method. - # result = client.call_function request - # - # # The returned object is of type Google::Cloud::Functions::V1::CallFunctionResponse. - # p result - # - def call_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::CallFunctionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.call_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION - metadata[:"x-goog-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.call_function.timeout, - metadata: metadata, - retry_policy: @config.rpcs.call_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.call_rpc :call_function, 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 a signed URL for uploading a function source code. - # For more information about the signed URL usage see: - # https://cloud.google.com/storage/docs/access-control/signed-urls. - # Once the function source code upload is complete, the used signed - # URL should be provided in CreateFunction or UpdateFunction request - # as a reference to the function source code. - # - # When uploading source code to the generated signed URL, please follow - # these restrictions: - # - # * Source file type should be a zip file. - # * Source file size should not exceed 100MB limit. - # * No credentials should be attached - the signed URLs provide access to the - # target bucket using internal service identity; if credentials were - # attached, the identity from the credentials would be used, but that - # identity does not have permissions to upload files to the URL. - # - # When making a HTTP PUT request, these two headers need to be specified: - # - # * `content-type: application/zip` - # * `x-goog-content-length-range: 0,104857600` - # - # And this header SHOULD NOT be specified: - # - # * `Authorization: Bearer YOUR_TOKEN` - # - # @overload generate_upload_url(request, options = nil) - # Pass arguments to `generate_upload_url` via a request object, either of type - # {::Google::Cloud::Functions::V1::GenerateUploadUrlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::GenerateUploadUrlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_upload_url(parent: nil, kms_key_name: nil) - # Pass arguments to `generate_upload_url` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The project and location in which the Google Cloud Storage signed URL - # should be generated, specified in the format `projects/*/locations/*`. - # @param kms_key_name [::String] - # Resource name of a KMS crypto key (managed by the user) used to - # encrypt/decrypt function source code objects in intermediate Cloud Storage - # buckets. When you generate an upload url and upload your source code, it - # gets copied to an intermediate Cloud Storage bucket. The source code is - # then copied to a versioned directory in the sources bucket in the consumer - # project during the function deployment. - # - # It must match the pattern - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - # - # The Google Cloud Functions service account - # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - # granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - # (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - # Key/KeyRing/Project/Organization (least access preferred). GCF will - # delegate access to the Google Storage service account in the internal - # project. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Functions::V1::GenerateUploadUrlResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Functions::V1::GenerateUploadUrlResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new - # - # # Call the generate_upload_url method. - # result = client.generate_upload_url request - # - # # The returned object is of type Google::Cloud::Functions::V1::GenerateUploadUrlResponse. - # p result - # - def generate_upload_url request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::GenerateUploadUrlRequest - - # Converts hash and nil to 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_upload_url.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION - metadata[:"x-goog-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.generate_upload_url.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_upload_url.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.call_rpc :generate_upload_url, 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 a signed URL for downloading deployed function source code. - # The URL is only valid for a limited period and should be used within - # minutes after generation. - # For more information about the signed URL usage see: - # https://cloud.google.com/storage/docs/access-control/signed-urls - # - # @overload generate_download_url(request, options = nil) - # Pass arguments to `generate_download_url` via a request object, either of type - # {::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_download_url(name: nil, version_id: nil) - # Pass arguments to `generate_download_url` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of function for which source code Google Cloud Storage signed - # URL should be generated. - # @param version_id [::Integer] - # The optional version of function. If not set, default, current version - # is used. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new - # - # # Call the generate_download_url method. - # result = client.generate_download_url request - # - # # The returned object is of type Google::Cloud::Functions::V1::GenerateDownloadUrlResponse. - # p result - # - def generate_download_url request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest - - # Converts hash and nil to 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_download_url.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION - metadata[:"x-goog-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_download_url.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_download_url.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.call_rpc :generate_download_url, 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 IAM access control policy on the specified function. - # Replaces any existing policy. - # - # @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/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::VERSION - metadata[:"x-goog-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 - - @cloud_functions_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 - - ## - # Gets the IAM access control policy for a function. - # Returns an empty policy if the function exists and does not have a policy - # set. - # - # @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/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::VERSION - metadata[:"x-goog-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 - - @cloud_functions_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 - - ## - # Tests the specified permissions against the IAM access control policy - # for a function. - # If the function does not exist, this will return an empty set of - # permissions, not a NOT_FOUND error. - # - # @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/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::VERSION - metadata[:"x-goog-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 - - @cloud_functions_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 - - ## - # Configuration class for the CloudFunctionsService API. - # - # This class represents the configuration for CloudFunctionsService, - # 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::Functions::V1::CloudFunctionsService::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_functions to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_functions.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_functions.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::Functions::V1::CloudFunctionsService::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 = "cloudfunctions.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 CloudFunctionsService 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_functions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_functions - ## - # RPC-specific configuration for `get_function` - # @return [::Gapic::Config::Method] - # - attr_reader :get_function - ## - # RPC-specific configuration for `create_function` - # @return [::Gapic::Config::Method] - # - attr_reader :create_function - ## - # RPC-specific configuration for `update_function` - # @return [::Gapic::Config::Method] - # - attr_reader :update_function - ## - # RPC-specific configuration for `delete_function` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_function - ## - # RPC-specific configuration for `call_function` - # @return [::Gapic::Config::Method] - # - attr_reader :call_function - ## - # RPC-specific configuration for `generate_upload_url` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_upload_url - ## - # RPC-specific configuration for `generate_download_url` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_download_url - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - list_functions_config = parent_rpcs.list_functions if parent_rpcs.respond_to? :list_functions - @list_functions = ::Gapic::Config::Method.new list_functions_config - get_function_config = parent_rpcs.get_function if parent_rpcs.respond_to? :get_function - @get_function = ::Gapic::Config::Method.new get_function_config - create_function_config = parent_rpcs.create_function if parent_rpcs.respond_to? :create_function - @create_function = ::Gapic::Config::Method.new create_function_config - update_function_config = parent_rpcs.update_function if parent_rpcs.respond_to? :update_function - @update_function = ::Gapic::Config::Method.new update_function_config - delete_function_config = parent_rpcs.delete_function if parent_rpcs.respond_to? :delete_function - @delete_function = ::Gapic::Config::Method.new delete_function_config - call_function_config = parent_rpcs.call_function if parent_rpcs.respond_to? :call_function - @call_function = ::Gapic::Config::Method.new call_function_config - generate_upload_url_config = parent_rpcs.generate_upload_url if parent_rpcs.respond_to? :generate_upload_url - @generate_upload_url = ::Gapic::Config::Method.new generate_upload_url_config - generate_download_url_config = parent_rpcs.generate_download_url if parent_rpcs.respond_to? :generate_download_url - @generate_download_url = ::Gapic::Config::Method.new generate_download_url_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 - 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 - 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 - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/credentials.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/credentials.rb deleted file mode 100644 index 7a899a1a9767..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Functions - module V1 - module CloudFunctionsService - # Credentials for the CloudFunctionsService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "FUNCTIONS_CREDENTIALS", - "FUNCTIONS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "FUNCTIONS_CREDENTIALS_JSON", - "FUNCTIONS_KEYFILE_JSON", - "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-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb deleted file mode 100644 index b9762001de1a..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/operations.rb +++ /dev/null @@ -1,833 +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 Functions - module V1 - module CloudFunctionsService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CloudFunctionsService 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 CloudFunctionsService 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::Functions::V1::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.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::Functions::V1::VERSION - metadata[:"x-goog-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::Functions::V1::VERSION - metadata[:"x-goog-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::Functions::V1::VERSION - metadata[:"x-goog-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::Functions::V1::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 = "cloudfunctions.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-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/paths.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/paths.rb deleted file mode 100644 index c363b2f96c71..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_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 Functions - module V1 - module CloudFunctionsService - # Path helper methods for the CloudFunctionsService API. - module Paths - ## - # Create a fully-qualified CloudFunction resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/functions/{function}` - # - # @param project [String] - # @param location [String] - # @param function [String] - # - # @return [::String] - def cloud_function_path project:, location:, function: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/functions/#{function}" - end - - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # - # @return [::String] - def crypto_key_path project:, location:, key_ring:, crypto_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" - 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 Repository resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # - # @return [::String] - def repository_path project:, location:, repository: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest.rb deleted file mode 100644 index e9d93d046095..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_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/functions/v1/version" -require "google/cloud/functions/v1/bindings_override" - -require "google/cloud/functions/v1/cloud_functions_service/credentials" -require "google/cloud/functions/v1/cloud_functions_service/paths" -require "google/cloud/functions/v1/cloud_functions_service/rest/operations" -require "google/cloud/functions/v1/cloud_functions_service/rest/client" - -module Google - module Cloud - module Functions - module V1 - ## - # A service that application uses to manipulate triggers and functions. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/functions/v1/cloud_functions_service/rest" - # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - module CloudFunctionsService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/functions/v1/cloud_functions_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/client.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/client.rb deleted file mode 100644 index f16435c6c1ee..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/client.rb +++ /dev/null @@ -1,1497 +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/functions/v1/functions_pb" -require "google/cloud/functions/v1/cloud_functions_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Functions - module V1 - module CloudFunctionsService - module Rest - ## - # REST client for the CloudFunctionsService service. - # - # A service that application uses to manipulate triggers and functions. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :cloud_functions_service_stub - - ## - # Configure the CloudFunctionsService Client class. - # - # See {::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all CloudFunctionsService clients - # ::Google::Cloud::Functions::V1::CloudFunctionsService::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", "Functions", "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.list_functions.timeout = 600.0 - default_config.rpcs.list_functions.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.get_function.timeout = 600.0 - default_config.rpcs.get_function.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.create_function.timeout = 600.0 - - default_config.rpcs.update_function.timeout = 600.0 - default_config.rpcs.update_function.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.delete_function.timeout = 600.0 - default_config.rpcs.delete_function.retry_policy = { - initial_delay: 0.1, max_delay: 60.0, multiplier: 1.3, retry_codes: [14, 4] - } - - default_config.rpcs.call_function.timeout = 600.0 - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the CloudFunctionsService 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::Functions::V1::CloudFunctionsService::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 - @cloud_functions_service_stub.universe_domain - end - - ## - # Create a new CloudFunctionsService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the CloudFunctionsService 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::Functions::V1::CloudFunctionsService::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 - - @cloud_functions_service_stub = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @cloud_functions_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 = @cloud_functions_service_stub.endpoint - config.universe_domain = @cloud_functions_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @cloud_functions_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 = @cloud_functions_service_stub.endpoint - config.universe_domain = @cloud_functions_service_stub.universe_domain - config.logger = @cloud_functions_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Functions::V1::CloudFunctionsService::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 - @cloud_functions_service_stub.logger - end - - # Service calls - - ## - # Returns a list of functions that belong to the requested project. - # - # @overload list_functions(request, options = nil) - # Pass arguments to `list_functions` via a request object, either of type - # {::Google::Cloud::Functions::V1::ListFunctionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::ListFunctionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_functions(parent: nil, page_size: nil, page_token: nil) - # Pass arguments to `list_functions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The project and location from which the function should be listed, - # specified in the format `projects/*/locations/*` - # If you want to list functions in all locations, use "-" in place of a - # location. When listing functions in all locations, if one or more - # location(s) are unreachable, the response will contain functions from all - # reachable locations along with the names of any unreachable locations. - # @param page_size [::Integer] - # Maximum number of functions to return per call. - # @param page_token [::String] - # The value returned by the last - # `ListFunctionsResponse`; indicates that - # this is a continuation of a prior `ListFunctions` call, and that the - # system should return the next page of data. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Functions::V1::CloudFunction>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Functions::V1::CloudFunction>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::ListFunctionsRequest.new - # - # # Call the list_functions method. - # result = client.list_functions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Functions::V1::CloudFunction. - # p item - # end - # - def list_functions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::ListFunctionsRequest - - # Converts hash and nil to an 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_functions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_functions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_functions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.list_functions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @cloud_functions_service_stub, :list_functions, "functions", 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 - - ## - # Returns a function with the given name from the requested project. - # - # @overload get_function(request, options = nil) - # Pass arguments to `get_function` via a request object, either of type - # {::Google::Cloud::Functions::V1::GetFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::GetFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_function(name: nil, version_id: nil) - # Pass arguments to `get_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 function which details should be obtained. - # @param version_id [::Integer] - # Optional. The optional version of the function whose details should be - # obtained. The version of a 1st Gen function is an integer that starts from - # 1 and gets incremented on redeployments. Each deployment creates a config - # version of the underlying function. GCF may keep historical configs for old - # versions. This field can be specified to fetch the historical configs. - # Leave it blank or set to 0 to get the latest version of the function. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V1::CloudFunction] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V1::CloudFunction] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::GetFunctionRequest.new - # - # # Call the get_function method. - # result = client.get_function request - # - # # The returned object is of type Google::Cloud::Functions::V1::CloudFunction. - # p result - # - def get_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::GetFunctionRequest - - # Converts hash and nil to an 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_function.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.get_function 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 new function. If a function with the given name already exists in - # the specified project, the long running operation will return - # `ALREADY_EXISTS` error. - # - # @overload create_function(request, options = nil) - # Pass arguments to `create_function` via a request object, either of type - # {::Google::Cloud::Functions::V1::CreateFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::CreateFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_function(location: nil, function: nil) - # Pass arguments to `create_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param location [::String] - # Required. The project and location in which the function should be created, - # specified in the format `projects/*/locations/*` - # @param function [::Google::Cloud::Functions::V1::CloudFunction, ::Hash] - # Required. Function to be created. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::CreateFunctionRequest.new - # - # # Call the create_function method. - # result = client.create_function request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::CreateFunctionRequest - - # Converts hash and nil to an 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_function.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.create_function 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 existing function. - # - # @overload update_function(request, options = nil) - # Pass arguments to `update_function` via a request object, either of type - # {::Google::Cloud::Functions::V1::UpdateFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::UpdateFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_function(function: nil, update_mask: nil) - # Pass arguments to `update_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param function [::Google::Cloud::Functions::V1::CloudFunction, ::Hash] - # Required. New version of the function. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. The list of fields in `CloudFunction` that have to be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::UpdateFunctionRequest.new - # - # # Call the update_function method. - # result = client.update_function request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::UpdateFunctionRequest - - # Converts hash and nil to an 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_function.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.update_function 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 function with the given name from the specified project. If the - # given function is used by some trigger, the trigger will be updated to - # remove this function. - # - # @overload delete_function(request, options = nil) - # Pass arguments to `delete_function` via a request object, either of type - # {::Google::Cloud::Functions::V1::DeleteFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::DeleteFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_function(name: nil) - # Pass arguments to `delete_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 function which should be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::DeleteFunctionRequest.new - # - # # Call the delete_function method. - # result = client.delete_function request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::DeleteFunctionRequest - - # Converts hash and nil to an 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_function.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.delete_function 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 - - ## - # Synchronously invokes a deployed Cloud Function. To be used for testing - # purposes as very limited traffic is allowed. For more information on - # the actual limits, refer to - # [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits). - # - # @overload call_function(request, options = nil) - # Pass arguments to `call_function` via a request object, either of type - # {::Google::Cloud::Functions::V1::CallFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::CallFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload call_function(name: nil, data: nil) - # Pass arguments to `call_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 function to be called. - # @param data [::String] - # Required. Input to be passed to the function. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V1::CallFunctionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V1::CallFunctionResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::CallFunctionRequest.new - # - # # Call the call_function method. - # result = client.call_function request - # - # # The returned object is of type Google::Cloud::Functions::V1::CallFunctionResponse. - # p result - # - def call_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::CallFunctionRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.call_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.call_function.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.call_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.call_function 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 a signed URL for uploading a function source code. - # For more information about the signed URL usage see: - # https://cloud.google.com/storage/docs/access-control/signed-urls. - # Once the function source code upload is complete, the used signed - # URL should be provided in CreateFunction or UpdateFunction request - # as a reference to the function source code. - # - # When uploading source code to the generated signed URL, please follow - # these restrictions: - # - # * Source file type should be a zip file. - # * Source file size should not exceed 100MB limit. - # * No credentials should be attached - the signed URLs provide access to the - # target bucket using internal service identity; if credentials were - # attached, the identity from the credentials would be used, but that - # identity does not have permissions to upload files to the URL. - # - # When making a HTTP PUT request, these two headers need to be specified: - # - # * `content-type: application/zip` - # * `x-goog-content-length-range: 0,104857600` - # - # And this header SHOULD NOT be specified: - # - # * `Authorization: Bearer YOUR_TOKEN` - # - # @overload generate_upload_url(request, options = nil) - # Pass arguments to `generate_upload_url` via a request object, either of type - # {::Google::Cloud::Functions::V1::GenerateUploadUrlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::GenerateUploadUrlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_upload_url(parent: nil, kms_key_name: nil) - # Pass arguments to `generate_upload_url` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # The project and location in which the Google Cloud Storage signed URL - # should be generated, specified in the format `projects/*/locations/*`. - # @param kms_key_name [::String] - # Resource name of a KMS crypto key (managed by the user) used to - # encrypt/decrypt function source code objects in intermediate Cloud Storage - # buckets. When you generate an upload url and upload your source code, it - # gets copied to an intermediate Cloud Storage bucket. The source code is - # then copied to a versioned directory in the sources bucket in the consumer - # project during the function deployment. - # - # It must match the pattern - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - # - # The Google Cloud Functions service account - # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - # granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - # (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - # Key/KeyRing/Project/Organization (least access preferred). GCF will - # delegate access to the Google Storage service account in the internal - # project. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V1::GenerateUploadUrlResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V1::GenerateUploadUrlResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new - # - # # Call the generate_upload_url method. - # result = client.generate_upload_url request - # - # # The returned object is of type Google::Cloud::Functions::V1::GenerateUploadUrlResponse. - # p result - # - def generate_upload_url request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::GenerateUploadUrlRequest - - # Converts hash and nil to an 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_upload_url.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_upload_url.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_upload_url.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.generate_upload_url 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 a signed URL for downloading deployed function source code. - # The URL is only valid for a limited period and should be used within - # minutes after generation. - # For more information about the signed URL usage see: - # https://cloud.google.com/storage/docs/access-control/signed-urls - # - # @overload generate_download_url(request, options = nil) - # Pass arguments to `generate_download_url` via a request object, either of type - # {::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_download_url(name: nil, version_id: nil) - # Pass arguments to `generate_download_url` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # The name of function for which source code Google Cloud Storage signed - # URL should be generated. - # @param version_id [::Integer] - # The optional version of function. If not set, default, current version - # is used. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new - # - # # Call the generate_download_url method. - # result = client.generate_download_url request - # - # # The returned object is of type Google::Cloud::Functions::V1::GenerateDownloadUrlResponse. - # p result - # - def generate_download_url request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest - - # Converts hash and nil to an 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_download_url.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_download_url.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_download_url.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @cloud_functions_service_stub.generate_download_url 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 IAM access control policy on the specified function. - # Replaces any existing policy. - # - # @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/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @cloud_functions_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 - - ## - # Gets the IAM access control policy for a function. - # Returns an empty policy if the function exists and does not have a policy - # set. - # - # @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/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @cloud_functions_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 - - ## - # Tests the specified permissions against the IAM access control policy - # for a function. - # If the function does not exist, this will return an empty set of - # permissions, not a NOT_FOUND error. - # - # @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/functions/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @cloud_functions_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 - - ## - # Configuration class for the CloudFunctionsService REST API. - # - # This class represents the configuration for CloudFunctionsService 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::Functions::V1::CloudFunctionsService::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_functions to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_functions.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_functions.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 = "cloudfunctions.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 CloudFunctionsService 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_functions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_functions - ## - # RPC-specific configuration for `get_function` - # @return [::Gapic::Config::Method] - # - attr_reader :get_function - ## - # RPC-specific configuration for `create_function` - # @return [::Gapic::Config::Method] - # - attr_reader :create_function - ## - # RPC-specific configuration for `update_function` - # @return [::Gapic::Config::Method] - # - attr_reader :update_function - ## - # RPC-specific configuration for `delete_function` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_function - ## - # RPC-specific configuration for `call_function` - # @return [::Gapic::Config::Method] - # - attr_reader :call_function - ## - # RPC-specific configuration for `generate_upload_url` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_upload_url - ## - # RPC-specific configuration for `generate_download_url` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_download_url - ## - # RPC-specific configuration for `set_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :set_iam_policy - ## - # RPC-specific configuration for `get_iam_policy` - # @return [::Gapic::Config::Method] - # - attr_reader :get_iam_policy - ## - # RPC-specific configuration for `test_iam_permissions` - # @return [::Gapic::Config::Method] - # - attr_reader :test_iam_permissions - - # @private - def initialize parent_rpcs = nil - list_functions_config = parent_rpcs.list_functions if parent_rpcs.respond_to? :list_functions - @list_functions = ::Gapic::Config::Method.new list_functions_config - get_function_config = parent_rpcs.get_function if parent_rpcs.respond_to? :get_function - @get_function = ::Gapic::Config::Method.new get_function_config - create_function_config = parent_rpcs.create_function if parent_rpcs.respond_to? :create_function - @create_function = ::Gapic::Config::Method.new create_function_config - update_function_config = parent_rpcs.update_function if parent_rpcs.respond_to? :update_function - @update_function = ::Gapic::Config::Method.new update_function_config - delete_function_config = parent_rpcs.delete_function if parent_rpcs.respond_to? :delete_function - @delete_function = ::Gapic::Config::Method.new delete_function_config - call_function_config = parent_rpcs.call_function if parent_rpcs.respond_to? :call_function - @call_function = ::Gapic::Config::Method.new call_function_config - generate_upload_url_config = parent_rpcs.generate_upload_url if parent_rpcs.respond_to? :generate_upload_url - @generate_upload_url = ::Gapic::Config::Method.new generate_upload_url_config - generate_download_url_config = parent_rpcs.generate_download_url if parent_rpcs.respond_to? :generate_download_url - @generate_download_url = ::Gapic::Config::Method.new generate_download_url_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 - 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 - 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 - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/operations.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/operations.rb deleted file mode 100644 index 84628a5f6367..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/operations.rb +++ /dev/null @@ -1,923 +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 Functions - module V1 - module CloudFunctionsService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the CloudFunctionsService 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 CloudFunctionsService 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::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Functions::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "cloudfunctions.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/operations", - matches: [] - ) - 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{^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{^operations(?:/.*)?$}, true] - ] - ) - 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{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/service_stub.rb deleted file mode 100644 index d808569a35b6..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/cloud_functions_service/rest/service_stub.rb +++ /dev/null @@ -1,759 +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/functions/v1/functions_pb" - -module Google - module Cloud - module Functions - module V1 - module CloudFunctionsService - module Rest - ## - # REST service stub for the CloudFunctionsService 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 list_functions REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::ListFunctionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V1::ListFunctionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V1::ListFunctionsResponse] - # A result object deserialized from the server's reply - def list_functions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_functions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_functions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Functions::V1::ListFunctionsResponse.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_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::GetFunctionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V1::CloudFunction] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V1::CloudFunction] - # A result object deserialized from the server's reply - def get_function request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_function_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_function", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Functions::V1::CloudFunction.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_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::CreateFunctionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_function request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_function_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_function", - 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_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::UpdateFunctionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_function request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_function_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_function", - 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_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::DeleteFunctionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_function request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_function_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_function", - 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 call_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::CallFunctionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V1::CallFunctionResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V1::CallFunctionResponse] - # A result object deserialized from the server's reply - def call_function request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_call_function_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "call_function", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Functions::V1::CallFunctionResponse.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_upload_url REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::GenerateUploadUrlRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V1::GenerateUploadUrlResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V1::GenerateUploadUrlResponse] - # A result object deserialized from the server's reply - def generate_upload_url request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_upload_url_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_upload_url", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Functions::V1::GenerateUploadUrlResponse.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_download_url REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse] - # A result object deserialized from the server's reply - def generate_download_url request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_download_url_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_download_url", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse.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 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 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 - - ## - # @private - # - # GRPC transcoding helper method for the list_functions REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::ListFunctionsRequest] - # 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_functions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/functions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::GetFunctionRequest] - # 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_function_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::CreateFunctionRequest] - # 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_function_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{location}/functions", - body: "function", - matches: [ - ["location", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::UpdateFunctionRequest] - # 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_function_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{function.name}", - body: "function", - matches: [ - ["function.name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::DeleteFunctionRequest] - # 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_function_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the call_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::CallFunctionRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_call_function_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:call", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_upload_url REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::GenerateUploadUrlRequest] - # 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_upload_url_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/functions:generateUploadUrl", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_download_url REST call - # - # @param request_pb [::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest] - # 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_download_url_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:generateDownloadUrl", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] - ] - ) - 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/[^/]+/functions/[^/]+/?$}, false] - ] - ) - 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/[^/]+/functions/[^/]+/?$}, false] - ] - ) - 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/[^/]+/functions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_pb.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_pb.rb deleted file mode 100644 index c5c8a134c7c6..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_pb.rb +++ /dev/null @@ -1,85 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/functions/v1/functions.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/functions/v1/operations_pb' -require 'google/iam/v1/iam_policy_pb' -require 'google/iam/v1/policy_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n)google/cloud/functions/v1/functions.proto\x12\x19google.cloud.functions.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/functions/v1/operations.proto\x1a\x1egoogle/iam/v1/iam_policy.proto\x1a\x1agoogle/iam/v1/policy.proto\x1a#google/longrunning/operations.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbb\x14\n\rCloudFunction\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x1c\n\x12source_archive_url\x18\x03 \x01(\tH\x00\x12H\n\x11source_repository\x18\x04 \x01(\x0b\x32+.google.cloud.functions.v1.SourceRepositoryH\x00\x12\x1b\n\x11source_upload_url\x18\x10 \x01(\tH\x00\x12@\n\rhttps_trigger\x18\x05 \x01(\x0b\x32\'.google.cloud.functions.v1.HttpsTriggerH\x01\x12@\n\revent_trigger\x18\x06 \x01(\x0b\x32\'.google.cloud.functions.v1.EventTriggerH\x01\x12\x43\n\x06status\x18\x07 \x01(\x0e\x32..google.cloud.functions.v1.CloudFunctionStatusB\x03\xe0\x41\x03\x12\x13\n\x0b\x65ntry_point\x18\x08 \x01(\t\x12\x0f\n\x07runtime\x18\x13 \x01(\t\x12*\n\x07timeout\x18\t \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x1b\n\x13\x61vailable_memory_mb\x18\n \x01(\x05\x12\x1d\n\x15service_account_email\x18\x0b \x01(\t\x12\x34\n\x0bupdate_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\nversion_id\x18\x0e \x01(\x03\x42\x03\xe0\x41\x03\x12\x44\n\x06labels\x18\x0f \x03(\x0b\x32\x34.google.cloud.functions.v1.CloudFunction.LabelsEntry\x12\x61\n\x15\x65nvironment_variables\x18\x11 \x03(\x0b\x32\x42.google.cloud.functions.v1.CloudFunction.EnvironmentVariablesEntry\x12l\n\x1b\x62uild_environment_variables\x18\x1c \x03(\x0b\x32G.google.cloud.functions.v1.CloudFunction.BuildEnvironmentVariablesEntry\x12\x13\n\x07network\x18\x12 \x01(\tB\x02\x18\x01\x12\x15\n\rmax_instances\x18\x14 \x01(\x05\x12\x15\n\rmin_instances\x18 \x01(\x05\x12\x15\n\rvpc_connector\x18\x16 \x01(\t\x12j\n\x1dvpc_connector_egress_settings\x18\x17 \x01(\x0e\x32\x43.google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings\x12R\n\x10ingress_settings\x18\x18 \x01(\x0e\x32\x38.google.cloud.functions.v1.CloudFunction.IngressSettings\x12<\n\x0ckms_key_name\x18\x19 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x19\n\x11\x62uild_worker_pool\x18\x1a \x01(\t\x12\x15\n\x08\x62uild_id\x18\x1b \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nbuild_name\x18! \x01(\tB\x03\xe0\x41\x03\x12M\n\x1csecret_environment_variables\x18\x1d \x03(\x0b\x32\'.google.cloud.functions.v1.SecretEnvVar\x12?\n\x0esecret_volumes\x18\x1e \x03(\x0b\x32\'.google.cloud.functions.v1.SecretVolume\x12\x19\n\x0csource_token\x18\x1f \x01(\tB\x03\xe0\x41\x04\x12J\n\x11\x64ocker_repository\x18\" \x01(\tB/\xfa\x41,\n*artifactregistry.googleapis.com/Repository\x12T\n\x0f\x64ocker_registry\x18# \x01(\x0e\x32\x37.google.cloud.functions.v1.CloudFunction.DockerRegistryB\x02\x18\x01\x12\x61\n\x17\x61utomatic_update_policy\x18( \x01(\x0b\x32>.google.cloud.functions.v1.CloudFunction.AutomaticUpdatePolicyH\x02\x12`\n\x17on_deploy_update_policy\x18) \x01(\x0b\x32=.google.cloud.functions.v1.CloudFunction.OnDeployUpdatePolicyH\x02\x12\x1d\n\x15\x62uild_service_account\x18+ \x01(\t\x1a\x17\n\x15\x41utomaticUpdatePolicy\x1a\x34\n\x14OnDeployUpdatePolicy\x12\x1c\n\x0fruntime_version\x18\x01 \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\x1a;\n\x19\x45nvironmentVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a@\n\x1e\x42uildEnvironmentVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"u\n\x1aVpcConnectorEgressSettings\x12-\n)VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED\x10\x00\x12\x17\n\x13PRIVATE_RANGES_ONLY\x10\x01\x12\x0f\n\x0b\x41LL_TRAFFIC\x10\x02\"x\n\x0fIngressSettings\x12 \n\x1cINGRESS_SETTINGS_UNSPECIFIED\x10\x00\x12\r\n\tALLOW_ALL\x10\x01\x12\x17\n\x13\x41LLOW_INTERNAL_ONLY\x10\x02\x12\x1b\n\x17\x41LLOW_INTERNAL_AND_GCLB\x10\x03\"`\n\x0e\x44ockerRegistry\x12\x1f\n\x1b\x44OCKER_REGISTRY_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43ONTAINER_REGISTRY\x10\x01\x12\x15\n\x11\x41RTIFACT_REGISTRY\x10\x02:n\xea\x41k\n+cloudfunctions.googleapis.com/CloudFunction\x12\n\x1aGenerateDownloadUrlRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nversion_id\x18\x02 \x01(\x04\"3\n\x1bGenerateDownloadUrlResponse\x12\x14\n\x0c\x64ownload_url\x18\x01 \x01(\t*\x92\x01\n\x13\x43loudFunctionStatus\x12%\n!CLOUD_FUNCTION_STATUS_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0b\n\x07OFFLINE\x10\x02\x12\x16\n\x12\x44\x45PLOY_IN_PROGRESS\x10\x03\x12\x16\n\x12\x44\x45LETE_IN_PROGRESS\x10\x04\x12\x0b\n\x07UNKNOWN\x10\x05\x32\x97\x11\n\x15\x43loudFunctionsService\x12\xa9\x01\n\rListFunctions\x12/.google.cloud.functions.v1.ListFunctionsRequest\x1a\x30.google.cloud.functions.v1.ListFunctionsResponse\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{parent=projects/*/locations/*}/functions\x12\xa4\x01\n\x0bGetFunction\x12-.google.cloud.functions.v1.GetFunctionRequest\x1a(.google.cloud.functions.v1.CloudFunction\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1/{name=projects/*/locations/*/functions/*}\x12\xdf\x01\n\x0e\x43reateFunction\x12\x30.google.cloud.functions.v1.CreateFunctionRequest\x1a\x1d.google.longrunning.Operation\"|\xca\x41$\n\rCloudFunction\x12\x13OperationMetadataV1\xda\x41\x11location,function\x82\xd3\xe4\x93\x02;\"//v1/{location=projects/*/locations/*}/functions:\x08\x66unction\x12\xdd\x01\n\x0eUpdateFunction\x12\x30.google.cloud.functions.v1.UpdateFunctionRequest\x1a\x1d.google.longrunning.Operation\"z\xca\x41$\n\rCloudFunction\x12\x13OperationMetadataV1\xda\x41\x08\x66unction\x82\xd3\xe4\x93\x02\x42\x32\x36/v1/{function.name=projects/*/locations/*/functions/*}:\x08\x66unction\x12\xce\x01\n\x0e\x44\x65leteFunction\x12\x30.google.cloud.functions.v1.DeleteFunctionRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41,\n\x15google.protobuf.Empty\x12\x13OperationMetadataV1\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v1/{name=projects/*/locations/*/functions/*}\x12\xba\x01\n\x0c\x43\x61llFunction\x12..google.cloud.functions.v1.CallFunctionRequest\x1a/.google.cloud.functions.v1.CallFunctionResponse\"I\xda\x41\tname,data\x82\xd3\xe4\x93\x02\x37\"2/v1/{name=projects/*/locations/*/functions/*}:call:\x01*\x12\xca\x01\n\x11GenerateUploadUrl\x12\x33.google.cloud.functions.v1.GenerateUploadUrlRequest\x1a\x34.google.cloud.functions.v1.GenerateUploadUrlResponse\"J\x82\xd3\xe4\x93\x02\x44\"?/v1/{parent=projects/*/locations/*}/functions:generateUploadUrl:\x01*\x12\xd2\x01\n\x13GenerateDownloadUrl\x12\x35.google.cloud.functions.v1.GenerateDownloadUrlRequest\x1a\x36.google.cloud.functions.v1.GenerateDownloadUrlResponse\"L\x82\xd3\xe4\x93\x02\x46\"A/v1/{name=projects/*/locations/*/functions/*}:generateDownloadUrl:\x01*\x12\x94\x01\n\x0cSetIamPolicy\x12\".google.iam.v1.SetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"I\x82\xd3\xe4\x93\x02\x43\">/v1/{resource=projects/*/locations/*/functions/*}:setIamPolicy:\x01*\x12\x91\x01\n\x0cGetIamPolicy\x12\".google.iam.v1.GetIamPolicyRequest\x1a\x15.google.iam.v1.Policy\"F\x82\xd3\xe4\x93\x02@\x12>/v1/{resource=projects/*/locations/*/functions/*}:getIamPolicy\x12\xba\x01\n\x12TestIamPermissions\x12(.google.iam.v1.TestIamPermissionsRequest\x1a).google.iam.v1.TestIamPermissionsResponse\"O\x82\xd3\xe4\x93\x02I\"D/v1/{resource=projects/*/locations/*/functions/*}:testIamPermissions:\x01*\x1aQ\xca\x41\x1d\x63loudfunctions.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xe1\x02\n\x1d\x63om.google.cloud.functions.v1B\x0e\x46unctionsProtoP\x01Z;cloud.google.com/go/functions/apiv1/functionspb;functionspb\xa2\x02\x03GCF\xea\x41o\n*artifactregistry.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}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.Duration", "google/protobuf/duration.proto"], - ["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 - -module Google - module Cloud - module Functions - module V1 - CloudFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction").msgclass - CloudFunction::AutomaticUpdatePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction.AutomaticUpdatePolicy").msgclass - CloudFunction::OnDeployUpdatePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction.OnDeployUpdatePolicy").msgclass - CloudFunction::VpcConnectorEgressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction.VpcConnectorEgressSettings").enummodule - CloudFunction::IngressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction.IngressSettings").enummodule - CloudFunction::DockerRegistry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunction.DockerRegistry").enummodule - SourceRepository = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.SourceRepository").msgclass - HttpsTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.HttpsTrigger").msgclass - HttpsTrigger::SecurityLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.HttpsTrigger.SecurityLevel").enummodule - EventTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.EventTrigger").msgclass - FailurePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.FailurePolicy").msgclass - FailurePolicy::Retry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.FailurePolicy.Retry").msgclass - SecretEnvVar = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.SecretEnvVar").msgclass - SecretVolume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.SecretVolume").msgclass - SecretVolume::SecretVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.SecretVolume.SecretVersion").msgclass - CreateFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CreateFunctionRequest").msgclass - UpdateFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.UpdateFunctionRequest").msgclass - GetFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GetFunctionRequest").msgclass - ListFunctionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.ListFunctionsRequest").msgclass - ListFunctionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.ListFunctionsResponse").msgclass - DeleteFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.DeleteFunctionRequest").msgclass - CallFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CallFunctionRequest").msgclass - CallFunctionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CallFunctionResponse").msgclass - GenerateUploadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GenerateUploadUrlRequest").msgclass - GenerateUploadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GenerateUploadUrlResponse").msgclass - GenerateDownloadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GenerateDownloadUrlRequest").msgclass - GenerateDownloadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.GenerateDownloadUrlResponse").msgclass - CloudFunctionStatus = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.CloudFunctionStatus").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_services_pb.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_services_pb.rb deleted file mode 100644 index 5290851160a8..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/functions_services_pb.rb +++ /dev/null @@ -1,106 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/functions/v1/functions.proto for package 'google.cloud.functions.v1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/functions/v1/functions_pb' - -module Google - module Cloud - module Functions - module V1 - module CloudFunctionsService - # A service that application uses to manipulate triggers and functions. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.functions.v1.CloudFunctionsService' - - # Returns a list of functions that belong to the requested project. - rpc :ListFunctions, ::Google::Cloud::Functions::V1::ListFunctionsRequest, ::Google::Cloud::Functions::V1::ListFunctionsResponse - # Returns a function with the given name from the requested project. - rpc :GetFunction, ::Google::Cloud::Functions::V1::GetFunctionRequest, ::Google::Cloud::Functions::V1::CloudFunction - # Creates a new function. If a function with the given name already exists in - # the specified project, the long running operation will return - # `ALREADY_EXISTS` error. - rpc :CreateFunction, ::Google::Cloud::Functions::V1::CreateFunctionRequest, ::Google::Longrunning::Operation - # Updates existing function. - rpc :UpdateFunction, ::Google::Cloud::Functions::V1::UpdateFunctionRequest, ::Google::Longrunning::Operation - # Deletes a function with the given name from the specified project. If the - # given function is used by some trigger, the trigger will be updated to - # remove this function. - rpc :DeleteFunction, ::Google::Cloud::Functions::V1::DeleteFunctionRequest, ::Google::Longrunning::Operation - # Synchronously invokes a deployed Cloud Function. To be used for testing - # purposes as very limited traffic is allowed. For more information on - # the actual limits, refer to - # [Rate Limits](https://cloud.google.com/functions/quotas#rate_limits). - rpc :CallFunction, ::Google::Cloud::Functions::V1::CallFunctionRequest, ::Google::Cloud::Functions::V1::CallFunctionResponse - # Returns a signed URL for uploading a function source code. - # For more information about the signed URL usage see: - # https://cloud.google.com/storage/docs/access-control/signed-urls. - # Once the function source code upload is complete, the used signed - # URL should be provided in CreateFunction or UpdateFunction request - # as a reference to the function source code. - # - # When uploading source code to the generated signed URL, please follow - # these restrictions: - # - # * Source file type should be a zip file. - # * Source file size should not exceed 100MB limit. - # * No credentials should be attached - the signed URLs provide access to the - # target bucket using internal service identity; if credentials were - # attached, the identity from the credentials would be used, but that - # identity does not have permissions to upload files to the URL. - # - # When making a HTTP PUT request, these two headers need to be specified: - # - # * `content-type: application/zip` - # * `x-goog-content-length-range: 0,104857600` - # - # And this header SHOULD NOT be specified: - # - # * `Authorization: Bearer YOUR_TOKEN` - rpc :GenerateUploadUrl, ::Google::Cloud::Functions::V1::GenerateUploadUrlRequest, ::Google::Cloud::Functions::V1::GenerateUploadUrlResponse - # Returns a signed URL for downloading deployed function source code. - # The URL is only valid for a limited period and should be used within - # minutes after generation. - # For more information about the signed URL usage see: - # https://cloud.google.com/storage/docs/access-control/signed-urls - rpc :GenerateDownloadUrl, ::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest, ::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse - # Sets the IAM access control policy on the specified function. - # Replaces any existing policy. - rpc :SetIamPolicy, ::Google::Iam::V1::SetIamPolicyRequest, ::Google::Iam::V1::Policy - # Gets the IAM access control policy for a function. - # Returns an empty policy if the function exists and does not have a policy - # set. - rpc :GetIamPolicy, ::Google::Iam::V1::GetIamPolicyRequest, ::Google::Iam::V1::Policy - # Tests the specified permissions against the IAM access control policy - # for a function. - # If the function does not exist, this will return an empty set of - # permissions, not a NOT_FOUND error. - rpc :TestIamPermissions, ::Google::Iam::V1::TestIamPermissionsRequest, ::Google::Iam::V1::TestIamPermissionsResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/operations_pb.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/operations_pb.rb deleted file mode 100644 index d7eed75eb7b0..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/operations_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/functions/v1/operations.proto - -require 'google/protobuf' - -require 'google/protobuf/any_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n*google/cloud/functions/v1/operations.proto\x12\x19google.cloud.functions.v1\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x85\x02\n\x13OperationMetadataV1\x12\x0e\n\x06target\x18\x01 \x01(\t\x12\x36\n\x04type\x18\x02 \x01(\x0e\x32(.google.cloud.functions.v1.OperationType\x12%\n\x07request\x18\x03 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x12\n\nversion_id\x18\x04 \x01(\x03\x12/\n\x0bupdate_time\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x10\n\x08\x62uild_id\x18\x06 \x01(\t\x12\x14\n\x0csource_token\x18\x07 \x01(\t\x12\x12\n\nbuild_name\x18\x08 \x01(\t*i\n\rOperationType\x12\x19\n\x15OPERATION_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43REATE_FUNCTION\x10\x01\x12\x13\n\x0fUPDATE_FUNCTION\x10\x02\x12\x13\n\x0f\x44\x45LETE_FUNCTION\x10\x03\x42x\n\x1d\x63om.google.cloud.functions.v1B\x18\x46unctionsOperationsProtoP\x01Z;cloud.google.com/go/functions/apiv1/functionspb;functionspbb\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.Any", "google/protobuf/any.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Functions - module V1 - OperationMetadataV1 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.OperationMetadataV1").msgclass - OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v1.OperationType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/rest.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/rest.rb deleted file mode 100644 index 5de47e912399..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/rest.rb +++ /dev/null @@ -1,38 +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/functions/v1/cloud_functions_service/rest" -require "google/cloud/functions/v1/bindings_override" -require "google/cloud/functions/v1/version" - -module Google - module Cloud - module Functions - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/functions/v1/rest" - # client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/version.rb b/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/v1/version.rb deleted file mode 100644 index 88469f088295..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/lib/google/cloud/functions/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 Functions - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-functions-v1/proto_docs/README.md deleted file mode 100644 index c72962cd9589..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Functions 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-functions-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/cloud/functions/v1/functions.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/functions.rb deleted file mode 100644 index 2ddf770f156f..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/functions.rb +++ /dev/null @@ -1,773 +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 Functions - module V1 - # Describes a Cloud Function that contains user computation executed in - # response to an event. It encapsulate function and triggers configurations. - # @!attribute [rw] name - # @return [::String] - # A user-defined name of the function. Function names must be unique - # globally and match pattern `projects/*/locations/*/functions/*` - # @!attribute [rw] description - # @return [::String] - # User-provided description of a function. - # @!attribute [rw] source_archive_url - # @return [::String] - # The Google Cloud Storage URL, starting with `gs://`, pointing to the zip - # archive which contains the function. - # - # Note: The following fields are mutually exclusive: `source_archive_url`, `source_repository`, `source_upload_url`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] source_repository - # @return [::Google::Cloud::Functions::V1::SourceRepository] - # **Beta Feature** - # - # The source repository where a function is hosted. - # - # Note: The following fields are mutually exclusive: `source_repository`, `source_archive_url`, `source_upload_url`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] source_upload_url - # @return [::String] - # The Google Cloud Storage signed URL used for source uploading, generated - # by calling [google.cloud.functions.v1.GenerateUploadUrl]. - # - # The signature is validated on write methods (Create, Update) - # The signature is stripped from the Function object on read methods (Get, - # List) - # - # Note: The following fields are mutually exclusive: `source_upload_url`, `source_archive_url`, `source_repository`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] https_trigger - # @return [::Google::Cloud::Functions::V1::HttpsTrigger] - # An HTTPS endpoint type of source that can be triggered via URL. - # - # Note: The following fields are mutually exclusive: `https_trigger`, `event_trigger`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] event_trigger - # @return [::Google::Cloud::Functions::V1::EventTrigger] - # A source that fires events in response to a condition in another service. - # - # Note: The following fields are mutually exclusive: `event_trigger`, `https_trigger`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] status - # @return [::Google::Cloud::Functions::V1::CloudFunctionStatus] - # Output only. Status of the function deployment. - # @!attribute [rw] entry_point - # @return [::String] - # The name of the function (as defined in source code) that will be - # executed. Defaults to the resource name suffix (ID of the function), if not - # specified. - # @!attribute [rw] runtime - # @return [::String] - # The runtime in which to run the function. Required when deploying a new - # function, optional when updating an existing function. For a complete - # list of possible choices, see the - # [`gcloud` command - # reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - # @!attribute [rw] timeout - # @return [::Google::Protobuf::Duration] - # The function execution timeout. Execution is considered failed and - # can be terminated if the function is not completed at the end of the - # timeout period. Defaults to 60 seconds. - # @!attribute [rw] available_memory_mb - # @return [::Integer] - # The amount of memory in MB available for a function. - # Defaults to 256MB. - # @!attribute [rw] service_account_email - # @return [::String] - # The email of the function's service account. If empty, defaults to - # `{project_id}@appspot.gserviceaccount.com`. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update timestamp of a Cloud Function. - # @!attribute [r] version_id - # @return [::Integer] - # Output only. The version identifier of the Cloud Function. Each deployment - # attempt results in a new version of a function being created. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels associated with this Cloud Function. - # @!attribute [rw] environment_variables - # @return [::Google::Protobuf::Map{::String => ::String}] - # Environment variables that shall be available during function execution. - # @!attribute [rw] build_environment_variables - # @return [::Google::Protobuf::Map{::String => ::String}] - # Build environment variables that shall be available during build time. - # @!attribute [rw] network - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::String] - # Deprecated: use vpc_connector - # @!attribute [rw] max_instances - # @return [::Integer] - # The limit on the maximum number of function instances that may coexist at a - # given time. - # - # In some cases, such as rapid traffic surges, Cloud Functions may, for a - # short period of time, create more instances than the specified max - # instances limit. If your function cannot tolerate this temporary behavior, - # you may want to factor in a safety margin and set a lower max instances - # value than your function can tolerate. - # - # See the [Max - # Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - # more details. - # @!attribute [rw] min_instances - # @return [::Integer] - # A lower bound for the number function instances that may coexist at a - # given time. - # @!attribute [rw] vpc_connector - # @return [::String] - # The VPC Network Connector that this cloud function can connect to. It can - # be either the fully-qualified URI, or the short name of the network - # connector resource. The format of this field is - # `projects/*/locations/*/connectors/*` - # - # This field is mutually exclusive with `network` field and will eventually - # replace it. - # - # See [the VPC documentation](https://cloud.google.com/compute/docs/vpc) for - # more information on connecting Cloud projects. - # @!attribute [rw] vpc_connector_egress_settings - # @return [::Google::Cloud::Functions::V1::CloudFunction::VpcConnectorEgressSettings] - # The egress settings for the connector, controlling what traffic is diverted - # through it. - # @!attribute [rw] ingress_settings - # @return [::Google::Cloud::Functions::V1::CloudFunction::IngressSettings] - # The ingress settings for the function, controlling what traffic can reach - # it. - # @!attribute [rw] kms_key_name - # @return [::String] - # Resource name of a KMS crypto key (managed by the user) used to - # encrypt/decrypt function resources. - # - # It must match the pattern - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - # - # If specified, you must also provide an artifact registry repository using - # the `docker_repository` field that was created with the same KMS crypto - # key. - # - # The following service accounts need to be granted the role 'Cloud KMS - # CryptoKey Encrypter/Decrypter (roles/cloudkms.cryptoKeyEncrypterDecrypter)' - # on the Key/KeyRing/Project/Organization (least access preferred). - # - # 1. Google Cloud Functions service account - # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) - - # Required to protect the function's image. - # 2. Google Storage service account - # (service-\\{project_number}@gs-project-accounts.iam.gserviceaccount.com) - - # Required to protect the function's source code. - # If this service account does not exist, deploying a function without a - # KMS key or retrieving the service agent name provisions it. For more - # information, see - # https://cloud.google.com/storage/docs/projects#service-agents and - # https://cloud.google.com/storage/docs/getting-service-agent#gsutil. - # - # Google Cloud Functions delegates access to service agents to protect - # function resources in internal projects that are not accessible by the - # end user. - # @!attribute [rw] build_worker_pool - # @return [::String] - # Name of the Cloud Build Custom Worker Pool that should be used to build the - # function. The format of this field is - # `projects/{project}/locations/{region}/workerPools/{workerPool}` where - # `{project}` and `{region}` are the project id and region respectively where - # the worker pool is defined and `{workerPool}` is the short name of the - # worker pool. - # - # If the project id is not the same as the function, then the Cloud - # Functions Service Agent - # (`service-@gcf-admin-robot.iam.gserviceaccount.com`) must - # be granted the role Cloud Build Custom Workers Builder - # (`roles/cloudbuild.customworkers.builder`) in the project. - # @!attribute [r] build_id - # @return [::String] - # Output only. The Cloud Build ID of the latest successful deployment of the - # function. - # @!attribute [r] build_name - # @return [::String] - # Output only. The Cloud Build Name of the function deployment. - # `projects//locations//builds/`. - # @!attribute [rw] secret_environment_variables - # @return [::Array<::Google::Cloud::Functions::V1::SecretEnvVar>] - # Secret environment variables configuration. - # @!attribute [rw] secret_volumes - # @return [::Array<::Google::Cloud::Functions::V1::SecretVolume>] - # Secret volumes configuration. - # @!attribute [rw] source_token - # @return [::String] - # Input only. An identifier for Firebase function sources. Disclaimer: This - # field is only supported for Firebase function deployments. - # @!attribute [rw] docker_repository - # @return [::String] - # User-managed repository created in Artifact Registry to which the - # function's Docker image will be pushed after it is built by Cloud Build. - # May optionally be encrypted with a customer-managed encryption key (CMEK). - # If unspecified and `docker_registry` is not explicitly set to - # `CONTAINER_REGISTRY`, GCF will create and use a default Artifact Registry - # repository named 'gcf-artifacts' in the region. - # - # It must match the pattern - # `projects/{project}/locations/{location}/repositories/{repository}`. - # - # Cross-project repositories are not supported. - # Cross-location repositories are not supported. - # Repository format must be 'DOCKER'. - # @!attribute [rw] docker_registry - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Functions::V1::CloudFunction::DockerRegistry] - # Docker Registry to use for this deployment. - # As of March 2025, `CONTAINER_REGISTRY` option is no longer - # available in response to Container Registry's deprecation: - # https://cloud.google.com/artifact-registry/docs/transition/transition-from-gcr - # Please use Artifact Registry instead, which is the default choice. - # - # If unspecified, it defaults to `ARTIFACT_REGISTRY`. - # If `docker_repository` field is specified, this field should either be left - # unspecified or set to `ARTIFACT_REGISTRY`. - # @!attribute [rw] automatic_update_policy - # @return [::Google::Cloud::Functions::V1::CloudFunction::AutomaticUpdatePolicy] - # Note: The following fields are mutually exclusive: `automatic_update_policy`, `on_deploy_update_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] on_deploy_update_policy - # @return [::Google::Cloud::Functions::V1::CloudFunction::OnDeployUpdatePolicy] - # Note: The following fields are mutually exclusive: `on_deploy_update_policy`, `automatic_update_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] build_service_account - # @return [::String] - # A service account the user provides for use with Cloud Build. The format of - # this field is - # `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. - class CloudFunction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Security patches are applied automatically to the runtime without requiring - # the function to be redeployed. - class AutomaticUpdatePolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Security patches are only applied when a function is redeployed. - # @!attribute [r] runtime_version - # @return [::String] - # Output only. Contains the runtime version which was used during latest - # function deployment. - class OnDeployUpdatePolicy - 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 [::String] - class EnvironmentVariablesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class BuildEnvironmentVariablesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Available egress settings. - # - # This controls what traffic is diverted through the VPC Access Connector - # resource. By default PRIVATE_RANGES_ONLY will be used. - module VpcConnectorEgressSettings - # Unspecified. - VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0 - - # Use the VPC Access Connector only for private IP space from RFC1918. - PRIVATE_RANGES_ONLY = 1 - - # Force the use of VPC Access Connector for all egress traffic from the - # function. - ALL_TRAFFIC = 2 - end - - # Available ingress settings. - # - # This controls what traffic can reach the function. - # - # If unspecified, ALLOW_ALL will be used. - module IngressSettings - # Unspecified. - INGRESS_SETTINGS_UNSPECIFIED = 0 - - # Allow HTTP traffic from public and private sources. - ALLOW_ALL = 1 - - # Allow HTTP traffic from only private VPC sources. - ALLOW_INTERNAL_ONLY = 2 - - # Allow HTTP traffic from private VPC sources and through GCLB. - ALLOW_INTERNAL_AND_GCLB = 3 - end - - # Docker Registry to use for storing function Docker images. - module DockerRegistry - # Unspecified. - DOCKER_REGISTRY_UNSPECIFIED = 0 - - # Docker images will be stored in multi-regional Container Registry - # repositories named `gcf`. - CONTAINER_REGISTRY = 1 - - # Docker images will be stored in regional Artifact Registry repositories. - # By default, GCF will create and use repositories named `gcf-artifacts` - # in every region in which a function is deployed. But the repository to - # use can also be specified by the user using the `docker_repository` - # field. - ARTIFACT_REGISTRY = 2 - end - end - - # Describes SourceRepository, used to represent parameters related to - # source repository where a function is hosted. - # @!attribute [rw] url - # @return [::String] - # The URL pointing to the hosted repository where the function is defined. - # There are supported Cloud Source Repository URLs in the following - # formats: - # - # To refer to a specific commit: - # `https://source.developers.google.com/projects/*/repos/*/revisions/*/paths/*` - # To refer to a moveable alias (branch): - # `https://source.developers.google.com/projects/*/repos/*/moveable-aliases/*/paths/*` - # In particular, to refer to HEAD use `master` moveable alias. - # To refer to a specific fixed alias (tag): - # `https://source.developers.google.com/projects/*/repos/*/fixed-aliases/*/paths/*` - # - # You may omit `paths/*` if you want to use the main directory. The function - # response may add an empty `/paths/` to the URL. - # @!attribute [r] deployed_url - # @return [::String] - # Output only. The URL pointing to the hosted repository where the function - # were defined at the time of deployment. It always points to a specific - # commit in the format described above. - class SourceRepository - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes HttpsTrigger, could be used to connect web hooks to function. - # @!attribute [r] url - # @return [::String] - # Output only. The deployed url for the function. - # @!attribute [rw] security_level - # @return [::Google::Cloud::Functions::V1::HttpsTrigger::SecurityLevel] - # The security level for the function. - class HttpsTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Available security level settings. - # - # This controls the methods to enforce security (HTTPS) on a URL. - # - # If unspecified, SECURE_OPTIONAL will be used. - module SecurityLevel - # Unspecified. - SECURITY_LEVEL_UNSPECIFIED = 0 - - # Requests for a URL that match this handler that do not use HTTPS are - # automatically redirected to the HTTPS URL with the same path. Query - # parameters are reserved for the redirect. - SECURE_ALWAYS = 1 - - # Both HTTP and HTTPS requests with URLs that match the handler succeed - # without redirects. The application can examine the request to determine - # which protocol was used and respond accordingly. - SECURE_OPTIONAL = 2 - end - end - - # Describes EventTrigger, used to request events be sent from another - # service. - # @!attribute [rw] event_type - # @return [::String] - # Required. The type of event to observe. For example: - # `providers/cloud.storage/eventTypes/object.change` and - # `providers/cloud.pubsub/eventTypes/topic.publish`. - # - # Event types match pattern `providers/*/eventTypes/*.*`. - # The pattern contains: - # - # 1. namespace: For example, `cloud.storage` and - # `google.firebase.analytics`. - # 2. resource type: The type of resource on which event occurs. For - # example, the Google Cloud Storage API includes the type `object`. - # 3. action: The action that generates the event. For example, action for - # a Google Cloud Storage Object is 'change'. - # These parts are lower case. - # @!attribute [rw] resource - # @return [::String] - # Required. The resource(s) from which to observe events, for example, - # `projects/_/buckets/myBucket`. - # - # Not all syntactically correct values are accepted by all services. For - # example: - # - # 1. The authorization model must support it. Google Cloud Functions - # only allows EventTriggers to be deployed that observe resources in the - # same project as the `CloudFunction`. - # 2. The resource type must match the pattern expected for an - # `event_type`. For example, an `EventTrigger` that has an - # `event_type` of "google.pubsub.topic.publish" should have a resource - # that matches Google Cloud Pub/Sub topics. - # - # Additionally, some services may support short names when creating an - # `EventTrigger`. These will always be returned in the normalized "long" - # format. - # - # See each *service's* documentation for supported formats. - # @!attribute [rw] service - # @return [::String] - # The hostname of the service that should be observed. - # - # If no string is provided, the default service implementing the API will - # be used. For example, `storage.googleapis.com` is the default for all - # event types in the `google.storage` namespace. - # @!attribute [rw] failure_policy - # @return [::Google::Cloud::Functions::V1::FailurePolicy] - # Specifies policy for failed executions. - class EventTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the policy in case of function's execution failure. - # If empty, then defaults to ignoring failures (i.e. not retrying them). - # @!attribute [rw] retry - # @return [::Google::Cloud::Functions::V1::FailurePolicy::Retry] - # If specified, then the function will be retried in case of a failure. - class FailurePolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes the retry policy in case of function's execution failure. - # A function execution will be retried on any failure. - # A failed execution will be retried up to 7 days with an exponential backoff - # (capped at 10 seconds). - # Retried execution is charged as any other execution. - class Retry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Configuration for a secret environment variable. It has the information - # necessary to fetch the secret value from secret manager and expose it as an - # environment variable. - # @!attribute [rw] key - # @return [::String] - # Name of the environment variable. - # @!attribute [rw] project_id - # @return [::String] - # Project identifier (preferably project number but can also be the project - # ID) of the project that contains the secret. If not set, it will be - # populated with the function's project assuming that the secret exists in - # the same project as of the function. - # @!attribute [rw] secret - # @return [::String] - # Name of the secret in secret manager (not the full resource name). - # @!attribute [rw] version - # @return [::String] - # Version of the secret (version number or the string 'latest'). It is - # recommended to use a numeric version for secret environment variables as - # any updates to the secret value is not reflected until new instances start. - class SecretEnvVar - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a secret volume. It has the information necessary to fetch - # the secret value from secret manager and make it available as files mounted - # at the requested paths within the application container. Secret value is not - # a part of the configuration. Every filesystem read operation performs a - # lookup in secret manager to retrieve the secret value. - # @!attribute [rw] mount_path - # @return [::String] - # The path within the container to mount the secret volume. For example, - # setting the mount_path as `/etc/secrets` would mount the secret value files - # under the `/etc/secrets` directory. This directory will also be completely - # shadowed and unavailable to mount any other secrets. - # - # Recommended mount paths: /etc/secrets - # Restricted mount paths: /cloudsql, /dev/log, /pod, /proc, /var/log - # @!attribute [rw] project_id - # @return [::String] - # Project identifier (preferrably project number but can also be the project - # ID) of the project that contains the secret. If not set, it will be - # populated with the function's project assuming that the secret exists in - # the same project as of the function. - # @!attribute [rw] secret - # @return [::String] - # Name of the secret in secret manager (not the full resource name). - # @!attribute [rw] versions - # @return [::Array<::Google::Cloud::Functions::V1::SecretVolume::SecretVersion>] - # List of secret versions to mount for this secret. If empty, the `latest` - # version of the secret will be made available in a file named after the - # secret under the mount point. - class SecretVolume - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for a single version. - # @!attribute [rw] version - # @return [::String] - # Version of the secret (version number or the string 'latest'). It is - # preferable to use `latest` version with secret volumes as secret value - # changes are reflected immediately. - # @!attribute [rw] path - # @return [::String] - # Relative path of the file under the mount path where the secret value for - # this version will be fetched and made available. For example, setting the - # mount_path as '/etc/secrets' and path as `/secret_foo` would mount the - # secret value file at `/etc/secrets/secret_foo`. - class SecretVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Request for the `CreateFunction` method. - # @!attribute [rw] location - # @return [::String] - # Required. The project and location in which the function should be created, - # specified in the format `projects/*/locations/*` - # @!attribute [rw] function - # @return [::Google::Cloud::Functions::V1::CloudFunction] - # Required. Function to be created. - class CreateFunctionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `UpdateFunction` method. - # @!attribute [rw] function - # @return [::Google::Cloud::Functions::V1::CloudFunction] - # Required. New version of the function. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. The list of fields in `CloudFunction` that have to be updated. - class UpdateFunctionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetFunction` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the function which details should be obtained. - # @!attribute [rw] version_id - # @return [::Integer] - # Optional. The optional version of the function whose details should be - # obtained. The version of a 1st Gen function is an integer that starts from - # 1 and gets incremented on redeployments. Each deployment creates a config - # version of the underlying function. GCF may keep historical configs for old - # versions. This field can be specified to fetch the historical configs. - # Leave it blank or set to 0 to get the latest version of the function. - class GetFunctionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListFunctions` method. - # @!attribute [rw] parent - # @return [::String] - # The project and location from which the function should be listed, - # specified in the format `projects/*/locations/*` - # If you want to list functions in all locations, use "-" in place of a - # location. When listing functions in all locations, if one or more - # location(s) are unreachable, the response will contain functions from all - # reachable locations along with the names of any unreachable locations. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of functions to return per call. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last - # `ListFunctionsResponse`; indicates that - # this is a continuation of a prior `ListFunctions` call, and that the - # system should return the next page of data. - class ListFunctionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListFunctions` method. - # @!attribute [rw] functions - # @return [::Array<::Google::Cloud::Functions::V1::CloudFunction>] - # The functions that match the request. - # @!attribute [rw] next_page_token - # @return [::String] - # If not empty, indicates that there may be more functions that match - # the request; this value should be passed in a new - # {::Google::Cloud::Functions::V1::ListFunctionsRequest google.cloud.functions.v1.ListFunctionsRequest} - # to get more functions. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. The response does not include any - # functions from these locations. - class ListFunctionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `DeleteFunction` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the function which should be deleted. - class DeleteFunctionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `CallFunction` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the function to be called. - # @!attribute [rw] data - # @return [::String] - # Required. Input to be passed to the function. - class CallFunctionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of `CallFunction` method. - # @!attribute [rw] execution_id - # @return [::String] - # Execution id of function invocation. - # @!attribute [rw] result - # @return [::String] - # Result populated for successful execution of synchronous function. Will - # not be populated if function does not return a result through context. - # @!attribute [rw] error - # @return [::String] - # Either system or user-function generated error. Set if execution - # was not successful. - class CallFunctionResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of `GenerateSourceUploadUrl` method. - # @!attribute [rw] parent - # @return [::String] - # The project and location in which the Google Cloud Storage signed URL - # should be generated, specified in the format `projects/*/locations/*`. - # @!attribute [rw] kms_key_name - # @return [::String] - # Resource name of a KMS crypto key (managed by the user) used to - # encrypt/decrypt function source code objects in intermediate Cloud Storage - # buckets. When you generate an upload url and upload your source code, it - # gets copied to an intermediate Cloud Storage bucket. The source code is - # then copied to a versioned directory in the sources bucket in the consumer - # project during the function deployment. - # - # It must match the pattern - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - # - # The Google Cloud Functions service account - # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - # granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - # (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - # Key/KeyRing/Project/Organization (least access preferred). GCF will - # delegate access to the Google Storage service account in the internal - # project. - class GenerateUploadUrlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of `GenerateSourceUploadUrl` method. - # @!attribute [rw] upload_url - # @return [::String] - # The generated Google Cloud Storage signed URL that should be used for a - # function source code upload. The uploaded file should be a zip archive - # which contains a function. - class GenerateUploadUrlResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of `GenerateDownloadUrl` method. - # @!attribute [rw] name - # @return [::String] - # The name of function for which source code Google Cloud Storage signed - # URL should be generated. - # @!attribute [rw] version_id - # @return [::Integer] - # The optional version of function. If not set, default, current version - # is used. - class GenerateDownloadUrlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of `GenerateDownloadUrl` method. - # @!attribute [rw] download_url - # @return [::String] - # The generated Google Cloud Storage signed URL that should be used for - # function source code download. - class GenerateDownloadUrlResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the current stage of a deployment. - module CloudFunctionStatus - # Not specified. Invalid state. - CLOUD_FUNCTION_STATUS_UNSPECIFIED = 0 - - # Function has been successfully deployed and is serving. - ACTIVE = 1 - - # Function deployment failed and the function isn’t serving. - OFFLINE = 2 - - # Function is being created or updated. - DEPLOY_IN_PROGRESS = 3 - - # Function is being deleted. - DELETE_IN_PROGRESS = 4 - - # Function deployment failed and the function serving state is undefined. - # The function should be updated or deleted to move it out of this state. - UNKNOWN = 5 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/operations.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/operations.rb deleted file mode 100644 index a24751dbd8a1..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/cloud/functions/v1/operations.rb +++ /dev/null @@ -1,77 +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 Functions - module V1 - # Metadata describing an {::Google::Longrunning::Operation Operation} - # @!attribute [rw] target - # @return [::String] - # Target of the operation - for example - # `projects/project-1/locations/region-1/functions/function-1` - # @!attribute [rw] type - # @return [::Google::Cloud::Functions::V1::OperationType] - # Type of operation. - # @!attribute [rw] request - # @return [::Google::Protobuf::Any] - # The original request that started the operation. - # @!attribute [rw] version_id - # @return [::Integer] - # Version id of the function created or updated by an API call. - # This field is only populated for Create and Update operations. - # @!attribute [rw] update_time - # @return [::Google::Protobuf::Timestamp] - # The last update timestamp of the operation. - # @!attribute [rw] build_id - # @return [::String] - # The Cloud Build ID of the function created or updated by an API call. - # This field is only populated for Create and Update operations. - # @!attribute [rw] source_token - # @return [::String] - # An identifier for Firebase function sources. Disclaimer: This field is only - # supported for Firebase function deployments. - # @!attribute [rw] build_name - # @return [::String] - # The Cloud Build Name of the function deployment. - # This field is only populated for Create and Update operations. - # `projects//locations//builds/`. - class OperationMetadataV1 - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A type of an operation. - module OperationType - # Unknown operation type. - OPERATION_UNSPECIFIED = 0 - - # Triggered by CreateFunction call - CREATE_FUNCTION = 1 - - # Triggered by UpdateFunction call - UPDATE_FUNCTION = 2 - - # Triggered by DeleteFunction call. - DELETE_FUNCTION = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-functions-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-functions-v1/snippets/Gemfile deleted file mode 100644 index 9a80fdfbcccd..000000000000 --- a/owl-bot-staging/google-cloud-functions-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-functions-v1", path: "../" -else - gem "google-cloud-functions-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-functions-v1/snippets/cloud_functions_service/call_function.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/call_function.rb deleted file mode 100644 index d019cb903d6f..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/call_function.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 cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_sync] -require "google/cloud/functions/v1" - -## -# Snippet for the call_function call in the CloudFunctionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V1::CloudFunctionsService::Client#call_function. -# -def call_function - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V1::CallFunctionRequest.new - - # Call the call_function method. - result = client.call_function request - - # The returned object is of type Google::Cloud::Functions::V1::CallFunctionResponse. - p result -end -# [END cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/create_function.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/create_function.rb deleted file mode 100644 index 7f4eac9fead3..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/create_function.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 cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_sync] -require "google/cloud/functions/v1" - -## -# Snippet for the create_function call in the CloudFunctionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V1::CloudFunctionsService::Client#create_function. -# -def create_function - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V1::CreateFunctionRequest.new - - # Call the create_function method. - result = client.create_function request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/delete_function.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/delete_function.rb deleted file mode 100644 index 5b2ab6b2aee6..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/delete_function.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 cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_sync] -require "google/cloud/functions/v1" - -## -# Snippet for the delete_function call in the CloudFunctionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V1::CloudFunctionsService::Client#delete_function. -# -def delete_function - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V1::DeleteFunctionRequest.new - - # Call the delete_function method. - result = client.delete_function request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_download_url.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_download_url.rb deleted file mode 100644 index fe3eaf68ac58..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_download_url.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 cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_sync] -require "google/cloud/functions/v1" - -## -# Snippet for the generate_download_url call in the CloudFunctionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V1::CloudFunctionsService::Client#generate_download_url. -# -def generate_download_url - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new - - # Call the generate_download_url method. - result = client.generate_download_url request - - # The returned object is of type Google::Cloud::Functions::V1::GenerateDownloadUrlResponse. - p result -end -# [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_upload_url.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_upload_url.rb deleted file mode 100644 index 0f62710b00ef..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/generate_upload_url.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 cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync] -require "google/cloud/functions/v1" - -## -# Snippet for the generate_upload_url call in the CloudFunctionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V1::CloudFunctionsService::Client#generate_upload_url. -# -def generate_upload_url - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new - - # Call the generate_upload_url method. - result = client.generate_upload_url request - - # The returned object is of type Google::Cloud::Functions::V1::GenerateUploadUrlResponse. - p result -end -# [END cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_function.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_function.rb deleted file mode 100644 index 240fd6259b26..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_function.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 cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_sync] -require "google/cloud/functions/v1" - -## -# Snippet for the get_function call in the CloudFunctionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V1::CloudFunctionsService::Client#get_function. -# -def get_function - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V1::GetFunctionRequest.new - - # Call the get_function method. - result = client.get_function request - - # The returned object is of type Google::Cloud::Functions::V1::CloudFunction. - p result -end -# [END cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_iam_policy.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_iam_policy.rb deleted file mode 100644 index 05cd95bebc89..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/get_iam_policy.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 cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_sync] -require "google/cloud/functions/v1" - -## -# Snippet for the get_iam_policy call in the CloudFunctionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V1::CloudFunctionsService::Client#get_iam_policy. -# -def get_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V1::CloudFunctionsService::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 cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/list_functions.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/list_functions.rb deleted file mode 100644 index b929f6e87aeb..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/list_functions.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 cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_sync] -require "google/cloud/functions/v1" - -## -# Snippet for the list_functions call in the CloudFunctionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V1::CloudFunctionsService::Client#list_functions. -# -def list_functions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V1::ListFunctionsRequest.new - - # Call the list_functions method. - result = client.list_functions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Functions::V1::CloudFunction. - p item - end -end -# [END cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/set_iam_policy.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/set_iam_policy.rb deleted file mode 100644 index 06da7de008f4..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/set_iam_policy.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 cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_sync] -require "google/cloud/functions/v1" - -## -# Snippet for the set_iam_policy call in the CloudFunctionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V1::CloudFunctionsService::Client#set_iam_policy. -# -def set_iam_policy - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V1::CloudFunctionsService::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 cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/test_iam_permissions.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/test_iam_permissions.rb deleted file mode 100644 index e1a8a26fb0c2..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/test_iam_permissions.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 cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_sync] -require "google/cloud/functions/v1" - -## -# Snippet for the test_iam_permissions call in the CloudFunctionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V1::CloudFunctionsService::Client#test_iam_permissions. -# -def test_iam_permissions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V1::CloudFunctionsService::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 cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/update_function.rb b/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/update_function.rb deleted file mode 100644 index 74dea02b9f0e..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/snippets/cloud_functions_service/update_function.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 cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_sync] -require "google/cloud/functions/v1" - -## -# Snippet for the update_function call in the CloudFunctionsService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V1::CloudFunctionsService::Client#update_function. -# -def update_function - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V1::CloudFunctionsService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V1::UpdateFunctionRequest.new - - # Call the update_function method. - result = client.update_function request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v1/snippets/snippet_metadata_google.cloud.functions.v1.json b/owl-bot-staging/google-cloud-functions-v1/snippets/snippet_metadata_google.cloud.functions.v1.json deleted file mode 100644 index c2a5bbd6e0bb..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/snippets/snippet_metadata_google.cloud.functions.v1.json +++ /dev/null @@ -1,455 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-functions-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.functions.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_ListFunctions_sync", - "title": "Snippet for the list_functions call in the CloudFunctionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#list_functions.", - "file": "cloud_functions_service/list_functions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_functions", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#list_functions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V1::ListFunctionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Functions::V1::ListFunctionsResponse", - "client": { - "short_name": "CloudFunctionsService::Client", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" - }, - "method": { - "short_name": "ListFunctions", - "full_name": "google.cloud.functions.v1.CloudFunctionsService.ListFunctions", - "service": { - "short_name": "CloudFunctionsService", - "full_name": "google.cloud.functions.v1.CloudFunctionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_GetFunction_sync", - "title": "Snippet for the get_function call in the CloudFunctionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#get_function.", - "file": "cloud_functions_service/get_function.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_function", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#get_function", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V1::GetFunctionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Functions::V1::CloudFunction", - "client": { - "short_name": "CloudFunctionsService::Client", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" - }, - "method": { - "short_name": "GetFunction", - "full_name": "google.cloud.functions.v1.CloudFunctionsService.GetFunction", - "service": { - "short_name": "CloudFunctionsService", - "full_name": "google.cloud.functions.v1.CloudFunctionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_CreateFunction_sync", - "title": "Snippet for the create_function call in the CloudFunctionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#create_function.", - "file": "cloud_functions_service/create_function.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_function", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#create_function", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V1::CreateFunctionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFunctionsService::Client", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" - }, - "method": { - "short_name": "CreateFunction", - "full_name": "google.cloud.functions.v1.CloudFunctionsService.CreateFunction", - "service": { - "short_name": "CloudFunctionsService", - "full_name": "google.cloud.functions.v1.CloudFunctionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_UpdateFunction_sync", - "title": "Snippet for the update_function call in the CloudFunctionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#update_function.", - "file": "cloud_functions_service/update_function.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_function", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#update_function", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V1::UpdateFunctionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFunctionsService::Client", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" - }, - "method": { - "short_name": "UpdateFunction", - "full_name": "google.cloud.functions.v1.CloudFunctionsService.UpdateFunction", - "service": { - "short_name": "CloudFunctionsService", - "full_name": "google.cloud.functions.v1.CloudFunctionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_DeleteFunction_sync", - "title": "Snippet for the delete_function call in the CloudFunctionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#delete_function.", - "file": "cloud_functions_service/delete_function.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_function", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#delete_function", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V1::DeleteFunctionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "CloudFunctionsService::Client", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" - }, - "method": { - "short_name": "DeleteFunction", - "full_name": "google.cloud.functions.v1.CloudFunctionsService.DeleteFunction", - "service": { - "short_name": "CloudFunctionsService", - "full_name": "google.cloud.functions.v1.CloudFunctionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_CallFunction_sync", - "title": "Snippet for the call_function call in the CloudFunctionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#call_function.", - "file": "cloud_functions_service/call_function.rb", - "language": "RUBY", - "client_method": { - "short_name": "call_function", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#call_function", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V1::CallFunctionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Functions::V1::CallFunctionResponse", - "client": { - "short_name": "CloudFunctionsService::Client", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" - }, - "method": { - "short_name": "CallFunction", - "full_name": "google.cloud.functions.v1.CloudFunctionsService.CallFunction", - "service": { - "short_name": "CloudFunctionsService", - "full_name": "google.cloud.functions.v1.CloudFunctionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_GenerateUploadUrl_sync", - "title": "Snippet for the generate_upload_url call in the CloudFunctionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#generate_upload_url.", - "file": "cloud_functions_service/generate_upload_url.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_upload_url", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#generate_upload_url", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V1::GenerateUploadUrlRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Functions::V1::GenerateUploadUrlResponse", - "client": { - "short_name": "CloudFunctionsService::Client", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" - }, - "method": { - "short_name": "GenerateUploadUrl", - "full_name": "google.cloud.functions.v1.CloudFunctionsService.GenerateUploadUrl", - "service": { - "short_name": "CloudFunctionsService", - "full_name": "google.cloud.functions.v1.CloudFunctionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_GenerateDownloadUrl_sync", - "title": "Snippet for the generate_download_url call in the CloudFunctionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#generate_download_url.", - "file": "cloud_functions_service/generate_download_url.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_download_url", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#generate_download_url", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse", - "client": { - "short_name": "CloudFunctionsService::Client", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" - }, - "method": { - "short_name": "GenerateDownloadUrl", - "full_name": "google.cloud.functions.v1.CloudFunctionsService.GenerateDownloadUrl", - "service": { - "short_name": "CloudFunctionsService", - "full_name": "google.cloud.functions.v1.CloudFunctionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_SetIamPolicy_sync", - "title": "Snippet for the set_iam_policy call in the CloudFunctionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#set_iam_policy.", - "file": "cloud_functions_service/set_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "set_iam_policy", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#set_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::SetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "CloudFunctionsService::Client", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" - }, - "method": { - "short_name": "SetIamPolicy", - "full_name": "google.cloud.functions.v1.CloudFunctionsService.SetIamPolicy", - "service": { - "short_name": "CloudFunctionsService", - "full_name": "google.cloud.functions.v1.CloudFunctionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_GetIamPolicy_sync", - "title": "Snippet for the get_iam_policy call in the CloudFunctionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#get_iam_policy.", - "file": "cloud_functions_service/get_iam_policy.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_iam_policy", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#get_iam_policy", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::GetIamPolicyRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::Policy", - "client": { - "short_name": "CloudFunctionsService::Client", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" - }, - "method": { - "short_name": "GetIamPolicy", - "full_name": "google.cloud.functions.v1.CloudFunctionsService.GetIamPolicy", - "service": { - "short_name": "CloudFunctionsService", - "full_name": "google.cloud.functions.v1.CloudFunctionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v1_generated_CloudFunctionsService_TestIamPermissions_sync", - "title": "Snippet for the test_iam_permissions call in the CloudFunctionsService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V1::CloudFunctionsService::Client#test_iam_permissions.", - "file": "cloud_functions_service/test_iam_permissions.rb", - "language": "RUBY", - "client_method": { - "short_name": "test_iam_permissions", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client#test_iam_permissions", - "async": false, - "parameters": [ - { - "type": "::Google::Iam::V1::TestIamPermissionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Iam::V1::TestIamPermissionsResponse", - "client": { - "short_name": "CloudFunctionsService::Client", - "full_name": "::Google::Cloud::Functions::V1::CloudFunctionsService::Client" - }, - "method": { - "short_name": "TestIamPermissions", - "full_name": "google.cloud.functions.v1.CloudFunctionsService.TestIamPermissions", - "service": { - "short_name": "CloudFunctionsService", - "full_name": "google.cloud.functions.v1.CloudFunctionsService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_operations_test.rb b/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_operations_test.rb deleted file mode 100644 index 7728081afeaf..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_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/functions/v1/functions_pb" -require "google/cloud/functions/v1/functions_services_pb" -require "google/cloud/functions/v1/cloud_functions_service" - -class ::Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_paths_test.rb b/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_paths_test.rb deleted file mode 100644 index b74cec4601f9..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_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/functions/v1/cloud_functions_service" - -class ::Google::Cloud::Functions::V1::CloudFunctionsService::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_cloud_function_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.cloud_function_path project: "value0", location: "value1", function: "value2" - assert_equal "projects/value0/locations/value1/functions/value2", path - end - end - - def test_crypto_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/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::Functions::V1::CloudFunctionsService::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_repository_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.repository_path project: "value0", location: "value1", repository: "value2" - assert_equal "projects/value0/locations/value1/repositories/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_rest_test.rb b/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_rest_test.rb deleted file mode 100644 index aa19f269708a..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_rest_test.rb +++ /dev/null @@ -1,705 +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/functions/v1/functions_pb" -require "google/cloud/functions/v1/cloud_functions_service/rest" - - -class ::Google::Cloud::Functions::V1::CloudFunctionsService::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_list_functions - # Create test objects. - client_result = ::Google::Cloud::Functions::V1::ListFunctionsResponse.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_functions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_list_functions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_functions_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_functions({ 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_functions 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_functions ::Google::Cloud::Functions::V1::ListFunctionsRequest.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_functions({ 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_functions(::Google::Cloud::Functions::V1::ListFunctionsRequest.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_functions_client_stub.call_count - end - end - end - - def test_get_function - # Create test objects. - client_result = ::Google::Cloud::Functions::V1::CloudFunction.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - version_id = 42 - - get_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_get_function_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_function({ name: name, version_id: version_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_function name: name, version_id: version_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_function ::Google::Cloud::Functions::V1::GetFunctionRequest.new(name: name, version_id: version_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_function({ name: name, version_id: version_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_function(::Google::Cloud::Functions::V1::GetFunctionRequest.new(name: name, version_id: version_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_function_client_stub.call_count - end - end - end - - def test_create_function - # 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. - location = "hello world" - function = {} - - create_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_create_function_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_function({ location: location, function: function }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_function location: location, function: function do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_function ::Google::Cloud::Functions::V1::CreateFunctionRequest.new(location: location, function: function) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_function({ location: location, function: function }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_function(::Google::Cloud::Functions::V1::CreateFunctionRequest.new(location: location, function: function), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_function_client_stub.call_count - end - end - end - - def test_update_function - # 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. - function = {} - update_mask = {} - - update_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_update_function_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_function({ function: function, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_function function: function, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_function ::Google::Cloud::Functions::V1::UpdateFunctionRequest.new(function: function, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_function({ function: function, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_function(::Google::Cloud::Functions::V1::UpdateFunctionRequest.new(function: function, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_function_client_stub.call_count - end - end - end - - def test_delete_function - # 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_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_delete_function_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_function({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_function name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_function ::Google::Cloud::Functions::V1::DeleteFunctionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_function({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_function(::Google::Cloud::Functions::V1::DeleteFunctionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_function_client_stub.call_count - end - end - end - - def test_call_function - # Create test objects. - client_result = ::Google::Cloud::Functions::V1::CallFunctionResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - data = "hello world" - - call_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_call_function_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, call_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.call_function({ name: name, data: data }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.call_function name: name, data: data do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.call_function ::Google::Cloud::Functions::V1::CallFunctionRequest.new(name: name, data: data) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.call_function({ name: name, data: data }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.call_function(::Google::Cloud::Functions::V1::CallFunctionRequest.new(name: name, data: data), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, call_function_client_stub.call_count - end - end - end - - def test_generate_upload_url - # Create test objects. - client_result = ::Google::Cloud::Functions::V1::GenerateUploadUrlResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - kms_key_name = "hello world" - - generate_upload_url_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_generate_upload_url_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_upload_url_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_upload_url parent: parent, kms_key_name: kms_key_name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_upload_url ::Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_upload_url(::Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_upload_url_client_stub.call_count - end - end - end - - def test_generate_download_url - # Create test objects. - client_result = ::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - version_id = 42 - - generate_download_url_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::ServiceStub.stub :transcode_generate_download_url_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_download_url_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_download_url({ name: name, version_id: version_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_download_url name: name, version_id: version_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_download_url ::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new(name: name, version_id: version_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_download_url({ name: name, version_id: version_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_download_url(::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new(name: name, version_id: version_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_download_url_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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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_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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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_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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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_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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_test.rb b/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_test.rb deleted file mode 100644 index c109970c7545..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/test/google/cloud/functions/v1/cloud_functions_service_test.rb +++ /dev/null @@ -1,800 +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/functions/v1/functions_pb" -require "google/cloud/functions/v1/cloud_functions_service" - -class ::Google::Cloud::Functions::V1::CloudFunctionsService::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_list_functions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Functions::V1::ListFunctionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_functions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_functions, name - assert_kind_of ::Google::Cloud::Functions::V1::ListFunctionsRequest, 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_functions_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_functions({ 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_functions 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_functions ::Google::Cloud::Functions::V1::ListFunctionsRequest.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_functions({ 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_functions(::Google::Cloud::Functions::V1::ListFunctionsRequest.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_functions_client_stub.call_rpc_count - end - end - - def test_get_function - # Create GRPC objects. - grpc_response = ::Google::Cloud::Functions::V1::CloudFunction.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - version_id = 42 - - get_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_function, name - assert_kind_of ::Google::Cloud::Functions::V1::GetFunctionRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["version_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_function({ name: name, version_id: version_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_function name: name, version_id: version_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_function ::Google::Cloud::Functions::V1::GetFunctionRequest.new(name: name, version_id: version_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_function({ name: name, version_id: version_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_function(::Google::Cloud::Functions::V1::GetFunctionRequest.new(name: name, version_id: version_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_function_client_stub.call_rpc_count - end - end - - def test_create_function - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - location = "hello world" - function = {} - - create_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_function, name - assert_kind_of ::Google::Cloud::Functions::V1::CreateFunctionRequest, request - assert_equal "hello world", request["location"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Functions::V1::CloudFunction), request["function"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_function({ location: location, function: function }) do |response, 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_function location: location, function: function do |response, 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_function ::Google::Cloud::Functions::V1::CreateFunctionRequest.new(location: location, function: function) do |response, operation| - assert_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_function({ location: location, function: function }, grpc_options) do |response, operation| - assert_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_function(::Google::Cloud::Functions::V1::CreateFunctionRequest.new(location: location, function: function), grpc_options) do |response, operation| - assert_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_function_client_stub.call_rpc_count - end - end - - def test_update_function - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - function = {} - update_mask = {} - - update_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_function, name - assert_kind_of ::Google::Cloud::Functions::V1::UpdateFunctionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Functions::V1::CloudFunction), request["function"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_function({ function: function, 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_function function: function, 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_function ::Google::Cloud::Functions::V1::UpdateFunctionRequest.new(function: function, 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_function({ function: function, 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_function(::Google::Cloud::Functions::V1::UpdateFunctionRequest.new(function: function, 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_function_client_stub.call_rpc_count - end - end - - def test_delete_function - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_function, name - assert_kind_of ::Google::Cloud::Functions::V1::DeleteFunctionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_function({ 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_function 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_function ::Google::Cloud::Functions::V1::DeleteFunctionRequest.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_function({ 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_function(::Google::Cloud::Functions::V1::DeleteFunctionRequest.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_function_client_stub.call_rpc_count - end - end - - def test_call_function - # Create GRPC objects. - grpc_response = ::Google::Cloud::Functions::V1::CallFunctionResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - data = "hello world" - - call_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :call_function, name - assert_kind_of ::Google::Cloud::Functions::V1::CallFunctionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["data"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, call_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.call_function({ name: name, data: data }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.call_function name: name, data: data do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.call_function ::Google::Cloud::Functions::V1::CallFunctionRequest.new(name: name, data: data) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.call_function({ name: name, data: data }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.call_function(::Google::Cloud::Functions::V1::CallFunctionRequest.new(name: name, data: data), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, call_function_client_stub.call_rpc_count - end - end - - def test_generate_upload_url - # Create GRPC objects. - grpc_response = ::Google::Cloud::Functions::V1::GenerateUploadUrlResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - kms_key_name = "hello world" - - generate_upload_url_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_upload_url, name - assert_kind_of ::Google::Cloud::Functions::V1::GenerateUploadUrlRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["kms_key_name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_upload_url_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_upload_url parent: parent, kms_key_name: kms_key_name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_upload_url ::Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_upload_url(::Google::Cloud::Functions::V1::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_upload_url_client_stub.call_rpc_count - end - end - - def test_generate_download_url - # Create GRPC objects. - grpc_response = ::Google::Cloud::Functions::V1::GenerateDownloadUrlResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - version_id = 42 - - generate_download_url_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_download_url, name - assert_kind_of ::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest, request - assert_equal "hello world", request["name"] - assert_equal 42, request["version_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_download_url_client_stub do - # Create client - client = ::Google::Cloud::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_download_url({ name: name, version_id: version_id }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_download_url name: name, version_id: version_id do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_download_url ::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new(name: name, version_id: version_id) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_download_url({ name: name, version_id: version_id }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_download_url(::Google::Cloud::Functions::V1::GenerateDownloadUrlRequest.new(name: name, version_id: version_id), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_download_url_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::Functions::V1::CloudFunctionsService::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_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::Functions::V1::CloudFunctionsService::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_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::Functions::V1::CloudFunctionsService::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_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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Functions::V1::CloudFunctionsService::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::Functions::V1::CloudFunctionsService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Functions::V1::CloudFunctionsService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-functions-v1/test/helper.rb b/owl-bot-staging/google-cloud-functions-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-functions-v1/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-functions-v2/.gitignore b/owl-bot-staging/google-cloud-functions-v2/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/.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-functions-v2/.repo-metadata.json b/owl-bot-staging/google-cloud-functions-v2/.repo-metadata.json deleted file mode 100644 index 08adcec8c106..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudfunctions.googleapis.com", - "api_shortname": "cloudfunctions", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v2/latest", - "distribution_name": "google-cloud-functions-v2", - "is_cloud": true, - "language": "ruby", - "name": "cloudfunctions", - "name_pretty": "Cloud Functions V2 API", - "product_documentation": "https://cloud.google.com/functions", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Cloud Functions API manages lightweight user-provided functions executed in response to events. Note that google-cloud-functions-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-functions instead. See the readme for more details.", - "ruby-cloud-env-prefix": "FUNCTIONS", - "ruby-cloud-product-url": "https://cloud.google.com/functions", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-functions-v2/.rubocop.yml b/owl-bot-staging/google-cloud-functions-v2/.rubocop.yml deleted file mode 100644 index e04c1f319ea6..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-functions-v2.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-functions-v2.rb" diff --git a/owl-bot-staging/google-cloud-functions-v2/.toys.rb b/owl-bot-staging/google-cloud-functions-v2/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/.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-functions-v2/.yardopts b/owl-bot-staging/google-cloud-functions-v2/.yardopts deleted file mode 100644 index 11de90a5a867..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Cloud Functions V2 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-functions-v2/AUTHENTICATION.md b/owl-bot-staging/google-cloud-functions-v2/AUTHENTICATION.md deleted file mode 100644 index 76016ac8ea3a..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-functions-v2 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-functions-v2 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/functions/v2" - -client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/functions/v2" - -::Google::Cloud::Functions::V2::FunctionService::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::Functions::V2::FunctionService::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-functions-v2 -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/functions/v2" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::Functions::V2::FunctionService::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-functions-v2/CHANGELOG.md b/owl-bot-staging/google-cloud-functions-v2/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-functions-v2/Gemfile b/owl-bot-staging/google-cloud-functions-v2/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-functions-v2/LICENSE.md b/owl-bot-staging/google-cloud-functions-v2/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/README.md b/owl-bot-staging/google-cloud-functions-v2/README.md deleted file mode 100644 index 6b8fd954d9b9..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Cloud Functions V2 API - -Manages lightweight user-provided functions executed in response to events. - -The Cloud Functions API manages lightweight user-provided functions executed in response to events. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Cloud Functions V2 API. Most users should consider using -the main client gem, -[google-cloud-functions](https://rubygems.org/gems/google-cloud-functions). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-functions-v2 -``` - -## 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/cloudfunctions.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/functions/v2" - -client = ::Google::Cloud::Functions::V2::FunctionService::Client.new -request = ::Google::Cloud::Functions::V2::GetFunctionRequest.new # (request fields as keyword arguments...) -response = client.get_function request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v2/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/functions) -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/functions/v2" -require "logger" - -client = ::Google::Cloud::Functions::V2::FunctionService::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-functions`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-functions-v2`. -_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-functions`. -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-functions-v2`. - -### 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-functions-v2/Rakefile b/owl-bot-staging/google-cloud-functions-v2/Rakefile deleted file mode 100644 index 43cbac85a00e..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2 acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["FUNCTIONS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["FUNCTIONS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["FUNCTIONS_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 FUNCTIONS_TEST_PROJECT=test123 FUNCTIONS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/functions/v2/function_service/credentials" - ::Google::Cloud::Functions::V2::FunctionService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["FUNCTIONS_PROJECT"] = project - ENV["FUNCTIONS_TEST_PROJECT"] = project - ENV["FUNCTIONS_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-functions-v2 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-functions-v2 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-functions-v2 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-functions-v2 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-functions-v2" - header "google-cloud-functions-v2 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-functions-v2 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-functions-v2 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-functions-v2 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-functions-v2 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-functions-v2/gapic_metadata.json b/owl-bot-staging/google-cloud-functions-v2/gapic_metadata.json deleted file mode 100644 index 6c52f2c01618..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/gapic_metadata.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.functions.v2", - "libraryPackage": "::Google::Cloud::Functions::V2", - "services": { - "FunctionService": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::Functions::V2::FunctionService::Client", - "rpcs": { - "GetFunction": { - "methods": [ - "get_function" - ] - }, - "ListFunctions": { - "methods": [ - "list_functions" - ] - }, - "CreateFunction": { - "methods": [ - "create_function" - ] - }, - "UpdateFunction": { - "methods": [ - "update_function" - ] - }, - "DeleteFunction": { - "methods": [ - "delete_function" - ] - }, - "GenerateUploadUrl": { - "methods": [ - "generate_upload_url" - ] - }, - "GenerateDownloadUrl": { - "methods": [ - "generate_download_url" - ] - }, - "ListRuntimes": { - "methods": [ - "list_runtimes" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-functions-v2/google-cloud-functions-v2.gemspec b/owl-bot-staging/google-cloud-functions-v2/google-cloud-functions-v2.gemspec deleted file mode 100644 index 0d784ec8066c..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/google-cloud-functions-v2.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/functions/v2/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-functions-v2" - gem.version = Google::Cloud::Functions::V2::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Cloud Functions API manages lightweight user-provided functions executed in response to events. Note that google-cloud-functions-v2 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-functions instead. See the readme for more details." - gem.summary = "Manages lightweight user-provided functions executed in response to events." - 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.1" - - 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-functions-v2/lib/google-cloud-functions-v2.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google-cloud-functions-v2.rb deleted file mode 100644 index 35e10a3c86b6..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google-cloud-functions-v2.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/functions/v2" diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2.rb deleted file mode 100644 index a28199a9890c..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2.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/functions/v2/function_service" -require "google/cloud/functions/v2/version" - -module Google - module Cloud - module Functions - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/functions/v2" - # client = ::Google::Cloud::Functions::V2::FunctionService::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/functions/v2" - # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - module V2 - end - end - end -end - -helper_path = ::File.join __dir__, "v2", "_helpers.rb" -require "google/cloud/functions/v2/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/bindings_override.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/bindings_override.rb deleted file mode 100644 index 09ac613e7bf1..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/bindings_override.rb +++ /dev/null @@ -1,97 +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 Functions - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/functions/v2/rest" - # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - module V2 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "Functions"] - 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.ListLocations"] = [ - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v2/{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: "/v2/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.SetIamPolicy"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v2/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config.bindings_override["google.iam.v1.IAMPolicy.TestIamPermissions"] = [ - - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v2/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service.rb deleted file mode 100644 index 1850fed09cb2..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_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/functions/v2/version" - -require "google/cloud/functions/v2/function_service/credentials" -require "google/cloud/functions/v2/function_service/paths" -require "google/cloud/functions/v2/function_service/operations" -require "google/cloud/functions/v2/function_service/client" -require "google/cloud/functions/v2/function_service/rest" - -module Google - module Cloud - module Functions - module V2 - ## - # Google Cloud Functions is used to deploy functions that are executed by - # Google in response to various events. Data connected with that event is - # passed to a function as the input data. - # - # A **function** is a resource which describes a function that should be - # executed and how it is triggered. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/functions/v2/function_service" - # client = ::Google::Cloud::Functions::V2::FunctionService::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/functions/v2/function_service/rest" - # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - module FunctionService - end - end - end - end -end - -helper_path = ::File.join __dir__, "function_service", "helpers.rb" -require "google/cloud/functions/v2/function_service/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/client.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/client.rb deleted file mode 100644 index ed23f8db3f23..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/client.rb +++ /dev/null @@ -1,1300 +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/functions/v2/functions_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module Functions - module V2 - module FunctionService - ## - # Client for the FunctionService service. - # - # Google Cloud Functions is used to deploy functions that are executed by - # Google in response to various events. Data connected with that event is - # passed to a function as the input data. - # - # A **function** is a resource which describes a function that should be - # executed and how it is triggered. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :function_service_stub - - ## - # Configure the FunctionService Client class. - # - # See {::Google::Cloud::Functions::V2::FunctionService::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all FunctionService clients - # ::Google::Cloud::Functions::V2::FunctionService::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", "Functions", "V2"] - 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 FunctionService 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::Functions::V2::FunctionService::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 - @function_service_stub.universe_domain - end - - ## - # Create a new FunctionService client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Functions::V2::FunctionService::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the FunctionService 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/functions/v2/functions_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 - - @function_service_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::Functions::V2::FunctionService::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 - ) - - @function_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 = @function_service_stub.endpoint - config.universe_domain = @function_service_stub.universe_domain - config.logger = @function_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 = @function_service_stub.endpoint - config.universe_domain = @function_service_stub.universe_domain - config.logger = @function_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Functions::V2::FunctionService::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 - @function_service_stub.logger - end - - # Service calls - - ## - # Returns a function with the given name from the requested project. - # - # @overload get_function(request, options = nil) - # Pass arguments to `get_function` via a request object, either of type - # {::Google::Cloud::Functions::V2::GetFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::GetFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_function(name: nil, revision: nil) - # Pass arguments to `get_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 function which details should be obtained. - # @param revision [::String] - # Optional. The optional version of the 1st gen function whose details should - # be obtained. The version of a 1st gen function is an integer that starts - # from 1 and gets incremented on redeployments. GCF may keep historical - # configs for old versions of 1st gen function. This field can be specified - # to fetch the historical configs. This field is valid only for GCF 1st gen - # function. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Functions::V2::Function] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Functions::V2::Function] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::GetFunctionRequest.new - # - # # Call the get_function method. - # result = client.get_function request - # - # # The returned object is of type Google::Cloud::Functions::V2::Function. - # p result - # - def get_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::GetFunctionRequest - - # Converts hash and nil to 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION - metadata[:"x-goog-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_function.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.call_rpc :get_function, 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 a list of functions that belong to the requested project. - # - # @overload list_functions(request, options = nil) - # Pass arguments to `list_functions` via a request object, either of type - # {::Google::Cloud::Functions::V2::ListFunctionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::ListFunctionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_functions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_functions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location from which the function should be - # listed, specified in the format `projects/*/locations/*` If you want to - # list functions in all locations, use "-" in place of a location. When - # listing functions in all locations, if one or more location(s) are - # unreachable, the response will contain functions from all reachable - # locations along with the names of any unreachable locations. - # @param page_size [::Integer] - # Maximum number of functions to return per call. The largest allowed - # page_size is 1,000, if the page_size is omitted or specified as greater - # than 1,000 then it will be replaced as 1,000. The size of the list - # response can be less than specified when used with filters. - # @param page_token [::String] - # The value returned by the last - # `ListFunctionsResponse`; indicates that - # this is a continuation of a prior `ListFunctions` call, and that the - # system should return the next page of data. - # @param filter [::String] - # The filter for Functions that match the filter expression, - # following the syntax outlined in https://google.aip.dev/160. - # @param order_by [::String] - # The sorting order of the resources returned. Value should be a comma - # separated list of fields. The default sorting order is ascending. - # See https://google.aip.dev/132#ordering. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::Functions::V2::Function>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::Functions::V2::Function>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::ListFunctionsRequest.new - # - # # Call the list_functions method. - # result = client.list_functions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Functions::V2::Function. - # p item - # end - # - def list_functions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::ListFunctionsRequest - - # Converts hash and nil to 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_functions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION - metadata[:"x-goog-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_functions.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_functions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.call_rpc :list_functions, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @function_service_stub, :list_functions, 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 function. If a function with the given name already exists in - # the specified project, the long running operation will return - # `ALREADY_EXISTS` error. - # - # @overload create_function(request, options = nil) - # Pass arguments to `create_function` via a request object, either of type - # {::Google::Cloud::Functions::V2::CreateFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::CreateFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_function(parent: nil, function: nil, function_id: nil) - # Pass arguments to `create_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location in which the function should be created, - # specified in the format `projects/*/locations/*` - # @param function [::Google::Cloud::Functions::V2::Function, ::Hash] - # Required. Function to be created. - # @param function_id [::String] - # The ID to use for the function, which will become the final component of - # the function's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::CreateFunctionRequest.new - # - # # Call the create_function method. - # result = client.create_function request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::CreateFunctionRequest - - # Converts hash and nil to 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION - metadata[:"x-goog-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_function.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.call_rpc :create_function, 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 existing function. - # - # @overload update_function(request, options = nil) - # Pass arguments to `update_function` via a request object, either of type - # {::Google::Cloud::Functions::V2::UpdateFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::UpdateFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_function(function: nil, update_mask: nil) - # Pass arguments to `update_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param function [::Google::Cloud::Functions::V2::Function, ::Hash] - # Required. New version of the function. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If no field mask is provided, all fields will be updated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::UpdateFunctionRequest.new - # - # # Call the update_function method. - # result = client.update_function request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::UpdateFunctionRequest - - # Converts hash and nil to 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.function&.name - header_params["function.name"] = request.function.name - end - - request_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_function.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.call_rpc :update_function, 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 function with the given name from the specified project. If the - # given function is used by some trigger, the trigger will be updated to - # remove this function. - # - # @overload delete_function(request, options = nil) - # Pass arguments to `delete_function` via a request object, either of type - # {::Google::Cloud::Functions::V2::DeleteFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::DeleteFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_function(name: nil) - # Pass arguments to `delete_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 function which should be deleted. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::DeleteFunctionRequest.new - # - # # Call the delete_function method. - # result = client.delete_function request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::DeleteFunctionRequest - - # Converts hash and nil to 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION - metadata[:"x-goog-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_function.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.call_rpc :delete_function, request, options: options do |response, operation| - response = ::Gapic::Operation.new response, @operations_client, options: options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a signed URL for uploading a function source code. - # For more information about the signed URL usage see: - # https://cloud.google.com/storage/docs/access-control/signed-urls. - # Once the function source code upload is complete, the used signed - # URL should be provided in CreateFunction or UpdateFunction request - # as a reference to the function source code. - # - # When uploading source code to the generated signed URL, please follow - # these restrictions: - # - # * Source file type should be a zip file. - # * No credentials should be attached - the signed URLs provide access to the - # target bucket using internal service identity; if credentials were - # attached, the identity from the credentials would be used, but that - # identity does not have permissions to upload files to the URL. - # - # When making a HTTP PUT request, specify this header: - # - # * `content-type: application/zip` - # - # Do not specify this header: - # - # * `Authorization: Bearer YOUR_TOKEN` - # - # @overload generate_upload_url(request, options = nil) - # Pass arguments to `generate_upload_url` via a request object, either of type - # {::Google::Cloud::Functions::V2::GenerateUploadUrlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::GenerateUploadUrlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_upload_url(parent: nil, kms_key_name: nil, environment: nil) - # Pass arguments to `generate_upload_url` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location in which the Google Cloud Storage signed - # URL should be generated, specified in the format `projects/*/locations/*`. - # @param kms_key_name [::String] - # Resource name of a KMS crypto key (managed by the user) used to - # encrypt/decrypt function source code objects in intermediate Cloud Storage - # buckets. When you generate an upload url and upload your source code, it - # gets copied to an intermediate Cloud Storage bucket. The source code is - # then copied to a versioned directory in the sources bucket in the consumer - # project during the function deployment. - # - # It must match the pattern - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - # - # The Google Cloud Functions service account - # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - # granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - # (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - # Key/KeyRing/Project/Organization (least access preferred). - # @param environment [::Google::Cloud::Functions::V2::Environment] - # The function environment the generated upload url will be used for. - # The upload url for 2nd Gen functions can also be used for 1st gen - # functions, but not vice versa. If not specified, 2nd generation-style - # upload URLs are generated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new - # - # # Call the generate_upload_url method. - # result = client.generate_upload_url request - # - # # The returned object is of type Google::Cloud::Functions::V2::GenerateUploadUrlResponse. - # p result - # - def generate_upload_url request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::GenerateUploadUrlRequest - - # Converts hash and nil to 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_upload_url.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION - metadata[:"x-goog-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.generate_upload_url.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_upload_url.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.call_rpc :generate_upload_url, 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 a signed URL for downloading deployed function source code. - # The URL is only valid for a limited period and should be used within - # 30 minutes of generation. - # For more information about the signed URL usage see: - # https://cloud.google.com/storage/docs/access-control/signed-urls - # - # @overload generate_download_url(request, options = nil) - # Pass arguments to `generate_download_url` via a request object, either of type - # {::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_download_url(name: nil) - # Pass arguments to `generate_download_url` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 function for which source code Google Cloud Storage - # signed URL should be generated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.new - # - # # Call the generate_download_url method. - # result = client.generate_download_url request - # - # # The returned object is of type Google::Cloud::Functions::V2::GenerateDownloadUrlResponse. - # p result - # - def generate_download_url request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest - - # Converts hash and nil to 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_download_url.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION - metadata[:"x-goog-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_download_url.timeout, - metadata: metadata, - retry_policy: @config.rpcs.generate_download_url.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.call_rpc :generate_download_url, 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 a list of runtimes that are supported for the requested project. - # - # @overload list_runtimes(request, options = nil) - # Pass arguments to `list_runtimes` via a request object, either of type - # {::Google::Cloud::Functions::V2::ListRuntimesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::ListRuntimesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_runtimes(parent: nil, filter: nil) - # Pass arguments to `list_runtimes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location from which the runtimes should be - # listed, specified in the format `projects/*/locations/*` - # @param filter [::String] - # The filter for Runtimes that match the filter expression, - # following the syntax outlined in https://google.aip.dev/160. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::Functions::V2::ListRuntimesResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::Functions::V2::ListRuntimesResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::ListRuntimesRequest.new - # - # # Call the list_runtimes method. - # result = client.list_runtimes request - # - # # The returned object is of type Google::Cloud::Functions::V2::ListRuntimesResponse. - # p result - # - def list_runtimes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::ListRuntimesRequest - - # Converts hash and nil to 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_runtimes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION - metadata[:"x-goog-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_runtimes.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_runtimes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.call_rpc :list_runtimes, 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 FunctionService API. - # - # This class represents the configuration for FunctionService, - # 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::Functions::V2::FunctionService::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 - # # get_function to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Functions::V2::FunctionService::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_function.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_function.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::Functions::V2::FunctionService::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 = "cloudfunctions.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 FunctionService 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 `get_function` - # @return [::Gapic::Config::Method] - # - attr_reader :get_function - ## - # RPC-specific configuration for `list_functions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_functions - ## - # RPC-specific configuration for `create_function` - # @return [::Gapic::Config::Method] - # - attr_reader :create_function - ## - # RPC-specific configuration for `update_function` - # @return [::Gapic::Config::Method] - # - attr_reader :update_function - ## - # RPC-specific configuration for `delete_function` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_function - ## - # RPC-specific configuration for `generate_upload_url` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_upload_url - ## - # RPC-specific configuration for `generate_download_url` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_download_url - ## - # RPC-specific configuration for `list_runtimes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_runtimes - - # @private - def initialize parent_rpcs = nil - get_function_config = parent_rpcs.get_function if parent_rpcs.respond_to? :get_function - @get_function = ::Gapic::Config::Method.new get_function_config - list_functions_config = parent_rpcs.list_functions if parent_rpcs.respond_to? :list_functions - @list_functions = ::Gapic::Config::Method.new list_functions_config - create_function_config = parent_rpcs.create_function if parent_rpcs.respond_to? :create_function - @create_function = ::Gapic::Config::Method.new create_function_config - update_function_config = parent_rpcs.update_function if parent_rpcs.respond_to? :update_function - @update_function = ::Gapic::Config::Method.new update_function_config - delete_function_config = parent_rpcs.delete_function if parent_rpcs.respond_to? :delete_function - @delete_function = ::Gapic::Config::Method.new delete_function_config - generate_upload_url_config = parent_rpcs.generate_upload_url if parent_rpcs.respond_to? :generate_upload_url - @generate_upload_url = ::Gapic::Config::Method.new generate_upload_url_config - generate_download_url_config = parent_rpcs.generate_download_url if parent_rpcs.respond_to? :generate_download_url - @generate_download_url = ::Gapic::Config::Method.new generate_download_url_config - list_runtimes_config = parent_rpcs.list_runtimes if parent_rpcs.respond_to? :list_runtimes - @list_runtimes = ::Gapic::Config::Method.new list_runtimes_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/credentials.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/credentials.rb deleted file mode 100644 index 4eae4ef2d81a..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/credentials.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! - -require "googleauth" - -module Google - module Cloud - module Functions - module V2 - module FunctionService - # Credentials for the FunctionService API. - class Credentials < ::Google::Auth::Credentials - self.scope = [ - "https://www.googleapis.com/auth/cloud-platform" - ] - self.env_vars = [ - "FUNCTIONS_CREDENTIALS", - "FUNCTIONS_KEYFILE", - "GOOGLE_CLOUD_CREDENTIALS", - "GOOGLE_CLOUD_KEYFILE", - "GCLOUD_KEYFILE", - "FUNCTIONS_CREDENTIALS_JSON", - "FUNCTIONS_KEYFILE_JSON", - "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-functions-v2/lib/google/cloud/functions/v2/function_service/operations.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/operations.rb deleted file mode 100644 index f18a12a5b48a..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_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 Functions - module V2 - module FunctionService - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the FunctionService 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 FunctionService 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::Functions::V2::VERSION - metadata[:"x-goog-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::Functions::V2::VERSION - metadata[:"x-goog-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::Functions::V2::VERSION - metadata[:"x-goog-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::Functions::V2::VERSION - metadata[:"x-goog-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::Functions::V2::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 = "cloudfunctions.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-functions-v2/lib/google/cloud/functions/v2/function_service/paths.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/paths.rb deleted file mode 100644 index 9ee1da7e125e..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/paths.rb +++ /dev/null @@ -1,240 +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 Functions - module V2 - module FunctionService - # Path helper methods for the FunctionService API. - module Paths - ## - # Create a fully-qualified Build resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/builds/{build}` - # - # @param project [String] - # @param location [String] - # @param build [String] - # - # @return [::String] - def build_path project:, location:, build: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/builds/#{build}" - end - - ## - # Create a fully-qualified Channel resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/channels/{channel}` - # - # @param project [String] - # @param location [String] - # @param channel [String] - # - # @return [::String] - def channel_path project:, location:, channel: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/channels/#{channel}" - end - - ## - # Create a fully-qualified Connector resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/connectors/{connector}` - # - # @param project [String] - # @param location [String] - # @param connector [String] - # - # @return [::String] - def connector_path project:, location:, connector: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/connectors/#{connector}" - end - - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # - # @return [::String] - def crypto_key_path project:, location:, key_ring:, crypto_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" - end - - ## - # Create a fully-qualified Function resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/functions/{function}` - # - # @param project [String] - # @param location [String] - # @param function [String] - # - # @return [::String] - def function_path project:, location:, function: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/functions/#{function}" - 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 Repository resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/repositories/{repository}` - # - # @param project [String] - # @param location [String] - # @param repository [String] - # - # @return [::String] - def repository_path project:, location:, repository: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/repositories/#{repository}" - end - - ## - # Create a fully-qualified Service resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/services/{service}` - # - # @param project [String] - # @param location [String] - # @param service [String] - # - # @return [::String] - def service_path project:, location:, service: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/services/#{service}" - end - - ## - # Create a fully-qualified Topic resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/topics/{topic}` - # - # @param project [String] - # @param topic [String] - # - # @return [::String] - def topic_path project:, topic: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - - "projects/#{project}/topics/#{topic}" - end - - ## - # Create a fully-qualified Trigger resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/triggers/{trigger}` - # - # @param project [String] - # @param location [String] - # @param trigger [String] - # - # @return [::String] - def trigger_path project:, location:, trigger: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/triggers/#{trigger}" - end - - ## - # Create a fully-qualified WorkerPool resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/workerPools/{worker_pool}` - # - # @param project [String] - # @param location [String] - # @param worker_pool [String] - # - # @return [::String] - def worker_pool_path project:, location:, worker_pool: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/workerPools/#{worker_pool}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest.rb deleted file mode 100644 index 9420f12600a5..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_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/functions/v2/version" -require "google/cloud/functions/v2/bindings_override" - -require "google/cloud/functions/v2/function_service/credentials" -require "google/cloud/functions/v2/function_service/paths" -require "google/cloud/functions/v2/function_service/rest/operations" -require "google/cloud/functions/v2/function_service/rest/client" - -module Google - module Cloud - module Functions - module V2 - ## - # Google Cloud Functions is used to deploy functions that are executed by - # Google in response to various events. Data connected with that event is - # passed to a function as the input data. - # - # A **function** is a resource which describes a function that should be - # executed and how it is triggered. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/functions/v2/function_service/rest" - # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - module FunctionService - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/functions/v2/function_service/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/client.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/client.rb deleted file mode 100644 index 19a0474f3058..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/client.rb +++ /dev/null @@ -1,1210 +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/functions/v2/functions_pb" -require "google/cloud/functions/v2/function_service/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module Functions - module V2 - module FunctionService - module Rest - ## - # REST client for the FunctionService service. - # - # Google Cloud Functions is used to deploy functions that are executed by - # Google in response to various events. Data connected with that event is - # passed to a function as the input data. - # - # A **function** is a resource which describes a function that should be - # executed and how it is triggered. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :function_service_stub - - ## - # Configure the FunctionService Client class. - # - # See {::Google::Cloud::Functions::V2::FunctionService::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all FunctionService clients - # ::Google::Cloud::Functions::V2::FunctionService::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", "Functions", "V2"] - 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 FunctionService 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::Functions::V2::FunctionService::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 - @function_service_stub.universe_domain - end - - ## - # Create a new FunctionService REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the FunctionService 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::Functions::V2::FunctionService::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 - - @function_service_stub = ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @function_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 = @function_service_stub.endpoint - config.universe_domain = @function_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @function_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 = @function_service_stub.endpoint - config.universe_domain = @function_service_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @function_service_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::Functions::V2::FunctionService::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 - @function_service_stub.logger - end - - # Service calls - - ## - # Returns a function with the given name from the requested project. - # - # @overload get_function(request, options = nil) - # Pass arguments to `get_function` via a request object, either of type - # {::Google::Cloud::Functions::V2::GetFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::GetFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_function(name: nil, revision: nil) - # Pass arguments to `get_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 function which details should be obtained. - # @param revision [::String] - # Optional. The optional version of the 1st gen function whose details should - # be obtained. The version of a 1st gen function is an integer that starts - # from 1 and gets incremented on redeployments. GCF may keep historical - # configs for old versions of 1st gen function. This field can be specified - # to fetch the historical configs. This field is valid only for GCF 1st gen - # function. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V2::Function] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V2::Function] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::GetFunctionRequest.new - # - # # Call the get_function method. - # result = client.get_function request - # - # # The returned object is of type Google::Cloud::Functions::V2::Function. - # p result - # - def get_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::GetFunctionRequest - - # Converts hash and nil to an 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_function.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.get_function 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 a list of functions that belong to the requested project. - # - # @overload list_functions(request, options = nil) - # Pass arguments to `list_functions` via a request object, either of type - # {::Google::Cloud::Functions::V2::ListFunctionsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::ListFunctionsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_functions(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_functions` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location from which the function should be - # listed, specified in the format `projects/*/locations/*` If you want to - # list functions in all locations, use "-" in place of a location. When - # listing functions in all locations, if one or more location(s) are - # unreachable, the response will contain functions from all reachable - # locations along with the names of any unreachable locations. - # @param page_size [::Integer] - # Maximum number of functions to return per call. The largest allowed - # page_size is 1,000, if the page_size is omitted or specified as greater - # than 1,000 then it will be replaced as 1,000. The size of the list - # response can be less than specified when used with filters. - # @param page_token [::String] - # The value returned by the last - # `ListFunctionsResponse`; indicates that - # this is a continuation of a prior `ListFunctions` call, and that the - # system should return the next page of data. - # @param filter [::String] - # The filter for Functions that match the filter expression, - # following the syntax outlined in https://google.aip.dev/160. - # @param order_by [::String] - # The sorting order of the resources returned. Value should be a comma - # separated list of fields. The default sorting order is ascending. - # See https://google.aip.dev/132#ordering. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Functions::V2::Function>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::Functions::V2::Function>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::ListFunctionsRequest.new - # - # # Call the list_functions method. - # result = client.list_functions request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::Functions::V2::Function. - # p item - # end - # - def list_functions request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::ListFunctionsRequest - - # Converts hash and nil to an 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_functions.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_functions.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_functions.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.list_functions request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @function_service_stub, :list_functions, "functions", 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 function. If a function with the given name already exists in - # the specified project, the long running operation will return - # `ALREADY_EXISTS` error. - # - # @overload create_function(request, options = nil) - # Pass arguments to `create_function` via a request object, either of type - # {::Google::Cloud::Functions::V2::CreateFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::CreateFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_function(parent: nil, function: nil, function_id: nil) - # Pass arguments to `create_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location in which the function should be created, - # specified in the format `projects/*/locations/*` - # @param function [::Google::Cloud::Functions::V2::Function, ::Hash] - # Required. Function to be created. - # @param function_id [::String] - # The ID to use for the function, which will become the final component of - # the function's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::CreateFunctionRequest.new - # - # # Call the create_function method. - # result = client.create_function request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::CreateFunctionRequest - - # Converts hash and nil to an 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_function.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.create_function 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 existing function. - # - # @overload update_function(request, options = nil) - # Pass arguments to `update_function` via a request object, either of type - # {::Google::Cloud::Functions::V2::UpdateFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::UpdateFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_function(function: nil, update_mask: nil) - # Pass arguments to `update_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param function [::Google::Cloud::Functions::V2::Function, ::Hash] - # Required. New version of the function. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # The list of fields to be updated. - # If no field mask is provided, all fields will be updated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::UpdateFunctionRequest.new - # - # # Call the update_function method. - # result = client.update_function request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::UpdateFunctionRequest - - # Converts hash and nil to an 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_function.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.update_function 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 function with the given name from the specified project. If the - # given function is used by some trigger, the trigger will be updated to - # remove this function. - # - # @overload delete_function(request, options = nil) - # Pass arguments to `delete_function` via a request object, either of type - # {::Google::Cloud::Functions::V2::DeleteFunctionRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::DeleteFunctionRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_function(name: nil) - # Pass arguments to `delete_function` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 function which should be deleted. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::DeleteFunctionRequest.new - # - # # Call the delete_function method. - # result = client.delete_function request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_function request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::DeleteFunctionRequest - - # Converts hash and nil to an 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_function.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_function.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_function.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.delete_function request, options do |result, operation| - result = ::Gapic::Operation.new result, @operations_client, options: options - yield result, operation if block_given? - throw :response, result - end - rescue ::Gapic::Rest::Error => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Returns a signed URL for uploading a function source code. - # For more information about the signed URL usage see: - # https://cloud.google.com/storage/docs/access-control/signed-urls. - # Once the function source code upload is complete, the used signed - # URL should be provided in CreateFunction or UpdateFunction request - # as a reference to the function source code. - # - # When uploading source code to the generated signed URL, please follow - # these restrictions: - # - # * Source file type should be a zip file. - # * No credentials should be attached - the signed URLs provide access to the - # target bucket using internal service identity; if credentials were - # attached, the identity from the credentials would be used, but that - # identity does not have permissions to upload files to the URL. - # - # When making a HTTP PUT request, specify this header: - # - # * `content-type: application/zip` - # - # Do not specify this header: - # - # * `Authorization: Bearer YOUR_TOKEN` - # - # @overload generate_upload_url(request, options = nil) - # Pass arguments to `generate_upload_url` via a request object, either of type - # {::Google::Cloud::Functions::V2::GenerateUploadUrlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::GenerateUploadUrlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_upload_url(parent: nil, kms_key_name: nil, environment: nil) - # Pass arguments to `generate_upload_url` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location in which the Google Cloud Storage signed - # URL should be generated, specified in the format `projects/*/locations/*`. - # @param kms_key_name [::String] - # Resource name of a KMS crypto key (managed by the user) used to - # encrypt/decrypt function source code objects in intermediate Cloud Storage - # buckets. When you generate an upload url and upload your source code, it - # gets copied to an intermediate Cloud Storage bucket. The source code is - # then copied to a versioned directory in the sources bucket in the consumer - # project during the function deployment. - # - # It must match the pattern - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - # - # The Google Cloud Functions service account - # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - # granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - # (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - # Key/KeyRing/Project/Organization (least access preferred). - # @param environment [::Google::Cloud::Functions::V2::Environment] - # The function environment the generated upload url will be used for. - # The upload url for 2nd Gen functions can also be used for 1st gen - # functions, but not vice versa. If not specified, 2nd generation-style - # upload URLs are generated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new - # - # # Call the generate_upload_url method. - # result = client.generate_upload_url request - # - # # The returned object is of type Google::Cloud::Functions::V2::GenerateUploadUrlResponse. - # p result - # - def generate_upload_url request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::GenerateUploadUrlRequest - - # Converts hash and nil to an 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_upload_url.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_upload_url.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_upload_url.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.generate_upload_url 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 a signed URL for downloading deployed function source code. - # The URL is only valid for a limited period and should be used within - # 30 minutes of generation. - # For more information about the signed URL usage see: - # https://cloud.google.com/storage/docs/access-control/signed-urls - # - # @overload generate_download_url(request, options = nil) - # Pass arguments to `generate_download_url` via a request object, either of type - # {::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_download_url(name: nil) - # Pass arguments to `generate_download_url` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 function for which source code Google Cloud Storage - # signed URL should be generated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.new - # - # # Call the generate_download_url method. - # result = client.generate_download_url request - # - # # The returned object is of type Google::Cloud::Functions::V2::GenerateDownloadUrlResponse. - # p result - # - def generate_download_url request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest - - # Converts hash and nil to an 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_download_url.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_download_url.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.generate_download_url.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.generate_download_url 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 a list of runtimes that are supported for the requested project. - # - # @overload list_runtimes(request, options = nil) - # Pass arguments to `list_runtimes` via a request object, either of type - # {::Google::Cloud::Functions::V2::ListRuntimesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::Functions::V2::ListRuntimesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_runtimes(parent: nil, filter: nil) - # Pass arguments to `list_runtimes` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location from which the runtimes should be - # listed, specified in the format `projects/*/locations/*` - # @param filter [::String] - # The filter for Runtimes that match the filter expression, - # following the syntax outlined in https://google.aip.dev/160. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V2::ListRuntimesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V2::ListRuntimesResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/functions/v2" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::Functions::V2::ListRuntimesRequest.new - # - # # Call the list_runtimes method. - # result = client.list_runtimes request - # - # # The returned object is of type Google::Cloud::Functions::V2::ListRuntimesResponse. - # p result - # - def list_runtimes request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::Functions::V2::ListRuntimesRequest - - # Converts hash and nil to an 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_runtimes.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::Functions::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_runtimes.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_runtimes.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @function_service_stub.list_runtimes 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 FunctionService REST API. - # - # This class represents the configuration for FunctionService 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::Functions::V2::FunctionService::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 - # # get_function to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.get_function.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.get_function.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 = "cloudfunctions.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 FunctionService 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 `get_function` - # @return [::Gapic::Config::Method] - # - attr_reader :get_function - ## - # RPC-specific configuration for `list_functions` - # @return [::Gapic::Config::Method] - # - attr_reader :list_functions - ## - # RPC-specific configuration for `create_function` - # @return [::Gapic::Config::Method] - # - attr_reader :create_function - ## - # RPC-specific configuration for `update_function` - # @return [::Gapic::Config::Method] - # - attr_reader :update_function - ## - # RPC-specific configuration for `delete_function` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_function - ## - # RPC-specific configuration for `generate_upload_url` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_upload_url - ## - # RPC-specific configuration for `generate_download_url` - # @return [::Gapic::Config::Method] - # - attr_reader :generate_download_url - ## - # RPC-specific configuration for `list_runtimes` - # @return [::Gapic::Config::Method] - # - attr_reader :list_runtimes - - # @private - def initialize parent_rpcs = nil - get_function_config = parent_rpcs.get_function if parent_rpcs.respond_to? :get_function - @get_function = ::Gapic::Config::Method.new get_function_config - list_functions_config = parent_rpcs.list_functions if parent_rpcs.respond_to? :list_functions - @list_functions = ::Gapic::Config::Method.new list_functions_config - create_function_config = parent_rpcs.create_function if parent_rpcs.respond_to? :create_function - @create_function = ::Gapic::Config::Method.new create_function_config - update_function_config = parent_rpcs.update_function if parent_rpcs.respond_to? :update_function - @update_function = ::Gapic::Config::Method.new update_function_config - delete_function_config = parent_rpcs.delete_function if parent_rpcs.respond_to? :delete_function - @delete_function = ::Gapic::Config::Method.new delete_function_config - generate_upload_url_config = parent_rpcs.generate_upload_url if parent_rpcs.respond_to? :generate_upload_url - @generate_upload_url = ::Gapic::Config::Method.new generate_upload_url_config - generate_download_url_config = parent_rpcs.generate_download_url if parent_rpcs.respond_to? :generate_download_url - @generate_download_url = ::Gapic::Config::Method.new generate_download_url_config - list_runtimes_config = parent_rpcs.list_runtimes if parent_rpcs.respond_to? :list_runtimes - @list_runtimes = ::Gapic::Config::Method.new list_runtimes_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/operations.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/operations.rb deleted file mode 100644 index 24561364963c..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/operations.rb +++ /dev/null @@ -1,925 +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 Functions - module V2 - module FunctionService - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "cloudfunctions.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the FunctionService 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 FunctionService 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::Functions::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Functions::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Functions::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::Functions::V2::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "cloudfunctions.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: "/v2/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^operations(?:/.*)?$}, true] - ] - ) - 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{^operations(?:/.*)?$}, true] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/service_stub.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/service_stub.rb deleted file mode 100644 index a6c8c2dab360..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/function_service/rest/service_stub.rb +++ /dev/null @@ -1,573 +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/functions/v2/functions_pb" - -module Google - module Cloud - module Functions - module V2 - module FunctionService - module Rest - ## - # REST service stub for the FunctionService 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 get_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::GetFunctionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V2::Function] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V2::Function] - # A result object deserialized from the server's reply - def get_function request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_function_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_function", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Functions::V2::Function.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_functions REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::ListFunctionsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V2::ListFunctionsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V2::ListFunctionsResponse] - # A result object deserialized from the server's reply - def list_functions request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_functions_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_functions", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Functions::V2::ListFunctionsResponse.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_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::CreateFunctionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_function request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_function_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_function", - 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_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::UpdateFunctionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_function request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_function_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_function", - 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_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::DeleteFunctionRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_function request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_function_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_function", - 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 generate_upload_url REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::GenerateUploadUrlRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V2::GenerateUploadUrlResponse] - # A result object deserialized from the server's reply - def generate_upload_url request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_upload_url_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_upload_url", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Functions::V2::GenerateUploadUrlResponse.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_download_url REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse] - # A result object deserialized from the server's reply - def generate_download_url request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_generate_download_url_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_download_url", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse.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_runtimes REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::ListRuntimesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::Functions::V2::ListRuntimesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::Functions::V2::ListRuntimesResponse] - # A result object deserialized from the server's reply - def list_runtimes request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_runtimes_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_runtimes", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::Functions::V2::ListRuntimesResponse.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 get_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::GetFunctionRequest] - # 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_function_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_functions REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::ListFunctionsRequest] - # 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_functions_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/functions", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::CreateFunctionRequest] - # 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_function_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/functions", - body: "function", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::UpdateFunctionRequest] - # 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_function_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v2/{function.name}", - body: "function", - matches: [ - ["function.name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_function REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::DeleteFunctionRequest] - # 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_function_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v2/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_upload_url REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::GenerateUploadUrlRequest] - # 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_upload_url_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{parent}/functions:generateUploadUrl", - body: "*", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the generate_download_url REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest] - # 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_download_url_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v2/{name}:generateDownloadUrl", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/functions/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_runtimes REST call - # - # @param request_pb [::Google::Cloud::Functions::V2::ListRuntimesRequest] - # 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_runtimes_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v2/{parent}/runtimes", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_pb.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_pb.rb deleted file mode 100644 index 0939a5e38cf3..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_pb.rb +++ /dev/null @@ -1,99 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/functions/v2/functions.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/longrunning/operations_pb' -require 'google/protobuf/any_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/date_pb' - - -descriptor_data = "\n)google/cloud/functions/v2/functions.proto\x12\x19google.cloud.functions.v2\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a#google/longrunning/operations.proto\x1a\x19google/protobuf/any.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\"\xd9\x07\n\x08\x46unction\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12<\n\x0c\x62uild_config\x18\x03 \x01(\x0b\x32&.google.cloud.functions.v2.BuildConfig\x12@\n\x0eservice_config\x18\x04 \x01(\x0b\x32(.google.cloud.functions.v2.ServiceConfig\x12>\n\revent_trigger\x18\x05 \x01(\x0b\x32\'.google.cloud.functions.v2.EventTrigger\x12=\n\x05state\x18\x06 \x01(\x0e\x32).google.cloud.functions.v2.Function.StateB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12?\n\x06labels\x18\x08 \x03(\x0b\x32/.google.cloud.functions.v2.Function.LabelsEntry\x12\x44\n\x0estate_messages\x18\t \x03(\x0b\x32\'.google.cloud.functions.v2.StateMessageB\x03\xe0\x41\x03\x12;\n\x0b\x65nvironment\x18\n \x01(\x0e\x32&.google.cloud.functions.v2.Environment\x12\x10\n\x03url\x18\x0e \x01(\tB\x03\xe0\x41\x03\x12<\n\x0ckms_key_name\x18\x19 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12\x1a\n\rsatisfies_pzs\x18\x1b \x01(\x08\x42\x03\xe0\x41\x03\x12\x34\n\x0b\x63reate_time\x18\x1c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\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\"`\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\n\n\x06\x46\x41ILED\x10\x02\x12\r\n\tDEPLOYING\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04\x12\x0b\n\x07UNKNOWN\x10\x05:~\xea\x41{\n&cloudfunctions.googleapis.com/Function\x12\n\x0bworker_pool\x18\x05 \x01(\tB)\xfa\x41&\n$cloudbuild.googleapis.com/WorkerPool\x12_\n\x15\x65nvironment_variables\x18\x06 \x03(\x0b\x32@.google.cloud.functions.v2.BuildConfig.EnvironmentVariablesEntry\x12R\n\x0f\x64ocker_registry\x18\n \x01(\x0e\x32\x35.google.cloud.functions.v2.BuildConfig.DockerRegistryB\x02\x18\x01\x12J\n\x11\x64ocker_repository\x18\x07 \x01(\tB/\xfa\x41,\n*artifactregistry.googleapis.com/Repository\x12\x17\n\x0fservice_account\x18\x1b \x01(\t\x1a;\n\x19\x45nvironmentVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"`\n\x0e\x44ockerRegistry\x12\x1f\n\x1b\x44OCKER_REGISTRY_UNSPECIFIED\x10\x00\x12\x16\n\x12\x43ONTAINER_REGISTRY\x10\x01\x12\x15\n\x11\x41RTIFACT_REGISTRY\x10\x02\x42\x17\n\x15runtime_update_policy\"\xd4\n\n\rServiceConfig\x12\x33\n\x07service\x18\x01 \x01(\tB\"\xe0\x41\x03\xfa\x41\x1c\n\x1arun.googleapis.com/Service\x12\x17\n\x0ftimeout_seconds\x18\x02 \x01(\x05\x12\x18\n\x10\x61vailable_memory\x18\r \x01(\t\x12\x15\n\ravailable_cpu\x18\x16 \x01(\t\x12\x61\n\x15\x65nvironment_variables\x18\x04 \x03(\x0b\x32\x42.google.cloud.functions.v2.ServiceConfig.EnvironmentVariablesEntry\x12\x1a\n\x12max_instance_count\x18\x05 \x01(\x05\x12\x1a\n\x12min_instance_count\x18\x0c \x01(\x05\x12>\n\rvpc_connector\x18\x06 \x01(\tB\'\xfa\x41$\n\"vpcaccess.googleapis.com/Connector\x12j\n\x1dvpc_connector_egress_settings\x18\x07 \x01(\x0e\x32\x43.google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings\x12R\n\x10ingress_settings\x18\x08 \x01(\x0e\x32\x38.google.cloud.functions.v2.ServiceConfig.IngressSettings\x12\x10\n\x03uri\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x1d\n\x15service_account_email\x18\n \x01(\t\x12&\n\x1e\x61ll_traffic_on_latest_revision\x18\x10 \x01(\x08\x12M\n\x1csecret_environment_variables\x18\x11 \x03(\x0b\x32\'.google.cloud.functions.v2.SecretEnvVar\x12?\n\x0esecret_volumes\x18\x13 \x03(\x0b\x32\'.google.cloud.functions.v2.SecretVolume\x12\x15\n\x08revision\x18\x12 \x01(\tB\x03\xe0\x41\x03\x12(\n max_instance_request_concurrency\x18\x14 \x01(\x05\x12N\n\x0esecurity_level\x18\x15 \x01(\x0e\x32\x36.google.cloud.functions.v2.ServiceConfig.SecurityLevel\x12(\n\x1b\x62inary_authorization_policy\x18\x17 \x01(\tB\x03\xe0\x41\x01\x1a;\n\x19\x45nvironmentVariablesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"u\n\x1aVpcConnectorEgressSettings\x12-\n)VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED\x10\x00\x12\x17\n\x13PRIVATE_RANGES_ONLY\x10\x01\x12\x0f\n\x0b\x41LL_TRAFFIC\x10\x02\"x\n\x0fIngressSettings\x12 \n\x1cINGRESS_SETTINGS_UNSPECIFIED\x10\x00\x12\r\n\tALLOW_ALL\x10\x01\x12\x17\n\x13\x41LLOW_INTERNAL_ONLY\x10\x02\x12\x1b\n\x17\x41LLOW_INTERNAL_AND_GCLB\x10\x03\"W\n\rSecurityLevel\x12\x1e\n\x1aSECURITY_LEVEL_UNSPECIFIED\x10\x00\x12\x11\n\rSECURE_ALWAYS\x10\x01\x12\x13\n\x0fSECURE_OPTIONAL\x10\x02\"P\n\x0cSecretEnvVar\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x0e\n\x06secret\x18\x03 \x01(\t\x12\x0f\n\x07version\x18\x04 \x01(\t\"\xbf\x01\n\x0cSecretVolume\x12\x12\n\nmount_path\x18\x01 \x01(\t\x12\x12\n\nproject_id\x18\x02 \x01(\t\x12\x0e\n\x06secret\x18\x03 \x01(\t\x12G\n\x08versions\x18\x04 \x03(\x0b\x32\x35.google.cloud.functions.v2.SecretVolume.SecretVersion\x1a.\n\rSecretVersion\x12\x0f\n\x07version\x18\x01 \x01(\t\x12\x0c\n\x04path\x18\x02 \x01(\t\"\x9b\x04\n\x0c\x45ventTrigger\x12\x38\n\x07trigger\x18\x01 \x01(\tB\'\xe0\x41\x03\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Trigger\x12\x16\n\x0etrigger_region\x18\x02 \x01(\t\x12\x17\n\nevent_type\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12=\n\revent_filters\x18\x04 \x03(\x0b\x32&.google.cloud.functions.v2.EventFilter\x12\x39\n\x0cpubsub_topic\x18\x05 \x01(\tB#\xe0\x41\x01\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\"\n\x15service_account_email\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12N\n\x0cretry_policy\x18\x07 \x01(\x0e\x32\x33.google.cloud.functions.v2.EventTrigger.RetryPolicyB\x03\xe0\x41\x01\x12\x38\n\x07\x63hannel\x18\x08 \x01(\tB\'\xe0\x41\x01\xfa\x41!\n\x1f\x65ventarc.googleapis.com/Channel\x12\x14\n\x07service\x18\t \x01(\tB\x03\xe0\x41\x01\"b\n\x0bRetryPolicy\x12\x1c\n\x18RETRY_POLICY_UNSPECIFIED\x10\x00\x12\x1d\n\x19RETRY_POLICY_DO_NOT_RETRY\x10\x01\x12\x16\n\x12RETRY_POLICY_RETRY\x10\x02\"P\n\x0b\x45ventFilter\x12\x16\n\tattribute\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05value\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12\x15\n\x08operator\x18\x03 \x01(\tB\x03\xe0\x41\x01\"i\n\x12GetFunctionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&cloudfunctions.googleapis.com/Function\x12\x15\n\x08revision\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\x9f\x01\n\x14ListFunctionsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\x12&cloudfunctions.googleapis.com/Function\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t\x12\x0e\n\x06\x66ilter\x18\x04 \x01(\t\x12\x10\n\x08order_by\x18\x05 \x01(\t\"}\n\x15ListFunctionsResponse\x12\x36\n\tfunctions\x18\x01 \x03(\x0b\x32#.google.cloud.functions.v2.Function\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"\xa3\x01\n\x15\x43reateFunctionRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12:\n\x08\x66unction\x18\x02 \x01(\x0b\x32#.google.cloud.functions.v2.FunctionB\x03\xe0\x41\x02\x12\x13\n\x0b\x66unction_id\x18\x03 \x01(\t\"\x84\x01\n\x15UpdateFunctionRequest\x12:\n\x08\x66unction\x18\x01 \x01(\x0b\x32#.google.cloud.functions.v2.FunctionB\x03\xe0\x41\x02\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"U\n\x15\x44\x65leteFunctionRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&cloudfunctions.googleapis.com/Function\"\xd0\x01\n\x18GenerateUploadUrlRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12<\n\x0ckms_key_name\x18\x02 \x01(\tB&\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\x12;\n\x0b\x65nvironment\x18\x03 \x01(\x0e\x32&.google.cloud.functions.v2.Environment\"q\n\x19GenerateUploadUrlResponse\x12\x12\n\nupload_url\x18\x01 \x01(\t\x12@\n\x0estorage_source\x18\x02 \x01(\x0b\x32(.google.cloud.functions.v2.StorageSource\"Z\n\x1aGenerateDownloadUrlRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&cloudfunctions.googleapis.com/Function\"3\n\x1bGenerateDownloadUrlResponse\x12\x14\n\x0c\x64ownload_url\x18\x01 \x01(\t\"`\n\x13ListRuntimesRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x0e\n\x06\x66ilter\x18\x02 \x01(\t\"\x89\x04\n\x14ListRuntimesResponse\x12I\n\x08runtimes\x18\x01 \x03(\x0b\x32\x37.google.cloud.functions.v2.ListRuntimesResponse.Runtime\x1a\xa4\x02\n\x07Runtime\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0c\x64isplay_name\x18\x05 \x01(\t\x12K\n\x05stage\x18\x02 \x01(\x0e\x32<.google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage\x12\x10\n\x08warnings\x18\x03 \x03(\t\x12;\n\x0b\x65nvironment\x18\x04 \x01(\x0e\x32&.google.cloud.functions.v2.Environment\x12+\n\x10\x64\x65precation_date\x18\x06 \x01(\x0b\x32\x11.google.type.Date\x12,\n\x11\x64\x65\x63ommission_date\x18\x07 \x01(\x0b\x32\x11.google.type.Date\"\x7f\n\x0cRuntimeStage\x12\x1d\n\x19RUNTIME_STAGE_UNSPECIFIED\x10\x00\x12\x0f\n\x0b\x44\x45VELOPMENT\x10\x01\x12\t\n\x05\x41LPHA\x10\x02\x12\x08\n\x04\x42\x45TA\x10\x03\x12\x06\n\x02GA\x10\x04\x12\x0e\n\nDEPRECATED\x10\x05\x12\x12\n\x0e\x44\x45\x43OMMISSIONED\x10\x06\"\x17\n\x15\x41utomaticUpdatePolicy\"4\n\x14OnDeployUpdatePolicy\x12\x1c\n\x0fruntime_version\x18\x01 \x01(\tB\x03\xe0\x41\x03\"\xa4\x03\n\x11OperationMetadata\x12/\n\x0b\x63reate_time\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12,\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x0e\n\x06target\x18\x03 \x01(\t\x12\x0c\n\x04verb\x18\x04 \x01(\t\x12\x15\n\rstatus_detail\x18\x05 \x01(\t\x12\x18\n\x10\x63\x61ncel_requested\x18\x06 \x01(\x08\x12\x13\n\x0b\x61pi_version\x18\x07 \x01(\t\x12.\n\x10request_resource\x18\x08 \x01(\x0b\x32\x14.google.protobuf.Any\x12\x30\n\x06stages\x18\t \x03(\x0b\x32 .google.cloud.functions.v2.Stage\x12\x14\n\x0csource_token\x18\n \x01(\t\x12\x12\n\nbuild_name\x18\r \x01(\t\x12@\n\x0eoperation_type\x18\x0b \x01(\x0e\x32(.google.cloud.functions.v2.OperationType\"P\n\x10LocationMetadata\x12<\n\x0c\x65nvironments\x18\x01 \x03(\x0e\x32&.google.cloud.functions.v2.Environment\"\xc4\x03\n\x05Stage\x12\x33\n\x04name\x18\x01 \x01(\x0e\x32%.google.cloud.functions.v2.Stage.Name\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x35\n\x05state\x18\x03 \x01(\x0e\x32&.google.cloud.functions.v2.Stage.State\x12\x10\n\x08resource\x18\x04 \x01(\t\x12\x14\n\x0cresource_uri\x18\x05 \x01(\t\x12?\n\x0estate_messages\x18\x06 \x03(\x0b\x32\'.google.cloud.functions.v2.StateMessage\"\x84\x01\n\x04Name\x12\x14\n\x10NAME_UNSPECIFIED\x10\x00\x12\x15\n\x11\x41RTIFACT_REGISTRY\x10\x01\x12\t\n\x05\x42UILD\x10\x02\x12\x0b\n\x07SERVICE\x10\x03\x12\x0b\n\x07TRIGGER\x10\x04\x12\x14\n\x10SERVICE_ROLLBACK\x10\x05\x12\x14\n\x10TRIGGER_ROLLBACK\x10\x06\"N\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bNOT_STARTED\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\x0c\n\x08\x43OMPLETE\x10\x03*m\n\rOperationType\x12\x1d\n\x19OPERATIONTYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43REATE_FUNCTION\x10\x01\x12\x13\n\x0fUPDATE_FUNCTION\x10\x02\x12\x13\n\x0f\x44\x45LETE_FUNCTION\x10\x03*@\n\x0b\x45nvironment\x12\x1b\n\x17\x45NVIRONMENT_UNSPECIFIED\x10\x00\x12\t\n\x05GEN_1\x10\x01\x12\t\n\x05GEN_2\x10\x02\x32\xaa\x0e\n\x0f\x46unctionService\x12\x9f\x01\n\x0bGetFunction\x12-.google.cloud.functions.v2.GetFunctionRequest\x1a#.google.cloud.functions.v2.Function\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v2/{name=projects/*/locations/*/functions/*}\x12\xb2\x01\n\rListFunctions\x12/.google.cloud.functions.v2.ListFunctionsRequest\x1a\x30.google.cloud.functions.v2.ListFunctionsResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v2/{parent=projects/*/locations/*}/functions\x12\x95\x02\n\x0e\x43reateFunction\x12\x30.google.cloud.functions.v2.CreateFunctionRequest\x1a\x1d.google.longrunning.Operation\"\xb1\x01\xca\x41Q\n\"google.cloud.functions.v2.Function\x12+google.cloud.functions.v2.OperationMetadata\xda\x41\x1bparent,function,function_id\x82\xd3\xe4\x93\x02\x39\"-/v2/{parent=projects/*/locations/*}/functions:\x08\x66unction\x12\x97\x02\n\x0eUpdateFunction\x12\x30.google.cloud.functions.v2.UpdateFunctionRequest\x1a\x1d.google.longrunning.Operation\"\xb3\x01\xca\x41Q\n\"google.cloud.functions.v2.Function\x12+google.cloud.functions.v2.OperationMetadata\xda\x41\x14\x66unction,update_mask\x82\xd3\xe4\x93\x02\x42\x32\x36/v2/{function.name=projects/*/locations/*/functions/*}:\x08\x66unction\x12\xe7\x01\n\x0e\x44\x65leteFunction\x12\x30.google.cloud.functions.v2.DeleteFunctionRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x44\n\x15google.protobuf.Empty\x12+google.cloud.functions.v2.OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02/*-/v2/{name=projects/*/locations/*/functions/*}\x12\xca\x01\n\x11GenerateUploadUrl\x12\x33.google.cloud.functions.v2.GenerateUploadUrlRequest\x1a\x34.google.cloud.functions.v2.GenerateUploadUrlResponse\"J\x82\xd3\xe4\x93\x02\x44\"?/v2/{parent=projects/*/locations/*}/functions:generateUploadUrl:\x01*\x12\xd2\x01\n\x13GenerateDownloadUrl\x12\x35.google.cloud.functions.v2.GenerateDownloadUrlRequest\x1a\x36.google.cloud.functions.v2.GenerateDownloadUrlResponse\"L\x82\xd3\xe4\x93\x02\x46\"A/v2/{name=projects/*/locations/*/functions/*}:generateDownloadUrl:\x01*\x12\xae\x01\n\x0cListRuntimes\x12..google.cloud.functions.v2.ListRuntimesRequest\x1a/.google.cloud.functions.v2.ListRuntimesResponse\"=\xda\x41\x06parent\x82\xd3\xe4\x93\x02.\x12,/v2/{parent=projects/*/locations/*}/runtimes\x1aQ\xca\x41\x1d\x63loudfunctions.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xee\x07\n\x1d\x63om.google.cloud.functions.v2B\x0e\x46unctionsProtoP\x01Z;cloud.google.com/go/functions/apiv2/functionspb;functionspb\xa2\x02\x03GCF\xea\x41o\n*artifactregistry.googleapis.com/Repository\x12\x41projects/{project}/locations/{location}/repositories/{repository}\xea\x41Y\n\x1f\x63loudbuild.googleapis.com/Build\x12\x36projects/{project}/locations/{location}/builds/{build}\xea\x41i\n$cloudbuild.googleapis.com/WorkerPool\x12\x41projects/{project}/locations/{location}/workerPools/{worker_pool}\xea\x41X\n\x1arun.googleapis.com/Service\x12:projects/{project}/locations/{location}/services/{service}\xea\x41\x64\n\"vpcaccess.googleapis.com/Connector\x12>projects/{project}/locations/{location}/connectors/{connector}\xea\x41]\n\x1f\x65ventarc.googleapis.com/Trigger\x12:projects/{project}/locations/{location}/triggers/{trigger}\xea\x41]\n\x1f\x65ventarc.googleapis.com/Channel\x12:projects/{project}/locations/{location}/channels/{channel}\xea\x41@\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}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"], - ["google.type.Date", "google/type/date.proto"], - ["google.protobuf.Any", "google/protobuf/any.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module Functions - module V2 - Function = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Function").msgclass - Function::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Function.State").enummodule - StateMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.StateMessage").msgclass - StateMessage::Severity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.StateMessage.Severity").enummodule - StorageSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.StorageSource").msgclass - RepoSource = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.RepoSource").msgclass - Source = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Source").msgclass - SourceProvenance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SourceProvenance").msgclass - BuildConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.BuildConfig").msgclass - BuildConfig::DockerRegistry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.BuildConfig.DockerRegistry").enummodule - ServiceConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig").msgclass - ServiceConfig::VpcConnectorEgressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig.VpcConnectorEgressSettings").enummodule - ServiceConfig::IngressSettings = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig.IngressSettings").enummodule - ServiceConfig::SecurityLevel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ServiceConfig.SecurityLevel").enummodule - SecretEnvVar = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SecretEnvVar").msgclass - SecretVolume = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SecretVolume").msgclass - SecretVolume::SecretVersion = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.SecretVolume.SecretVersion").msgclass - EventTrigger = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.EventTrigger").msgclass - EventTrigger::RetryPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.EventTrigger.RetryPolicy").enummodule - EventFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.EventFilter").msgclass - GetFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GetFunctionRequest").msgclass - ListFunctionsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListFunctionsRequest").msgclass - ListFunctionsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListFunctionsResponse").msgclass - CreateFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.CreateFunctionRequest").msgclass - UpdateFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.UpdateFunctionRequest").msgclass - DeleteFunctionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.DeleteFunctionRequest").msgclass - GenerateUploadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GenerateUploadUrlRequest").msgclass - GenerateUploadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GenerateUploadUrlResponse").msgclass - GenerateDownloadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GenerateDownloadUrlRequest").msgclass - GenerateDownloadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.GenerateDownloadUrlResponse").msgclass - ListRuntimesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListRuntimesRequest").msgclass - ListRuntimesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListRuntimesResponse").msgclass - ListRuntimesResponse::Runtime = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListRuntimesResponse.Runtime").msgclass - ListRuntimesResponse::RuntimeStage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.ListRuntimesResponse.RuntimeStage").enummodule - AutomaticUpdatePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.AutomaticUpdatePolicy").msgclass - OnDeployUpdatePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.OnDeployUpdatePolicy").msgclass - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.OperationMetadata").msgclass - LocationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.LocationMetadata").msgclass - Stage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Stage").msgclass - Stage::Name = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Stage.Name").enummodule - Stage::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Stage.State").enummodule - OperationType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.OperationType").enummodule - Environment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.functions.v2.Environment").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_services_pb.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_services_pb.rb deleted file mode 100644 index 161b4140d5f9..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/functions_services_pb.rb +++ /dev/null @@ -1,94 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/functions/v2/functions.proto for package 'google.cloud.functions.v2' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/functions/v2/functions_pb' - -module Google - module Cloud - module Functions - module V2 - module FunctionService - # Google Cloud Functions is used to deploy functions that are executed by - # Google in response to various events. Data connected with that event is - # passed to a function as the input data. - # - # A **function** is a resource which describes a function that should be - # executed and how it is triggered. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.functions.v2.FunctionService' - - # Returns a function with the given name from the requested project. - rpc :GetFunction, ::Google::Cloud::Functions::V2::GetFunctionRequest, ::Google::Cloud::Functions::V2::Function - # Returns a list of functions that belong to the requested project. - rpc :ListFunctions, ::Google::Cloud::Functions::V2::ListFunctionsRequest, ::Google::Cloud::Functions::V2::ListFunctionsResponse - # Creates a new function. If a function with the given name already exists in - # the specified project, the long running operation will return - # `ALREADY_EXISTS` error. - rpc :CreateFunction, ::Google::Cloud::Functions::V2::CreateFunctionRequest, ::Google::Longrunning::Operation - # Updates existing function. - rpc :UpdateFunction, ::Google::Cloud::Functions::V2::UpdateFunctionRequest, ::Google::Longrunning::Operation - # Deletes a function with the given name from the specified project. If the - # given function is used by some trigger, the trigger will be updated to - # remove this function. - rpc :DeleteFunction, ::Google::Cloud::Functions::V2::DeleteFunctionRequest, ::Google::Longrunning::Operation - # Returns a signed URL for uploading a function source code. - # For more information about the signed URL usage see: - # https://cloud.google.com/storage/docs/access-control/signed-urls. - # Once the function source code upload is complete, the used signed - # URL should be provided in CreateFunction or UpdateFunction request - # as a reference to the function source code. - # - # When uploading source code to the generated signed URL, please follow - # these restrictions: - # - # * Source file type should be a zip file. - # * No credentials should be attached - the signed URLs provide access to the - # target bucket using internal service identity; if credentials were - # attached, the identity from the credentials would be used, but that - # identity does not have permissions to upload files to the URL. - # - # When making a HTTP PUT request, specify this header: - # - # * `content-type: application/zip` - # - # Do not specify this header: - # - # * `Authorization: Bearer YOUR_TOKEN` - rpc :GenerateUploadUrl, ::Google::Cloud::Functions::V2::GenerateUploadUrlRequest, ::Google::Cloud::Functions::V2::GenerateUploadUrlResponse - # Returns a signed URL for downloading deployed function source code. - # The URL is only valid for a limited period and should be used within - # 30 minutes of generation. - # For more information about the signed URL usage see: - # https://cloud.google.com/storage/docs/access-control/signed-urls - rpc :GenerateDownloadUrl, ::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest, ::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse - # Returns a list of runtimes that are supported for the requested project. - rpc :ListRuntimes, ::Google::Cloud::Functions::V2::ListRuntimesRequest, ::Google::Cloud::Functions::V2::ListRuntimesResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/rest.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/rest.rb deleted file mode 100644 index f1568ca2a93e..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/rest.rb +++ /dev/null @@ -1,38 +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/functions/v2/function_service/rest" -require "google/cloud/functions/v2/bindings_override" -require "google/cloud/functions/v2/version" - -module Google - module Cloud - module Functions - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/functions/v2/rest" - # client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new - # - module V2 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/version.rb b/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/version.rb deleted file mode 100644 index dcacdf1f9499..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/lib/google/cloud/functions/v2/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 Functions - module V2 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/proto_docs/README.md b/owl-bot-staging/google-cloud-functions-v2/proto_docs/README.md deleted file mode 100644 index a7d67d286369..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Cloud Functions V2 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-functions-v2/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/cloud/functions/v2/functions.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/cloud/functions/v2/functions.rb deleted file mode 100644 index 52e1d1eee684..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/cloud/functions/v2/functions.rb +++ /dev/null @@ -1,1129 +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 Functions - module V2 - # Describes a Cloud Function that contains user computation executed in - # response to an event. It encapsulates function and trigger configurations. - # @!attribute [rw] name - # @return [::String] - # A user-defined name of the function. Function names must be unique - # globally and match pattern `projects/*/locations/*/functions/*` - # @!attribute [rw] description - # @return [::String] - # User-provided description of a function. - # @!attribute [rw] build_config - # @return [::Google::Cloud::Functions::V2::BuildConfig] - # Describes the Build step of the function that builds a container from the - # given source. - # @!attribute [rw] service_config - # @return [::Google::Cloud::Functions::V2::ServiceConfig] - # Describes the Service being deployed. Currently deploys services to Cloud - # Run (fully managed). - # @!attribute [rw] event_trigger - # @return [::Google::Cloud::Functions::V2::EventTrigger] - # An Eventarc trigger managed by Google Cloud Functions that fires events in - # response to a condition in another service. - # @!attribute [r] state - # @return [::Google::Cloud::Functions::V2::Function::State] - # Output only. State of the function. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The last update timestamp of a Cloud Function. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Labels associated with this Cloud Function. - # @!attribute [r] state_messages - # @return [::Array<::Google::Cloud::Functions::V2::StateMessage>] - # Output only. State Messages for this Cloud Function. - # @!attribute [rw] environment - # @return [::Google::Cloud::Functions::V2::Environment] - # Describe whether the function is 1st Gen or 2nd Gen. - # @!attribute [r] url - # @return [::String] - # Output only. The deployed url for the function. - # @!attribute [rw] kms_key_name - # @return [::String] - # Resource name of a KMS crypto key (managed by the user) used to - # encrypt/decrypt function resources. - # - # It must match the pattern - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. Reserved for future use. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The create timestamp of a Cloud Function. This is only - # applicable to 2nd Gen functions. - class Function - 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 - - # Describes the current state of the function. - module State - # Not specified. Invalid state. - STATE_UNSPECIFIED = 0 - - # Function has been successfully deployed and is serving. - ACTIVE = 1 - - # Function deployment failed and the function is not serving. - FAILED = 2 - - # Function is being created or updated. - DEPLOYING = 3 - - # Function is being deleted. - DELETING = 4 - - # Function deployment failed and the function serving state is undefined. - # The function should be updated or deleted to move it out of this state. - UNKNOWN = 5 - end - end - - # Informational messages about the state of the Cloud Function or Operation. - # @!attribute [rw] severity - # @return [::Google::Cloud::Functions::V2::StateMessage::Severity] - # Severity of the state message. - # @!attribute [rw] type - # @return [::String] - # One-word CamelCase type of the state message. - # @!attribute [rw] message - # @return [::String] - # The message. - class StateMessage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Severity of the state message. - module Severity - # Not specified. Invalid severity. - SEVERITY_UNSPECIFIED = 0 - - # ERROR-level severity. - ERROR = 1 - - # WARNING-level severity. - WARNING = 2 - - # INFO-level severity. - INFO = 3 - end - end - - # Location of the source in an archive file in Google Cloud Storage. - # @!attribute [rw] bucket - # @return [::String] - # Google Cloud Storage bucket containing the source (see - # [Bucket Name - # Requirements](https://cloud.google.com/storage/docs/bucket-naming#requirements)). - # @!attribute [rw] object - # @return [::String] - # Google Cloud Storage object containing the source. - # - # This object must be a gzipped archive file (`.tar.gz`) containing source to - # build. - # @!attribute [rw] generation - # @return [::Integer] - # Google Cloud Storage generation for the object. If the generation is - # omitted, the latest generation will be used. - # @!attribute [rw] source_upload_url - # @return [::String] - # When the specified storage bucket is a 1st gen function uploard url bucket, - # this field should be set as the generated upload url for 1st gen - # deployment. - class StorageSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Location of the source in a Google Cloud Source Repository. - # @!attribute [rw] branch_name - # @return [::String] - # Regex matching branches to build. - # - # The syntax of the regular expressions accepted is the syntax accepted by - # RE2 and described at https://github.com/google/re2/wiki/Syntax - # - # Note: The following fields are mutually exclusive: `branch_name`, `tag_name`, `commit_sha`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] tag_name - # @return [::String] - # Regex matching tags to build. - # - # The syntax of the regular expressions accepted is the syntax accepted by - # RE2 and described at https://github.com/google/re2/wiki/Syntax - # - # Note: The following fields are mutually exclusive: `tag_name`, `branch_name`, `commit_sha`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] commit_sha - # @return [::String] - # Explicit commit SHA to build. - # - # Note: The following fields are mutually exclusive: `commit_sha`, `branch_name`, `tag_name`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] project_id - # @return [::String] - # ID of the project that owns the Cloud Source Repository. If omitted, the - # project ID requesting the build is assumed. - # @!attribute [rw] repo_name - # @return [::String] - # Name of the Cloud Source Repository. - # @!attribute [rw] dir - # @return [::String] - # Directory, relative to the source root, in which to run the build. - # - # This must be a relative path. If a step's `dir` is specified and is an - # absolute path, this value is ignored for that step's execution. - # eg. helloworld (no leading slash allowed) - # @!attribute [rw] invert_regex - # @return [::Boolean] - # Only trigger a build if the revision regex does NOT match the revision - # regex. - class RepoSource - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The location of the function source code. - # @!attribute [rw] storage_source - # @return [::Google::Cloud::Functions::V2::StorageSource] - # If provided, get the source from this location in Google Cloud Storage. - # - # Note: The following fields are mutually exclusive: `storage_source`, `repo_source`, `git_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] repo_source - # @return [::Google::Cloud::Functions::V2::RepoSource] - # If provided, get the source from this location in a Cloud Source - # Repository. - # - # Note: The following fields are mutually exclusive: `repo_source`, `storage_source`, `git_uri`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] git_uri - # @return [::String] - # If provided, get the source from GitHub repository. This option is valid - # only for GCF 1st Gen function. - # Example: https://github.com///blob// - # - # Note: The following fields are mutually exclusive: `git_uri`, `storage_source`, `repo_source`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class Source - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Provenance of the source. Ways to find the original source, or verify that - # some source was used for this build. - # @!attribute [rw] resolved_storage_source - # @return [::Google::Cloud::Functions::V2::StorageSource] - # A copy of the build's `source.storage_source`, if exists, with any - # generations resolved. - # @!attribute [rw] resolved_repo_source - # @return [::Google::Cloud::Functions::V2::RepoSource] - # A copy of the build's `source.repo_source`, if exists, with any - # revisions resolved. - # @!attribute [rw] git_uri - # @return [::String] - # A copy of the build's `source.git_uri`, if exists, with any commits - # resolved. - class SourceProvenance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Describes the Build step of the function that builds a container from the - # given source. - # @!attribute [rw] automatic_update_policy - # @return [::Google::Cloud::Functions::V2::AutomaticUpdatePolicy] - # Note: The following fields are mutually exclusive: `automatic_update_policy`, `on_deploy_update_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] on_deploy_update_policy - # @return [::Google::Cloud::Functions::V2::OnDeployUpdatePolicy] - # Note: The following fields are mutually exclusive: `on_deploy_update_policy`, `automatic_update_policy`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] build - # @return [::String] - # Output only. The Cloud Build name of the latest successful deployment of - # the function. - # @!attribute [rw] runtime - # @return [::String] - # The runtime in which to run the function. Required when deploying a new - # function, optional when updating an existing function. For a complete - # list of possible choices, see the - # [`gcloud` command - # reference](https://cloud.google.com/sdk/gcloud/reference/functions/deploy#--runtime). - # @!attribute [rw] entry_point - # @return [::String] - # The name of the function (as defined in source code) that will be - # executed. Defaults to the resource name suffix, if not specified. For - # backward compatibility, if function with given name is not found, then the - # system will try to use function named "function". - # For Node.js this is name of a function exported by the module specified - # in `source_location`. - # @!attribute [rw] source - # @return [::Google::Cloud::Functions::V2::Source] - # The location of the function source code. - # @!attribute [r] source_provenance - # @return [::Google::Cloud::Functions::V2::SourceProvenance] - # Output only. A permanent fixed identifier for source. - # @!attribute [rw] worker_pool - # @return [::String] - # Name of the Cloud Build Custom Worker Pool that should be used to build the - # function. The format of this field is - # `projects/{project}/locations/{region}/workerPools/{workerPool}` where - # \\{project} and \\{region} are the project id and region respectively where the - # worker pool is defined and \\{workerPool} is the short name of the worker - # pool. - # - # If the project id is not the same as the function, then the Cloud - # Functions Service Agent - # (service-@gcf-admin-robot.iam.gserviceaccount.com) must be - # granted the role Cloud Build Custom Workers Builder - # (roles/cloudbuild.customworkers.builder) in the project. - # @!attribute [rw] environment_variables - # @return [::Google::Protobuf::Map{::String => ::String}] - # User-provided build-time environment variables for the function - # @!attribute [rw] docker_registry - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Cloud::Functions::V2::BuildConfig::DockerRegistry] - # Docker Registry to use for this deployment. This configuration is only - # applicable to 1st Gen functions, 2nd Gen functions can only use Artifact - # Registry. - # Deprecated: As of March 2025, `CONTAINER_REGISTRY` option is no longer - # available in response to Container Registry's deprecation: - # https://cloud.google.com/artifact-registry/docs/transition/transition-from-gcr - # Please use Artifact Registry instead, which is the default choice. - # - # If unspecified, it defaults to `ARTIFACT_REGISTRY`. - # If `docker_repository` field is specified, this field should either be left - # unspecified or set to `ARTIFACT_REGISTRY`. - # @!attribute [rw] docker_repository - # @return [::String] - # Repository in Artifact Registry to which the function docker image will be - # pushed after it is built by Cloud Build. If specified by user, it is - # created and managed by user with a customer managed encryption key. - # Otherwise, GCF will create and use a repository named 'gcf-artifacts' - # for every deployed region. - # - # It must match the pattern - # `projects/{project}/locations/{location}/repositories/{repository}`. - # Repository format must be 'DOCKER'. - # @!attribute [rw] service_account - # @return [::String] - # Service account to be used for building the container. The format of this - # field is `projects/{projectId}/serviceAccounts/{serviceAccountEmail}`. - class BuildConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class EnvironmentVariablesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Docker Registry to use for storing function Docker images. - module DockerRegistry - # Unspecified. - DOCKER_REGISTRY_UNSPECIFIED = 0 - - # Docker images will be stored in multi-regional Container Registry - # repositories named `gcf`. - CONTAINER_REGISTRY = 1 - - # Docker images will be stored in regional Artifact Registry repositories. - # By default, GCF will create and use repositories named `gcf-artifacts` - # in every region in which a function is deployed. But the repository to - # use can also be specified by the user using the `docker_repository` - # field. - ARTIFACT_REGISTRY = 2 - end - end - - # Describes the Service being deployed. - # Currently Supported : Cloud Run (fully managed). - # @!attribute [r] service - # @return [::String] - # Output only. Name of the service associated with a Function. - # The format of this field is - # `projects/{project}/locations/{region}/services/{service}` - # @!attribute [rw] timeout_seconds - # @return [::Integer] - # The function execution timeout. Execution is considered failed and - # can be terminated if the function is not completed at the end of the - # timeout period. Defaults to 60 seconds. - # @!attribute [rw] available_memory - # @return [::String] - # The amount of memory available for a function. - # Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is - # supplied the value is interpreted as bytes. - # See - # https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/apimachinery/pkg/api/resource/quantity.go - # a full description. - # @!attribute [rw] available_cpu - # @return [::String] - # The number of CPUs used in a single container instance. - # Default value is calculated from available memory. - # Supports the same values as Cloud Run, see - # https://cloud.google.com/run/docs/reference/rest/v1/Container#resourcerequirements - # Example: "1" indicates 1 vCPU - # @!attribute [rw] environment_variables - # @return [::Google::Protobuf::Map{::String => ::String}] - # Environment variables that shall be available during function execution. - # @!attribute [rw] max_instance_count - # @return [::Integer] - # The limit on the maximum number of function instances that may coexist at a - # given time. - # - # In some cases, such as rapid traffic surges, Cloud Functions may, for a - # short period of time, create more instances than the specified max - # instances limit. If your function cannot tolerate this temporary behavior, - # you may want to factor in a safety margin and set a lower max instances - # value than your function can tolerate. - # - # See the [Max - # Instances](https://cloud.google.com/functions/docs/max-instances) Guide for - # more details. - # @!attribute [rw] min_instance_count - # @return [::Integer] - # The limit on the minimum number of function instances that may coexist at a - # given time. - # - # Function instances are kept in idle state for a short period after they - # finished executing the request to reduce cold start time for subsequent - # requests. Setting a minimum instance count will ensure that the given - # number of instances are kept running in idle state always. This can help - # with cold start times when jump in incoming request count occurs after the - # idle instance would have been stopped in the default case. - # @!attribute [rw] vpc_connector - # @return [::String] - # The Serverless VPC Access connector that this cloud function can connect - # to. The format of this field is `projects/*/locations/*/connectors/*`. - # @!attribute [rw] vpc_connector_egress_settings - # @return [::Google::Cloud::Functions::V2::ServiceConfig::VpcConnectorEgressSettings] - # The egress settings for the connector, controlling what traffic is diverted - # through it. - # @!attribute [rw] ingress_settings - # @return [::Google::Cloud::Functions::V2::ServiceConfig::IngressSettings] - # The ingress settings for the function, controlling what traffic can reach - # it. - # @!attribute [r] uri - # @return [::String] - # Output only. URI of the Service deployed. - # @!attribute [rw] service_account_email - # @return [::String] - # The email of the service's service account. If empty, defaults to - # `{project_number}-compute@developer.gserviceaccount.com`. - # @!attribute [rw] all_traffic_on_latest_revision - # @return [::Boolean] - # Whether 100% of traffic is routed to the latest revision. - # On CreateFunction and UpdateFunction, when set to true, the revision being - # deployed will serve 100% of traffic, ignoring any traffic split settings, - # if any. On GetFunction, true will be returned if the latest revision is - # serving 100% of traffic. - # @!attribute [rw] secret_environment_variables - # @return [::Array<::Google::Cloud::Functions::V2::SecretEnvVar>] - # Secret environment variables configuration. - # @!attribute [rw] secret_volumes - # @return [::Array<::Google::Cloud::Functions::V2::SecretVolume>] - # Secret volumes configuration. - # @!attribute [r] revision - # @return [::String] - # Output only. The name of service revision. - # @!attribute [rw] max_instance_request_concurrency - # @return [::Integer] - # Sets the maximum number of concurrent requests that each instance - # can receive. Defaults to 1. - # @!attribute [rw] security_level - # @return [::Google::Cloud::Functions::V2::ServiceConfig::SecurityLevel] - # Security level configure whether the function only accepts https. - # This configuration is only applicable to 1st Gen functions with Http - # trigger. By default https is optional for 1st Gen functions; 2nd Gen - # functions are https ONLY. - # @!attribute [rw] binary_authorization_policy - # @return [::String] - # Optional. The binary authorization policy to be checked when deploying the - # Cloud Run service. - class ServiceConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class EnvironmentVariablesEntry - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Available egress settings. - # - # This controls what traffic is diverted through the VPC Access Connector - # resource. By default PRIVATE_RANGES_ONLY will be used. - module VpcConnectorEgressSettings - # Unspecified. - VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED = 0 - - # Use the VPC Access Connector only for private IP space from RFC1918. - PRIVATE_RANGES_ONLY = 1 - - # Force the use of VPC Access Connector for all egress traffic from the - # function. - ALL_TRAFFIC = 2 - end - - # Available ingress settings. - # - # This controls what traffic can reach the function. - # - # If unspecified, ALLOW_ALL will be used. - module IngressSettings - # Unspecified. - INGRESS_SETTINGS_UNSPECIFIED = 0 - - # Allow HTTP traffic from public and private sources. - ALLOW_ALL = 1 - - # Allow HTTP traffic from only private VPC sources. - ALLOW_INTERNAL_ONLY = 2 - - # Allow HTTP traffic from private VPC sources and through GCLB. - ALLOW_INTERNAL_AND_GCLB = 3 - end - - # Available security level settings. - # - # This enforces security protocol on function URL. - # - # Security level is only configurable for 1st Gen functions, If unspecified, - # SECURE_OPTIONAL will be used. 2nd Gen functions are SECURE_ALWAYS ONLY. - module SecurityLevel - # Unspecified. - SECURITY_LEVEL_UNSPECIFIED = 0 - - # Requests for a URL that match this handler that do not use HTTPS are - # automatically redirected to the HTTPS URL with the same path. Query - # parameters are reserved for the redirect. - SECURE_ALWAYS = 1 - - # Both HTTP and HTTPS requests with URLs that match the handler succeed - # without redirects. The application can examine the request to determine - # which protocol was used and respond accordingly. - SECURE_OPTIONAL = 2 - end - end - - # Configuration for a secret environment variable. It has the information - # necessary to fetch the secret value from secret manager and expose it as an - # environment variable. - # @!attribute [rw] key - # @return [::String] - # Name of the environment variable. - # @!attribute [rw] project_id - # @return [::String] - # Project identifier (preferably project number but can also be the - # project ID) of the project that contains the secret. If not set, it is - # assumed that the secret is in the same project as the function. - # @!attribute [rw] secret - # @return [::String] - # Name of the secret in secret manager (not the full resource name). - # @!attribute [rw] version - # @return [::String] - # Version of the secret (version number or the string 'latest'). It is - # recommended to use a numeric version for secret environment variables as - # any updates to the secret value is not reflected until new instances - # start. - class SecretEnvVar - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a secret volume. It has the information necessary to fetch - # the secret value from secret manager and make it available as files mounted - # at the requested paths within the application container. - # @!attribute [rw] mount_path - # @return [::String] - # The path within the container to mount the secret volume. For example, - # setting the mount_path as `/etc/secrets` would mount the secret value files - # under the `/etc/secrets` directory. This directory will also be completely - # shadowed and unavailable to mount any other secrets. - # Recommended mount path: /etc/secrets - # @!attribute [rw] project_id - # @return [::String] - # Project identifier (preferably project number but can also be the project - # ID) of the project that contains the secret. If not set, it is - # assumed that the secret is in the same project as the function. - # @!attribute [rw] secret - # @return [::String] - # Name of the secret in secret manager (not the full resource name). - # @!attribute [rw] versions - # @return [::Array<::Google::Cloud::Functions::V2::SecretVolume::SecretVersion>] - # List of secret versions to mount for this secret. If empty, the `latest` - # version of the secret will be made available in a file named after the - # secret under the mount point. - class SecretVolume - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Configuration for a single version. - # @!attribute [rw] version - # @return [::String] - # Version of the secret (version number or the string 'latest'). It is - # preferable to use `latest` version with secret volumes as secret value - # changes are reflected immediately. - # @!attribute [rw] path - # @return [::String] - # Relative path of the file under the mount path where the secret value for - # this version will be fetched and made available. For example, setting the - # mount_path as '/etc/secrets' and path as `secret_foo` would mount the - # secret value file at `/etc/secrets/secret_foo`. - class SecretVersion - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Describes EventTrigger, used to request events to be sent from another - # service. - # @!attribute [r] trigger - # @return [::String] - # Output only. The resource name of the Eventarc trigger. The format of this - # field is `projects/{project}/locations/{region}/triggers/{trigger}`. - # @!attribute [rw] trigger_region - # @return [::String] - # The region that the trigger will be in. The trigger will only receive - # events originating in this region. It can be the same - # region as the function, a different region or multi-region, or the global - # region. If not provided, defaults to the same region as the function. - # @!attribute [rw] event_type - # @return [::String] - # Required. The type of event to observe. For example: - # `google.cloud.audit.log.v1.written` or - # `google.cloud.pubsub.topic.v1.messagePublished`. - # @!attribute [rw] event_filters - # @return [::Array<::Google::Cloud::Functions::V2::EventFilter>] - # Criteria used to filter events. - # @!attribute [rw] pubsub_topic - # @return [::String] - # Optional. The name of a Pub/Sub topic in the same project that will be used - # as the transport topic for the event delivery. Format: - # `projects/{project}/topics/{topic}`. - # - # This is only valid for events of type - # `google.cloud.pubsub.topic.v1.messagePublished`. The topic provided here - # will not be deleted at function deletion. - # @!attribute [rw] service_account_email - # @return [::String] - # Optional. The email of the trigger's service account. The service account - # must have permission to invoke Cloud Run services, the permission is - # `run.routes.invoke`. - # If empty, defaults to the Compute Engine default service account: - # `{project_number}-compute@developer.gserviceaccount.com`. - # @!attribute [rw] retry_policy - # @return [::Google::Cloud::Functions::V2::EventTrigger::RetryPolicy] - # Optional. If unset, then defaults to ignoring failures (i.e. not retrying - # them). - # @!attribute [rw] channel - # @return [::String] - # Optional. The name of the channel associated with the trigger in - # `projects/{project}/locations/{location}/channels/{channel}` format. - # You must provide a channel to receive events from Eventarc SaaS partners. - # @!attribute [rw] service - # @return [::String] - # Optional. The hostname of the service that 1st Gen function should be - # observed. - # - # If no string is provided, the default service implementing the API will - # be used. For example, `storage.googleapis.com` is the default for all - # event types in the `google.storage` namespace. - # - # The field is only applicable to 1st Gen functions. - class EventTrigger - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes the retry policy in case of function's execution failure. - # Retried execution is charged as any other execution. - module RetryPolicy - # Not specified. - RETRY_POLICY_UNSPECIFIED = 0 - - # Do not retry. - RETRY_POLICY_DO_NOT_RETRY = 1 - - # Retry on any failure, retry up to 7 days with an exponential backoff - # (capped at 10 seconds). - RETRY_POLICY_RETRY = 2 - end - end - - # Filters events based on exact matches on the CloudEvents attributes. - # @!attribute [rw] attribute - # @return [::String] - # Required. The name of a CloudEvents attribute. - # @!attribute [rw] value - # @return [::String] - # Required. The value for the attribute. - # @!attribute [rw] operator - # @return [::String] - # Optional. The operator used for matching the events with the value of the - # filter. If not specified, only events that have an exact key-value pair - # specified in the filter are matched. The only allowed value is - # `match-path-pattern`. - class EventFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `GetFunction` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the function which details should be obtained. - # @!attribute [rw] revision - # @return [::String] - # Optional. The optional version of the 1st gen function whose details should - # be obtained. The version of a 1st gen function is an integer that starts - # from 1 and gets incremented on redeployments. GCF may keep historical - # configs for old versions of 1st gen function. This field can be specified - # to fetch the historical configs. This field is valid only for GCF 1st gen - # function. - class GetFunctionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListFunctions` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the function should be - # listed, specified in the format `projects/*/locations/*` If you want to - # list functions in all locations, use "-" in place of a location. When - # listing functions in all locations, if one or more location(s) are - # unreachable, the response will contain functions from all reachable - # locations along with the names of any unreachable locations. - # @!attribute [rw] page_size - # @return [::Integer] - # Maximum number of functions to return per call. The largest allowed - # page_size is 1,000, if the page_size is omitted or specified as greater - # than 1,000 then it will be replaced as 1,000. The size of the list - # response can be less than specified when used with filters. - # @!attribute [rw] page_token - # @return [::String] - # The value returned by the last - # `ListFunctionsResponse`; indicates that - # this is a continuation of a prior `ListFunctions` call, and that the - # system should return the next page of data. - # @!attribute [rw] filter - # @return [::String] - # The filter for Functions that match the filter expression, - # following the syntax outlined in https://google.aip.dev/160. - # @!attribute [rw] order_by - # @return [::String] - # The sorting order of the resources returned. Value should be a comma - # separated list of fields. The default sorting order is ascending. - # See https://google.aip.dev/132#ordering. - class ListFunctionsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListFunctions` method. - # @!attribute [rw] functions - # @return [::Array<::Google::Cloud::Functions::V2::Function>] - # The functions that match the request. - # @!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 - # @return [::Array<::String>] - # Locations that could not be reached. The response does not include any - # functions from these locations. - class ListFunctionsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `CreateFunction` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location in which the function should be created, - # specified in the format `projects/*/locations/*` - # @!attribute [rw] function - # @return [::Google::Cloud::Functions::V2::Function] - # Required. Function to be created. - # @!attribute [rw] function_id - # @return [::String] - # The ID to use for the function, which will become the final component of - # the function's resource name. - # - # This value should be 4-63 characters, and valid characters - # are /[a-z][0-9]-/. - class CreateFunctionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `UpdateFunction` method. - # @!attribute [rw] function - # @return [::Google::Cloud::Functions::V2::Function] - # Required. New version of the function. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # The list of fields to be updated. - # If no field mask is provided, all fields will be updated. - class UpdateFunctionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `DeleteFunction` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the function which should be deleted. - class DeleteFunctionRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of `GenerateSourceUploadUrl` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location in which the Google Cloud Storage signed - # URL should be generated, specified in the format `projects/*/locations/*`. - # @!attribute [rw] kms_key_name - # @return [::String] - # Resource name of a KMS crypto key (managed by the user) used to - # encrypt/decrypt function source code objects in intermediate Cloud Storage - # buckets. When you generate an upload url and upload your source code, it - # gets copied to an intermediate Cloud Storage bucket. The source code is - # then copied to a versioned directory in the sources bucket in the consumer - # project during the function deployment. - # - # It must match the pattern - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}`. - # - # The Google Cloud Functions service account - # (service-\\{project_number}@gcf-admin-robot.iam.gserviceaccount.com) must be - # granted the role 'Cloud KMS CryptoKey Encrypter/Decrypter - # (roles/cloudkms.cryptoKeyEncrypterDecrypter)' on the - # Key/KeyRing/Project/Organization (least access preferred). - # @!attribute [rw] environment - # @return [::Google::Cloud::Functions::V2::Environment] - # The function environment the generated upload url will be used for. - # The upload url for 2nd Gen functions can also be used for 1st gen - # functions, but not vice versa. If not specified, 2nd generation-style - # upload URLs are generated. - class GenerateUploadUrlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of `GenerateSourceUploadUrl` method. - # @!attribute [rw] upload_url - # @return [::String] - # The generated Google Cloud Storage signed URL that should be used for a - # function source code upload. The uploaded file should be a zip archive - # which contains a function. - # @!attribute [rw] storage_source - # @return [::Google::Cloud::Functions::V2::StorageSource] - # The location of the source code in the upload bucket. - # - # Once the archive is uploaded using the `upload_url` use this field to - # set the `function.build_config.source.storage_source` - # during CreateFunction and UpdateFunction. - # - # Generation defaults to 0, as Cloud Storage provides a new generation only - # upon uploading a new object or version of an object. - class GenerateUploadUrlResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request of `GenerateDownloadUrl` method. - # @!attribute [rw] name - # @return [::String] - # Required. The name of function for which source code Google Cloud Storage - # signed URL should be generated. - class GenerateDownloadUrlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response of `GenerateDownloadUrl` method. - # @!attribute [rw] download_url - # @return [::String] - # The generated Google Cloud Storage signed URL that should be used for - # function source code download. - class GenerateDownloadUrlResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request for the `ListRuntimes` method. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location from which the runtimes should be - # listed, specified in the format `projects/*/locations/*` - # @!attribute [rw] filter - # @return [::String] - # The filter for Runtimes that match the filter expression, - # following the syntax outlined in https://google.aip.dev/160. - class ListRuntimesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response for the `ListRuntimes` method. - # @!attribute [rw] runtimes - # @return [::Array<::Google::Cloud::Functions::V2::ListRuntimesResponse::Runtime>] - # The runtimes that match the request. - class ListRuntimesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Describes a runtime and any special information (e.g., deprecation status) - # related to it. - # @!attribute [rw] name - # @return [::String] - # The name of the runtime, e.g., 'go113', 'nodejs12', etc. - # @!attribute [rw] display_name - # @return [::String] - # The user facing name, eg 'Go 1.13', 'Node.js 12', etc. - # @!attribute [rw] stage - # @return [::Google::Cloud::Functions::V2::ListRuntimesResponse::RuntimeStage] - # The stage of life this runtime is in, e.g., BETA, GA, etc. - # @!attribute [rw] warnings - # @return [::Array<::String>] - # Warning messages, e.g., a deprecation warning. - # @!attribute [rw] environment - # @return [::Google::Cloud::Functions::V2::Environment] - # The environment for the runtime. - # @!attribute [rw] deprecation_date - # @return [::Google::Type::Date] - # Deprecation date for the runtime. - # @!attribute [rw] decommission_date - # @return [::Google::Type::Date] - # Decommission date for the runtime. - class Runtime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # The various stages that a runtime can be in. - module RuntimeStage - # Not specified. - RUNTIME_STAGE_UNSPECIFIED = 0 - - # The runtime is in development. - DEVELOPMENT = 1 - - # The runtime is in the Alpha stage. - ALPHA = 2 - - # The runtime is in the Beta stage. - BETA = 3 - - # The runtime is generally available. - GA = 4 - - # The runtime is deprecated. - DEPRECATED = 5 - - # The runtime is no longer supported. - DECOMMISSIONED = 6 - end - end - - # Security patches are applied automatically to the runtime without requiring - # the function to be redeployed. - class AutomaticUpdatePolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Security patches are only applied when a function is redeployed. - # @!attribute [r] runtime_version - # @return [::String] - # Output only. contains the runtime version which was used during latest - # function deployment. - class OnDeployUpdatePolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the metadata of the long-running operation. - # @!attribute [rw] create_time - # @return [::Google::Protobuf::Timestamp] - # The time the operation was created. - # @!attribute [rw] end_time - # @return [::Google::Protobuf::Timestamp] - # The time the operation finished running. - # @!attribute [rw] target - # @return [::String] - # Server-defined resource path for the target of the operation. - # @!attribute [rw] verb - # @return [::String] - # Name of the verb executed by the operation. - # @!attribute [rw] status_detail - # @return [::String] - # Human-readable status of the operation, if any. - # @!attribute [rw] cancel_requested - # @return [::Boolean] - # Identifies whether the user has requested cancellation - # of the operation. Operations that have successfully been cancelled - # have - # {::Google::Longrunning::Operation#error google.longrunning.Operation.error} - # value with a {::Google::Rpc::Status#code google.rpc.Status.code} of 1, - # corresponding to `Code.CANCELLED`. - # @!attribute [rw] api_version - # @return [::String] - # API version used to start the operation. - # @!attribute [rw] request_resource - # @return [::Google::Protobuf::Any] - # The original request that started the operation. - # @!attribute [rw] stages - # @return [::Array<::Google::Cloud::Functions::V2::Stage>] - # Mechanism for reporting in-progress stages - # @!attribute [rw] source_token - # @return [::String] - # An identifier for Firebase function sources. Disclaimer: This field is only - # supported for Firebase function deployments. - # @!attribute [rw] build_name - # @return [::String] - # The build name of the function for create and update operations. - # @!attribute [rw] operation_type - # @return [::Google::Cloud::Functions::V2::OperationType] - # The operation type. - class OperationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Extra GCF specific location information. - # @!attribute [rw] environments - # @return [::Array<::Google::Cloud::Functions::V2::Environment>] - # The Cloud Function environments this location supports. - class LocationMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Each Stage of the deployment process - # @!attribute [rw] name - # @return [::Google::Cloud::Functions::V2::Stage::Name] - # Name of the Stage. This will be unique for each Stage. - # @!attribute [rw] message - # @return [::String] - # Message describing the Stage - # @!attribute [rw] state - # @return [::Google::Cloud::Functions::V2::Stage::State] - # Current state of the Stage - # @!attribute [rw] resource - # @return [::String] - # Resource of the Stage - # @!attribute [rw] resource_uri - # @return [::String] - # Link to the current Stage resource - # @!attribute [rw] state_messages - # @return [::Array<::Google::Cloud::Functions::V2::StateMessage>] - # State messages from the current Stage. - class Stage - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible names for a Stage - module Name - # Not specified. Invalid name. - NAME_UNSPECIFIED = 0 - - # Artifact Registry Stage - ARTIFACT_REGISTRY = 1 - - # Build Stage - BUILD = 2 - - # Service Stage - SERVICE = 3 - - # Trigger Stage - TRIGGER = 4 - - # Service Rollback Stage - SERVICE_ROLLBACK = 5 - - # Trigger Rollback Stage - TRIGGER_ROLLBACK = 6 - end - - # Possible states for a Stage - module State - # Not specified. Invalid state. - STATE_UNSPECIFIED = 0 - - # Stage has not started. - NOT_STARTED = 1 - - # Stage is in progress. - IN_PROGRESS = 2 - - # Stage has completed. - COMPLETE = 3 - end - end - - # The type of the long running operation. - module OperationType - # Unspecified - OPERATIONTYPE_UNSPECIFIED = 0 - - # CreateFunction - CREATE_FUNCTION = 1 - - # UpdateFunction - UPDATE_FUNCTION = 2 - - # DeleteFunction - DELETE_FUNCTION = 3 - end - - # The environment the function is hosted on. - module Environment - # Unspecified - ENVIRONMENT_UNSPECIFIED = 0 - - # Gen 1 - GEN_1 = 1 - - # Gen 2 - GEN_2 = 2 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/type/date.rb deleted file mode 100644 index 1d0a9780457f..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/type/date.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! - - -module Google - module Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values - # * A month and day value, with a zero year, such as an anniversary - # * A year on its own, with zero month and day values - # * A year and month value, with a zero day, such as a credit card expiration - # date - # - # Related types are [google.type.TimeOfDay][google.type.TimeOfDay] and - # `google.protobuf.Timestamp`. - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-functions-v2/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2/snippets/Gemfile b/owl-bot-staging/google-cloud-functions-v2/snippets/Gemfile deleted file mode 100644 index c3b60f34cf1c..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/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-functions-v2", path: "../" -else - gem "google-cloud-functions-v2" -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-functions-v2/snippets/function_service/create_function.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/create_function.rb deleted file mode 100644 index 0b659131ef3c..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/create_function.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 cloudfunctions_v2_generated_FunctionService_CreateFunction_sync] -require "google/cloud/functions/v2" - -## -# Snippet for the create_function call in the FunctionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V2::FunctionService::Client#create_function. -# -def create_function - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V2::FunctionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V2::CreateFunctionRequest.new - - # Call the create_function method. - result = client.create_function request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 cloudfunctions_v2_generated_FunctionService_CreateFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/delete_function.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/delete_function.rb deleted file mode 100644 index dee9f5f5a274..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/delete_function.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 cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync] -require "google/cloud/functions/v2" - -## -# Snippet for the delete_function call in the FunctionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V2::FunctionService::Client#delete_function. -# -def delete_function - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V2::FunctionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V2::DeleteFunctionRequest.new - - # Call the delete_function method. - result = client.delete_function request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_download_url.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_download_url.rb deleted file mode 100644 index 54466b888938..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_download_url.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 cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync] -require "google/cloud/functions/v2" - -## -# Snippet for the generate_download_url call in the FunctionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V2::FunctionService::Client#generate_download_url. -# -def generate_download_url - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V2::FunctionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.new - - # Call the generate_download_url method. - result = client.generate_download_url request - - # The returned object is of type Google::Cloud::Functions::V2::GenerateDownloadUrlResponse. - p result -end -# [END cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_upload_url.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_upload_url.rb deleted file mode 100644 index fa4a85c218d6..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/generate_upload_url.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 cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync] -require "google/cloud/functions/v2" - -## -# Snippet for the generate_upload_url call in the FunctionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V2::FunctionService::Client#generate_upload_url. -# -def generate_upload_url - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V2::FunctionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new - - # Call the generate_upload_url method. - result = client.generate_upload_url request - - # The returned object is of type Google::Cloud::Functions::V2::GenerateUploadUrlResponse. - p result -end -# [END cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/get_function.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/get_function.rb deleted file mode 100644 index 6a4197de8942..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/get_function.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 cloudfunctions_v2_generated_FunctionService_GetFunction_sync] -require "google/cloud/functions/v2" - -## -# Snippet for the get_function call in the FunctionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V2::FunctionService::Client#get_function. -# -def get_function - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V2::FunctionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V2::GetFunctionRequest.new - - # Call the get_function method. - result = client.get_function request - - # The returned object is of type Google::Cloud::Functions::V2::Function. - p result -end -# [END cloudfunctions_v2_generated_FunctionService_GetFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_functions.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_functions.rb deleted file mode 100644 index 7b1887fbfe3b..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_functions.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 cloudfunctions_v2_generated_FunctionService_ListFunctions_sync] -require "google/cloud/functions/v2" - -## -# Snippet for the list_functions call in the FunctionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V2::FunctionService::Client#list_functions. -# -def list_functions - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V2::FunctionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V2::ListFunctionsRequest.new - - # Call the list_functions method. - result = client.list_functions request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::Functions::V2::Function. - p item - end -end -# [END cloudfunctions_v2_generated_FunctionService_ListFunctions_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_runtimes.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_runtimes.rb deleted file mode 100644 index 1248a80fe944..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/list_runtimes.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 cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync] -require "google/cloud/functions/v2" - -## -# Snippet for the list_runtimes call in the FunctionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V2::FunctionService::Client#list_runtimes. -# -def list_runtimes - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V2::FunctionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V2::ListRuntimesRequest.new - - # Call the list_runtimes method. - result = client.list_runtimes request - - # The returned object is of type Google::Cloud::Functions::V2::ListRuntimesResponse. - p result -end -# [END cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/update_function.rb b/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/update_function.rb deleted file mode 100644 index 7f4c66738c0b..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/snippets/function_service/update_function.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 cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync] -require "google/cloud/functions/v2" - -## -# Snippet for the update_function call in the FunctionService service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::Functions::V2::FunctionService::Client#update_function. -# -def update_function - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::Functions::V2::FunctionService::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::Functions::V2::UpdateFunctionRequest.new - - # Call the update_function method. - result = client.update_function request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync] diff --git a/owl-bot-staging/google-cloud-functions-v2/snippets/snippet_metadata_google.cloud.functions.v2.json b/owl-bot-staging/google-cloud-functions-v2/snippets/snippet_metadata_google.cloud.functions.v2.json deleted file mode 100644 index 2ca8085df932..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/snippets/snippet_metadata_google.cloud.functions.v2.json +++ /dev/null @@ -1,335 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-functions-v2", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.functions.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "region_tag": "cloudfunctions_v2_generated_FunctionService_GetFunction_sync", - "title": "Snippet for the get_function call in the FunctionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#get_function.", - "file": "function_service/get_function.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_function", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#get_function", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V2::GetFunctionRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Functions::V2::Function", - "client": { - "short_name": "FunctionService::Client", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" - }, - "method": { - "short_name": "GetFunction", - "full_name": "google.cloud.functions.v2.FunctionService.GetFunction", - "service": { - "short_name": "FunctionService", - "full_name": "google.cloud.functions.v2.FunctionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v2_generated_FunctionService_ListFunctions_sync", - "title": "Snippet for the list_functions call in the FunctionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#list_functions.", - "file": "function_service/list_functions.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_functions", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#list_functions", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V2::ListFunctionsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Functions::V2::ListFunctionsResponse", - "client": { - "short_name": "FunctionService::Client", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" - }, - "method": { - "short_name": "ListFunctions", - "full_name": "google.cloud.functions.v2.FunctionService.ListFunctions", - "service": { - "short_name": "FunctionService", - "full_name": "google.cloud.functions.v2.FunctionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v2_generated_FunctionService_CreateFunction_sync", - "title": "Snippet for the create_function call in the FunctionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#create_function.", - "file": "function_service/create_function.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_function", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#create_function", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V2::CreateFunctionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "FunctionService::Client", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" - }, - "method": { - "short_name": "CreateFunction", - "full_name": "google.cloud.functions.v2.FunctionService.CreateFunction", - "service": { - "short_name": "FunctionService", - "full_name": "google.cloud.functions.v2.FunctionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v2_generated_FunctionService_UpdateFunction_sync", - "title": "Snippet for the update_function call in the FunctionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#update_function.", - "file": "function_service/update_function.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_function", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#update_function", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V2::UpdateFunctionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "FunctionService::Client", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" - }, - "method": { - "short_name": "UpdateFunction", - "full_name": "google.cloud.functions.v2.FunctionService.UpdateFunction", - "service": { - "short_name": "FunctionService", - "full_name": "google.cloud.functions.v2.FunctionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v2_generated_FunctionService_DeleteFunction_sync", - "title": "Snippet for the delete_function call in the FunctionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#delete_function.", - "file": "function_service/delete_function.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_function", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#delete_function", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V2::DeleteFunctionRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "FunctionService::Client", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" - }, - "method": { - "short_name": "DeleteFunction", - "full_name": "google.cloud.functions.v2.FunctionService.DeleteFunction", - "service": { - "short_name": "FunctionService", - "full_name": "google.cloud.functions.v2.FunctionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v2_generated_FunctionService_GenerateUploadUrl_sync", - "title": "Snippet for the generate_upload_url call in the FunctionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#generate_upload_url.", - "file": "function_service/generate_upload_url.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_upload_url", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#generate_upload_url", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V2::GenerateUploadUrlRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Functions::V2::GenerateUploadUrlResponse", - "client": { - "short_name": "FunctionService::Client", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" - }, - "method": { - "short_name": "GenerateUploadUrl", - "full_name": "google.cloud.functions.v2.FunctionService.GenerateUploadUrl", - "service": { - "short_name": "FunctionService", - "full_name": "google.cloud.functions.v2.FunctionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v2_generated_FunctionService_GenerateDownloadUrl_sync", - "title": "Snippet for the generate_download_url call in the FunctionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#generate_download_url.", - "file": "function_service/generate_download_url.rb", - "language": "RUBY", - "client_method": { - "short_name": "generate_download_url", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#generate_download_url", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse", - "client": { - "short_name": "FunctionService::Client", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" - }, - "method": { - "short_name": "GenerateDownloadUrl", - "full_name": "google.cloud.functions.v2.FunctionService.GenerateDownloadUrl", - "service": { - "short_name": "FunctionService", - "full_name": "google.cloud.functions.v2.FunctionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "cloudfunctions_v2_generated_FunctionService_ListRuntimes_sync", - "title": "Snippet for the list_runtimes call in the FunctionService service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::Functions::V2::FunctionService::Client#list_runtimes.", - "file": "function_service/list_runtimes.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_runtimes", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client#list_runtimes", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::Functions::V2::ListRuntimesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::Functions::V2::ListRuntimesResponse", - "client": { - "short_name": "FunctionService::Client", - "full_name": "::Google::Cloud::Functions::V2::FunctionService::Client" - }, - "method": { - "short_name": "ListRuntimes", - "full_name": "google.cloud.functions.v2.FunctionService.ListRuntimes", - "service": { - "short_name": "FunctionService", - "full_name": "google.cloud.functions.v2.FunctionService" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_operations_test.rb b/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_operations_test.rb deleted file mode 100644 index 8744af29c25d..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_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/functions/v2/functions_pb" -require "google/cloud/functions/v2/functions_services_pb" -require "google/cloud/functions/v2/function_service" - -class ::Google::Cloud::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_paths_test.rb b/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_paths_test.rb deleted file mode 100644 index fa8d32402832..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_paths_test.rb +++ /dev/null @@ -1,175 +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/functions/v2/function_service" - -class ::Google::Cloud::Functions::V2::FunctionService::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_build_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.build_path project: "value0", location: "value1", build: "value2" - assert_equal "projects/value0/locations/value1/builds/value2", path - end - end - - def test_channel_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.channel_path project: "value0", location: "value1", channel: "value2" - assert_equal "projects/value0/locations/value1/channels/value2", path - end - end - - def test_connector_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.connector_path project: "value0", location: "value1", connector: "value2" - assert_equal "projects/value0/locations/value1/connectors/value2", path - end - end - - def test_crypto_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/value3", path - end - end - - def test_function_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.function_path project: "value0", location: "value1", function: "value2" - assert_equal "projects/value0/locations/value1/functions/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::Functions::V2::FunctionService::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_repository_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.repository_path project: "value0", location: "value1", repository: "value2" - assert_equal "projects/value0/locations/value1/repositories/value2", path - end - end - - def test_service_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.service_path project: "value0", location: "value1", service: "value2" - assert_equal "projects/value0/locations/value1/services/value2", path - end - end - - def test_topic_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.topic_path project: "value0", topic: "value1" - assert_equal "projects/value0/topics/value1", path - end - end - - def test_trigger_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.trigger_path project: "value0", location: "value1", trigger: "value2" - assert_equal "projects/value0/locations/value1/triggers/value2", path - end - end - - def test_worker_pool_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.worker_pool_path project: "value0", location: "value1", worker_pool: "value2" - assert_equal "projects/value0/locations/value1/workerPools/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_rest_test.rb b/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_rest_test.rb deleted file mode 100644 index 1306f6057a18..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_rest_test.rb +++ /dev/null @@ -1,542 +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/functions/v2/functions_pb" -require "google/cloud/functions/v2/function_service/rest" - - -class ::Google::Cloud::Functions::V2::FunctionService::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_get_function - # Create test objects. - client_result = ::Google::Cloud::Functions::V2::Function.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - revision = "hello world" - - get_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_get_function_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_function({ name: name, revision: revision }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_function name: name, revision: revision do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_function ::Google::Cloud::Functions::V2::GetFunctionRequest.new(name: name, revision: revision) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_function({ name: name, revision: revision }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_function(::Google::Cloud::Functions::V2::GetFunctionRequest.new(name: name, revision: revision), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_function_client_stub.call_count - end - end - end - - def test_list_functions - # Create test objects. - client_result = ::Google::Cloud::Functions::V2::ListFunctionsResponse.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_functions_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_list_functions_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_functions_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_functions({ parent: parent, page_size: 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_functions parent: parent, page_size: 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_functions ::Google::Cloud::Functions::V2::ListFunctionsRequest.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_functions({ 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_functions(::Google::Cloud::Functions::V2::ListFunctionsRequest.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_functions_client_stub.call_count - end - end - end - - def test_create_function - # 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" - function = {} - function_id = "hello world" - - create_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_create_function_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_function({ parent: parent, function: function, function_id: function_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_function parent: parent, function: function, function_id: function_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_function ::Google::Cloud::Functions::V2::CreateFunctionRequest.new(parent: parent, function: function, function_id: function_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_function({ parent: parent, function: function, function_id: function_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_function(::Google::Cloud::Functions::V2::CreateFunctionRequest.new(parent: parent, function: function, function_id: function_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_function_client_stub.call_count - end - end - end - - def test_update_function - # 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. - function = {} - update_mask = {} - - update_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_update_function_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_function({ function: function, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_function function: function, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_function ::Google::Cloud::Functions::V2::UpdateFunctionRequest.new(function: function, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_function({ function: function, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_function(::Google::Cloud::Functions::V2::UpdateFunctionRequest.new(function: function, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_function_client_stub.call_count - end - end - end - - def test_delete_function - # 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_function_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_delete_function_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_function({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_function name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_function ::Google::Cloud::Functions::V2::DeleteFunctionRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_function({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_function(::Google::Cloud::Functions::V2::DeleteFunctionRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_function_client_stub.call_count - end - end - end - - def test_generate_upload_url - # Create test objects. - client_result = ::Google::Cloud::Functions::V2::GenerateUploadUrlResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - kms_key_name = "hello world" - environment = :ENVIRONMENT_UNSPECIFIED - - generate_upload_url_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_generate_upload_url_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_upload_url_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name, environment: environment }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_upload_url parent: parent, kms_key_name: kms_key_name, environment: environment do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_upload_url ::Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name, environment: environment) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name, environment: environment }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_upload_url(::Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name, environment: environment), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_upload_url_client_stub.call_count - end - end - end - - def test_generate_download_url - # Create test objects. - client_result = ::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - generate_download_url_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_generate_download_url_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, generate_download_url_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.generate_download_url({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.generate_download_url name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.generate_download_url ::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.generate_download_url({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.generate_download_url(::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, generate_download_url_client_stub.call_count - end - end - end - - def test_list_runtimes - # Create test objects. - client_result = ::Google::Cloud::Functions::V2::ListRuntimesResponse.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" - - list_runtimes_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::Functions::V2::FunctionService::Rest::ServiceStub.stub :transcode_list_runtimes_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_runtimes_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_runtimes({ parent: parent, filter: filter }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_runtimes parent: parent, filter: filter do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_runtimes ::Google::Cloud::Functions::V2::ListRuntimesRequest.new(parent: parent, filter: filter) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_runtimes({ parent: parent, filter: filter }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_runtimes(::Google::Cloud::Functions::V2::ListRuntimesRequest.new(parent: parent, filter: filter), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_runtimes_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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_test.rb b/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_test.rb deleted file mode 100644 index 35d3779d84f7..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/test/google/cloud/functions/v2/function_service_test.rb +++ /dev/null @@ -1,624 +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/functions/v2/functions_pb" -require "google/cloud/functions/v2/function_service" - -class ::Google::Cloud::Functions::V2::FunctionService::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_get_function - # Create GRPC objects. - grpc_response = ::Google::Cloud::Functions::V2::Function.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - revision = "hello world" - - get_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_function, name - assert_kind_of ::Google::Cloud::Functions::V2::GetFunctionRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["revision"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_function({ name: name, revision: revision }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_function name: name, revision: revision do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_function ::Google::Cloud::Functions::V2::GetFunctionRequest.new(name: name, revision: revision) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_function({ name: name, revision: revision }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_function(::Google::Cloud::Functions::V2::GetFunctionRequest.new(name: name, revision: revision), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_function_client_stub.call_rpc_count - end - end - - def test_list_functions - # Create GRPC objects. - grpc_response = ::Google::Cloud::Functions::V2::ListFunctionsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_functions_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_functions, name - assert_kind_of ::Google::Cloud::Functions::V2::ListFunctionsRequest, 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_functions_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_functions({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_functions parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_functions ::Google::Cloud::Functions::V2::ListFunctionsRequest.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_functions({ 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_functions(::Google::Cloud::Functions::V2::ListFunctionsRequest.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_functions_client_stub.call_rpc_count - end - end - - def test_create_function - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - function = {} - function_id = "hello world" - - create_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_function, name - assert_kind_of ::Google::Cloud::Functions::V2::CreateFunctionRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Functions::V2::Function), request["function"] - assert_equal "hello world", request["function_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_function({ parent: parent, function: function, function_id: function_id }) do |response, 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_function parent: parent, function: function, function_id: function_id do |response, 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_function ::Google::Cloud::Functions::V2::CreateFunctionRequest.new(parent: parent, function: function, function_id: function_id) do |response, operation| - assert_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_function({ parent: parent, function: function, function_id: function_id }, grpc_options) do |response, operation| - assert_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_function(::Google::Cloud::Functions::V2::CreateFunctionRequest.new(parent: parent, function: function, function_id: function_id), grpc_options) do |response, operation| - assert_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_function_client_stub.call_rpc_count - end - end - - def test_update_function - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - function = {} - update_mask = {} - - update_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_function, name - assert_kind_of ::Google::Cloud::Functions::V2::UpdateFunctionRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::Functions::V2::Function), request["function"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_function({ function: function, 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_function function: function, 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_function ::Google::Cloud::Functions::V2::UpdateFunctionRequest.new(function: function, 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_function({ function: function, 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_function(::Google::Cloud::Functions::V2::UpdateFunctionRequest.new(function: function, 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_function_client_stub.call_rpc_count - end - end - - def test_delete_function - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_function_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_function, name - assert_kind_of ::Google::Cloud::Functions::V2::DeleteFunctionRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_function_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_function({ 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_function 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_function ::Google::Cloud::Functions::V2::DeleteFunctionRequest.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_function({ 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_function(::Google::Cloud::Functions::V2::DeleteFunctionRequest.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_function_client_stub.call_rpc_count - end - end - - def test_generate_upload_url - # Create GRPC objects. - grpc_response = ::Google::Cloud::Functions::V2::GenerateUploadUrlResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - kms_key_name = "hello world" - environment = :ENVIRONMENT_UNSPECIFIED - - generate_upload_url_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_upload_url, name - assert_kind_of ::Google::Cloud::Functions::V2::GenerateUploadUrlRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["kms_key_name"] - assert_equal :ENVIRONMENT_UNSPECIFIED, request["environment"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_upload_url_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name, environment: environment }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_upload_url parent: parent, kms_key_name: kms_key_name, environment: environment do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_upload_url ::Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name, environment: environment) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_upload_url({ parent: parent, kms_key_name: kms_key_name, environment: environment }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.generate_upload_url(::Google::Cloud::Functions::V2::GenerateUploadUrlRequest.new(parent: parent, kms_key_name: kms_key_name, environment: environment), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, generate_upload_url_client_stub.call_rpc_count - end - end - - def test_generate_download_url - # Create GRPC objects. - grpc_response = ::Google::Cloud::Functions::V2::GenerateDownloadUrlResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_download_url_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :generate_download_url, name - assert_kind_of ::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, generate_download_url_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.generate_download_url({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.generate_download_url name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.generate_download_url ::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.generate_download_url({ 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_download_url(::Google::Cloud::Functions::V2::GenerateDownloadUrlRequest.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_download_url_client_stub.call_rpc_count - end - end - - def test_list_runtimes - # Create GRPC objects. - grpc_response = ::Google::Cloud::Functions::V2::ListRuntimesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - - list_runtimes_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_runtimes, name - assert_kind_of ::Google::Cloud::Functions::V2::ListRuntimesRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["filter"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_runtimes_client_stub do - # Create client - client = ::Google::Cloud::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_runtimes({ parent: parent, filter: filter }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.list_runtimes parent: parent, filter: filter do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.list_runtimes ::Google::Cloud::Functions::V2::ListRuntimesRequest.new(parent: parent, filter: filter) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.list_runtimes({ parent: parent, filter: filter }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.list_runtimes(::Google::Cloud::Functions::V2::ListRuntimesRequest.new(parent: parent, filter: filter), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, list_runtimes_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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::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::Functions::V2::FunctionService::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::Functions::V2::FunctionService::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::Functions::V2::FunctionService::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::Functions::V2::FunctionService::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-functions-v2/test/helper.rb b/owl-bot-staging/google-cloud-functions-v2/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-functions-v2/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-functions/.gitignore b/owl-bot-staging/google-cloud-functions/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-functions/.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-functions/.repo-metadata.json b/owl-bot-staging/google-cloud-functions/.repo-metadata.json deleted file mode 100644 index f7844168eea8..000000000000 --- a/owl-bot-staging/google-cloud-functions/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "cloudfunctions.googleapis.com", - "api_shortname": "cloudfunctions", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-functions/latest", - "distribution_name": "google-cloud-functions", - "is_cloud": true, - "language": "ruby", - "name": "cloudfunctions", - "name_pretty": "Cloud Functions API", - "product_documentation": "https://cloud.google.com/functions", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "The Cloud Functions API manages lightweight user-provided functions executed in response to events.", - "ruby-cloud-env-prefix": "FUNCTIONS", - "ruby-cloud-product-url": "https://cloud.google.com/functions", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-functions/.rubocop.yml b/owl-bot-staging/google-cloud-functions/.rubocop.yml deleted file mode 100644 index 55e51b65f5ec..000000000000 --- a/owl-bot-staging/google-cloud-functions/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-functions.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-functions.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-functions/.toys.rb b/owl-bot-staging/google-cloud-functions/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-functions/.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-functions/.yardopts b/owl-bot-staging/google-cloud-functions/.yardopts deleted file mode 100644 index d0ffab7c0e49..000000000000 --- a/owl-bot-staging/google-cloud-functions/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Cloud Functions API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-functions/AUTHENTICATION.md b/owl-bot-staging/google-cloud-functions/AUTHENTICATION.md deleted file mode 100644 index d50ab8b4ab4f..000000000000 --- a/owl-bot-staging/google-cloud-functions/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-functions 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-functions 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/functions" - -client = Google::Cloud::Functions.function_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/functions" - -Google::Cloud::Functions.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::Functions.function_service -``` - -### 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-functions -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/functions" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::Functions.function_service -``` - -### 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-functions/CHANGELOG.md b/owl-bot-staging/google-cloud-functions/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-functions/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-functions/Gemfile b/owl-bot-staging/google-cloud-functions/Gemfile deleted file mode 100644 index 1ded85dfcf9b..000000000000 --- a/owl-bot-staging/google-cloud-functions/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-functions-v2"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-functions.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-functions/LICENSE.md b/owl-bot-staging/google-cloud-functions/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-functions/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-functions/README.md b/owl-bot-staging/google-cloud-functions/README.md deleted file mode 100644 index 2395caf08576..000000000000 --- a/owl-bot-staging/google-cloud-functions/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Cloud Functions API - -API Client library for the Cloud Functions API - -The Cloud Functions API manages lightweight user-provided functions executed in response to events. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-functions-v*`. -The gem `google-cloud-functions` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-functions/latest) -for this library, google-cloud-functions, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-functions-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v2/latest). - -See also the [Product Documentation](https://cloud.google.com/functions) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-functions -``` - -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/cloudfunctions.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/functions" - -client = Google::Cloud::Functions.function_service -request = ::Google::Cloud::Functions::V2::GetFunctionRequest.new # (request fields as keyword arguments...) -response = client.get_function request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-functions-v2](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v2/latest). - -## 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-functions`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-functions-v2`. -_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-functions`. -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-functions-v2`. - -### 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-functions/Rakefile b/owl-bot-staging/google-cloud-functions/Rakefile deleted file mode 100644 index c25ffc04b080..000000000000 --- a/owl-bot-staging/google-cloud-functions/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 = true -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-functions acceptance tests." -task :acceptance, :project, :keyfile do |t, args| - project = args[:project] - project ||= - ENV["FUNCTIONS_TEST_PROJECT"] || - ENV["GCLOUD_TEST_PROJECT"] - keyfile = args[:keyfile] - keyfile ||= - ENV["FUNCTIONS_TEST_KEYFILE"] || - ENV["GCLOUD_TEST_KEYFILE"] - if keyfile - keyfile = File.read keyfile - else - keyfile ||= - ENV["FUNCTIONS_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 FUNCTIONS_TEST_PROJECT=test123 FUNCTIONS_TEST_KEYFILE=/path/to/keyfile.json rake acceptance" - end - require "google/cloud/functions/v2/function_service/credentials" - ::Google::Cloud::Functions::V2::FunctionService::Credentials.env_vars.each do |path| - ENV[path] = nil - end - ENV["FUNCTIONS_PROJECT"] = project - ENV["FUNCTIONS_TEST_PROJECT"] = project - ENV["FUNCTIONS_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-functions 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-functions 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-functions 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-functions gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-functions" - header "google-cloud-functions rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-functions yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-functions 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-functions 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-functions 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-functions/google-cloud-functions.gemspec b/owl-bot-staging/google-cloud-functions/google-cloud-functions.gemspec deleted file mode 100644 index afc01799cd52..000000000000 --- a/owl-bot-staging/google-cloud-functions/google-cloud-functions.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/functions/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-functions" - gem.version = Google::Cloud::Functions::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "The Cloud Functions API manages lightweight user-provided functions executed in response to events." - gem.summary = "API Client library for the Cloud Functions API" - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-functions-v2", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-functions/lib/google-cloud-functions.rb b/owl-bot-staging/google-cloud-functions/lib/google-cloud-functions.rb deleted file mode 100644 index 776197e8d3f4..000000000000 --- a/owl-bot-staging/google-cloud-functions/lib/google-cloud-functions.rb +++ /dev/null @@ -1,19 +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/functions" unless defined? Google::Cloud::Functions::VERSION diff --git a/owl-bot-staging/google-cloud-functions/lib/google/cloud/functions.rb b/owl-bot-staging/google-cloud-functions/lib/google/cloud/functions.rb deleted file mode 100644 index c0c0823a130d..000000000000 --- a/owl-bot-staging/google-cloud-functions/lib/google/cloud/functions.rb +++ /dev/null @@ -1,161 +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 this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/functions/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :functions do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module Functions - ## - # Create a new client object for FunctionService. - # - # By default, this returns an instance of - # [Google::Cloud::Functions::V2::FunctionService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-functions-v2/latest/Google-Cloud-Functions-V2-FunctionService-Client) - # for a gRPC client for version V2 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the FunctionService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the FunctionService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::Functions.function_service_available?}. - # - # ## About FunctionService - # - # Google Cloud Functions is used to deploy functions that are executed by - # Google in response to various events. Data connected with that event is - # passed to a function as the input data. - # - # A **function** is a resource which describes a function that should be - # executed and how it is triggered. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.function_service version: :v2, transport: :grpc, &block - require "google/cloud/functions/#{version.to_s.downcase}" - - package_name = Google::Cloud::Functions - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::Functions.const_get(package_name).const_get(:FunctionService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the FunctionService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::Functions.function_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the FunctionService service, - # or if the versioned client gem needs an update to support the FunctionService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v2`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.function_service_available? version: :v2, transport: :grpc - require "google/cloud/functions/#{version.to_s.downcase}" - package_name = Google::Cloud::Functions - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::Functions.const_get package_name - return false unless service_module.const_defined? :FunctionService - service_module = service_module.const_get :FunctionService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-functions library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # 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 [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.functions if block_given? - - ::Google::Cloud.configure.functions - end - end - end -end - -helper_path = ::File.join __dir__, "functions", "helpers.rb" -require "google/cloud/functions/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-functions/lib/google/cloud/functions/version.rb b/owl-bot-staging/google-cloud-functions/lib/google/cloud/functions/version.rb deleted file mode 100644 index 79200a8142c7..000000000000 --- a/owl-bot-staging/google-cloud-functions/lib/google/cloud/functions/version.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! - - -module Google - module Cloud - module Functions - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-functions/test/google/cloud/functions/client_test.rb b/owl-bot-staging/google-cloud-functions/test/google/cloud/functions/client_test.rb deleted file mode 100644 index ba0bb7a83579..000000000000 --- a/owl-bot-staging/google-cloud-functions/test/google/cloud/functions/client_test.rb +++ /dev/null @@ -1,64 +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 "google/cloud/functions" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::Functions::ClientConstructionMinitest < 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_function_service_grpc - skip unless Google::Cloud::Functions.function_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::Functions.function_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::Functions::V2::FunctionService::Client, client - end - end - - def test_function_service_rest - skip unless Google::Cloud::Functions.function_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::Functions.function_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::Functions::V2::FunctionService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-functions/test/google/cloud/functions/version_test.rb b/owl-bot-staging/google-cloud-functions/test/google/cloud/functions/version_test.rb deleted file mode 100644 index 22fb0bae6a98..000000000000 --- a/owl-bot-staging/google-cloud-functions/test/google/cloud/functions/version_test.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 "helper" -require "google/cloud/functions/version" - -class Google::Cloud::Functions::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::Functions::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-functions/test/helper.rb b/owl-bot-staging/google-cloud-functions/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-functions/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.gitignore b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.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-gdc_hardware_management-v1alpha/.repo-metadata.json b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.repo-metadata.json deleted file mode 100644 index d9135f143ae9..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "gdchardwaremanagement.googleapis.com", - "api_shortname": "gdchardwaremanagement", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management-v1alpha/latest", - "distribution_name": "google-cloud-gdc_hardware_management-v1alpha", - "is_cloud": true, - "language": "ruby", - "name": "gdchardwaremanagement", - "name_pretty": "GDC Hardware Management V1ALPHA API", - "product_documentation": "https://cloud.google.com/distributed-cloud/edge/latest/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-gdc_hardware_management-v1alpha is the official client library for the GDC Hardware Management V1ALPHA API. Note that google-cloud-gdc_hardware_management-v1alpha is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gdc_hardware_management instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/distributed-cloud/edge/latest/docs", - "ruby-cloud-service-override": "GdcHardwareManagement=GDCHardwareManagement", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.rubocop.yml b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.rubocop.yml deleted file mode 100644 index 7c5bd6fa2fa0..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-gdc_hardware_management-v1alpha.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-gdc_hardware_management-v1alpha.rb" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.toys.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.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-gdc_hardware_management-v1alpha/.yardopts b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.yardopts deleted file mode 100644 index eda2091db73f..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="GDC Hardware Management V1ALPHA 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-gdc_hardware_management-v1alpha/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/AUTHENTICATION.md deleted file mode 100644 index 870900569f1a..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha 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/gdc_hardware_management/v1alpha" - -client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/gdc_hardware_management/v1alpha" - -::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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-gdc_hardware_management-v1alpha -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/gdc_hardware_management/v1alpha" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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-gdc_hardware_management-v1alpha/CHANGELOG.md b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/Gemfile b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/LICENSE.md b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/README.md b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/README.md deleted file mode 100644 index ef5d1772230c..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the GDC Hardware Management V1ALPHA API - -API Client library for the GDC Hardware Management V1ALPHA API - -google-cloud-gdc_hardware_management-v1alpha is the official client library for the GDC Hardware Management V1ALPHA API. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the GDC Hardware Management V1ALPHA API. Most users should consider using -the main client gem, -[google-cloud-gdc_hardware_management](https://rubygems.org/gems/google-cloud-gdc_hardware_management). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-gdc_hardware_management-v1alpha -``` - -## 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/gdchardwaremanagement.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/gdc_hardware_management/v1alpha" - -client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new -request = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.new # (request fields as keyword arguments...) -response = client.list_orders request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management-v1alpha/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/distributed-cloud/edge/latest/docs) -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/gdc_hardware_management/v1alpha" -require "logger" - -client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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-gdc_hardware_management`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-gdc_hardware_management-v1alpha`. -_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-gdc_hardware_management`. -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-gdc_hardware_management-v1alpha`. - -### 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-gdc_hardware_management-v1alpha/Rakefile b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/Rakefile deleted file mode 100644 index dd6a7f239d3d..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha 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/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials" - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-gdc_hardware_management-v1alpha" - header "google-cloud-gdc_hardware_management-v1alpha rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-gdc_hardware_management-v1alpha yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha 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-gdc_hardware_management-v1alpha/gapic_metadata.json b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/gapic_metadata.json deleted file mode 100644 index 87a29abf2b0e..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/gapic_metadata.json +++ /dev/null @@ -1,203 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.gdchardwaremanagement.v1alpha", - "libraryPackage": "::Google::Cloud::GDCHardwareManagement::V1alpha", - "services": { - "GDCHardwareManagement": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client", - "rpcs": { - "ListOrders": { - "methods": [ - "list_orders" - ] - }, - "GetOrder": { - "methods": [ - "get_order" - ] - }, - "CreateOrder": { - "methods": [ - "create_order" - ] - }, - "UpdateOrder": { - "methods": [ - "update_order" - ] - }, - "DeleteOrder": { - "methods": [ - "delete_order" - ] - }, - "SubmitOrder": { - "methods": [ - "submit_order" - ] - }, - "CancelOrder": { - "methods": [ - "cancel_order" - ] - }, - "ListSites": { - "methods": [ - "list_sites" - ] - }, - "GetSite": { - "methods": [ - "get_site" - ] - }, - "CreateSite": { - "methods": [ - "create_site" - ] - }, - "UpdateSite": { - "methods": [ - "update_site" - ] - }, - "DeleteSite": { - "methods": [ - "delete_site" - ] - }, - "ListHardwareGroups": { - "methods": [ - "list_hardware_groups" - ] - }, - "GetHardwareGroup": { - "methods": [ - "get_hardware_group" - ] - }, - "CreateHardwareGroup": { - "methods": [ - "create_hardware_group" - ] - }, - "UpdateHardwareGroup": { - "methods": [ - "update_hardware_group" - ] - }, - "DeleteHardwareGroup": { - "methods": [ - "delete_hardware_group" - ] - }, - "ListHardware": { - "methods": [ - "list_hardware" - ] - }, - "GetHardware": { - "methods": [ - "get_hardware" - ] - }, - "CreateHardware": { - "methods": [ - "create_hardware" - ] - }, - "UpdateHardware": { - "methods": [ - "update_hardware" - ] - }, - "DeleteHardware": { - "methods": [ - "delete_hardware" - ] - }, - "ListComments": { - "methods": [ - "list_comments" - ] - }, - "GetComment": { - "methods": [ - "get_comment" - ] - }, - "CreateComment": { - "methods": [ - "create_comment" - ] - }, - "RecordActionOnComment": { - "methods": [ - "record_action_on_comment" - ] - }, - "ListChangeLogEntries": { - "methods": [ - "list_change_log_entries" - ] - }, - "GetChangeLogEntry": { - "methods": [ - "get_change_log_entry" - ] - }, - "ListSkus": { - "methods": [ - "list_skus" - ] - }, - "GetSku": { - "methods": [ - "get_sku" - ] - }, - "ListZones": { - "methods": [ - "list_zones" - ] - }, - "GetZone": { - "methods": [ - "get_zone" - ] - }, - "CreateZone": { - "methods": [ - "create_zone" - ] - }, - "UpdateZone": { - "methods": [ - "update_zone" - ] - }, - "DeleteZone": { - "methods": [ - "delete_zone" - ] - }, - "SignalZoneState": { - "methods": [ - "signal_zone_state" - ] - }, - "RequestOrderDateChange": { - "methods": [ - "request_order_date_change" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/google-cloud-gdc_hardware_management-v1alpha.gemspec b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/google-cloud-gdc_hardware_management-v1alpha.gemspec deleted file mode 100644 index fa8f96ea06dc..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/google-cloud-gdc_hardware_management-v1alpha.gemspec +++ /dev/null @@ -1,29 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/gdc_hardware_management/v1alpha/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-gdc_hardware_management-v1alpha" - gem.version = Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-gdc_hardware_management-v1alpha is the official client library for the GDC Hardware Management V1ALPHA API. Note that google-cloud-gdc_hardware_management-v1alpha is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gdc_hardware_management instead. See the readme for more details." - gem.summary = "API Client library for the GDC Hardware Management V1ALPHA API" - 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.1" - - gem.add_dependency "gapic-common", "~> 1.2" - gem.add_dependency "google-cloud-errors", "~> 1.0" - gem.add_dependency "google-cloud-location", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google-cloud-gdc_hardware_management-v1alpha.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google-cloud-gdc_hardware_management-v1alpha.rb deleted file mode 100644 index d40020ca9852..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google-cloud-gdc_hardware_management-v1alpha.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/gdc_hardware_management/v1alpha" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha.rb deleted file mode 100644 index 6db51170738a..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha.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/gdc_hardware_management/v1alpha/gdc_hardware_management" -require "google/cloud/gdc_hardware_management/v1alpha/version" - -module Google - module Cloud - module GDCHardwareManagement - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/gdc_hardware_management/v1alpha" - # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/gdc_hardware_management/v1alpha" - # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - module V1alpha - end - end - end -end - -helper_path = ::File.join __dir__, "v1alpha", "_helpers.rb" -require "google/cloud/gdc_hardware_management/v1alpha/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/bindings_override.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/bindings_override.rb deleted file mode 100644 index d13989b04895..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/bindings_override.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! - -require "gapic/rest" - -module Google - module Cloud - module GDCHardwareManagement - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/gdc_hardware_management/v1alpha/rest" - # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - module V1alpha - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "GDCHardwareManagement"] - 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: "/v1alpha/{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: "/v1alpha/{name}/locations", - matches: [ - ["name", %r{^projects/[^/]+/?$}, false] - ], - body: nil - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management.rb deleted file mode 100644 index 954c647498da..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management.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/gdc_hardware_management/v1alpha/version" - -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials" -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/paths" -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/operations" -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client" -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest" - -module Google - module Cloud - module GDCHardwareManagement - module V1alpha - ## - # The GDC Hardware Management service. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management" - # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest" - # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - module GDCHardwareManagement - end - end - end - end -end - -helper_path = ::File.join __dir__, "gdc_hardware_management", "helpers.rb" -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb deleted file mode 100644 index aa86199e8d7b..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/client.rb +++ /dev/null @@ -1,4499 +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/gdchardwaremanagement/v1alpha/service_pb" -require "google/cloud/location" - -module Google - module Cloud - module GDCHardwareManagement - module V1alpha - module GDCHardwareManagement - ## - # Client for the GDCHardwareManagement service. - # - # The GDC Hardware Management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "gdchardwaremanagement.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :gdc_hardware_management_stub - - ## - # Configure the GDCHardwareManagement Client class. - # - # See {::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all GDCHardwareManagement clients - # ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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", "GDCHardwareManagement", "V1alpha"] - 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.list_orders.timeout = 60.0 - default_config.rpcs.list_orders.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_order.timeout = 60.0 - default_config.rpcs.get_order.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_order.timeout = 60.0 - - default_config.rpcs.update_order.timeout = 60.0 - default_config.rpcs.update_order.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_order.timeout = 60.0 - default_config.rpcs.delete_order.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.submit_order.timeout = 60.0 - default_config.rpcs.submit_order.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.cancel_order.timeout = 60.0 - default_config.rpcs.cancel_order.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_sites.timeout = 60.0 - default_config.rpcs.list_sites.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_site.timeout = 60.0 - default_config.rpcs.get_site.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_site.timeout = 60.0 - - default_config.rpcs.update_site.timeout = 60.0 - default_config.rpcs.update_site.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_site.timeout = 60.0 - default_config.rpcs.delete_site.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_hardware_groups.timeout = 60.0 - default_config.rpcs.list_hardware_groups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_hardware_group.timeout = 60.0 - default_config.rpcs.get_hardware_group.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_hardware_group.timeout = 60.0 - - default_config.rpcs.update_hardware_group.timeout = 60.0 - default_config.rpcs.update_hardware_group.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_hardware_group.timeout = 60.0 - default_config.rpcs.delete_hardware_group.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_hardware.timeout = 60.0 - default_config.rpcs.list_hardware.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_hardware.timeout = 60.0 - default_config.rpcs.get_hardware.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_hardware.timeout = 60.0 - - default_config.rpcs.update_hardware.timeout = 60.0 - default_config.rpcs.update_hardware.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_hardware.timeout = 60.0 - default_config.rpcs.delete_hardware.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_comments.timeout = 60.0 - default_config.rpcs.list_comments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_comment.timeout = 60.0 - default_config.rpcs.get_comment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_comment.timeout = 60.0 - - default_config.rpcs.list_change_log_entries.timeout = 60.0 - default_config.rpcs.list_change_log_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_change_log_entry.timeout = 60.0 - default_config.rpcs.get_change_log_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_skus.timeout = 60.0 - default_config.rpcs.list_skus.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_sku.timeout = 60.0 - default_config.rpcs.get_sku.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - 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.create_zone.timeout = 60.0 - - default_config.rpcs.update_zone.timeout = 60.0 - default_config.rpcs.update_zone.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_zone.timeout = 60.0 - default_config.rpcs.delete_zone.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 GDCHardwareManagement 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 - @gdc_hardware_management_stub.universe_domain - end - - ## - # Create a new GDCHardwareManagement client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the GDCHardwareManagement 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/gdchardwaremanagement/v1alpha/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 - - @gdc_hardware_management_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 - ) - - @gdc_hardware_management_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 = @gdc_hardware_management_stub.endpoint - config.universe_domain = @gdc_hardware_management_stub.universe_domain - config.logger = @gdc_hardware_management_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @gdc_hardware_management_stub.logger - end - - # Service calls - - ## - # Lists orders in a given project and location. - # - # @overload list_orders(request, options = nil) - # Pass arguments to `list_orders` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_orders(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_orders` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to list orders in. - # Format: `projects/{project}/locations/{location}` - # - # To list orders across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.new - # - # # Call the list_orders method. - # result = client.list_orders request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Order. - # p item - # end - # - def list_orders request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest - - # Converts hash and nil to 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_orders.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_orders.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_orders.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :list_orders, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_orders, 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 details of an order. - # - # @overload get_order(request, options = nil) - # Pass arguments to `get_order` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_order(name: nil) - # Pass arguments to `get_order` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new - # - # # Call the get_order method. - # result = client.get_order request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Order. - # p result - # - def get_order request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest - - # Converts hash and nil to 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_order.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_order.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_order.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :get_order, 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 new order in a given project and location. - # - # @overload create_order(request, options = nil) - # Pass arguments to `create_order` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_order(parent: nil, order_id: nil, order: nil, request_id: nil) - # Pass arguments to `create_order` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to create the order in. - # Format: `projects/{project}/locations/{location}` - # @param order_id [::String] - # Optional. ID used to uniquely identify the Order within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The order.name field in the request will be ignored. - # @param order [::Google::Cloud::GDCHardwareManagement::V1alpha::Order, ::Hash] - # Required. The order to create. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new - # - # # Call the create_order method. - # result = client.create_order request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_order request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest - - # Converts hash and nil to 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_order.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_order.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_order.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :create_order, 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 the parameters of an order. - # - # @overload update_order(request, options = nil) - # Pass arguments to `update_order` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_order(update_mask: nil, order: nil, request_id: nil) - # Pass arguments to `update_order` via keyword arguments. Note that at - # least one keyword argument is 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. A mask to specify the fields in the Order to overwrite with this - # update. The fields specified in the update_mask are relative to the order, - # not the full request. A field will be overwritten if it is in the mask. If - # you don't provide a mask then all fields will be overwritten. - # @param order [::Google::Cloud::GDCHardwareManagement::V1alpha::Order, ::Hash] - # Required. The order to update. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new - # - # # Call the update_order method. - # result = client.update_order request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_order request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest - - # Converts hash and nil to 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_order.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.order&.name - header_params["order.name"] = request.order.name - end - - request_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_order.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_order.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :update_order, 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 order. - # - # @overload delete_order(request, options = nil) - # Pass arguments to `delete_order` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_order(name: nil, request_id: nil, force: nil) - # Pass arguments to `delete_order` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 order. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @param force [::Boolean] - # Optional. An option to delete any nested resources in the Order, such as a - # HardwareGroup. If true, any nested resources for this Order will also be - # deleted. Otherwise, the request will only succeed if the Order has no - # nested 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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new - # - # # Call the delete_order method. - # result = client.delete_order request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_order request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest - - # Converts hash and nil to 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_order.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_order.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_order.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :delete_order, 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 - - ## - # Submits an order. - # - # @overload submit_order(request, options = nil) - # Pass arguments to `submit_order` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload submit_order(name: nil, request_id: nil, type: nil) - # Pass arguments to `submit_order` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 order. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @param type [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest::Type] - # Optional. Type of this request. If unset, the request type is assumed to be - # `INFO_PENDING`. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new - # - # # Call the submit_order method. - # result = client.submit_order request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def submit_order request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.submit_order.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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.submit_order.timeout, - metadata: metadata, - retry_policy: @config.rpcs.submit_order.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :submit_order, 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 - - ## - # Cancels an order. - # - # @overload cancel_order(request, options = nil) - # Pass arguments to `cancel_order` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_order(name: nil, request_id: nil) - # Pass arguments to `cancel_order` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 order. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new - # - # # Call the cancel_order method. - # result = client.cancel_order request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def cancel_order request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest - - # Converts hash and nil to 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_order.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_order.timeout, - metadata: metadata, - retry_policy: @config.rpcs.cancel_order.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :cancel_order, 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 sites in a given project and location. - # - # @overload list_sites(request, options = nil) - # Pass arguments to `list_sites` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_sites(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_sites` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to list sites in. - # Format: `projects/{project}/locations/{location}` - # - # To list sites across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.new - # - # # Call the list_sites method. - # result = client.list_sites request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Site. - # p item - # end - # - def list_sites request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest - - # Converts hash and nil to 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_sites.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_sites.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_sites.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :list_sites, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_sites, 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 details of a site. - # - # @overload get_site(request, options = nil) - # Pass arguments to `get_site` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_site(name: nil) - # Pass arguments to `get_site` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 site. - # Format: `projects/{project}/locations/{location}/sites/{site}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new - # - # # Call the get_site method. - # result = client.get_site request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Site. - # p result - # - def get_site request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest - - # Converts hash and nil to 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_site.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_site.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_site.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :get_site, 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 new site in a given project and location. - # - # @overload create_site(request, options = nil) - # Pass arguments to `create_site` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_site(parent: nil, site_id: nil, site: nil, request_id: nil) - # Pass arguments to `create_site` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to create the site in. - # Format: `projects/{project}/locations/{location}` - # @param site_id [::String] - # Optional. ID used to uniquely identify the Site within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The site.name field in the request will be ignored. - # @param site [::Google::Cloud::GDCHardwareManagement::V1alpha::Site, ::Hash] - # Required. The site to create. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new - # - # # Call the create_site method. - # result = client.create_site request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_site request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest - - # Converts hash and nil to 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_site.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_site.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_site.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :create_site, 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 the parameters of a site. - # - # @overload update_site(request, options = nil) - # Pass arguments to `update_site` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_site(update_mask: nil, site: nil, request_id: nil) - # Pass arguments to `update_site` via keyword arguments. Note that at - # least one keyword argument is 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. A mask to specify the fields in the Site to overwrite with this - # update. The fields specified in the update_mask are relative to the site, - # not the full request. A field will be overwritten if it is in the mask. If - # you don't provide a mask then all fields will be overwritten. - # @param site [::Google::Cloud::GDCHardwareManagement::V1alpha::Site, ::Hash] - # Required. The site to update. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new - # - # # Call the update_site method. - # result = client.update_site request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_site request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest - - # Converts hash and nil to 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_site.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.site&.name - header_params["site.name"] = request.site.name - end - - request_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_site.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_site.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :update_site, 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 site. - # - # @overload delete_site(request, options = nil) - # Pass arguments to `delete_site` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_site(name: nil, request_id: nil) - # Pass arguments to `delete_site` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 site. - # Format: `projects/{project}/locations/{location}/sites/{site}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new - # - # # Call the delete_site method. - # result = client.delete_site request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_site request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest - - # Converts hash and nil to 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_site.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_site.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_site.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :delete_site, 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 hardware groups in a given order. - # - # @overload list_hardware_groups(request, options = nil) - # Pass arguments to `list_hardware_groups` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_hardware_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_hardware_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 order to list hardware groups in. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.new - # - # # Call the list_hardware_groups method. - # result = client.list_hardware_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::GDCHardwareManagement::V1alpha::HardwareGroup. - # p item - # end - # - def list_hardware_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest - - # Converts hash and nil to 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_hardware_groups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_hardware_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :list_hardware_groups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware_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 details of a hardware group. - # - # @overload get_hardware_group(request, options = nil) - # Pass arguments to `get_hardware_group` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_hardware_group(name: nil) - # Pass arguments to `get_hardware_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 name of the hardware group. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new - # - # # Call the get_hardware_group method. - # result = client.get_hardware_group request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup. - # p result - # - def get_hardware_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest - - # Converts hash and nil to 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_hardware_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_hardware_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :get_hardware_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 a new hardware group in a given order. - # - # @overload create_hardware_group(request, options = nil) - # Pass arguments to `create_hardware_group` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_hardware_group(parent: nil, hardware_group_id: nil, hardware_group: nil, request_id: nil) - # Pass arguments to `create_hardware_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 order to create the hardware group in. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param hardware_group_id [::String] - # Optional. ID used to uniquely identify the HardwareGroup within its parent - # scope. This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The hardware_group.name field in the request will be ignored. - # @param hardware_group [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup, ::Hash] - # Required. The hardware group to create. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new - # - # # Call the create_hardware_group method. - # result = client.create_hardware_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_hardware_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest - - # Converts hash and nil to 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_hardware_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_hardware_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :create_hardware_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 the parameters of a hardware group. - # - # @overload update_hardware_group(request, options = nil) - # Pass arguments to `update_hardware_group` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_hardware_group(update_mask: nil, hardware_group: nil, request_id: nil) - # Pass arguments to `update_hardware_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A mask to specify the fields in the HardwareGroup to overwrite - # with this update. The fields specified in the update_mask are relative to - # the hardware group, not the full request. A field will be overwritten if it - # is in the mask. If you don't provide a mask then all fields will be - # overwritten. - # @param hardware_group [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup, ::Hash] - # Required. The hardware group to update. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new - # - # # Call the update_hardware_group method. - # result = client.update_hardware_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_hardware_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest - - # Converts hash and nil to 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.hardware_group&.name - header_params["hardware_group.name"] = request.hardware_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_hardware_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_hardware_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :update_hardware_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 a hardware group. - # - # @overload delete_hardware_group(request, options = nil) - # Pass arguments to `delete_hardware_group` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_hardware_group(name: nil, request_id: nil) - # Pass arguments to `delete_hardware_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 name of the hardware group. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new - # - # # Call the delete_hardware_group method. - # result = client.delete_hardware_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_hardware_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest - - # Converts hash and nil to 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_hardware_group.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_hardware_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :delete_hardware_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 hardware in a given project and location. - # - # @overload list_hardware(request, options = nil) - # Pass arguments to `list_hardware` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_hardware(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_hardware` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to list hardware in. - # Format: `projects/{project}/locations/{location}` - # - # To list hardware across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.new - # - # # Call the list_hardware method. - # result = client.list_hardware request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware. - # p item - # end - # - def list_hardware request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest - - # Converts hash and nil to 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_hardware.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_hardware.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_hardware.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :list_hardware, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware, 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 hardware details. - # - # @overload get_hardware(request, options = nil) - # Pass arguments to `get_hardware` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_hardware(name: nil) - # Pass arguments to `get_hardware` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 hardware. - # Format: `projects/{project}/locations/{location}/hardware/{hardware}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new - # - # # Call the get_hardware method. - # result = client.get_hardware request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Hardware. - # p result - # - def get_hardware request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest - - # Converts hash and nil to 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_hardware.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_hardware.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_hardware.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :get_hardware, 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 new hardware in a given project and location. - # - # @overload create_hardware(request, options = nil) - # Pass arguments to `create_hardware` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_hardware(parent: nil, hardware_id: nil, hardware: nil) - # Pass arguments to `create_hardware` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to create hardware in. - # Format: `projects/{project}/locations/{location}` - # @param hardware_id [::String] - # Optional. ID used to uniquely identify the Hardware within its parent - # scope. This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The hardware.name field in the request will be ignored. - # @param hardware [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware, ::Hash] - # Required. The resource 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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new - # - # # Call the create_hardware method. - # result = client.create_hardware request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_hardware request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest - - # Converts hash and nil to 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_hardware.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_hardware.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_hardware.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :create_hardware, 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 hardware parameters. - # - # @overload update_hardware(request, options = nil) - # Pass arguments to `update_hardware` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_hardware(update_mask: nil, hardware: nil, request_id: nil) - # Pass arguments to `update_hardware` via keyword arguments. Note that at - # least one keyword argument is 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. A mask to specify the fields in the Hardware to overwrite with - # this update. The fields specified in the update_mask are relative to the - # hardware, not the full request. A field will be overwritten if it is in the - # mask. If you don't provide a mask then all fields will be overwritten. - # @param hardware [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware, ::Hash] - # Required. The hardware to update. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new - # - # # Call the update_hardware method. - # result = client.update_hardware request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_hardware request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest - - # Converts hash and nil to 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_hardware.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.hardware&.name - header_params["hardware.name"] = request.hardware.name - end - - request_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_hardware.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_hardware.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :update_hardware, 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 hardware. - # - # @overload delete_hardware(request, options = nil) - # Pass arguments to `delete_hardware` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_hardware(name: nil, request_id: nil) - # Pass arguments to `delete_hardware` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 hardware. - # Format: `projects/{project}/locations/{location}/hardware/{hardware}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new - # - # # Call the delete_hardware method. - # result = client.delete_hardware request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_hardware request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest - - # Converts hash and nil to 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_hardware.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_hardware.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_hardware.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :delete_hardware, 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 the comments on an order. - # - # @overload list_comments(request, options = nil) - # Pass arguments to `list_comments` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_comments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_comments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The order to list comments on. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.new - # - # # Call the list_comments method. - # result = client.list_comments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment. - # p item - # end - # - def list_comments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest - - # Converts hash and nil to 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_comments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_comments.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_comments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :list_comments, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_comments, request, response, operation, options - yield response, operation if block_given? - throw :response, response - end - rescue ::GRPC::BadStatus => e - raise ::Google::Cloud::Error.from_error(e) - end - - ## - # Gets the content of a comment. - # - # @overload get_comment(request, options = nil) - # Pass arguments to `get_comment` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_comment(name: nil) - # Pass arguments to `get_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 comment. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new - # - # # Call the get_comment method. - # result = client.get_comment request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment. - # p result - # - def get_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest - - # Converts hash and nil to 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_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_comment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :get_comment, 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 new comment on an order. - # - # @overload create_comment(request, options = nil) - # Pass arguments to `create_comment` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_comment(parent: nil, comment_id: nil, comment: nil, request_id: nil) - # Pass arguments to `create_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The order to create the comment on. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param comment_id [::String] - # Optional. ID used to uniquely identify the Comment within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The comment.name field in the request will be ignored. - # @param comment [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment, ::Hash] - # Required. The comment to create. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new - # - # # Call the create_comment method. - # result = client.create_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest - - # Converts hash and nil to 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_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_comment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :create_comment, 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 - - ## - # Record Action on a Comment. If the Action specified in the request is READ, - # the viewed time in the comment is set to the time the request was received. - # If the comment is already marked as read, subsequent calls will be ignored. - # If the Action is UNREAD, the viewed time is cleared from the comment. - # - # @overload record_action_on_comment(request, options = nil) - # Pass arguments to `record_action_on_comment` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload record_action_on_comment(name: nil, action_type: nil) - # Pass arguments to `record_action_on_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 comment. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` - # @param action_type [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest::ActionType] - # Required. The action type of the recorded action. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new - # - # # Call the record_action_on_comment method. - # result = client.record_action_on_comment request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment. - # p result - # - def record_action_on_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.record_action_on_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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.record_action_on_comment.timeout, - metadata: metadata, - retry_policy: @config.rpcs.record_action_on_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :record_action_on_comment, 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 the changes made to an order. - # - # @overload list_change_log_entries(request, options = nil) - # Pass arguments to `list_change_log_entries` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_change_log_entries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_change_log_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 order to list change log entries for. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.new - # - # # Call the list_change_log_entries method. - # result = client.list_change_log_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::GDCHardwareManagement::V1alpha::ChangeLogEntry. - # p item - # end - # - def list_change_log_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest - - # Converts hash and nil to 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_change_log_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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_change_log_entries.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_change_log_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :list_change_log_entries, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_change_log_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 details of a change to an order. - # - # @overload get_change_log_entry(request, options = nil) - # Pass arguments to `get_change_log_entry` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_change_log_entry(name: nil) - # Pass arguments to `get_change_log_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 name of the change log entry. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new - # - # # Call the get_change_log_entry method. - # result = client.get_change_log_entry request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry. - # p result - # - def get_change_log_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest - - # Converts hash and nil to 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_change_log_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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_change_log_entry.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_change_log_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :get_change_log_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 SKUs for a given project and location. - # - # @overload list_skus(request, options = nil) - # Pass arguments to `list_skus` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_skus(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to list SKUs in. - # Format: `projects/{project}/locations/{location}` - # - # To list SKUs across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.new - # - # # Call the list_skus method. - # result = client.list_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku. - # p item - # end - # - def list_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest - - # Converts hash and nil to 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_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_skus.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :list_skus, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_stub, :list_skus, 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 details of an SKU. - # - # @overload get_sku(request, options = nil) - # Pass arguments to `get_sku` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_sku(name: nil) - # Pass arguments to `get_sku` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 SKU. - # Format: `projects/{project}/locations/{location}/skus/{sku}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new - # - # # Call the get_sku method. - # result = client.get_sku request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Sku. - # p result - # - def get_sku request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest - - # Converts hash and nil to 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_sku.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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_sku.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_sku.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :get_sku, 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 zones in a given project and location. - # - # @overload list_zones(request, options = nil) - # Pass arguments to `list_zones` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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 project and location to list zones in. - # Format: `projects/{project}/locations/{location}` - # - # To list zones across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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 - - @gdc_hardware_management_stub.call_rpc :list_zones, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @gdc_hardware_management_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 - - ## - # Gets details of a zone. - # - # @overload get_zone(request, options = nil) - # Pass arguments to `get_zone` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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 name of the zone. - # Format: `projects/{project}/locations/{location}/zones/{zone}` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest.new - # - # # Call the get_zone method. - # result = client.get_zone request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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 - - @gdc_hardware_management_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 - - ## - # Creates a new zone in a given project and location. - # - # @overload create_zone(request, options = nil) - # Pass arguments to `create_zone` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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, request_id: 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 project and location to create the zone in. - # Format: `projects/{project}/locations/{location}` - # @param zone_id [::String] - # Optional. ID used to uniquely identify the Zone within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The zone.name field in the request will be ignored. - # @param zone [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone, ::Hash] - # Required. The zone to create. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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 - - @gdc_hardware_management_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 the parameters of a zone. - # - # @overload update_zone(request, options = nil) - # Pass arguments to `update_zone` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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, request_id: 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. A mask to specify the fields in the Zone to overwrite with this - # update. The fields specified in the update_mask are relative to the zone, - # not the full request. A field will be overwritten if it is in the mask. If - # you don't provide a mask then all fields will be overwritten. - # @param zone [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone, ::Hash] - # Required. The zone to update. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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 - - @gdc_hardware_management_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. - # - # @overload delete_zone(request, options = nil) - # Pass arguments to `delete_zone` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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, request_id: 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 name of the zone. - # Format: `projects/{project}/locations/{location}/zones/{zone}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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 - - @gdc_hardware_management_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 - - ## - # Signals the state of a zone. - # - # @overload signal_zone_state(request, options = nil) - # Pass arguments to `signal_zone_state` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload signal_zone_state(name: nil, request_id: nil, state_signal: nil, provisioning_state_signal: nil, step: nil, details: nil) - # Pass arguments to `signal_zone_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 zone. - # Format: `projects/{project}/locations/{location}/zones/{zone}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @param state_signal [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest::StateSignal] - # Optional. The state signal to send for this zone. Either state_signal or - # provisioning_state_signal must be set, but not both. - # @param provisioning_state_signal [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest::ProvisioningStateSignal] - # Optional. The provisioning state signal to send for this zone. Either - # state_signal or provisioning_state_signal must be set, but not both. - # @param step [::String] - # Optional. The step being executed. Provides a finer grained status when the - # state_signal is FACTORY_TURNUP_CHECKS_STARTED or - # FACTORY_TURNUP_CHECKS_FAILED. - # @param details [::String] - # Optional. Additional details, such as an error message when state_signal is - # FACTORY_TURNUP_CHECKS_FAILED. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new - # - # # Call the signal_zone_state method. - # result = client.signal_zone_state request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def signal_zone_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.signal_zone_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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.signal_zone_state.timeout, - metadata: metadata, - retry_policy: @config.rpcs.signal_zone_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :signal_zone_state, 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 the requested date change of a single Order. - # - # @overload request_order_date_change(request, options = nil) - # Pass arguments to `request_order_date_change` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload request_order_date_change(name: nil, requested_date: nil) - # Pass arguments to `request_order_date_change` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 order to update. - # Format: projects/\\{project}/locations/\\{location}/orders/\\{order} - # @param requested_date [::Google::Type::Date, ::Hash] - # Required. The date to which the customer or Google wants to set the - # scheduled installation date. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new - # - # # Call the request_order_date_change method. - # result = client.request_order_date_change request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def request_order_date_change request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - metadata = @config.rpcs.request_order_date_change.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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.request_order_date_change.timeout, - metadata: metadata, - retry_policy: @config.rpcs.request_order_date_change.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.call_rpc :request_order_date_change, 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 GDCHardwareManagement API. - # - # This class represents the configuration for GDCHardwareManagement, - # 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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_orders to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_orders.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_orders.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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 = "gdchardwaremanagement.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 GDCHardwareManagement 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_orders` - # @return [::Gapic::Config::Method] - # - attr_reader :list_orders - ## - # RPC-specific configuration for `get_order` - # @return [::Gapic::Config::Method] - # - attr_reader :get_order - ## - # RPC-specific configuration for `create_order` - # @return [::Gapic::Config::Method] - # - attr_reader :create_order - ## - # RPC-specific configuration for `update_order` - # @return [::Gapic::Config::Method] - # - attr_reader :update_order - ## - # RPC-specific configuration for `delete_order` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_order - ## - # RPC-specific configuration for `submit_order` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_order - ## - # RPC-specific configuration for `cancel_order` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_order - ## - # RPC-specific configuration for `list_sites` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sites - ## - # RPC-specific configuration for `get_site` - # @return [::Gapic::Config::Method] - # - attr_reader :get_site - ## - # RPC-specific configuration for `create_site` - # @return [::Gapic::Config::Method] - # - attr_reader :create_site - ## - # RPC-specific configuration for `update_site` - # @return [::Gapic::Config::Method] - # - attr_reader :update_site - ## - # RPC-specific configuration for `delete_site` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_site - ## - # RPC-specific configuration for `list_hardware_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_hardware_groups - ## - # RPC-specific configuration for `get_hardware_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_hardware_group - ## - # RPC-specific configuration for `create_hardware_group` - # @return [::Gapic::Config::Method] - # - attr_reader :create_hardware_group - ## - # RPC-specific configuration for `update_hardware_group` - # @return [::Gapic::Config::Method] - # - attr_reader :update_hardware_group - ## - # RPC-specific configuration for `delete_hardware_group` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_hardware_group - ## - # RPC-specific configuration for `list_hardware` - # @return [::Gapic::Config::Method] - # - attr_reader :list_hardware - ## - # RPC-specific configuration for `get_hardware` - # @return [::Gapic::Config::Method] - # - attr_reader :get_hardware - ## - # RPC-specific configuration for `create_hardware` - # @return [::Gapic::Config::Method] - # - attr_reader :create_hardware - ## - # RPC-specific configuration for `update_hardware` - # @return [::Gapic::Config::Method] - # - attr_reader :update_hardware - ## - # RPC-specific configuration for `delete_hardware` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_hardware - ## - # RPC-specific configuration for `list_comments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_comments - ## - # RPC-specific configuration for `get_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_comment - ## - # RPC-specific configuration for `create_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_comment - ## - # RPC-specific configuration for `record_action_on_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :record_action_on_comment - ## - # RPC-specific configuration for `list_change_log_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_change_log_entries - ## - # RPC-specific configuration for `get_change_log_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :get_change_log_entry - ## - # RPC-specific configuration for `list_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_skus - ## - # RPC-specific configuration for `get_sku` - # @return [::Gapic::Config::Method] - # - attr_reader :get_sku - ## - # 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 `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 `signal_zone_state` - # @return [::Gapic::Config::Method] - # - attr_reader :signal_zone_state - ## - # RPC-specific configuration for `request_order_date_change` - # @return [::Gapic::Config::Method] - # - attr_reader :request_order_date_change - - # @private - def initialize parent_rpcs = nil - list_orders_config = parent_rpcs.list_orders if parent_rpcs.respond_to? :list_orders - @list_orders = ::Gapic::Config::Method.new list_orders_config - get_order_config = parent_rpcs.get_order if parent_rpcs.respond_to? :get_order - @get_order = ::Gapic::Config::Method.new get_order_config - create_order_config = parent_rpcs.create_order if parent_rpcs.respond_to? :create_order - @create_order = ::Gapic::Config::Method.new create_order_config - update_order_config = parent_rpcs.update_order if parent_rpcs.respond_to? :update_order - @update_order = ::Gapic::Config::Method.new update_order_config - delete_order_config = parent_rpcs.delete_order if parent_rpcs.respond_to? :delete_order - @delete_order = ::Gapic::Config::Method.new delete_order_config - submit_order_config = parent_rpcs.submit_order if parent_rpcs.respond_to? :submit_order - @submit_order = ::Gapic::Config::Method.new submit_order_config - cancel_order_config = parent_rpcs.cancel_order if parent_rpcs.respond_to? :cancel_order - @cancel_order = ::Gapic::Config::Method.new cancel_order_config - list_sites_config = parent_rpcs.list_sites if parent_rpcs.respond_to? :list_sites - @list_sites = ::Gapic::Config::Method.new list_sites_config - get_site_config = parent_rpcs.get_site if parent_rpcs.respond_to? :get_site - @get_site = ::Gapic::Config::Method.new get_site_config - create_site_config = parent_rpcs.create_site if parent_rpcs.respond_to? :create_site - @create_site = ::Gapic::Config::Method.new create_site_config - update_site_config = parent_rpcs.update_site if parent_rpcs.respond_to? :update_site - @update_site = ::Gapic::Config::Method.new update_site_config - delete_site_config = parent_rpcs.delete_site if parent_rpcs.respond_to? :delete_site - @delete_site = ::Gapic::Config::Method.new delete_site_config - list_hardware_groups_config = parent_rpcs.list_hardware_groups if parent_rpcs.respond_to? :list_hardware_groups - @list_hardware_groups = ::Gapic::Config::Method.new list_hardware_groups_config - get_hardware_group_config = parent_rpcs.get_hardware_group if parent_rpcs.respond_to? :get_hardware_group - @get_hardware_group = ::Gapic::Config::Method.new get_hardware_group_config - create_hardware_group_config = parent_rpcs.create_hardware_group if parent_rpcs.respond_to? :create_hardware_group - @create_hardware_group = ::Gapic::Config::Method.new create_hardware_group_config - update_hardware_group_config = parent_rpcs.update_hardware_group if parent_rpcs.respond_to? :update_hardware_group - @update_hardware_group = ::Gapic::Config::Method.new update_hardware_group_config - delete_hardware_group_config = parent_rpcs.delete_hardware_group if parent_rpcs.respond_to? :delete_hardware_group - @delete_hardware_group = ::Gapic::Config::Method.new delete_hardware_group_config - list_hardware_config = parent_rpcs.list_hardware if parent_rpcs.respond_to? :list_hardware - @list_hardware = ::Gapic::Config::Method.new list_hardware_config - get_hardware_config = parent_rpcs.get_hardware if parent_rpcs.respond_to? :get_hardware - @get_hardware = ::Gapic::Config::Method.new get_hardware_config - create_hardware_config = parent_rpcs.create_hardware if parent_rpcs.respond_to? :create_hardware - @create_hardware = ::Gapic::Config::Method.new create_hardware_config - update_hardware_config = parent_rpcs.update_hardware if parent_rpcs.respond_to? :update_hardware - @update_hardware = ::Gapic::Config::Method.new update_hardware_config - delete_hardware_config = parent_rpcs.delete_hardware if parent_rpcs.respond_to? :delete_hardware - @delete_hardware = ::Gapic::Config::Method.new delete_hardware_config - list_comments_config = parent_rpcs.list_comments if parent_rpcs.respond_to? :list_comments - @list_comments = ::Gapic::Config::Method.new list_comments_config - get_comment_config = parent_rpcs.get_comment if parent_rpcs.respond_to? :get_comment - @get_comment = ::Gapic::Config::Method.new get_comment_config - create_comment_config = parent_rpcs.create_comment if parent_rpcs.respond_to? :create_comment - @create_comment = ::Gapic::Config::Method.new create_comment_config - record_action_on_comment_config = parent_rpcs.record_action_on_comment if parent_rpcs.respond_to? :record_action_on_comment - @record_action_on_comment = ::Gapic::Config::Method.new record_action_on_comment_config - list_change_log_entries_config = parent_rpcs.list_change_log_entries if parent_rpcs.respond_to? :list_change_log_entries - @list_change_log_entries = ::Gapic::Config::Method.new list_change_log_entries_config - get_change_log_entry_config = parent_rpcs.get_change_log_entry if parent_rpcs.respond_to? :get_change_log_entry - @get_change_log_entry = ::Gapic::Config::Method.new get_change_log_entry_config - list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus - @list_skus = ::Gapic::Config::Method.new list_skus_config - get_sku_config = parent_rpcs.get_sku if parent_rpcs.respond_to? :get_sku - @get_sku = ::Gapic::Config::Method.new get_sku_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 - 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 - signal_zone_state_config = parent_rpcs.signal_zone_state if parent_rpcs.respond_to? :signal_zone_state - @signal_zone_state = ::Gapic::Config::Method.new signal_zone_state_config - request_order_date_change_config = parent_rpcs.request_order_date_change if parent_rpcs.respond_to? :request_order_date_change - @request_order_date_change = ::Gapic::Config::Method.new request_order_date_change_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials.rb deleted file mode 100644 index f71ab8bc016f..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/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 GDCHardwareManagement - module V1alpha - module GDCHardwareManagement - # Credentials for the GDCHardwareManagement 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-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/operations.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/operations.rb deleted file mode 100644 index 284b8f8b9f8c..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/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 GDCHardwareManagement - module V1alpha - module GDCHardwareManagement - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "gdchardwaremanagement.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the GDCHardwareManagement 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 GDCHardwareManagement 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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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::GDCHardwareManagement::V1alpha::VERSION - metadata[:"x-goog-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::GDCHardwareManagement::V1alpha::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 = "gdchardwaremanagement.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-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/paths.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/paths.rb deleted file mode 100644 index 37a35977c460..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/paths.rb +++ /dev/null @@ -1,208 +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 GDCHardwareManagement - module V1alpha - module GDCHardwareManagement - # Path helper methods for the GDCHardwareManagement API. - module Paths - ## - # Create a fully-qualified ChangeLogEntry resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` - # - # @param project [String] - # @param location [String] - # @param order [String] - # @param change_log_entry [String] - # - # @return [::String] - def change_log_entry_path project:, location:, order:, change_log_entry: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "order cannot contain /" if order.to_s.include? "/" - - "projects/#{project}/locations/#{location}/orders/#{order}/changeLogEntries/#{change_log_entry}" - end - - ## - # Create a fully-qualified Comment resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` - # - # @param project [String] - # @param location [String] - # @param order [String] - # @param comment [String] - # - # @return [::String] - def comment_path project:, location:, order:, comment: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "order cannot contain /" if order.to_s.include? "/" - - "projects/#{project}/locations/#{location}/orders/#{order}/comments/#{comment}" - end - - ## - # Create a fully-qualified Hardware resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/hardware/{hardware}` - # - # @param project [String] - # @param location [String] - # @param hardware [String] - # - # @return [::String] - def hardware_path project:, location:, hardware: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/hardware/#{hardware}" - end - - ## - # Create a fully-qualified HardwareGroup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` - # - # @param project [String] - # @param location [String] - # @param order [String] - # @param hardware_group [String] - # - # @return [::String] - def hardware_group_path project:, location:, order:, hardware_group: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "order cannot contain /" if order.to_s.include? "/" - - "projects/#{project}/locations/#{location}/orders/#{order}/hardwareGroups/#{hardware_group}" - 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 Order resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/orders/{order}` - # - # @param project [String] - # @param location [String] - # @param order [String] - # - # @return [::String] - def order_path project:, location:, order: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/orders/#{order}" - end - - ## - # Create a fully-qualified Site resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/sites/{site}` - # - # @param project [String] - # @param location [String] - # @param site [String] - # - # @return [::String] - def site_path project:, location:, site: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/sites/#{site}" - end - - ## - # Create a fully-qualified Sku resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/skus/{sku}` - # - # @param project [String] - # @param location [String] - # @param sku [String] - # - # @return [::String] - def sku_path project:, location:, sku: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/skus/#{sku}" - end - - ## - # Create a fully-qualified Zone resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/zones/{zone}` - # - # @param project [String] - # @param location [String] - # @param zone [String] - # - # @return [::String] - def zone_path project:, location:, zone: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/zones/#{zone}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest.rb deleted file mode 100644 index a6427b850375..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/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/gdc_hardware_management/v1alpha/version" -require "google/cloud/gdc_hardware_management/v1alpha/bindings_override" - -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials" -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/paths" -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/operations" -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/client" - -module Google - module Cloud - module GDCHardwareManagement - module V1alpha - ## - # The GDC Hardware Management service. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest" - # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - module GDCHardwareManagement - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/client.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/client.rb deleted file mode 100644 index a682f54057ca..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/client.rb +++ /dev/null @@ -1,4205 +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/gdchardwaremanagement/v1alpha/service_pb" -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/service_stub" -require "google/cloud/location/rest" - -module Google - module Cloud - module GDCHardwareManagement - module V1alpha - module GDCHardwareManagement - module Rest - ## - # REST client for the GDCHardwareManagement service. - # - # The GDC Hardware Management service. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "gdchardwaremanagement.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :gdc_hardware_management_stub - - ## - # Configure the GDCHardwareManagement Client class. - # - # See {::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all GDCHardwareManagement clients - # ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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", "GDCHardwareManagement", "V1alpha"] - 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.list_orders.timeout = 60.0 - default_config.rpcs.list_orders.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_order.timeout = 60.0 - default_config.rpcs.get_order.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_order.timeout = 60.0 - - default_config.rpcs.update_order.timeout = 60.0 - default_config.rpcs.update_order.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_order.timeout = 60.0 - default_config.rpcs.delete_order.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.submit_order.timeout = 60.0 - default_config.rpcs.submit_order.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.cancel_order.timeout = 60.0 - default_config.rpcs.cancel_order.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_sites.timeout = 60.0 - default_config.rpcs.list_sites.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_site.timeout = 60.0 - default_config.rpcs.get_site.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_site.timeout = 60.0 - - default_config.rpcs.update_site.timeout = 60.0 - default_config.rpcs.update_site.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_site.timeout = 60.0 - default_config.rpcs.delete_site.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_hardware_groups.timeout = 60.0 - default_config.rpcs.list_hardware_groups.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_hardware_group.timeout = 60.0 - default_config.rpcs.get_hardware_group.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_hardware_group.timeout = 60.0 - - default_config.rpcs.update_hardware_group.timeout = 60.0 - default_config.rpcs.update_hardware_group.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_hardware_group.timeout = 60.0 - default_config.rpcs.delete_hardware_group.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_hardware.timeout = 60.0 - default_config.rpcs.list_hardware.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_hardware.timeout = 60.0 - default_config.rpcs.get_hardware.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_hardware.timeout = 60.0 - - default_config.rpcs.update_hardware.timeout = 60.0 - default_config.rpcs.update_hardware.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_hardware.timeout = 60.0 - default_config.rpcs.delete_hardware.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_comments.timeout = 60.0 - default_config.rpcs.list_comments.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_comment.timeout = 60.0 - default_config.rpcs.get_comment.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_comment.timeout = 60.0 - - default_config.rpcs.list_change_log_entries.timeout = 60.0 - default_config.rpcs.list_change_log_entries.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_change_log_entry.timeout = 60.0 - default_config.rpcs.get_change_log_entry.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.list_skus.timeout = 60.0 - default_config.rpcs.list_skus.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_sku.timeout = 60.0 - default_config.rpcs.get_sku.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - 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.create_zone.timeout = 60.0 - - default_config.rpcs.update_zone.timeout = 60.0 - default_config.rpcs.update_zone.retry_policy = { - initial_delay: 1.0, max_delay: 10.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.delete_zone.timeout = 60.0 - default_config.rpcs.delete_zone.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 GDCHardwareManagement 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 - @gdc_hardware_management_stub.universe_domain - end - - ## - # Create a new GDCHardwareManagement REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the GDCHardwareManagement 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 - - @gdc_hardware_management_stub = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @gdc_hardware_management_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 = @gdc_hardware_management_stub.endpoint - config.universe_domain = @gdc_hardware_management_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @gdc_hardware_management_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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 - - ## - # The logger used for request/response debug logging. - # - # @return [Logger] - # - def logger - @gdc_hardware_management_stub.logger - end - - # Service calls - - ## - # Lists orders in a given project and location. - # - # @overload list_orders(request, options = nil) - # Pass arguments to `list_orders` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_orders(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_orders` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to list orders in. - # Format: `projects/{project}/locations/{location}` - # - # To list orders across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.new - # - # # Call the list_orders method. - # result = client.list_orders request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Order. - # p item - # end - # - def list_orders request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest - - # Converts hash and nil to an 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_orders.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_orders.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_orders.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.list_orders request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_orders, "orders", 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 details of an order. - # - # @overload get_order(request, options = nil) - # Pass arguments to `get_order` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_order(name: nil) - # Pass arguments to `get_order` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the resource - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new - # - # # Call the get_order method. - # result = client.get_order request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Order. - # p result - # - def get_order request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest - - # Converts hash and nil to an 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_order.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_order.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_order.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.get_order 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 new order in a given project and location. - # - # @overload create_order(request, options = nil) - # Pass arguments to `create_order` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_order(parent: nil, order_id: nil, order: nil, request_id: nil) - # Pass arguments to `create_order` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to create the order in. - # Format: `projects/{project}/locations/{location}` - # @param order_id [::String] - # Optional. ID used to uniquely identify the Order within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The order.name field in the request will be ignored. - # @param order [::Google::Cloud::GDCHardwareManagement::V1alpha::Order, ::Hash] - # Required. The order to create. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new - # - # # Call the create_order method. - # result = client.create_order request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_order request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest - - # Converts hash and nil to an 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_order.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_order.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_order.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.create_order 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 the parameters of an order. - # - # @overload update_order(request, options = nil) - # Pass arguments to `update_order` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_order(update_mask: nil, order: nil, request_id: nil) - # Pass arguments to `update_order` via keyword arguments. Note that at - # least one keyword argument is 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. A mask to specify the fields in the Order to overwrite with this - # update. The fields specified in the update_mask are relative to the order, - # not the full request. A field will be overwritten if it is in the mask. If - # you don't provide a mask then all fields will be overwritten. - # @param order [::Google::Cloud::GDCHardwareManagement::V1alpha::Order, ::Hash] - # Required. The order to update. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new - # - # # Call the update_order method. - # result = client.update_order request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_order request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest - - # Converts hash and nil to an 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_order.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_order.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_order.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.update_order 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 order. - # - # @overload delete_order(request, options = nil) - # Pass arguments to `delete_order` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_order(name: nil, request_id: nil, force: nil) - # Pass arguments to `delete_order` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 order. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @param force [::Boolean] - # Optional. An option to delete any nested resources in the Order, such as a - # HardwareGroup. If true, any nested resources for this Order will also be - # deleted. Otherwise, the request will only succeed if the Order has no - # nested 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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new - # - # # Call the delete_order method. - # result = client.delete_order request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_order request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest - - # Converts hash and nil to an 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_order.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_order.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_order.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.delete_order 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 - - ## - # Submits an order. - # - # @overload submit_order(request, options = nil) - # Pass arguments to `submit_order` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload submit_order(name: nil, request_id: nil, type: nil) - # Pass arguments to `submit_order` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 order. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @param type [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest::Type] - # Optional. Type of this request. If unset, the request type is assumed to be - # `INFO_PENDING`. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new - # - # # Call the submit_order method. - # result = client.submit_order request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def submit_order request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.submit_order.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.submit_order.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.submit_order.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.submit_order 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 - - ## - # Cancels an order. - # - # @overload cancel_order(request, options = nil) - # Pass arguments to `cancel_order` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_order(name: nil, request_id: nil) - # Pass arguments to `cancel_order` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 order. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new - # - # # Call the cancel_order method. - # result = client.cancel_order request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def cancel_order request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest - - # Converts hash and nil to an 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_order.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_order.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.cancel_order.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.cancel_order 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 sites in a given project and location. - # - # @overload list_sites(request, options = nil) - # Pass arguments to `list_sites` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_sites(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_sites` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to list sites in. - # Format: `projects/{project}/locations/{location}` - # - # To list sites across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.new - # - # # Call the list_sites method. - # result = client.list_sites request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Site. - # p item - # end - # - def list_sites request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest - - # Converts hash and nil to an 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_sites.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_sites.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_sites.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.list_sites request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_sites, "sites", 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 details of a site. - # - # @overload get_site(request, options = nil) - # Pass arguments to `get_site` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_site(name: nil) - # Pass arguments to `get_site` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 site. - # Format: `projects/{project}/locations/{location}/sites/{site}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new - # - # # Call the get_site method. - # result = client.get_site request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Site. - # p result - # - def get_site request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest - - # Converts hash and nil to an 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_site.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_site.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_site.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.get_site 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 new site in a given project and location. - # - # @overload create_site(request, options = nil) - # Pass arguments to `create_site` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_site(parent: nil, site_id: nil, site: nil, request_id: nil) - # Pass arguments to `create_site` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to create the site in. - # Format: `projects/{project}/locations/{location}` - # @param site_id [::String] - # Optional. ID used to uniquely identify the Site within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The site.name field in the request will be ignored. - # @param site [::Google::Cloud::GDCHardwareManagement::V1alpha::Site, ::Hash] - # Required. The site to create. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new - # - # # Call the create_site method. - # result = client.create_site request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_site request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest - - # Converts hash and nil to an 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_site.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_site.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_site.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.create_site 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 the parameters of a site. - # - # @overload update_site(request, options = nil) - # Pass arguments to `update_site` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_site(update_mask: nil, site: nil, request_id: nil) - # Pass arguments to `update_site` via keyword arguments. Note that at - # least one keyword argument is 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. A mask to specify the fields in the Site to overwrite with this - # update. The fields specified in the update_mask are relative to the site, - # not the full request. A field will be overwritten if it is in the mask. If - # you don't provide a mask then all fields will be overwritten. - # @param site [::Google::Cloud::GDCHardwareManagement::V1alpha::Site, ::Hash] - # Required. The site to update. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new - # - # # Call the update_site method. - # result = client.update_site request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_site request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest - - # Converts hash and nil to an 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_site.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_site.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_site.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.update_site 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 site. - # - # @overload delete_site(request, options = nil) - # Pass arguments to `delete_site` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_site(name: nil, request_id: nil) - # Pass arguments to `delete_site` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 site. - # Format: `projects/{project}/locations/{location}/sites/{site}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new - # - # # Call the delete_site method. - # result = client.delete_site request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_site request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest - - # Converts hash and nil to an 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_site.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_site.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_site.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.delete_site 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 hardware groups in a given order. - # - # @overload list_hardware_groups(request, options = nil) - # Pass arguments to `list_hardware_groups` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_hardware_groups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_hardware_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 order to list hardware groups in. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.new - # - # # Call the list_hardware_groups method. - # result = client.list_hardware_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::GDCHardwareManagement::V1alpha::HardwareGroup. - # p item - # end - # - def list_hardware_groups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest - - # Converts hash and nil to an 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hardware_groups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_hardware_groups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.list_hardware_groups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware_groups, "hardware_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 details of a hardware group. - # - # @overload get_hardware_group(request, options = nil) - # Pass arguments to `get_hardware_group` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_hardware_group(name: nil) - # Pass arguments to `get_hardware_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 name of the hardware group. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new - # - # # Call the get_hardware_group method. - # result = client.get_hardware_group request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup. - # p result - # - def get_hardware_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest - - # Converts hash and nil to an 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hardware_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_hardware_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.get_hardware_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 a new hardware group in a given order. - # - # @overload create_hardware_group(request, options = nil) - # Pass arguments to `create_hardware_group` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_hardware_group(parent: nil, hardware_group_id: nil, hardware_group: nil, request_id: nil) - # Pass arguments to `create_hardware_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 order to create the hardware group in. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param hardware_group_id [::String] - # Optional. ID used to uniquely identify the HardwareGroup within its parent - # scope. This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The hardware_group.name field in the request will be ignored. - # @param hardware_group [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup, ::Hash] - # Required. The hardware group to create. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new - # - # # Call the create_hardware_group method. - # result = client.create_hardware_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_hardware_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest - - # Converts hash and nil to an 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hardware_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_hardware_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.create_hardware_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 the parameters of a hardware group. - # - # @overload update_hardware_group(request, options = nil) - # Pass arguments to `update_hardware_group` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_hardware_group(update_mask: nil, hardware_group: nil, request_id: nil) - # Pass arguments to `update_hardware_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 update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Required. A mask to specify the fields in the HardwareGroup to overwrite - # with this update. The fields specified in the update_mask are relative to - # the hardware group, not the full request. A field will be overwritten if it - # is in the mask. If you don't provide a mask then all fields will be - # overwritten. - # @param hardware_group [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup, ::Hash] - # Required. The hardware group to update. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new - # - # # Call the update_hardware_group method. - # result = client.update_hardware_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_hardware_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest - - # Converts hash and nil to an 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hardware_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_hardware_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.update_hardware_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 a hardware group. - # - # @overload delete_hardware_group(request, options = nil) - # Pass arguments to `delete_hardware_group` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_hardware_group(name: nil, request_id: nil) - # Pass arguments to `delete_hardware_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 name of the hardware group. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new - # - # # Call the delete_hardware_group method. - # result = client.delete_hardware_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_hardware_group request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest - - # Converts hash and nil to an 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_hardware_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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hardware_group.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_hardware_group.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.delete_hardware_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 hardware in a given project and location. - # - # @overload list_hardware(request, options = nil) - # Pass arguments to `list_hardware` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_hardware(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_hardware` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to list hardware in. - # Format: `projects/{project}/locations/{location}` - # - # To list hardware across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.new - # - # # Call the list_hardware method. - # result = client.list_hardware request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware. - # p item - # end - # - def list_hardware request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest - - # Converts hash and nil to an 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_hardware.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hardware.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_hardware.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.list_hardware request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_hardware, "hardware", 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 hardware details. - # - # @overload get_hardware(request, options = nil) - # Pass arguments to `get_hardware` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_hardware(name: nil) - # Pass arguments to `get_hardware` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 hardware. - # Format: `projects/{project}/locations/{location}/hardware/{hardware}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new - # - # # Call the get_hardware method. - # result = client.get_hardware request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Hardware. - # p result - # - def get_hardware request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest - - # Converts hash and nil to an 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_hardware.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hardware.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_hardware.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.get_hardware 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 new hardware in a given project and location. - # - # @overload create_hardware(request, options = nil) - # Pass arguments to `create_hardware` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_hardware(parent: nil, hardware_id: nil, hardware: nil) - # Pass arguments to `create_hardware` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to create hardware in. - # Format: `projects/{project}/locations/{location}` - # @param hardware_id [::String] - # Optional. ID used to uniquely identify the Hardware within its parent - # scope. This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The hardware.name field in the request will be ignored. - # @param hardware [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware, ::Hash] - # Required. The resource 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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new - # - # # Call the create_hardware method. - # result = client.create_hardware request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_hardware request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest - - # Converts hash and nil to an 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_hardware.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hardware.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_hardware.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.create_hardware 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 hardware parameters. - # - # @overload update_hardware(request, options = nil) - # Pass arguments to `update_hardware` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_hardware(update_mask: nil, hardware: nil, request_id: nil) - # Pass arguments to `update_hardware` via keyword arguments. Note that at - # least one keyword argument is 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. A mask to specify the fields in the Hardware to overwrite with - # this update. The fields specified in the update_mask are relative to the - # hardware, not the full request. A field will be overwritten if it is in the - # mask. If you don't provide a mask then all fields will be overwritten. - # @param hardware [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware, ::Hash] - # Required. The hardware to update. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new - # - # # Call the update_hardware method. - # result = client.update_hardware request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_hardware request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest - - # Converts hash and nil to an 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_hardware.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hardware.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_hardware.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.update_hardware 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 hardware. - # - # @overload delete_hardware(request, options = nil) - # Pass arguments to `delete_hardware` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_hardware(name: nil, request_id: nil) - # Pass arguments to `delete_hardware` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 hardware. - # Format: `projects/{project}/locations/{location}/hardware/{hardware}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new - # - # # Call the delete_hardware method. - # result = client.delete_hardware request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_hardware request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest - - # Converts hash and nil to an 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_hardware.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_hardware.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_hardware.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.delete_hardware 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 the comments on an order. - # - # @overload list_comments(request, options = nil) - # Pass arguments to `list_comments` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_comments(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_comments` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The order to list comments on. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.new - # - # # Call the list_comments method. - # result = client.list_comments request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment. - # p item - # end - # - def list_comments request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest - - # Converts hash and nil to an 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_comments.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_comments.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_comments.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.list_comments request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_comments, "comments", 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 content of a comment. - # - # @overload get_comment(request, options = nil) - # Pass arguments to `get_comment` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_comment(name: nil) - # Pass arguments to `get_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 comment. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new - # - # # Call the get_comment method. - # result = client.get_comment request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment. - # p result - # - def get_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest - - # Converts hash and nil to an 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_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_comment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.get_comment 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 new comment on an order. - # - # @overload create_comment(request, options = nil) - # Pass arguments to `create_comment` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_comment(parent: nil, comment_id: nil, comment: nil, request_id: nil) - # Pass arguments to `create_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The order to create the comment on. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param comment_id [::String] - # Optional. ID used to uniquely identify the Comment within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The comment.name field in the request will be ignored. - # @param comment [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment, ::Hash] - # Required. The comment to create. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new - # - # # Call the create_comment method. - # result = client.create_comment request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest - - # Converts hash and nil to an 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_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_comment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.create_comment 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 - - ## - # Record Action on a Comment. If the Action specified in the request is READ, - # the viewed time in the comment is set to the time the request was received. - # If the comment is already marked as read, subsequent calls will be ignored. - # If the Action is UNREAD, the viewed time is cleared from the comment. - # - # @overload record_action_on_comment(request, options = nil) - # Pass arguments to `record_action_on_comment` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload record_action_on_comment(name: nil, action_type: nil) - # Pass arguments to `record_action_on_comment` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 comment. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` - # @param action_type [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest::ActionType] - # Required. The action type of the recorded action. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new - # - # # Call the record_action_on_comment method. - # result = client.record_action_on_comment request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment. - # p result - # - def record_action_on_comment request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.record_action_on_comment.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.record_action_on_comment.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.record_action_on_comment.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.record_action_on_comment 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 the changes made to an order. - # - # @overload list_change_log_entries(request, options = nil) - # Pass arguments to `list_change_log_entries` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_change_log_entries(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_change_log_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 order to list change log entries for. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.new - # - # # Call the list_change_log_entries method. - # result = client.list_change_log_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::GDCHardwareManagement::V1alpha::ChangeLogEntry. - # p item - # end - # - def list_change_log_entries request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest - - # Converts hash and nil to an 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_change_log_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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_change_log_entries.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_change_log_entries.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.list_change_log_entries request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_change_log_entries, "change_log_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 details of a change to an order. - # - # @overload get_change_log_entry(request, options = nil) - # Pass arguments to `get_change_log_entry` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_change_log_entry(name: nil) - # Pass arguments to `get_change_log_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 name of the change log entry. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new - # - # # Call the get_change_log_entry method. - # result = client.get_change_log_entry request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry. - # p result - # - def get_change_log_entry request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest - - # Converts hash and nil to an 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_change_log_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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_change_log_entry.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_change_log_entry.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.get_change_log_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 SKUs for a given project and location. - # - # @overload list_skus(request, options = nil) - # Pass arguments to `list_skus` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_skus(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_skus` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The project and location to list SKUs in. - # Format: `projects/{project}/locations/{location}` - # - # To list SKUs across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.new - # - # # Call the list_skus method. - # result = client.list_skus request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku. - # p item - # end - # - def list_skus request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest - - # Converts hash and nil to an 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_skus.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_skus.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_skus.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.list_skus request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_stub, :list_skus, "skus", 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 details of an SKU. - # - # @overload get_sku(request, options = nil) - # Pass arguments to `get_sku` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_sku(name: nil) - # Pass arguments to `get_sku` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 SKU. - # Format: `projects/{project}/locations/{location}/skus/{sku}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new - # - # # Call the get_sku method. - # result = client.get_sku request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Sku. - # p result - # - def get_sku request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest - - # Converts hash and nil to an 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_sku.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_sku.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_sku.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.get_sku 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 zones in a given project and location. - # - # @overload list_zones(request, options = nil) - # Pass arguments to `list_zones` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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 project and location to list zones in. - # Format: `projects/{project}/locations/{location}` - # - # To list zones across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @param page_size [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @param page_token [::String] - # Optional. A token identifying a page of results the server should return. - # @param filter [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @param order_by [::String] - # Optional. Hint for how to order the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @gdc_hardware_management_stub.list_zones request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @gdc_hardware_management_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 - - ## - # Gets details of a zone. - # - # @overload get_zone(request, options = nil) - # Pass arguments to `get_zone` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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 name of the zone. - # Format: `projects/{project}/locations/{location}/zones/{zone}` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest.new - # - # # Call the get_zone method. - # result = client.get_zone request - # - # # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @gdc_hardware_management_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 - - ## - # Creates a new zone in a given project and location. - # - # @overload create_zone(request, options = nil) - # Pass arguments to `create_zone` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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, request_id: 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 project and location to create the zone in. - # Format: `projects/{project}/locations/{location}` - # @param zone_id [::String] - # Optional. ID used to uniquely identify the Zone within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The zone.name field in the request will be ignored. - # @param zone [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone, ::Hash] - # Required. The zone to create. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @gdc_hardware_management_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 the parameters of a zone. - # - # @overload update_zone(request, options = nil) - # Pass arguments to `update_zone` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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, request_id: 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. A mask to specify the fields in the Zone to overwrite with this - # update. The fields specified in the update_mask are relative to the zone, - # not the full request. A field will be overwritten if it is in the mask. If - # you don't provide a mask then all fields will be overwritten. - # @param zone [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone, ::Hash] - # Required. The zone to update. - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @gdc_hardware_management_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. - # - # @overload delete_zone(request, options = nil) - # Pass arguments to `delete_zone` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::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, request_id: 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 name of the zone. - # Format: `projects/{project}/locations/{location}/zones/{zone}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 - - @gdc_hardware_management_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 - - ## - # Signals the state of a zone. - # - # @overload signal_zone_state(request, options = nil) - # Pass arguments to `signal_zone_state` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload signal_zone_state(name: nil, request_id: nil, state_signal: nil, provisioning_state_signal: nil, step: nil, details: nil) - # Pass arguments to `signal_zone_state` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 zone. - # Format: `projects/{project}/locations/{location}/zones/{zone}` - # @param request_id [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @param state_signal [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest::StateSignal] - # Optional. The state signal to send for this zone. Either state_signal or - # provisioning_state_signal must be set, but not both. - # @param provisioning_state_signal [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest::ProvisioningStateSignal] - # Optional. The provisioning state signal to send for this zone. Either - # state_signal or provisioning_state_signal must be set, but not both. - # @param step [::String] - # Optional. The step being executed. Provides a finer grained status when the - # state_signal is FACTORY_TURNUP_CHECKS_STARTED or - # FACTORY_TURNUP_CHECKS_FAILED. - # @param details [::String] - # Optional. Additional details, such as an error message when state_signal is - # FACTORY_TURNUP_CHECKS_FAILED. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new - # - # # Call the signal_zone_state method. - # result = client.signal_zone_state request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def signal_zone_state request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.signal_zone_state.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.signal_zone_state.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.signal_zone_state.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.signal_zone_state 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 the requested date change of a single Order. - # - # @overload request_order_date_change(request, options = nil) - # Pass arguments to `request_order_date_change` via a request object, either of type - # {::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload request_order_date_change(name: nil, requested_date: nil) - # Pass arguments to `request_order_date_change` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 order to update. - # Format: projects/\\{project}/locations/\\{location}/orders/\\{order} - # @param requested_date [::Google::Type::Date, ::Hash] - # Required. The date to which the customer or Google wants to set the - # scheduled installation date. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gdc_hardware_management/v1alpha" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new - # - # # Call the request_order_date_change method. - # result = client.request_order_date_change request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how to wait for a response. - # result.wait_until_done! timeout: 60 - # if result.response? - # p result.response - # else - # puts "No response received." - # end - # - def request_order_date_change request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest - - # Converts hash and nil to an options object - options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h - - # Customize the options with defaults - call_metadata = @config.rpcs.request_order_date_change.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - call_metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - options.apply_defaults timeout: @config.rpcs.request_order_date_change.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.request_order_date_change.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @gdc_hardware_management_stub.request_order_date_change 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 GDCHardwareManagement REST API. - # - # This class represents the configuration for GDCHardwareManagement 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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_orders to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.list_orders.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.list_orders.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 = "gdchardwaremanagement.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 GDCHardwareManagement 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_orders` - # @return [::Gapic::Config::Method] - # - attr_reader :list_orders - ## - # RPC-specific configuration for `get_order` - # @return [::Gapic::Config::Method] - # - attr_reader :get_order - ## - # RPC-specific configuration for `create_order` - # @return [::Gapic::Config::Method] - # - attr_reader :create_order - ## - # RPC-specific configuration for `update_order` - # @return [::Gapic::Config::Method] - # - attr_reader :update_order - ## - # RPC-specific configuration for `delete_order` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_order - ## - # RPC-specific configuration for `submit_order` - # @return [::Gapic::Config::Method] - # - attr_reader :submit_order - ## - # RPC-specific configuration for `cancel_order` - # @return [::Gapic::Config::Method] - # - attr_reader :cancel_order - ## - # RPC-specific configuration for `list_sites` - # @return [::Gapic::Config::Method] - # - attr_reader :list_sites - ## - # RPC-specific configuration for `get_site` - # @return [::Gapic::Config::Method] - # - attr_reader :get_site - ## - # RPC-specific configuration for `create_site` - # @return [::Gapic::Config::Method] - # - attr_reader :create_site - ## - # RPC-specific configuration for `update_site` - # @return [::Gapic::Config::Method] - # - attr_reader :update_site - ## - # RPC-specific configuration for `delete_site` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_site - ## - # RPC-specific configuration for `list_hardware_groups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_hardware_groups - ## - # RPC-specific configuration for `get_hardware_group` - # @return [::Gapic::Config::Method] - # - attr_reader :get_hardware_group - ## - # RPC-specific configuration for `create_hardware_group` - # @return [::Gapic::Config::Method] - # - attr_reader :create_hardware_group - ## - # RPC-specific configuration for `update_hardware_group` - # @return [::Gapic::Config::Method] - # - attr_reader :update_hardware_group - ## - # RPC-specific configuration for `delete_hardware_group` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_hardware_group - ## - # RPC-specific configuration for `list_hardware` - # @return [::Gapic::Config::Method] - # - attr_reader :list_hardware - ## - # RPC-specific configuration for `get_hardware` - # @return [::Gapic::Config::Method] - # - attr_reader :get_hardware - ## - # RPC-specific configuration for `create_hardware` - # @return [::Gapic::Config::Method] - # - attr_reader :create_hardware - ## - # RPC-specific configuration for `update_hardware` - # @return [::Gapic::Config::Method] - # - attr_reader :update_hardware - ## - # RPC-specific configuration for `delete_hardware` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_hardware - ## - # RPC-specific configuration for `list_comments` - # @return [::Gapic::Config::Method] - # - attr_reader :list_comments - ## - # RPC-specific configuration for `get_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :get_comment - ## - # RPC-specific configuration for `create_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :create_comment - ## - # RPC-specific configuration for `record_action_on_comment` - # @return [::Gapic::Config::Method] - # - attr_reader :record_action_on_comment - ## - # RPC-specific configuration for `list_change_log_entries` - # @return [::Gapic::Config::Method] - # - attr_reader :list_change_log_entries - ## - # RPC-specific configuration for `get_change_log_entry` - # @return [::Gapic::Config::Method] - # - attr_reader :get_change_log_entry - ## - # RPC-specific configuration for `list_skus` - # @return [::Gapic::Config::Method] - # - attr_reader :list_skus - ## - # RPC-specific configuration for `get_sku` - # @return [::Gapic::Config::Method] - # - attr_reader :get_sku - ## - # 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 `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 `signal_zone_state` - # @return [::Gapic::Config::Method] - # - attr_reader :signal_zone_state - ## - # RPC-specific configuration for `request_order_date_change` - # @return [::Gapic::Config::Method] - # - attr_reader :request_order_date_change - - # @private - def initialize parent_rpcs = nil - list_orders_config = parent_rpcs.list_orders if parent_rpcs.respond_to? :list_orders - @list_orders = ::Gapic::Config::Method.new list_orders_config - get_order_config = parent_rpcs.get_order if parent_rpcs.respond_to? :get_order - @get_order = ::Gapic::Config::Method.new get_order_config - create_order_config = parent_rpcs.create_order if parent_rpcs.respond_to? :create_order - @create_order = ::Gapic::Config::Method.new create_order_config - update_order_config = parent_rpcs.update_order if parent_rpcs.respond_to? :update_order - @update_order = ::Gapic::Config::Method.new update_order_config - delete_order_config = parent_rpcs.delete_order if parent_rpcs.respond_to? :delete_order - @delete_order = ::Gapic::Config::Method.new delete_order_config - submit_order_config = parent_rpcs.submit_order if parent_rpcs.respond_to? :submit_order - @submit_order = ::Gapic::Config::Method.new submit_order_config - cancel_order_config = parent_rpcs.cancel_order if parent_rpcs.respond_to? :cancel_order - @cancel_order = ::Gapic::Config::Method.new cancel_order_config - list_sites_config = parent_rpcs.list_sites if parent_rpcs.respond_to? :list_sites - @list_sites = ::Gapic::Config::Method.new list_sites_config - get_site_config = parent_rpcs.get_site if parent_rpcs.respond_to? :get_site - @get_site = ::Gapic::Config::Method.new get_site_config - create_site_config = parent_rpcs.create_site if parent_rpcs.respond_to? :create_site - @create_site = ::Gapic::Config::Method.new create_site_config - update_site_config = parent_rpcs.update_site if parent_rpcs.respond_to? :update_site - @update_site = ::Gapic::Config::Method.new update_site_config - delete_site_config = parent_rpcs.delete_site if parent_rpcs.respond_to? :delete_site - @delete_site = ::Gapic::Config::Method.new delete_site_config - list_hardware_groups_config = parent_rpcs.list_hardware_groups if parent_rpcs.respond_to? :list_hardware_groups - @list_hardware_groups = ::Gapic::Config::Method.new list_hardware_groups_config - get_hardware_group_config = parent_rpcs.get_hardware_group if parent_rpcs.respond_to? :get_hardware_group - @get_hardware_group = ::Gapic::Config::Method.new get_hardware_group_config - create_hardware_group_config = parent_rpcs.create_hardware_group if parent_rpcs.respond_to? :create_hardware_group - @create_hardware_group = ::Gapic::Config::Method.new create_hardware_group_config - update_hardware_group_config = parent_rpcs.update_hardware_group if parent_rpcs.respond_to? :update_hardware_group - @update_hardware_group = ::Gapic::Config::Method.new update_hardware_group_config - delete_hardware_group_config = parent_rpcs.delete_hardware_group if parent_rpcs.respond_to? :delete_hardware_group - @delete_hardware_group = ::Gapic::Config::Method.new delete_hardware_group_config - list_hardware_config = parent_rpcs.list_hardware if parent_rpcs.respond_to? :list_hardware - @list_hardware = ::Gapic::Config::Method.new list_hardware_config - get_hardware_config = parent_rpcs.get_hardware if parent_rpcs.respond_to? :get_hardware - @get_hardware = ::Gapic::Config::Method.new get_hardware_config - create_hardware_config = parent_rpcs.create_hardware if parent_rpcs.respond_to? :create_hardware - @create_hardware = ::Gapic::Config::Method.new create_hardware_config - update_hardware_config = parent_rpcs.update_hardware if parent_rpcs.respond_to? :update_hardware - @update_hardware = ::Gapic::Config::Method.new update_hardware_config - delete_hardware_config = parent_rpcs.delete_hardware if parent_rpcs.respond_to? :delete_hardware - @delete_hardware = ::Gapic::Config::Method.new delete_hardware_config - list_comments_config = parent_rpcs.list_comments if parent_rpcs.respond_to? :list_comments - @list_comments = ::Gapic::Config::Method.new list_comments_config - get_comment_config = parent_rpcs.get_comment if parent_rpcs.respond_to? :get_comment - @get_comment = ::Gapic::Config::Method.new get_comment_config - create_comment_config = parent_rpcs.create_comment if parent_rpcs.respond_to? :create_comment - @create_comment = ::Gapic::Config::Method.new create_comment_config - record_action_on_comment_config = parent_rpcs.record_action_on_comment if parent_rpcs.respond_to? :record_action_on_comment - @record_action_on_comment = ::Gapic::Config::Method.new record_action_on_comment_config - list_change_log_entries_config = parent_rpcs.list_change_log_entries if parent_rpcs.respond_to? :list_change_log_entries - @list_change_log_entries = ::Gapic::Config::Method.new list_change_log_entries_config - get_change_log_entry_config = parent_rpcs.get_change_log_entry if parent_rpcs.respond_to? :get_change_log_entry - @get_change_log_entry = ::Gapic::Config::Method.new get_change_log_entry_config - list_skus_config = parent_rpcs.list_skus if parent_rpcs.respond_to? :list_skus - @list_skus = ::Gapic::Config::Method.new list_skus_config - get_sku_config = parent_rpcs.get_sku if parent_rpcs.respond_to? :get_sku - @get_sku = ::Gapic::Config::Method.new get_sku_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 - 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 - signal_zone_state_config = parent_rpcs.signal_zone_state if parent_rpcs.respond_to? :signal_zone_state - @signal_zone_state = ::Gapic::Config::Method.new signal_zone_state_config - request_order_date_change_config = parent_rpcs.request_order_date_change if parent_rpcs.respond_to? :request_order_date_change - @request_order_date_change = ::Gapic::Config::Method.new request_order_date_change_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/operations.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/operations.rb deleted file mode 100644 index 0fd6460e36ea..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/operations.rb +++ /dev/null @@ -1,925 +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 GDCHardwareManagement - module V1alpha - module GDCHardwareManagement - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "gdchardwaremanagement.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the GDCHardwareManagement 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 GDCHardwareManagement 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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::GDCHardwareManagement::V1alpha::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "gdchardwaremanagement.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: "/v1alpha/{name}/operations", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1alpha/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/service_stub.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/service_stub.rb deleted file mode 100644 index 0f1cf309a507..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest/service_stub.rb +++ /dev/null @@ -1,2354 +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/gdchardwaremanagement/v1alpha/service_pb" - -module Google - module Cloud - module GDCHardwareManagement - module V1alpha - module GDCHardwareManagement - module Rest - ## - # REST service stub for the GDCHardwareManagement 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 list_orders REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse] - # A result object deserialized from the server's reply - def list_orders request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_orders_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_orders", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse.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_order REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] - # A result object deserialized from the server's reply - def get_order request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_order_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_order", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Order.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_order REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_order request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_order_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_order", - 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_order REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_order request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_order_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_order", - 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_order REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_order request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_order_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_order", - 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 submit_order REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def submit_order request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_submit_order_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "submit_order", - 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 cancel_order REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def cancel_order request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_cancel_order_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_order", - 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_sites REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse] - # A result object deserialized from the server's reply - def list_sites request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_sites_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_sites", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse.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_site REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] - # A result object deserialized from the server's reply - def get_site request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_site_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_site", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Site.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_site REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_site request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_site_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_site", - 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_site REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_site request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_site_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_site", - 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_site REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_site request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_site_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_site", - 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_hardware_groups REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse] - # A result object deserialized from the server's reply - def list_hardware_groups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_hardware_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_hardware_groups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse.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_hardware_group REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] - # A result object deserialized from the server's reply - def get_hardware_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_hardware_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_hardware_group", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup.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_hardware_group REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_hardware_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_hardware_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_hardware_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_hardware_group REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_hardware_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_hardware_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_hardware_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_hardware_group REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_hardware_group request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_hardware_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_hardware_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_hardware REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse] - # A result object deserialized from the server's reply - def list_hardware request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_hardware_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_hardware", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse.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_hardware REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] - # A result object deserialized from the server's reply - def get_hardware request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_hardware_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_hardware", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware.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_hardware REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_hardware request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_hardware_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_hardware", - 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_hardware REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_hardware request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_hardware_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_hardware", - 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_hardware REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_hardware request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_hardware_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_hardware", - 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_comments REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse] - # A result object deserialized from the server's reply - def list_comments request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_comments_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_comments", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse.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_comment REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] - # A result object deserialized from the server's reply - def get_comment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_comment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_comment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.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_comment REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_comment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_comment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_comment", - 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 record_action_on_comment REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] - # A result object deserialized from the server's reply - def record_action_on_comment request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_record_action_on_comment_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "record_action_on_comment", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.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_change_log_entries REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse] - # A result object deserialized from the server's reply - def list_change_log_entries request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_change_log_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_change_log_entries", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse.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_change_log_entry REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry] - # A result object deserialized from the server's reply - def get_change_log_entry request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_change_log_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_change_log_entry", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry.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_skus REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse] - # A result object deserialized from the server's reply - def list_skus request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_skus_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_skus", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse.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_sku REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku] - # A result object deserialized from the server's reply - def get_sku request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_sku_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_sku", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku.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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::ListZonesResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::Zone] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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 create_zone REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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 signal_zone_state REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def signal_zone_state request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_signal_zone_state_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "signal_zone_state", - 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 request_order_date_change REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Longrunning::Operation] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Longrunning::Operation] - # A result object deserialized from the server's reply - def request_order_date_change request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_request_order_date_change_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_h { |p| p.split "=", 2 } - else - {} - end - - response = @client_stub.make_http_request( - verb, - uri: uri, - body: body || "", - params: query_string_params, - method_name: "request_order_date_change", - 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 list_orders REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest] - # 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_orders_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{parent}/orders", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_order REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest] - # 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_order_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_order REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest] - # 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_order_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1alpha/{parent}/orders", - body: "order", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_order REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest] - # 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_order_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1alpha/{order.name}", - body: "order", - matches: [ - ["order.name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_order REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest] - # 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_order_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the submit_order REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_submit_order_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1alpha/{name}:submit", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_order REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest] - # 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_order_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1alpha/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_sites REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest] - # 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_sites_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{parent}/sites", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_site REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest] - # 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_site_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/sites/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_site REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest] - # 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_site_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1alpha/{parent}/sites", - body: "site", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_site REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest] - # 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_site_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1alpha/{site.name}", - body: "site", - matches: [ - ["site.name", %r{^projects/[^/]+/locations/[^/]+/sites/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_site REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest] - # 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_site_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/sites/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_hardware_groups REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest] - # 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_hardware_groups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{parent}/hardwareGroups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_hardware_group REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest] - # 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_hardware_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/hardwareGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_hardware_group REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest] - # 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_hardware_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1alpha/{parent}/hardwareGroups", - body: "hardware_group", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_hardware_group REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest] - # 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_hardware_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1alpha/{hardware_group.name}", - body: "hardware_group", - matches: [ - ["hardware_group.name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/hardwareGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_hardware_group REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest] - # 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_hardware_group_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/hardwareGroups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_hardware REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest] - # 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_hardware_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{parent}/hardware", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_hardware REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest] - # 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_hardware_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/hardware/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_hardware REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest] - # 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_hardware_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1alpha/{parent}/hardware", - body: "hardware", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_hardware REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest] - # 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_hardware_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1alpha/{hardware.name}", - body: "hardware", - matches: [ - ["hardware.name", %r{^projects/[^/]+/locations/[^/]+/hardware/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_hardware REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest] - # 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_hardware_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/hardware/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_comments REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest] - # 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_comments_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{parent}/comments", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_comment REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest] - # 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_comment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/comments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_comment REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest] - # 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_comment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1alpha/{parent}/comments", - body: "comment", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the record_action_on_comment REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_record_action_on_comment_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1alpha/{name}:recordAction", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/comments/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_change_log_entries REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest] - # 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_change_log_entries_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{parent}/changeLogEntries", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_change_log_entry REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest] - # 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_change_log_entry_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/changeLogEntries/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_skus REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest] - # 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_skus_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{parent}/skus", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_sku REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest] - # 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_sku_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/skus/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_zones REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::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: "/v1alpha/{parent}/zones", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_zone REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::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: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_zone REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::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: "/v1alpha/{parent}/zones", - body: "zone", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_zone REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::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: "/v1alpha/{zone.name}", - body: "zone", - matches: [ - ["zone.name", %r{^projects/[^/]+/locations/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_zone REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::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: "/v1alpha/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the signal_zone_state REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_signal_zone_state_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1alpha/{name}:signal", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/zones/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the request_order_date_change REST call - # - # @param request_pb [::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_request_order_date_change_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1alpha/{name}:requestDateChange", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/orders/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/rest.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/rest.rb deleted file mode 100644 index 30ef342103a5..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/rest.rb +++ /dev/null @@ -1,38 +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/gdc_hardware_management/v1alpha/gdc_hardware_management/rest" -require "google/cloud/gdc_hardware_management/v1alpha/bindings_override" -require "google/cloud/gdc_hardware_management/v1alpha/version" - -module Google - module Cloud - module GDCHardwareManagement - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/gdc_hardware_management/v1alpha/rest" - # client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new - # - module V1alpha - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/version.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/version.rb deleted file mode 100644 index b560b3e7f8df..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdc_hardware_management/v1alpha/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 GDCHardwareManagement - module V1alpha - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/resources_pb.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/resources_pb.rb deleted file mode 100644 index 8513739dcc2d..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/resources_pb.rb +++ /dev/null @@ -1,99 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gdchardwaremanagement/v1alpha/resources.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/date_pb' -require 'google/type/datetime_pb' -require 'google/type/dayofweek_pb' -require 'google/type/postal_address_pb' -require 'google/type/timeofday_pb' - - -descriptor_data = "\n:google/cloud/gdchardwaremanagement/v1alpha/resources.proto\x12*google.cloud.gdchardwaremanagement.v1alpha\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x1agoogle/type/datetime.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a google/type/postal_address.proto\x1a\x1bgoogle/type/timeofday.proto\"\xf6\x0f\n\x05Order\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\r \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12R\n\x06labels\x18\x04 \x03(\x0b\x32=.google.cloud.gdchardwaremanagement.v1alpha.Order.LabelsEntryB\x03\xe0\x41\x01\x12K\n\x05state\x18\x05 \x01(\x0e\x32\x37.google.cloud.gdchardwaremanagement.v1alpha.Order.StateB\x03\xe0\x41\x03\x12\x62\n\x14organization_contact\x18\x06 \x01(\x0b\x32?.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactB\x03\xe0\x41\x02\x12\x1d\n\x10target_workloads\x18\x07 \x03(\tB\x03\xe0\x41\x01\x12 \n\x13\x63ustomer_motivation\x18\x08 \x01(\tB\x03\xe0\x41\x02\x12;\n\x10\x66ulfillment_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x05\x18\x01\xe0\x41\x01\x12\x44\n$customer_requested_installation_date\x18\x15 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01\x12\x18\n\x0bregion_code\x18\n \x01(\tB\x03\xe0\x41\x02\x12\x1b\n\x0eorder_form_uri\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12I\n\x04type\x18\x0c \x01(\x0e\x32\x36.google.cloud.gdchardwaremanagement.v1alpha.Order.TypeB\x03\xe0\x41\x03\x12\x34\n\x0bsubmit_time\x18\x0e \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x17\n\nbilling_id\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\\\n\x11\x65xisting_hardware\x18\x10 \x03(\x0b\x32<.google.cloud.gdchardwaremanagement.v1alpha.HardwareLocationB\x03\xe0\x41\x01\x12^\n\x0f\x64\x65ployment_type\x18\x12 \x01(\x0e\x32@.google.cloud.gdchardwaremanagement.v1alpha.Order.DeploymentTypeB\x03\xe0\x41\x03\x12\x38\n\x18\x61\x63tual_installation_date\x18\x13 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x12;\n\x1b\x65stimated_installation_date\x18\x14 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x12\x37\n\x17\x65stimated_delivery_date\x18\x16 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x12\x16\n\tmigration\x18\x17 \x01(\x08\x42\x03\xe0\x41\x01\x12\x36\n\raccepted_time\x18\x18 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x35\n\x15requested_date_change\x18\x19 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x12\x19\n\x0cvendor_notes\x18\x1a \x01(\tB\x03\xe0\x41\x03\x12\\\n\x0evendor_contact\x18\x1b \x01(\x0b\x32?.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactB\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\"\xe4\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\t\n\x05\x44RAFT\x10\x01\x12\r\n\tSUBMITTED\x10\x02\x12\x11\n\rINFO_COMPLETE\x10\x0c\x12\x0c\n\x08\x41\x43\x43\x45PTED\x10\x03\x12\x1a\n\x16\x41\x44\x44ITIONAL_INFO_NEEDED\x10\x04\x12\x0c\n\x08\x42UILDING\x10\x05\x12\x0c\n\x08SHIPPING\x10\x06\x12\x0e\n\nINSTALLING\x10\x07\x12\n\n\x06\x46\x41ILED\x10\x08\x12\x17\n\x13PARTIALLY_COMPLETED\x10\t\x12\r\n\tCOMPLETED\x10\n\x12\r\n\tCANCELLED\x10\x0b\"?\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04PAID\x10\x01\x12\x07\n\x03POC\x10\x02\x12\n\n\x06UNPAID\x10\x02\x1a\x02\x10\x01\"|\n\x0e\x44\x65ploymentType\x12\x1f\n\x1b\x44\x45PLOYMENT_TYPE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x46ULL_PRODUCTION\x10\x01\x12\x14\n\x10PROOF_OF_CONCEPT\x10\x02\x12\x0c\n\x08INTERNAL\x10\x03\x12\x10\n\x0c\x43USTOMER_LAB\x10\x04:v\xea\x41s\n*gdchardwaremanagement.googleapis.com/Order\x12\x36projects/{project}/locations/{location}/orders/{order}*\x06orders2\x05order\"\xbb\x05\n\x04Site\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\x18\x18 \x01(\tB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x19 \x01(\tB\x03\xe0\x41\x01\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.gdchardwaremanagement.v1alpha.Site.LabelsEntryB\x03\xe0\x41\x01\x12\x62\n\x14organization_contact\x18\x05 \x01(\x0b\x32?.google.cloud.gdchardwaremanagement.v1alpha.OrganizationContactB\x03\xe0\x41\x02\x12 \n\x13google_maps_pin_uri\x18\x06 \x01(\tB\x03\xe0\x41\x01\x12Q\n\x0c\x61\x63\x63\x65ss_times\x18\x1a \x03(\x0b\x32\x36.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodB\x03\xe0\x41\x01\x12\x12\n\x05notes\x18\x1b \x01(\tB\x03\xe0\x41\x01\x12\x1d\n\x10\x63ustomer_site_id\x18\x1c \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:q\xea\x41n\n)gdchardwaremanagement.googleapis.com/Site\x12\x34projects/{project}/locations/{location}/sites/{site}*\x05sites2\x04site\"\xec\x07\n\rHardwareGroup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Z\n\x06labels\x18\x04 \x03(\x0b\x32\x45.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.LabelsEntryB\x03\xe0\x41\x01\x12\x1b\n\x0ehardware_count\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12O\n\x06\x63onfig\x18\x06 \x01(\x0b\x32:.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigB\x03\xe0\x41\x02\x12?\n\x04site\x18\x07 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Site\x12S\n\x05state\x18\x08 \x01(\x0e\x32?.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.StateB\x03\xe0\x41\x03\x12?\n\x04zone\x18\t \x01(\tB1\xe0\x41\x01\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Zone\x12=\n\x1brequested_installation_date\x18\n \x01(\x0b\x32\x11.google.type.DateB\x05\x18\x01\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\"\x9a\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x41\x44\x44ITIONAL_INFO_NEEDED\x10\x01\x12\x0c\n\x08\x42UILDING\x10\x02\x12\x0c\n\x08SHIPPING\x10\x03\x12\x0e\n\nINSTALLING\x10\x04\x12\x17\n\x13PARTIALLY_INSTALLED\x10\x05\x12\r\n\tINSTALLED\x10\x06\x12\n\n\x06\x46\x41ILED\x10\x07:\xaf\x01\xea\x41\xab\x01\n2gdchardwaremanagement.googleapis.com/HardwareGroup\x12Vprojects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}*\x0ehardwareGroups2\rhardwareGroup\"\x99\x11\n\x08Hardware\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\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\x12U\n\x06labels\x18\x05 \x03(\x0b\x32@.google.cloud.gdchardwaremanagement.v1alpha.Hardware.LabelsEntryB\x03\xe0\x41\x01\x12\x41\n\x05order\x18\x06 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gdchardwaremanagement.googleapis.com/Order\x12R\n\x0ehardware_group\x18\x07 \x01(\tB:\xe0\x41\x03\xfa\x41\x34\n2gdchardwaremanagement.googleapis.com/HardwareGroup\x12?\n\x04site\x18\x08 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Site\x12N\n\x05state\x18\t \x01(\x0e\x32:.google.cloud.gdchardwaremanagement.v1alpha.Hardware.StateB\x03\xe0\x41\x03\x12\x14\n\x07\x63iq_uri\x18\n \x01(\tB\x03\xe0\x41\x03\x12O\n\x06\x63onfig\x18\x0b \x01(\x0b\x32:.google.cloud.gdchardwaremanagement.v1alpha.HardwareConfigB\x03\xe0\x41\x02\x12;\n\x1b\x65stimated_installation_date\x18\x0c \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x12\\\n\rphysical_info\x18\r \x01(\x0b\x32@.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfoB\x03\xe0\x41\x01\x12\x64\n\x11installation_info\x18\x0e \x01(\x0b\x32\x44.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfoB\x03\xe0\x41\x01\x12?\n\x04zone\x18\x0f \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Zone\x12;\n\x1brequested_installation_date\x18\x10 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x01\x12\x38\n\x18\x61\x63tual_installation_date\x18\x11 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x12\\\n\rmachine_infos\x18\x14 \x03(\x0b\x32@.google.cloud.gdchardwaremanagement.v1alpha.Hardware.MachineInfoB\x03\xe0\x41\x03\x12\x37\n\x17\x65stimated_delivery_date\x18\x15 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x03\x1a\xf1\x01\n\nMacAddress\x12\x14\n\x07\x61\x64\x64ress\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12^\n\x04type\x18\x02 \x01(\x0e\x32K.google.cloud.gdchardwaremanagement.v1alpha.Hardware.MacAddress.AddressTypeB\x03\xe0\x41\x03\x12!\n\x0cipv4_address\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x02\"J\n\x0b\x41\x64\x64ressType\x12\x1c\n\x18\x41\x44\x44RESS_TYPE_UNSPECIFIED\x10\x00\x12\x07\n\x03NIC\x10\x01\x12\x07\n\x03\x42MC\x10\x02\x12\x0b\n\x07VIRTUAL\x10\x03\x1a\x9c\x01\n\x08\x44iskInfo\x12\x19\n\x0cmanufacturer\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04slot\x18\x02 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1a\n\rserial_number\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04psid\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bpart_number\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x19\n\x0cmodel_number\x18\x06 \x01(\tB\x03\xe0\x41\x03\x1a\xef\x01\n\x0bMachineInfo\x12\x18\n\x0bservice_tag\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12[\n\rmac_addresses\x18\x02 \x03(\x0b\x32?.google.cloud.gdchardwaremanagement.v1alpha.Hardware.MacAddressB\x03\xe0\x41\x03\x12\x11\n\x04name\x18\x03 \x01(\tB\x03\xe0\x41\x03\x12V\n\ndisk_infos\x18\x04 \x03(\x0b\x32=.google.cloud.gdchardwaremanagement.v1alpha.Hardware.DiskInfoB\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\"\x81\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x41\x44\x44ITIONAL_INFO_NEEDED\x10\x01\x12\x0c\n\x08\x42UILDING\x10\x02\x12\x0c\n\x08SHIPPING\x10\x03\x12\x0e\n\nINSTALLING\x10\x04\x12\r\n\tINSTALLED\x10\x05\x12\n\n\x06\x46\x41ILED\x10\x06:\x84\x01\xea\x41\x80\x01\n-gdchardwaremanagement.googleapis.com/Hardware\x12;projects/{project}/locations/{location}/hardware/{hardware}*\x08hardware2\x08hardware\"\xa1\x04\n\x07\x43omment\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12T\n\x06labels\x18\x03 \x03(\x0b\x32?.google.cloud.gdchardwaremanagement.v1alpha.Comment.LabelsEntryB\x03\xe0\x41\x01\x12\x13\n\x06\x61uthor\x18\x04 \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04text\x18\x05 \x01(\tB\x03\xe0\x41\x02\x12=\n\x14\x63ustomer_viewed_time\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12N\n\rauthor_entity\x18\x07 \x01(\x0e\x32\x32.google.cloud.gdchardwaremanagement.v1alpha.EntityB\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:\x90\x01\xea\x41\x8c\x01\n,gdchardwaremanagement.googleapis.com/Comment\x12Iprojects/{project}/locations/{location}/orders/{order}/comments/{comment}*\x08\x63omments2\x07\x63omment\"\xb1\x03\n\x0e\x43hangeLogEntry\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12[\n\x06labels\x18\x03 \x03(\x0b\x32\x46.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry.LabelsEntryB\x03\xe0\x41\x01\x12\x10\n\x03log\x18\x04 \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:\xb7\x01\xea\x41\xb3\x01\n3gdchardwaremanagement.googleapis.com/ChangeLogEntry\x12Zprojects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}*\x10\x63hangeLogEntries2\x0e\x63hangeLogEntry\"\x8a\x06\n\x03Sku\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x19\n\x0c\x64isplay_name\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\x12J\n\x06\x63onfig\x18\x06 \x01(\x0b\x32\x35.google.cloud.gdchardwaremanagement.v1alpha.SkuConfigB\x03\xe0\x41\x03\x12O\n\tinstances\x18\x07 \x03(\x0b\x32\x37.google.cloud.gdchardwaremanagement.v1alpha.SkuInstanceB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0brevision_id\x18\t \x01(\tB\x03\xe0\x41\x03\x12\x16\n\tis_active\x18\n \x01(\x08\x42\x03\xe0\x41\x03\x12G\n\x04type\x18\x0b \x01(\x0e\x32\x34.google.cloud.gdchardwaremanagement.v1alpha.Sku.TypeB\x03\xe0\x41\x03\x12\x17\n\nvcpu_count\x18\x0c \x01(\x05\x42\x03\xe0\x41\x03\x12Y\n\x15hardware_count_ranges\x18\r \x03(\x0b\x32\x35.google.cloud.gdchardwaremanagement.v1alpha.Sku.RangeB\x03\xe0\x41\x03\x1a!\n\x05Range\x12\x0b\n\x03min\x18\x01 \x01(\x05\x12\x0b\n\x03max\x18\x02 \x01(\x05\"2\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04RACK\x10\x01\x12\n\n\x06SERVER\x10\x02:l\xea\x41i\n(gdchardwaremanagement.googleapis.com/Sku\x12\x32projects/{project}/locations/{location}/skus/{sku}*\x04skus2\x03sku\"\x91\x0b\n\x04Zone\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12\x34\n\x0b\x63reate_time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x34\n\x0bupdate_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12Q\n\x06labels\x18\x04 \x03(\x0b\x32<.google.cloud.gdchardwaremanagement.v1alpha.Zone.LabelsEntryB\x03\xe0\x41\x01\x12\x19\n\x0c\x64isplay_name\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12J\n\x05state\x18\x08 \x01(\x0e\x32\x36.google.cloud.gdchardwaremanagement.v1alpha.Zone.StateB\x03\xe0\x41\x03\x12J\n\x08\x63ontacts\x18\t \x03(\x0b\x32\x33.google.cloud.gdchardwaremanagement.v1alpha.ContactB\x03\xe0\x41\x02\x12\x14\n\x07\x63iq_uri\x18\n \x01(\tB\x03\xe0\x41\x03\x12Z\n\x0enetwork_config\x18\x0b \x01(\x0b\x32=.google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfigB\x03\xe0\x41\x01\x12\x1f\n\x12globally_unique_id\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x61\n\x14subscription_configs\x18\r \x03(\x0b\x32>.google.cloud.gdchardwaremanagement.v1alpha.SubscriptionConfigB\x03\xe0\x41\x03\x12\x63\n\x12provisioning_state\x18\x0e \x01(\x0e\x32\x42.google.cloud.gdchardwaremanagement.v1alpha.Zone.ProvisioningStateB\x03\xe0\x41\x03\x12&\n\x19skip_cluster_provisioning\x18\x10 \x01(\x08\x42\x03\xe0\x41\x01\x12$\n\x17\x63luster_intent_required\x18\x11 \x01(\x08\x42\x03\xe0\x41\x03\x12$\n\x17\x63luster_intent_verified\x18\x12 \x01(\x08\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\"\x84\x02\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x1a\n\x16\x41\x44\x44ITIONAL_INFO_NEEDED\x10\x01\x12\r\n\tPREPARING\x10\x02\x12,\n(READY_FOR_CUSTOMER_FACTORY_TURNUP_CHECKS\x10\x05\x12*\n&CUSTOMER_FACTORY_TURNUP_CHECKS_STARTED\x10\x08\x12\x19\n\x15READY_FOR_SITE_TURNUP\x10\x06\x12)\n%CUSTOMER_FACTORY_TURNUP_CHECKS_FAILED\x10\x07\x12\n\n\x06\x41\x43TIVE\x10\x03\x12\r\n\tCANCELLED\x10\x04\"\x8b\x01\n\x11ProvisioningState\x12\"\n\x1ePROVISIONING_STATE_UNSPECIFIED\x10\x00\x12\x19\n\x15PROVISIONING_REQUIRED\x10\x01\x12\x1c\n\x18PROVISIONING_IN_PROGRESS\x10\x02\x12\x19\n\x15PROVISIONING_COMPLETE\x10\x03:q\xea\x41n\n)gdchardwaremanagement.googleapis.com/Zone\x12\x34projects/{project}/locations/{location}/zones/{zone}*\x05zones2\x04zone\"\xbb\x01\n\x13OrganizationContact\x12\x30\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0b\x32\x1a.google.type.PostalAddressB\x03\xe0\x41\x02\x12\x12\n\x05\x65mail\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05phone\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12J\n\x08\x63ontacts\x18\x04 \x03(\x0b\x32\x33.google.cloud.gdchardwaremanagement.v1alpha.ContactB\x03\xe0\x41\x02\"\xe9\x01\n\x07\x43ontact\x12\x17\n\ngiven_name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x18\n\x0b\x66\x61mily_name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x65mail\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12\x12\n\x05phone\x18\x04 \x01(\tB\x03\xe0\x41\x02\x12-\n\ttime_zone\x18\x05 \x01(\x0b\x32\x15.google.type.TimeZoneB\x03\xe0\x41\x01\x12T\n\x0freachable_times\x18\x06 \x03(\x0b\x32\x36.google.cloud.gdchardwaremanagement.v1alpha.TimePeriodB\x03\xe0\x41\x01\"\xce\x01\n\x0eHardwareConfig\x12=\n\x03sku\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(gdchardwaremanagement.googleapis.com/Sku\x12R\n\x0cpower_supply\x18\x02 \x01(\x0e\x32\x37.google.cloud.gdchardwaremanagement.v1alpha.PowerSupplyB\x03\xe0\x41\x02\x12)\n\x1csubscription_duration_months\x18\x03 \x01(\x05\x42\x03\xe0\x41\x01\"C\n\tSkuConfig\x12\x0b\n\x03\x63pu\x18\x01 \x01(\t\x12\x0b\n\x03gpu\x18\x02 \x01(\t\x12\x0b\n\x03ram\x18\x03 \x01(\t\x12\x0f\n\x07storage\x18\x04 \x01(\t\"\xca\x01\n\x0bSkuInstance\x12\x13\n\x0bregion_code\x18\x01 \x01(\t\x12M\n\x0cpower_supply\x18\x02 \x01(\x0e\x32\x37.google.cloud.gdchardwaremanagement.v1alpha.PowerSupply\x12\x13\n\x0b\x62illing_sku\x18\x03 \x01(\t\x12\x1c\n\x14\x62illing_sku_per_vcpu\x18\x04 \x01(\t\x12$\n\x1csubscription_duration_months\x18\x05 \x01(\x05\"\xa1\x06\n\x14HardwarePhysicalInfo\x12s\n\x10power_receptacle\x18\x01 \x01(\x0e\x32T.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleTypeB\x03\xe0\x41\x02\x12o\n\x0enetwork_uplink\x18\x02 \x01(\x0e\x32R.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkTypeB\x03\xe0\x41\x02\x12^\n\x07voltage\x18\x03 \x01(\x0e\x32H.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.VoltageB\x03\xe0\x41\x02\x12^\n\x07\x61mperes\x18\x04 \x01(\x0e\x32H.google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.AmperesB\x03\xe0\x41\x02\"\xa3\x01\n\x13PowerReceptacleType\x12%\n!POWER_RECEPTACLE_TYPE_UNSPECIFIED\x10\x00\x12\r\n\tNEMA_5_15\x10\x01\x12\x08\n\x04\x43_13\x10\x02\x12\x13\n\x0bSTANDARD_EU\x10\x03\x1a\x02\x08\x01\x12\x11\n\rTYPE_G_BS1363\x10\x04\x12\x0b\n\x07\x43\x45\x45_7_3\x10\x05\x12\x0b\n\x07\x43\x45\x45_7_5\x10\x06\x12\n\n\x06TYPE_F\x10\x07\"C\n\x11NetworkUplinkType\x12#\n\x1fNETWORK_UPLINK_TYPE_UNSPECIFIED\x10\x00\x12\t\n\x05RJ_45\x10\x01\"D\n\x07Voltage\x12\x17\n\x13VOLTAGE_UNSPECIFIED\x10\x00\x12\x0f\n\x0bVOLTAGE_110\x10\x01\x12\x0f\n\x0bVOLTAGE_220\x10\x03\"2\n\x07\x41mperes\x12\x17\n\x13\x41MPERES_UNSPECIFIED\x10\x00\x12\x0e\n\nAMPERES_15\x10\x01\"\xd5\x03\n\x18HardwareInstallationInfo\x12\x1a\n\rrack_location\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\"\n\x15power_distance_meters\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\x12#\n\x16switch_distance_meters\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02\x12Y\n\x14rack_unit_dimensions\x18\x04 \x01(\x0b\x32\x36.google.cloud.gdchardwaremanagement.v1alpha.DimensionsB\x03\xe0\x41\x02\x12N\n\nrack_space\x18\x05 \x01(\x0b\x32\x35.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceB\x03\xe0\x41\x02\x12\x65\n\track_type\x18\x06 \x01(\x0e\x32M.google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackTypeB\x03\xe0\x41\x02\"B\n\x08RackType\x12\x19\n\x15RACK_TYPE_UNSPECIFIED\x10\x00\x12\x0c\n\x08TWO_POST\x10\x01\x12\r\n\tFOUR_POST\x10\x02\"\xb0\x03\n\x11ZoneNetworkConfig\x12,\n\x17machine_mgmt_ipv4_range\x18\x01 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12/\n\x1akubernetes_node_ipv4_range\x18\x02 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\x38\n#kubernetes_control_plane_ipv4_range\x18\x03 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12W\n\x16management_ipv4_subnet\x18\x04 \x01(\x0b\x32\x32.google.cloud.gdchardwaremanagement.v1alpha.SubnetB\x03\xe0\x41\x02\x12W\n\x16kubernetes_ipv4_subnet\x18\x05 \x01(\x0b\x32\x32.google.cloud.gdchardwaremanagement.v1alpha.SubnetB\x03\xe0\x41\x01\x12\'\n\x12\x64ns_ipv4_addresses\x18\x06 \x03(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12\'\n\x1akubernetes_primary_vlan_id\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\"]\n\x06Subnet\x12\"\n\raddress_range\x18\x01 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x02\x12/\n\x1a\x64\x65\x66\x61ult_gateway_ip_address\x18\x02 \x01(\tB\x0b\xe0\x41\x02\xe2\x8c\xcf\xd7\x08\x02\x08\x02\"\x97\x01\n\nTimePeriod\x12/\n\nstart_time\x18\x01 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x02\x12-\n\x08\x65nd_time\x18\x02 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x02\x12)\n\x04\x64\x61ys\x18\x03 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x02\"^\n\nDimensions\x12\x19\n\x0cwidth_inches\x18\x01 \x01(\x02\x42\x03\xe0\x41\x02\x12\x1a\n\rheight_inches\x18\x02 \x01(\x02\x42\x03\xe0\x41\x02\x12\x19\n\x0c\x64\x65pth_inches\x18\x03 \x01(\x02\x42\x03\xe0\x41\x02\"E\n\tRackSpace\x12\x1c\n\x0fstart_rack_unit\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12\x1a\n\rend_rack_unit\x18\x02 \x01(\x05\x42\x03\xe0\x41\x02\"\xbf\x01\n\x10HardwareLocation\x12?\n\x04site\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Site\x12\x1a\n\rrack_location\x18\x02 \x01(\tB\x03\xe0\x41\x02\x12N\n\nrack_space\x18\x03 \x03(\x0b\x32\x35.google.cloud.gdchardwaremanagement.v1alpha.RackSpaceB\x03\xe0\x41\x01\"\xb7\x02\n\x12SubscriptionConfig\x12\x1c\n\x0fsubscription_id\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x17\n\nbilling_id\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\x64\n\x05state\x18\x03 \x01(\x0e\x32P.google.cloud.gdchardwaremanagement.v1alpha.SubscriptionConfig.SubscriptionStateB\x03\xe0\x41\x03\"\x83\x01\n\x11SubscriptionState\x12\"\n\x1eSUBSCRIPTION_STATE_UNSPECIFIED\x10\x00\x12\n\n\x06\x41\x43TIVE\x10\x01\x12\x0c\n\x08INACTIVE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x12\x16\n\x12\x46\x41ILED_TO_RETRIEVE\x10\x04\x12\r\n\tCOMPLETED\x10\x05*U\n\x0bPowerSupply\x12\x1c\n\x18POWER_SUPPLY_UNSPECIFIED\x10\x00\x12\x13\n\x0fPOWER_SUPPLY_AC\x10\x01\x12\x13\n\x0fPOWER_SUPPLY_DC\x10\x02*F\n\x06\x45ntity\x12\x16\n\x12\x45NTITY_UNSPECIFIED\x10\x00\x12\n\n\x06GOOGLE\x10\x01\x12\x0c\n\x08\x43USTOMER\x10\x02\x12\n\n\x06VENDOR\x10\x03\x42\xb2\x02\n.com.google.cloud.gdchardwaremanagement.v1alphaB\x0eResourcesProtoP\x01Zdcloud.google.com/go/gdchardwaremanagement/apiv1alpha/gdchardwaremanagementpb;gdchardwaremanagementpb\xaa\x02*Google.Cloud.GdcHardwareManagement.V1Alpha\xca\x02*Google\\Cloud\\GdcHardwareManagement\\V1alpha\xea\x02-Google::Cloud::GDCHardwareManagement::V1alphab\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.type.Date", "google/type/date.proto"], - ["google.type.PostalAddress", "google/type/postal_address.proto"], - ["google.type.TimeZone", "google/type/datetime.proto"], - ["google.type.TimeOfDay", "google/type/timeofday.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GDCHardwareManagement - module V1alpha - Order = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Order").msgclass - Order::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Order.State").enummodule - Order::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Order.Type").enummodule - Order::DeploymentType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Order.DeploymentType").enummodule - Site = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Site").msgclass - HardwareGroup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup").msgclass - HardwareGroup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup.State").enummodule - Hardware = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Hardware").msgclass - Hardware::MacAddress = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Hardware.MacAddress").msgclass - Hardware::MacAddress::AddressType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Hardware.MacAddress.AddressType").enummodule - Hardware::DiskInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Hardware.DiskInfo").msgclass - Hardware::MachineInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Hardware.MachineInfo").msgclass - Hardware::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Hardware.State").enummodule - Comment = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Comment").msgclass - ChangeLogEntry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry").msgclass - Sku = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Sku").msgclass - Sku::Range = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Sku.Range").msgclass - Sku::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Sku.Type").enummodule - Zone = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Zone").msgclass - Zone::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Zone.State").enummodule - Zone::ProvisioningState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Zone.ProvisioningState").enummodule - OrganizationContact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.OrganizationContact").msgclass - Contact = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Contact").msgclass - HardwareConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwareConfig").msgclass - SkuConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SkuConfig").msgclass - SkuInstance = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SkuInstance").msgclass - HardwarePhysicalInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo").msgclass - HardwarePhysicalInfo::PowerReceptacleType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.PowerReceptacleType").enummodule - HardwarePhysicalInfo::NetworkUplinkType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.NetworkUplinkType").enummodule - HardwarePhysicalInfo::Voltage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Voltage").enummodule - HardwarePhysicalInfo::Amperes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwarePhysicalInfo.Amperes").enummodule - HardwareInstallationInfo = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo").msgclass - HardwareInstallationInfo::RackType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwareInstallationInfo.RackType").enummodule - ZoneNetworkConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ZoneNetworkConfig").msgclass - Subnet = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Subnet").msgclass - TimePeriod = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.TimePeriod").msgclass - Dimensions = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Dimensions").msgclass - RackSpace = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.RackSpace").msgclass - HardwareLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.HardwareLocation").msgclass - SubscriptionConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SubscriptionConfig").msgclass - SubscriptionConfig::SubscriptionState = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SubscriptionConfig.SubscriptionState").enummodule - PowerSupply = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.PowerSupply").enummodule - Entity = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.Entity").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_pb.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_pb.rb deleted file mode 100644 index 644c021c1880..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_pb.rb +++ /dev/null @@ -1,107 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gdchardwaremanagement/v1alpha/service.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/gdchardwaremanagement/v1alpha/resources_pb' -require 'google/longrunning/operations_pb' -require 'google/protobuf/empty_pb' -require 'google/protobuf/field_mask_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/date_pb' - - -descriptor_data = "\n8google/cloud/gdchardwaremanagement/v1alpha/service.proto\x12*google.cloud.gdchardwaremanagement.v1alpha\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/gdchardwaremanagement/v1alpha/resources.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\"\xb4\x01\n\x11ListOrdersRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*gdchardwaremanagement.googleapis.com/Order\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\"\x85\x01\n\x12ListOrdersResponse\x12\x41\n\x06orders\x18\x01 \x03(\x0b\x32\x31.google.cloud.gdchardwaremanagement.v1alpha.Order\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x0fGetOrderRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gdchardwaremanagement.googleapis.com/Order\"\xcf\x01\n\x12\x43reateOrderRequest\x12\x42\n\x06parent\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\x12*gdchardwaremanagement.googleapis.com/Order\x12\x15\n\x08order_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x45\n\x05order\x18\x03 \x01(\x0b\x32\x31.google.cloud.gdchardwaremanagement.v1alpha.OrderB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xaa\x01\n\x12UpdateOrderRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x45\n\x05order\x18\x02 \x01(\x0b\x32\x31.google.cloud.gdchardwaremanagement.v1alpha.OrderB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x83\x01\n\x12\x44\x65leteOrderRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gdchardwaremanagement.googleapis.com/Order\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\x8a\x02\n\x12SubmitOrderRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gdchardwaremanagement.googleapis.com/Order\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12V\n\x04type\x18\x03 \x01(\x0e\x32\x43.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest.TypeB\x03\xe0\x41\x01\"A\n\x04Type\x12\x14\n\x10TYPE_UNSPECIFIED\x10\x00\x12\x10\n\x0cINFO_PENDING\x10\x01\x12\x11\n\rINFO_COMPLETE\x10\x02\"w\n\x12\x43\x61ncelOrderRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gdchardwaremanagement.googleapis.com/Order\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb2\x01\n\x10ListSitesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)gdchardwaremanagement.googleapis.com/Site\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\"\x82\x01\n\x11ListSitesResponse\x12?\n\x05sites\x18\x01 \x03(\x0b\x32\x30.google.cloud.gdchardwaremanagement.v1alpha.Site\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x0eGetSiteRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Site\"\xca\x01\n\x11\x43reateSiteRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)gdchardwaremanagement.googleapis.com/Site\x12\x14\n\x07site_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x04site\x18\x03 \x01(\x0b\x32\x30.google.cloud.gdchardwaremanagement.v1alpha.SiteB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xa7\x01\n\x11UpdateSiteRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x43\n\x04site\x18\x02 \x01(\x0b\x32\x30.google.cloud.gdchardwaremanagement.v1alpha.SiteB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"u\n\x11\x44\x65leteSiteRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Site\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xc4\x01\n\x19ListHardwareGroupsRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32gdchardwaremanagement.googleapis.com/HardwareGroup\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\"\x9e\x01\n\x1aListHardwareGroupsResponse\x12R\n\x0fhardware_groups\x18\x01 \x03(\x0b\x32\x39.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"c\n\x17GetHardwareGroupRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2gdchardwaremanagement.googleapis.com/HardwareGroup\"\xf9\x01\n\x1a\x43reateHardwareGroupRequest\x12J\n\x06parent\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\x12\x32gdchardwaremanagement.googleapis.com/HardwareGroup\x12\x1e\n\x11hardware_group_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12V\n\x0ehardware_group\x18\x03 \x01(\x0b\x32\x39.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\xc3\x01\n\x1aUpdateHardwareGroupRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12V\n\x0ehardware_group\x18\x02 \x01(\x0b\x32\x39.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroupB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\x7f\n\x1a\x44\x65leteHardwareGroupRequest\x12H\n\x04name\x18\x01 \x01(\tB:\xe0\x41\x02\xfa\x41\x34\n2gdchardwaremanagement.googleapis.com/HardwareGroup\x12\x17\n\nrequest_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xb9\x01\n\x13ListHardwareRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-gdchardwaremanagement.googleapis.com/Hardware\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\"\x8c\x01\n\x14ListHardwareResponse\x12\x46\n\x08hardware\x18\x01 \x03(\x0b\x32\x34.google.cloud.gdchardwaremanagement.v1alpha.Hardware\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Y\n\x12GetHardwareRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-gdchardwaremanagement.googleapis.com/Hardware\"\xc5\x01\n\x15\x43reateHardwareRequest\x12\x45\n\x06parent\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\x12-gdchardwaremanagement.googleapis.com/Hardware\x12\x18\n\x0bhardware_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12K\n\x08hardware\x18\x03 \x01(\x0b\x32\x34.google.cloud.gdchardwaremanagement.v1alpha.HardwareB\x03\xe0\x41\x02\"\xb3\x01\n\x15UpdateHardwareRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12K\n\x08hardware\x18\x02 \x01(\x0b\x32\x34.google.cloud.gdchardwaremanagement.v1alpha.HardwareB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"}\n\x15\x44\x65leteHardwareRequest\x12\x43\n\x04name\x18\x01 \x01(\tB5\xe0\x41\x02\xfa\x41/\n-gdchardwaremanagement.googleapis.com/Hardware\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xb8\x01\n\x13ListCommentsRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,gdchardwaremanagement.googleapis.com/Comment\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\"\x8b\x01\n\x14ListCommentsResponse\x12\x45\n\x08\x63omments\x18\x01 \x03(\x0b\x32\x33.google.cloud.gdchardwaremanagement.v1alpha.Comment\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"W\n\x11GetCommentRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,gdchardwaremanagement.googleapis.com/Comment\"\xd9\x01\n\x14\x43reateCommentRequest\x12\x44\n\x06parent\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\x12,gdchardwaremanagement.googleapis.com/Comment\x12\x17\n\ncomment_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12I\n\x07\x63omment\x18\x03 \x01(\x0b\x32\x33.google.cloud.gdchardwaremanagement.v1alpha.CommentB\x03\xe0\x41\x02\x12\x17\n\nrequest_id\x18\x04 \x01(\tB\x03\xe0\x41\x01\"\x92\x02\n\x1cRecordActionOnCommentRequest\x12\x42\n\x04name\x18\x01 \x01(\tB4\xe0\x41\x02\xfa\x41.\n,gdchardwaremanagement.googleapis.com/Comment\x12m\n\x0b\x61\x63tion_type\x18\x02 \x01(\x0e\x32S.google.cloud.gdchardwaremanagement.v1alpha.RecordActionOnCommentRequest.ActionTypeB\x03\xe0\x41\x02\"?\n\nActionType\x12\x1b\n\x17\x41\x43TION_TYPE_UNSPECIFIED\x10\x00\x12\x08\n\x04READ\x10\x01\x12\n\n\x06UNREAD\x10\x02\"\xc7\x01\n\x1bListChangeLogEntriesRequest\x12K\n\x06parent\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\x12\x33gdchardwaremanagement.googleapis.com/ChangeLogEntry\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\"\xa4\x01\n\x1cListChangeLogEntriesResponse\x12V\n\x12\x63hange_log_entries\x18\x01 \x03(\x0b\x32:.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"e\n\x18GetChangeLogEntryRequest\x12I\n\x04name\x18\x01 \x01(\tB;\xe0\x41\x02\xfa\x41\x35\n3gdchardwaremanagement.googleapis.com/ChangeLogEntry\"\xb0\x01\n\x0fListSkusRequest\x12@\n\x06parent\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\x12(gdchardwaremanagement.googleapis.com/Sku\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\"\x7f\n\x10ListSkusResponse\x12=\n\x04skus\x18\x01 \x03(\x0b\x32/.google.cloud.gdchardwaremanagement.v1alpha.Sku\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"O\n\rGetSkuRequest\x12>\n\x04name\x18\x01 \x01(\tB0\xe0\x41\x02\xfa\x41*\n(gdchardwaremanagement.googleapis.com/Sku\"\xb2\x01\n\x10ListZonesRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)gdchardwaremanagement.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\"\x82\x01\n\x11ListZonesResponse\x12?\n\x05zones\x18\x01 \x03(\x0b\x32\x30.google.cloud.gdchardwaremanagement.v1alpha.Zone\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x0eGetZoneRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Zone\"\xd2\x01\n\x11\x43reateZoneRequest\x12\x41\n\x06parent\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\x12)gdchardwaremanagement.googleapis.com/Zone\x12\x14\n\x07zone_id\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x43\n\x04zone\x18\x03 \x01(\x0b\x32\x30.google.cloud.gdchardwaremanagement.v1alpha.ZoneB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x04 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xaf\x01\n\x11UpdateZoneRequest\x12\x34\n\x0bupdate_mask\x18\x01 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02\x12\x43\n\x04zone\x18\x02 \x01(\x0b\x32\x30.google.cloud.gdchardwaremanagement.v1alpha.ZoneB\x03\xe0\x41\x02\x12\x1f\n\nrequest_id\x18\x03 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"u\n\x11\x44\x65leteZoneRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Zone\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\"\xee\x05\n\x16SignalZoneStateRequest\x12?\n\x04name\x18\x01 \x01(\tB1\xe0\x41\x02\xfa\x41+\n)gdchardwaremanagement.googleapis.com/Zone\x12\x1f\n\nrequest_id\x18\x02 \x01(\tB\x0b\xe0\x41\x01\xe2\x8c\xcf\xd7\x08\x02\x08\x01\x12i\n\x0cstate_signal\x18\x03 \x01(\x0e\x32N.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignalB\x03\xe0\x41\x01\x12\x82\x01\n\x19provisioning_state_signal\x18\x04 \x01(\x0e\x32Z.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.ProvisioningStateSignalB\x03\xe0\x41\x01\x12\x11\n\x04step\x18\x05 \x01(\tB\x03\xe0\x41\x01\x12\x14\n\x07\x64\x65tails\x18\x06 \x01(\tB\x03\xe0\x41\x01\"\xd9\x01\n\x0bStateSignal\x12\x1c\n\x18STATE_SIGNAL_UNSPECIFIED\x10\x00\x12!\n\x1d\x46\x41\x43TORY_TURNUP_CHECKS_STARTED\x10\x03\x12 \n\x1c\x46\x41\x43TORY_TURNUP_CHECKS_PASSED\x10\x01\x12\x1d\n\x15READY_FOR_SITE_TURNUP\x10\x01\x1a\x02\x08\x01\x12 \n\x1c\x46\x41\x43TORY_TURNUP_CHECKS_FAILED\x10\x02\x12\"\n\x1eVERIFY_CLUSTER_INTENT_PRESENCE\x10\x04\x1a\x02\x10\x01\"}\n\x17ProvisioningStateSignal\x12)\n%PROVISIONING_STATE_SIGNAL_UNSPECIFIED\x10\x00\x12\x1c\n\x18PROVISIONING_IN_PROGRESS\x10\x01\x12\x19\n\x15PROVISIONING_COMPLETE\x10\x02\"\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\"\x91\x01\n\x1dRequestOrderDateChangeRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gdchardwaremanagement.googleapis.com/Order\x12.\n\x0erequested_date\x18\x02 \x01(\x0b\x32\x11.google.type.DateB\x03\xe0\x41\x02\x32\xaf\x42\n\x15GDCHardwareManagement\x12\xcd\x01\n\nListOrders\x12=.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest\x1a>.google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{parent=projects/*/locations/*}/orders\x12\xba\x01\n\x08GetOrder\x12;.google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest\x1a\x31.google.cloud.gdchardwaremanagement.v1alpha.Order\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1alpha/{name=projects/*/locations/*/orders/*}\x12\xe1\x01\n\x0b\x43reateOrder\x12>.google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest\x1a\x1d.google.longrunning.Operation\"s\xca\x41\x1a\n\x05Order\x12\x11OperationMetadata\xda\x41\x15parent,order,order_id\x82\xd3\xe4\x93\x02\x38\"//v1alpha/{parent=projects/*/locations/*}/orders:\x05order\x12\xe3\x01\n\x0bUpdateOrder\x12>.google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41\x1a\n\x05Order\x12\x11OperationMetadata\xda\x41\x11order,update_mask\x82\xd3\xe4\x93\x02>25/v1alpha/{order.name=projects/*/locations/*/orders/*}:\x05order\x12\xd9\x01\n\x0b\x44\x65leteOrder\x12>.google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest\x1a\x1d.google.longrunning.Operation\"k\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31*//v1alpha/{name=projects/*/locations/*/orders/*}\x12\xd3\x01\n\x0bSubmitOrder\x12>.google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41\x1a\n\x05Order\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1alpha/{name=projects/*/locations/*/orders/*}:submit:\x01*\x12\xd3\x01\n\x0b\x43\x61ncelOrder\x12>.google.cloud.gdchardwaremanagement.v1alpha.CancelOrderRequest\x1a\x1d.google.longrunning.Operation\"e\xca\x41\x1a\n\x05Order\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;\"6/v1alpha/{name=projects/*/locations/*/orders/*}:cancel:\x01*\x12\xc9\x01\n\tListSites\x12<.google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest\x1a=.google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1alpha/{parent=projects/*/locations/*}/sites\x12\xb6\x01\n\x07GetSite\x12:.google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest\x1a\x30.google.cloud.gdchardwaremanagement.v1alpha.Site\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1alpha/{name=projects/*/locations/*/sites/*}\x12\xda\x01\n\nCreateSite\x12=.google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41\x19\n\x04Site\x12\x11OperationMetadata\xda\x41\x13parent,site,site_id\x82\xd3\xe4\x93\x02\x36\"./v1alpha/{parent=projects/*/locations/*}/sites:\x04site\x12\xdc\x01\n\nUpdateSite\x12=.google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x19\n\x04Site\x12\x11OperationMetadata\xda\x41\x10site,update_mask\x82\xd3\xe4\x93\x02;23/v1alpha/{site.name=projects/*/locations/*/sites/*}:\x04site\x12\xd6\x01\n\nDeleteSite\x12=.google.cloud.gdchardwaremanagement.v1alpha.DeleteSiteRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1alpha/{name=projects/*/locations/*/sites/*}\x12\xf6\x01\n\x12ListHardwareGroups\x12\x45.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest\x1a\x46.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse\"Q\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x42\x12@/v1alpha/{parent=projects/*/locations/*/orders/*}/hardwareGroups\x12\xe3\x01\n\x10GetHardwareGroup\x12\x43.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest\x1a\x39.google.cloud.gdchardwaremanagement.v1alpha.HardwareGroup\"O\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42\x12@/v1alpha/{name=projects/*/locations/*/orders/*/hardwareGroups/*}\x12\xa6\x02\n\x13\x43reateHardwareGroup\x12\x46.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest\x1a\x1d.google.longrunning.Operation\"\xa7\x01\xca\x41\"\n\rHardwareGroup\x12\x11OperationMetadata\xda\x41\'parent,hardware_group,hardware_group_id\x82\xd3\xe4\x93\x02R\"@/v1alpha/{parent=projects/*/locations/*/orders/*}/hardwareGroups:\x0ehardware_group\x12\xa8\x02\n\x13UpdateHardwareGroup\x12\x46.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest\x1a\x1d.google.longrunning.Operation\"\xa9\x01\xca\x41\"\n\rHardwareGroup\x12\x11OperationMetadata\xda\x41\x1ahardware_group,update_mask\x82\xd3\xe4\x93\x02\x61\x32O/v1alpha/{hardware_group.name=projects/*/locations/*/orders/*/hardwareGroups/*}:\x0ehardware_group\x12\xfa\x01\n\x13\x44\x65leteHardwareGroup\x12\x46.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest\x1a\x1d.google.longrunning.Operation\"|\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x42*@/v1alpha/{name=projects/*/locations/*/orders/*/hardwareGroups/*}\x12\xd5\x01\n\x0cListHardware\x12?.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest\x1a@.google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse\"B\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x33\x12\x31/v1alpha/{parent=projects/*/locations/*}/hardware\x12\xc5\x01\n\x0bGetHardware\x12>.google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest\x1a\x34.google.cloud.gdchardwaremanagement.v1alpha.Hardware\"@\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33\x12\x31/v1alpha/{name=projects/*/locations/*/hardware/*}\x12\xf6\x01\n\x0e\x43reateHardware\x12\x41.google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest\x1a\x1d.google.longrunning.Operation\"\x81\x01\xca\x41\x1d\n\x08Hardware\x12\x11OperationMetadata\xda\x41\x1bparent,hardware,hardware_id\x82\xd3\xe4\x93\x02=\"1/v1alpha/{parent=projects/*/locations/*}/hardware:\x08hardware\x12\xf8\x01\n\x0eUpdateHardware\x12\x41.google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x1d\n\x08Hardware\x12\x11OperationMetadata\xda\x41\x14hardware,update_mask\x82\xd3\xe4\x93\x02\x46\x32:/v1alpha/{hardware.name=projects/*/locations/*/hardware/*}:\x08hardware\x12\xe1\x01\n\x0e\x44\x65leteHardware\x12\x41.google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest\x1a\x1d.google.longrunning.Operation\"m\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x33*1/v1alpha/{name=projects/*/locations/*/hardware/*}\x12\xde\x01\n\x0cListComments\x12?.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest\x1a@.google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse\"K\xda\x41\x06parent\x82\xd3\xe4\x93\x02<\x12:/v1alpha/{parent=projects/*/locations/*/orders/*}/comments\x12\xcb\x01\n\nGetComment\x12=.google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest\x1a\x33.google.cloud.gdchardwaremanagement.v1alpha.Comment\"I\xda\x41\x04name\x82\xd3\xe4\x93\x02<\x12:/v1alpha/{name=projects/*/locations/*/orders/*/comments/*}\x12\xf9\x01\n\rCreateComment\x12@.google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest\x1a\x1d.google.longrunning.Operation\"\x86\x01\xca\x41\x1c\n\x07\x43omment\x12\x11OperationMetadata\xda\x41\x19parent,comment,comment_id\x82\xd3\xe4\x93\x02\x45\":/v1alpha/{parent=projects/*/locations/*/orders/*}/comments:\x07\x63omment\x12\xfd\x01\n\x15RecordActionOnComment\x12H.google.cloud.gdchardwaremanagement.v1alpha.RecordActionOnCommentRequest\x1a\x33.google.cloud.gdchardwaremanagement.v1alpha.Comment\"e\xda\x41\x10name,action_type\x82\xd3\xe4\x93\x02L\"G/v1alpha/{name=projects/*/locations/*/orders/*/comments/*}:recordAction:\x01*\x12\xfe\x01\n\x14ListChangeLogEntries\x12G.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest\x1aH.google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse\"S\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x44\x12\x42/v1alpha/{parent=projects/*/locations/*/orders/*}/changeLogEntries\x12\xe8\x01\n\x11GetChangeLogEntry\x12\x44.google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest\x1a:.google.cloud.gdchardwaremanagement.v1alpha.ChangeLogEntry\"Q\xda\x41\x04name\x82\xd3\xe4\x93\x02\x44\x12\x42/v1alpha/{name=projects/*/locations/*/orders/*/changeLogEntries/*}\x12\xc5\x01\n\x08ListSkus\x12;.google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest\x1a<.google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse\">\xda\x41\x06parent\x82\xd3\xe4\x93\x02/\x12-/v1alpha/{parent=projects/*/locations/*}/skus\x12\xb2\x01\n\x06GetSku\x12\x39.google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest\x1a/.google.cloud.gdchardwaremanagement.v1alpha.Sku\"<\xda\x41\x04name\x82\xd3\xe4\x93\x02/\x12-/v1alpha/{name=projects/*/locations/*/skus/*}\x12\xc9\x01\n\tListZones\x12<.google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest\x1a=.google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse\"?\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x30\x12./v1alpha/{parent=projects/*/locations/*}/zones\x12\xb6\x01\n\x07GetZone\x12:.google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest\x1a\x30.google.cloud.gdchardwaremanagement.v1alpha.Zone\"=\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30\x12./v1alpha/{name=projects/*/locations/*/zones/*}\x12\xda\x01\n\nCreateZone\x12=.google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x13parent,zone,zone_id\x82\xd3\xe4\x93\x02\x36\"./v1alpha/{parent=projects/*/locations/*}/zones:\x04zone\x12\xdc\x01\n\nUpdateZone\x12=.google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x10zone,update_mask\x82\xd3\xe4\x93\x02;23/v1alpha/{zone.name=projects/*/locations/*/zones/*}:\x04zone\x12\xd6\x01\n\nDeleteZone\x12=.google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest\x1a\x1d.google.longrunning.Operation\"j\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x30*./v1alpha/{name=projects/*/locations/*/zones/*}\x12\xe6\x01\n\x0fSignalZoneState\x12\x42.google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest\x1a\x1d.google.longrunning.Operation\"p\xca\x41\x19\n\x04Zone\x12\x11OperationMetadata\xda\x41\x11name,state_signal\x82\xd3\xe4\x93\x02:\"5/v1alpha/{name=projects/*/locations/*/zones/*}:signal:\x01*\x12\x83\x02\n\x16RequestOrderDateChange\x12I.google.cloud.gdchardwaremanagement.v1alpha.RequestOrderDateChangeRequest\x1a\x1d.google.longrunning.Operation\"\x7f\xca\x41\x1a\n\x05Order\x12\x11OperationMetadata\xda\x41\x13name,requested_date\x82\xd3\xe4\x93\x02\x46\"A/v1alpha/{name=projects/*/locations/*/orders/*}:requestDateChange:\x01*\x1aX\xca\x41$gdchardwaremanagement.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xb0\x02\n.com.google.cloud.gdchardwaremanagement.v1alphaB\x0cServiceProtoP\x01Zdcloud.google.com/go/gdchardwaremanagement/apiv1alpha/gdchardwaremanagementpb;gdchardwaremanagementpb\xaa\x02*Google.Cloud.GdcHardwareManagement.V1Alpha\xca\x02*Google\\Cloud\\GdcHardwareManagement\\V1alpha\xea\x02-Google::Cloud::GDCHardwareManagement::V1alphab\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.gdchardwaremanagement.v1alpha.Order", "google/cloud/gdchardwaremanagement/v1alpha/resources.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.type.Date", "google/type/date.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GDCHardwareManagement - module V1alpha - ListOrdersRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListOrdersRequest").msgclass - ListOrdersResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListOrdersResponse").msgclass - GetOrderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetOrderRequest").msgclass - CreateOrderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CreateOrderRequest").msgclass - UpdateOrderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.UpdateOrderRequest").msgclass - DeleteOrderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.DeleteOrderRequest").msgclass - SubmitOrderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest").msgclass - SubmitOrderRequest::Type = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SubmitOrderRequest.Type").enummodule - CancelOrderRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CancelOrderRequest").msgclass - ListSitesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListSitesRequest").msgclass - ListSitesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListSitesResponse").msgclass - GetSiteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetSiteRequest").msgclass - CreateSiteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CreateSiteRequest").msgclass - UpdateSiteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.UpdateSiteRequest").msgclass - DeleteSiteRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.DeleteSiteRequest").msgclass - ListHardwareGroupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsRequest").msgclass - ListHardwareGroupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListHardwareGroupsResponse").msgclass - GetHardwareGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetHardwareGroupRequest").msgclass - CreateHardwareGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareGroupRequest").msgclass - UpdateHardwareGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareGroupRequest").msgclass - DeleteHardwareGroupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareGroupRequest").msgclass - ListHardwareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListHardwareRequest").msgclass - ListHardwareResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListHardwareResponse").msgclass - GetHardwareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetHardwareRequest").msgclass - CreateHardwareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CreateHardwareRequest").msgclass - UpdateHardwareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.UpdateHardwareRequest").msgclass - DeleteHardwareRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.DeleteHardwareRequest").msgclass - ListCommentsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListCommentsRequest").msgclass - ListCommentsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListCommentsResponse").msgclass - GetCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetCommentRequest").msgclass - CreateCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CreateCommentRequest").msgclass - RecordActionOnCommentRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.RecordActionOnCommentRequest").msgclass - RecordActionOnCommentRequest::ActionType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.RecordActionOnCommentRequest.ActionType").enummodule - ListChangeLogEntriesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesRequest").msgclass - ListChangeLogEntriesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListChangeLogEntriesResponse").msgclass - GetChangeLogEntryRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetChangeLogEntryRequest").msgclass - ListSkusRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListSkusRequest").msgclass - ListSkusResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListSkusResponse").msgclass - GetSkuRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetSkuRequest").msgclass - ListZonesRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListZonesRequest").msgclass - ListZonesResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.ListZonesResponse").msgclass - GetZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.GetZoneRequest").msgclass - CreateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.CreateZoneRequest").msgclass - UpdateZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.UpdateZoneRequest").msgclass - DeleteZoneRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.DeleteZoneRequest").msgclass - SignalZoneStateRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest").msgclass - SignalZoneStateRequest::StateSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.StateSignal").enummodule - SignalZoneStateRequest::ProvisioningStateSignal = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.SignalZoneStateRequest.ProvisioningStateSignal").enummodule - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.OperationMetadata").msgclass - RequestOrderDateChangeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gdchardwaremanagement.v1alpha.RequestOrderDateChangeRequest").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_services_pb.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_services_pb.rb deleted file mode 100644 index b7d920dba588..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/lib/google/cloud/gdchardwaremanagement/v1alpha/service_services_pb.rb +++ /dev/null @@ -1,120 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/gdchardwaremanagement/v1alpha/service.proto for package 'Google.Cloud.GDCHardwareManagement.V1alpha' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/gdchardwaremanagement/v1alpha/service_pb' - -module Google - module Cloud - module GDCHardwareManagement - module V1alpha - module GDCHardwareManagement - # The GDC Hardware Management service. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement' - - # Lists orders in a given project and location. - rpc :ListOrders, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse - # Gets details of an order. - rpc :GetOrder, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Order - # Creates a new order in a given project and location. - rpc :CreateOrder, ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest, ::Google::Longrunning::Operation - # Updates the parameters of an order. - rpc :UpdateOrder, ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest, ::Google::Longrunning::Operation - # Deletes an order. - rpc :DeleteOrder, ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest, ::Google::Longrunning::Operation - # Submits an order. - rpc :SubmitOrder, ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest, ::Google::Longrunning::Operation - # Cancels an order. - rpc :CancelOrder, ::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest, ::Google::Longrunning::Operation - # Lists sites in a given project and location. - rpc :ListSites, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse - # Gets details of a site. - rpc :GetSite, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Site - # Creates a new site in a given project and location. - rpc :CreateSite, ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest, ::Google::Longrunning::Operation - # Updates the parameters of a site. - rpc :UpdateSite, ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest, ::Google::Longrunning::Operation - # Deletes a site. - rpc :DeleteSite, ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest, ::Google::Longrunning::Operation - # Lists hardware groups in a given order. - rpc :ListHardwareGroups, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse - # Gets details of a hardware group. - rpc :GetHardwareGroup, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup - # Creates a new hardware group in a given order. - rpc :CreateHardwareGroup, ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest, ::Google::Longrunning::Operation - # Updates the parameters of a hardware group. - rpc :UpdateHardwareGroup, ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest, ::Google::Longrunning::Operation - # Deletes a hardware group. - rpc :DeleteHardwareGroup, ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest, ::Google::Longrunning::Operation - # Lists hardware in a given project and location. - rpc :ListHardware, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse - # Gets hardware details. - rpc :GetHardware, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware - # Creates new hardware in a given project and location. - rpc :CreateHardware, ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest, ::Google::Longrunning::Operation - # Updates hardware parameters. - rpc :UpdateHardware, ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest, ::Google::Longrunning::Operation - # Deletes hardware. - rpc :DeleteHardware, ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest, ::Google::Longrunning::Operation - # Lists the comments on an order. - rpc :ListComments, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse - # Gets the content of a comment. - rpc :GetComment, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment - # Creates a new comment on an order. - rpc :CreateComment, ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest, ::Google::Longrunning::Operation - # Record Action on a Comment. If the Action specified in the request is READ, - # the viewed time in the comment is set to the time the request was received. - # If the comment is already marked as read, subsequent calls will be ignored. - # If the Action is UNREAD, the viewed time is cleared from the comment. - rpc :RecordActionOnComment, ::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment - # Lists the changes made to an order. - rpc :ListChangeLogEntries, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse - # Gets details of a change to an order. - rpc :GetChangeLogEntry, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry - # Lists SKUs for a given project and location. - rpc :ListSkus, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse - # Gets details of an SKU. - rpc :GetSku, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku - # Lists zones in a given project and location. - rpc :ListZones, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesResponse - # Gets details of a zone. - rpc :GetZone, ::Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest, ::Google::Cloud::GDCHardwareManagement::V1alpha::Zone - # Creates a new zone in a given project and location. - rpc :CreateZone, ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest, ::Google::Longrunning::Operation - # Updates the parameters of a zone. - rpc :UpdateZone, ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest, ::Google::Longrunning::Operation - # Deletes a zone. - rpc :DeleteZone, ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest, ::Google::Longrunning::Operation - # Signals the state of a zone. - rpc :SignalZoneState, ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest, ::Google::Longrunning::Operation - # Updates the requested date change of a single Order. - rpc :RequestOrderDateChange, ::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest, ::Google::Longrunning::Operation - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/README.md b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/README.md deleted file mode 100644 index 7e80aeaac20b..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# GDC Hardware Management V1ALPHA 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-gdc_hardware_management-v1alpha/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/resources.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/resources.rb deleted file mode 100644 index da6b670c171e..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/resources.rb +++ /dev/null @@ -1,1206 +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 GDCHardwareManagement - module V1alpha - # An order for GDC hardware. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of this order. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @!attribute [rw] display_name - # @return [::String] - # Optional. Display name of this order. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this order was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this order was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels associated with this order as key value pairs. - # For more information about labels, see [Create and manage - # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). - # @!attribute [r] state - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order::State] - # Output only. State of this order. On order creation, state will be set to - # DRAFT. - # @!attribute [rw] organization_contact - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::OrganizationContact] - # Required. Customer contact information. - # @!attribute [rw] target_workloads - # @return [::Array<::String>] - # Optional. Customer specified workloads of interest targeted by this order. - # This must contain <= 20 elements and the length of each element must be <= - # 50 characters. - # @!attribute [rw] customer_motivation - # @return [::String] - # Required. Information about the customer's motivation for this order. The - # length of this field must be <= 1000 characters. - # @!attribute [rw] fulfillment_time - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Protobuf::Timestamp] - # Deprecated: Please use customer_requested_installation_date instead. - # @!attribute [rw] customer_requested_installation_date - # @return [::Google::Type::Date] - # Optional. Customer requested installation date for this order. - # @!attribute [rw] region_code - # @return [::String] - # Required. [Unicode CLDR](http://cldr.unicode.org/) region code where this - # order will be deployed. For a list of valid CLDR region codes, see the - # [Language Subtag - # Registry](https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry). - # @!attribute [r] order_form_uri - # @return [::String] - # Output only. Link to the order form. - # @!attribute [r] type - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order::Type] - # Output only. Type of this Order. - # @!attribute [r] submit_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when the order was submitted. Is auto-populated to the - # current time when an order is submitted. - # @!attribute [r] billing_id - # @return [::String] - # Output only. The Google Cloud Billing ID to be charged for this order. - # @!attribute [rw] existing_hardware - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareLocation>] - # Optional. Existing hardware to be removed as part of this order. - # Note: any hardware removed will be recycled unless otherwise agreed. - # @!attribute [r] deployment_type - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order::DeploymentType] - # Output only. The deployment type of this order. - # @!attribute [r] actual_installation_date - # @return [::Google::Type::Date] - # Output only. Actual installation date for this order. - # @!attribute [r] estimated_installation_date - # @return [::Google::Type::Date] - # Output only. Estimated installation date for this order. - # @!attribute [r] estimated_delivery_date - # @return [::Google::Type::Date] - # Output only. Estimated delivery date for this order. - # @!attribute [rw] migration - # @return [::Boolean] - # Optional. Whether this order is a migration from customer's existing - # infrastructure. - # @!attribute [r] accepted_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time when the order was moved to ACCEPTED state. - # @!attribute [r] requested_date_change - # @return [::Google::Type::Date] - # Output only. The date to which the customer or Google wants to set the - # scheduled installation date. - # @!attribute [r] vendor_notes - # @return [::String] - # Output only. Notes for this order, provided by the vendor. - # @!attribute [r] vendor_contact - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::OrganizationContact] - # Output only. Contact information of the SI assigned to this order. - class Order - 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 - - # Valid states of an order. - module State - # State of the order is unspecified. - STATE_UNSPECIFIED = 0 - - # Order is being drafted by the customer and has not been submitted yet. - DRAFT = 1 - - # Order has been submitted to Google. - SUBMITTED = 2 - - # All information required from the customer for fulfillment of the order - # is complete. - INFO_COMPLETE = 12 - - # Order has been accepted by Google. - ACCEPTED = 3 - - # Order needs more information from the customer. - ADDITIONAL_INFO_NEEDED = 4 - - # Google has initiated building hardware for the order. - BUILDING = 5 - - # The hardware has been built and is being shipped. - SHIPPING = 6 - - # The hardware is being installed. - INSTALLING = 7 - - # An error occurred in processing the order and customer intervention is - # required. - FAILED = 8 - - # Order has been partially completed i.e., some hardware have been - # delivered and installed. - PARTIALLY_COMPLETED = 9 - - # Order has been completed. - COMPLETED = 10 - - # Order has been cancelled. - CANCELLED = 11 - end - - # Valid types of an Order. - module Type - # Type of the order is unspecified. - TYPE_UNSPECIFIED = 0 - - # Paid by the customer. - PAID = 1 - - # Proof of concept for the customer. - POC = 2 - - # Not billed. - UNPAID = 2 - end - - # Valid types of a deployment. - module DeploymentType - # Deployment type is unspecified. - DEPLOYMENT_TYPE_UNSPECIFIED = 0 - - # Prod deployment with SLOs. - FULL_PRODUCTION = 1 - - # Deployment with best-effort support and no SLOs. - PROOF_OF_CONCEPT = 2 - - # Internal deployment with best-effort support and no SLOs. - INTERNAL = 3 - - # Customer lab deployment that we support as though it's prod. - CUSTOMER_LAB = 4 - end - end - - # A physical site where hardware will be installed. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of the site. - # Format: `projects/{project}/locations/{location}/sites/{site}` - # @!attribute [rw] display_name - # @return [::String] - # Optional. Display name of this Site. - # @!attribute [rw] description - # @return [::String] - # Optional. Description of this Site. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this site was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this site was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels associated with this site as key value pairs. - # For more information about labels, see [Create and manage - # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). - # @!attribute [rw] organization_contact - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::OrganizationContact] - # Required. Contact information for this site. - # @!attribute [rw] google_maps_pin_uri - # @return [::String] - # Optional. A URL to the Google Maps address location of the site. - # An example value is `https://goo.gl/maps/xxxxxxxxx`. - # @!attribute [rw] access_times - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::TimePeriod>] - # Optional. The time periods when the site is accessible. - # If this field is empty, the site is accessible at all times. - # - # This field is used by Google to schedule the initial installation as well - # as any later hardware maintenance. You may update this at any time. For - # example, if the initial installation is requested during off-hours but - # maintenance should be performed during regular business hours, you should - # update the access times after initial installation is complete. - # @!attribute [rw] notes - # @return [::String] - # Optional. Any additional notes for this Site. Please include information - # about: - # - security or access restrictions - # - any regulations affecting the technicians visiting the site - # - any special process or approval required to move the equipment - # - whether a representative will be available during site visits - # @!attribute [rw] customer_site_id - # @return [::String] - # Optional. Customer defined identifier for this Site. This can be used to - # identify the site in the customer's own systems. - class Site - 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 group of hardware that is part of the same order, has the same SKU, and is - # delivered to the same site. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of this hardware group. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this hardware group was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this hardware group was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels associated with this hardware group as key value pairs. - # For more information about labels, see [Create and manage - # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). - # @!attribute [rw] hardware_count - # @return [::Integer] - # Required. Number of hardware in this HardwareGroup. - # @!attribute [rw] config - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareConfig] - # Required. Configuration for hardware in this HardwareGroup. - # @!attribute [rw] site - # @return [::String] - # Required. Name of the site where the hardware in this HardwareGroup will be - # delivered. - # Format: `projects/{project}/locations/{location}/sites/{site}` - # @!attribute [r] state - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup::State] - # Output only. Current state of this HardwareGroup. - # @!attribute [rw] zone - # @return [::String] - # Optional. Name of the zone that the hardware in this HardwareGroup belongs - # to. Format: `projects/{project}/locations/{location}/zones/{zone}` - # @!attribute [rw] requested_installation_date - # @deprecated This field is deprecated and may be removed in the next major version update. - # @return [::Google::Type::Date] - # Deprecated: This value is not used. Use the requested_installation_date - # field in the Order resource instead. - class HardwareGroup - 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 - - # Valid states of a HardwareGroup. - module State - # State of the HardwareGroup is unspecified. - STATE_UNSPECIFIED = 0 - - # More information is required from the customer to make progress. - ADDITIONAL_INFO_NEEDED = 1 - - # Google has initiated building hardware for this HardwareGroup. - BUILDING = 2 - - # The hardware has been built and is being shipped. - SHIPPING = 3 - - # The hardware is being installed. - INSTALLING = 4 - - # Some hardware in the HardwareGroup have been installed. - PARTIALLY_INSTALLED = 5 - - # All hardware in the HardwareGroup have been installed. - INSTALLED = 6 - - # An error occurred and customer intervention is required. - FAILED = 7 - end - end - - # An instance of hardware installed at a site. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of this hardware. - # Format: `projects/{project}/locations/{location}/hardware/{hardware}` - # @!attribute [rw] display_name - # @return [::String] - # Optional. Display name for this hardware. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this hardware was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this hardware was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels associated with this hardware as key value pairs. - # For more information about labels, see [Create and manage - # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). - # @!attribute [rw] order - # @return [::String] - # Required. Name of the order that this hardware belongs to. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @!attribute [r] hardware_group - # @return [::String] - # Output only. Name for the hardware group that this hardware belongs to. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` - # @!attribute [rw] site - # @return [::String] - # Required. Name for the site that this hardware belongs to. - # Format: `projects/{project}/locations/{location}/sites/{site}` - # @!attribute [r] state - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware::State] - # Output only. Current state for this hardware. - # @!attribute [r] ciq_uri - # @return [::String] - # Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this - # Hardware. - # @!attribute [rw] config - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareConfig] - # Required. Configuration for this hardware. - # @!attribute [r] estimated_installation_date - # @return [::Google::Type::Date] - # Output only. Estimated installation date for this hardware. - # @!attribute [rw] physical_info - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwarePhysicalInfo] - # Optional. Physical properties of this hardware. - # @!attribute [rw] installation_info - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareInstallationInfo] - # Optional. Information for installation of this hardware. - # @!attribute [rw] zone - # @return [::String] - # Required. Name for the zone that this hardware belongs to. - # Format: `projects/{project}/locations/{location}/zones/{zone}` - # @!attribute [rw] requested_installation_date - # @return [::Google::Type::Date] - # Optional. Requested installation date for this hardware. If not specified, - # this is auto-populated from the order's fulfillment_time upon submission or - # from the HardwareGroup's requested_installation_date upon order acceptance. - # @!attribute [r] actual_installation_date - # @return [::Google::Type::Date] - # Output only. Actual installation date for this hardware. Filled in by - # Google. - # @!attribute [r] machine_infos - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware::MachineInfo>] - # Output only. Per machine asset information needed for turnup. - # @!attribute [r] estimated_delivery_date - # @return [::Google::Type::Date] - # Output only. The estimated delivery date of the hardware. - class Hardware - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Message to describe the MAC address of a machine. - # @!attribute [r] address - # @return [::String] - # Output only. Address string. - # @!attribute [r] type - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware::MacAddress::AddressType] - # Output only. Address type for this MAC address. - # @!attribute [r] ipv4_address - # @return [::String] - # Output only. Static IP address (if used) that is associated with the MAC - # address. Only applicable for VIRTUAL MAC address type. - class MacAddress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum for the different types of MAC address. - module AddressType - # Unspecified address type. - ADDRESS_TYPE_UNSPECIFIED = 0 - - # Address of a network interface card. - NIC = 1 - - # Address of a baseboard management controller. - BMC = 2 - - # Address of a virtual interface. - VIRTUAL = 3 - end - end - - # Information about individual disks on a machine. - # @!attribute [r] manufacturer - # @return [::String] - # Output only. Disk manufacturer. - # @!attribute [r] slot - # @return [::Integer] - # Output only. Disk slot number. - # @!attribute [r] serial_number - # @return [::String] - # Output only. Disk serial number. - # @!attribute [r] psid - # @return [::String] - # Output only. Disk PSID. - # @!attribute [r] part_number - # @return [::String] - # Output only. Disk part number. - # @!attribute [r] model_number - # @return [::String] - # Output only. Disk model number. - class DiskInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Information about individual machines vendors will provide during turnup. - # @!attribute [r] service_tag - # @return [::String] - # Output only. Machine service tag. - # @!attribute [r] mac_addresses - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware::MacAddress>] - # Output only. Each associated MAC address. - # @!attribute [r] name - # @return [::String] - # Output only. Machine name. - # @!attribute [r] disk_infos - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware::DiskInfo>] - # Output only. Information for each disk installed. - class MachineInfo - 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 - - # Valid states for hardware. - module State - # State of the Hardware is unspecified. - STATE_UNSPECIFIED = 0 - - # More information is required from the customer to make progress. - ADDITIONAL_INFO_NEEDED = 1 - - # Google has initiated building hardware for this Hardware. - BUILDING = 2 - - # The hardware has been built and is being shipped. - SHIPPING = 3 - - # The hardware is being installed. - INSTALLING = 4 - - # The hardware has been installed. - INSTALLED = 5 - - # An error occurred and customer intervention is required. - FAILED = 6 - end - end - - # A comment on an order. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of this comment. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this comment was created. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels associated with this comment as key value pairs. - # For more information about labels, see [Create and manage - # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). - # @!attribute [r] author - # @return [::String] - # Output only. Username of the author of this comment. This is auto-populated - # from the credentials used during creation of the comment. - # @!attribute [rw] text - # @return [::String] - # Required. Text of this comment. The length of text must be <= 1000 - # characters. - # @!attribute [r] customer_viewed_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of the first time this comment was viewed by the - # customer. If the comment wasn't viewed then this timestamp will be unset. - # @!attribute [r] author_entity - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Entity] - # Output only. The entity the author belongs to. - class Comment - 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 log entry of a change made to an order. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of this change log entry. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this change log entry was created. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels associated with this change log entry as key value pairs. - # For more information about labels, see [Create and manage - # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). - # @!attribute [r] log - # @return [::String] - # Output only. Content of this log entry. - class ChangeLogEntry - 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 stock keeping unit (SKU) of GDC hardware. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of this SKU. - # Format: `projects/{project}/locations/{location}/skus/{sku}` - # @!attribute [r] display_name - # @return [::String] - # Output only. Display name of this SKU. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this SKU was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this SKU was last updated. - # @!attribute [r] config - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::SkuConfig] - # Output only. Configuration for this SKU. - # @!attribute [r] instances - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::SkuInstance>] - # Output only. Available instances of this SKU. This field should be used for - # checking availability of a SKU. - # @!attribute [r] description - # @return [::String] - # Output only. Description of this SKU. - # @!attribute [r] revision_id - # @return [::String] - # Output only. The SKU revision ID. - # A new revision is created whenever `config` is updated. The format is an - # 8-character hexadecimal string. - # @!attribute [r] is_active - # @return [::Boolean] - # Output only. Flag to indicate whether or not this revision is active. Only - # an active revision can be used in a new Order. - # @!attribute [r] type - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Sku::Type] - # Output only. Type of this SKU. - # @!attribute [r] vcpu_count - # @return [::Integer] - # Output only. The vCPU count associated with this SKU. - # @!attribute [r] hardware_count_ranges - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku::Range>] - # Output only. The inclusive ranges of hardware counts that are allowed in a - # zone using this SKU. - class Sku - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Inclusive range. - # @!attribute [rw] min - # @return [::Integer] - # The minimum value of the range. - # @!attribute [rw] max - # @return [::Integer] - # The maximum value of the range. - class Range - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Valid types of a SKU. - module Type - # Type of the SKU is unspecified. This is not an allowed value. - TYPE_UNSPECIFIED = 0 - - # Rack SKU. - RACK = 1 - - # Server SKU. - SERVER = 2 - end - end - - # A zone holding a set of hardware. - # @!attribute [rw] name - # @return [::String] - # Identifier. Name of this zone. - # Format: `projects/{project}/locations/{location}/zones/{zone}` - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this zone was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Time when this zone was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Labels associated with this zone as key value pairs. - # For more information about labels, see [Create and manage - # labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels). - # @!attribute [rw] display_name - # @return [::String] - # Optional. Human friendly display name of this zone. - # @!attribute [r] state - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone::State] - # Output only. Current state for this zone. - # @!attribute [rw] contacts - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Contact>] - # Required. The points of contact. - # @!attribute [r] ciq_uri - # @return [::String] - # Output only. Link to the Customer Intake Questionnaire (CIQ) sheet for this - # zone. - # @!attribute [rw] network_config - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::ZoneNetworkConfig] - # Optional. Networking configuration for this zone. - # @!attribute [r] globally_unique_id - # @return [::String] - # Output only. Globally unique identifier generated for this Edge Zone. - # @!attribute [r] subscription_configs - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::SubscriptionConfig>] - # Output only. Subscription configurations for this zone. - # @!attribute [r] provisioning_state - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone::ProvisioningState] - # Output only. Provisioning state for configurations like MAC addresses. - # @!attribute [rw] skip_cluster_provisioning - # @return [::Boolean] - # Optional. Whether to skip the cluster provisioning step during factory - # turnup. If true, indicates that the Kubernetes cluster will be created - # after the zone's hardware is installed at the customer site. - # @!attribute [r] cluster_intent_required - # @return [::Boolean] - # Output only. Indicates whether a valid cluster intent must be provided by - # the customer before accepting the order. If true, the order cannot be - # accepted until cluster intent is present. This is used to enforce early - # validation and prevent delays caused by missing configuration. - # @!attribute [r] cluster_intent_verified - # @return [::Boolean] - # Output only. Indicates whether the provided cluster intent has been - # successfully verified. This flag ensures cluster intent exists before order - # can be accepted. - class Zone - 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 - - # Valid states for a zone. - module State - # State of the Zone is unspecified. - STATE_UNSPECIFIED = 0 - - # More information is required from the customer to make progress. - ADDITIONAL_INFO_NEEDED = 1 - - # Google is preparing the Zone. - PREPARING = 2 - - # Factory turnup has succeeded. - READY_FOR_CUSTOMER_FACTORY_TURNUP_CHECKS = 5 - - # The Zone is running factory turnup checks. - CUSTOMER_FACTORY_TURNUP_CHECKS_STARTED = 8 - - # The Zone is ready for site turnup. - READY_FOR_SITE_TURNUP = 6 - - # The Zone failed in factory turnup checks. - CUSTOMER_FACTORY_TURNUP_CHECKS_FAILED = 7 - - # The Zone is available to use. - ACTIVE = 3 - - # The Zone has been cancelled. - CANCELLED = 4 - end - - # Valid provisioning states for configurations like MAC addresses. - module ProvisioningState - # Provisioning state is unspecified. - PROVISIONING_STATE_UNSPECIFIED = 0 - - # Provisioning is required. Set by Google. - PROVISIONING_REQUIRED = 1 - - # Provisioning is in progress. Set by customer. - PROVISIONING_IN_PROGRESS = 2 - - # Provisioning is complete. Set by customer. - PROVISIONING_COMPLETE = 3 - end - end - - # Contact information of the customer organization. - # @!attribute [rw] address - # @return [::Google::Type::PostalAddress] - # Required. The organization's address. - # @!attribute [rw] email - # @return [::String] - # Optional. The organization's email. - # @!attribute [rw] phone - # @return [::String] - # Optional. The organization's phone number. - # @!attribute [rw] contacts - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Contact>] - # Required. The individual points of contact in the organization at this - # location. - class OrganizationContact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Contact details of a point of contact. - # @!attribute [rw] given_name - # @return [::String] - # Required. Given name of the contact. - # @!attribute [rw] family_name - # @return [::String] - # Optional. Family name of the contact. - # @!attribute [rw] email - # @return [::String] - # Required. Email of the contact. - # @!attribute [rw] phone - # @return [::String] - # Required. Phone number of the contact. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # Optional. Time zone of the contact. - # @!attribute [rw] reachable_times - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::TimePeriod>] - # Optional. The time periods when the contact is reachable. - # If this field is empty, the contact is reachable at all times. - class Contact - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for GDC hardware. - # @!attribute [rw] sku - # @return [::String] - # Required. Reference to the SKU for this hardware. This can point to a - # specific SKU revision in the form of `resource_name@revision_id` as defined - # in [AIP-162](https://google.aip.dev/162). If no revision_id is specified, - # it refers to the latest revision. - # @!attribute [rw] power_supply - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::PowerSupply] - # Required. Power supply type for this hardware. - # @!attribute [rw] subscription_duration_months - # @return [::Integer] - # Optional. Subscription duration for the hardware in months. - class HardwareConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Configuration for a SKU. - # @!attribute [rw] cpu - # @return [::String] - # Information about CPU configuration. - # @!attribute [rw] gpu - # @return [::String] - # Information about GPU configuration. - # @!attribute [rw] ram - # @return [::String] - # Information about RAM configuration. - # @!attribute [rw] storage - # @return [::String] - # Information about storage configuration. - class SkuConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A specific instance of the SKU. - # @!attribute [rw] region_code - # @return [::String] - # The [Unicode CLDR](https://cldr.unicode.org) region code where this - # instance is available. - # @!attribute [rw] power_supply - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::PowerSupply] - # Power supply type for this instance. - # @!attribute [rw] billing_sku - # @return [::String] - # Reference to the corresponding SKU in the Cloud Billing API. - # The estimated price information can be retrieved using that API. - # Format: `services/{service}/skus/{sku}` - # @!attribute [rw] billing_sku_per_vcpu - # @return [::String] - # Reference to the corresponding SKU per vCPU in the Cloud Billing API. - # The estimated price information can be retrieved using that API. - # Format: `services/{service}/skus/{sku}` - # @!attribute [rw] subscription_duration_months - # @return [::Integer] - # Subscription duration for the hardware in months. - class SkuInstance - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Physical properties of a hardware. - # @!attribute [rw] power_receptacle - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwarePhysicalInfo::PowerReceptacleType] - # Required. The power receptacle type. - # @!attribute [rw] network_uplink - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwarePhysicalInfo::NetworkUplinkType] - # Required. Type of the uplink network connection. - # @!attribute [rw] voltage - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwarePhysicalInfo::Voltage] - # Required. Voltage of the power supply. - # @!attribute [rw] amperes - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwarePhysicalInfo::Amperes] - # Required. Amperes of the power supply. - class HardwarePhysicalInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Valid power receptacle types. - module PowerReceptacleType - # Facility plug type is unspecified. - POWER_RECEPTACLE_TYPE_UNSPECIFIED = 0 - - # NEMA 5-15. - NEMA_5_15 = 1 - - # C13. - C_13 = 2 - - # Deprecated: Please use TYPE_G_BS1363, CEE_7_3, CEE_7_5 or TYPE_F - # instead. - STANDARD_EU = 3 - - # Type G / BS1363. - TYPE_G_BS1363 = 4 - - # C 7/3. - CEE_7_3 = 5 - - # C 7/5. - CEE_7_5 = 6 - - # Type F. - TYPE_F = 7 - end - - # Valid network uplink types. - module NetworkUplinkType - # Network uplink type is unspecified. - NETWORK_UPLINK_TYPE_UNSPECIFIED = 0 - - # RJ-45. - RJ_45 = 1 - end - - # Valid voltage values. - module Voltage - # Voltage is unspecified. - VOLTAGE_UNSPECIFIED = 0 - - # 120V. - VOLTAGE_110 = 1 - - # 220V. - VOLTAGE_220 = 3 - end - - # Valid amperes values. - module Amperes - # Amperes is unspecified. - AMPERES_UNSPECIFIED = 0 - - # 15A. - AMPERES_15 = 1 - end - end - - # Information for installation of a Hardware. - # @!attribute [rw] rack_location - # @return [::String] - # Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7, - # Rack 3. - # @!attribute [rw] power_distance_meters - # @return [::Integer] - # Required. Distance from the power outlet in meters. - # @!attribute [rw] switch_distance_meters - # @return [::Integer] - # Required. Distance from the network switch in meters. - # @!attribute [rw] rack_unit_dimensions - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Dimensions] - # Required. Dimensions of the rack unit. - # @!attribute [rw] rack_space - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::RackSpace] - # Required. Rack space allocated for the hardware. - # @!attribute [rw] rack_type - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareInstallationInfo::RackType] - # Required. Type of the rack. - class HardwareInstallationInfo - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Valid rack types. - module RackType - # Rack type is unspecified. - RACK_TYPE_UNSPECIFIED = 0 - - # Two post rack. - TWO_POST = 1 - - # Four post rack. - FOUR_POST = 2 - end - end - - # Networking configuration for a zone. - # @!attribute [rw] machine_mgmt_ipv4_range - # @return [::String] - # Required. An IPv4 address block for machine management. - # Should be a private RFC1918 or public CIDR block large enough to allocate - # at least one address per machine in the Zone. - # Should be in `management_ipv4_subnet`, and disjoint with other address - # ranges. - # @!attribute [rw] kubernetes_node_ipv4_range - # @return [::String] - # Required. An IPv4 address block for kubernetes nodes. - # Should be a private RFC1918 or public CIDR block large enough to allocate - # at least one address per machine in the Zone. - # Should be in `kubernetes_ipv4_subnet`, and disjoint with other address - # ranges. - # @!attribute [rw] kubernetes_control_plane_ipv4_range - # @return [::String] - # Required. An IPv4 address block for kubernetes control plane. - # Should be a private RFC1918 or public CIDR block large enough to allocate - # at least one address per cluster in the Zone. - # Should be in `kubernetes_ipv4_subnet`, and disjoint with other address - # ranges. - # @!attribute [rw] management_ipv4_subnet - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Subnet] - # Required. An IPv4 subnet for the management network. - # @!attribute [rw] kubernetes_ipv4_subnet - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Subnet] - # Optional. An IPv4 subnet for the kubernetes network. - # If unspecified, the kubernetes subnet will be the same as the management - # subnet. - # @!attribute [rw] dns_ipv4_addresses - # @return [::Array<::String>] - # Optional. DNS nameservers. - # The GDC Infrastructure will resolve DNS queries via these IPs. - # If unspecified, Google DNS is used. - # @!attribute [rw] kubernetes_primary_vlan_id - # @return [::Integer] - # Optional. Kubernetes VLAN ID. - # By default, the kubernetes node, including the primary kubernetes network, - # are in the same VLAN as the machine management network. - # For network segmentation purposes, these can optionally be separated. - class ZoneNetworkConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a subnet. - # @!attribute [rw] address_range - # @return [::String] - # Required. Address range for this subnet in CIDR notation. - # @!attribute [rw] default_gateway_ip_address - # @return [::String] - # Required. Default gateway for this subnet. - class Subnet - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a time period in a week. - # @!attribute [rw] start_time - # @return [::Google::Type::TimeOfDay] - # Required. The start of the time period. - # @!attribute [rw] end_time - # @return [::Google::Type::TimeOfDay] - # Required. The end of the time period. - # @!attribute [rw] days - # @return [::Array<::Google::Type::DayOfWeek>] - # Required. The days of the week that the time period is active. - class TimePeriod - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the dimensions of an object. - # @!attribute [rw] width_inches - # @return [::Float] - # Required. Width in inches. - # @!attribute [rw] height_inches - # @return [::Float] - # Required. Height in inches. - # @!attribute [rw] depth_inches - # @return [::Float] - # Required. Depth in inches. - class Dimensions - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents contiguous space in a rack. - # @!attribute [rw] start_rack_unit - # @return [::Integer] - # Required. First rack unit of the rack space (inclusive). - # @!attribute [rw] end_rack_unit - # @return [::Integer] - # Required. Last rack unit of the rack space (inclusive). - class RackSpace - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents the location of one or many hardware. - # @!attribute [rw] site - # @return [::String] - # Required. Name of the site where the hardware are present. - # Format: `projects/{project}/locations/{location}/sites/{site}` - # @!attribute [rw] rack_location - # @return [::String] - # Required. Location of the rack in the site e.g. Floor 2, Room 201, Row 7, - # Rack 3. - # @!attribute [rw] rack_space - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::RackSpace>] - # Optional. Spaces occupied by the hardware in the rack. - # If unset, this location is assumed to be the entire rack. - class HardwareLocation - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A message to store a subscription configuration. - # @!attribute [r] subscription_id - # @return [::String] - # Output only. The unique identifier of the subscription. - # @!attribute [r] billing_id - # @return [::String] - # Output only. The Google Cloud Billing ID that the subscription is created - # under. - # @!attribute [r] state - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::SubscriptionConfig::SubscriptionState] - # Output only. The current state of the subscription. - class SubscriptionConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Enum to represent the state of the subscription. - module SubscriptionState - # State is unspecified. - SUBSCRIPTION_STATE_UNSPECIFIED = 0 - - # Active state means that the subscription has been created successfully - # and billing is happening. - ACTIVE = 1 - - # Inactive means that the subscription has been created successfully, but - # billing has not started yet. - INACTIVE = 2 - - # The subscription is in an erroneous state. - ERROR = 3 - - # The subscription state failed to be retrieved. This may be a transient - # issue. The user should retry the request. - FAILED_TO_RETRIEVE = 4 - - # The subscription has been completed, because it has reached the end date. - COMPLETED = 5 - end - end - - # The power supply options. - module PowerSupply - # Power supply is unspecified. - POWER_SUPPLY_UNSPECIFIED = 0 - - # AC power supply. - POWER_SUPPLY_AC = 1 - - # DC power supply. - POWER_SUPPLY_DC = 2 - end - - # Entity is used to denote an organization or party. - module Entity - # Entity is unspecified. - ENTITY_UNSPECIFIED = 0 - - # Google. - GOOGLE = 1 - - # Customer. - CUSTOMER = 2 - - # Vendor. - VENDOR = 3 - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/service.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/service.rb deleted file mode 100644 index cf335ddab76c..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/cloud/gdchardwaremanagement/v1alpha/service.rb +++ /dev/null @@ -1,959 +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 GDCHardwareManagement - module V1alpha - # A request to list orders. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location to list orders in. - # Format: `projects/{project}/locations/{location}` - # - # To list orders across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListOrdersRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of orders. - # @!attribute [rw] orders - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Order>] - # The list of orders. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. Only used for queries to the wildcard - # location `-`. If non-empty, it indicates that the results are incomplete. - class ListOrdersResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get an order. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the resource - class GetOrderRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create an order. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location to create the order in. - # Format: `projects/{project}/locations/{location}` - # @!attribute [rw] order_id - # @return [::String] - # Optional. ID used to uniquely identify the Order within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The order.name field in the request will be ignored. - # @!attribute [rw] order - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] - # Required. The order to create. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class CreateOrderRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update an order. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A mask to specify the fields in the Order to overwrite with this - # update. The fields specified in the update_mask are relative to the order, - # not the full request. A field will be overwritten if it is in the mask. If - # you don't provide a mask then all fields will be overwritten. - # @!attribute [rw] order - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Order] - # Required. The order to update. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class UpdateOrderRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete an order. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the order. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @!attribute [rw] force - # @return [::Boolean] - # Optional. An option to delete any nested resources in the Order, such as a - # HardwareGroup. If true, any nested resources for this Order will also be - # deleted. Otherwise, the request will only succeed if the Order has no - # nested resources. - class DeleteOrderRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to submit an order. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the order. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @!attribute [rw] type - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest::Type] - # Optional. Type of this request. If unset, the request type is assumed to be - # `INFO_PENDING`. - class SubmitOrderRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Valid types of submit order request. - module Type - # Request type is unspecified. This should not be used. - TYPE_UNSPECIFIED = 0 - - # Use this request type to submit your order and initiate conversation with - # Google. After this submission, you will not be able to modify the number - # or SKU of your ordered hardware. Please note that this order will not be - # ready for fulfillment yet until you provide more information, such as - # zone network configuration, hardware physical and installation - # information, etc. - # If you are submitting an order for a SKU type of RACK, please use this - # request type, as additional information will be required outside of the - # API. - INFO_PENDING = 1 - - # Use this request type if and when you are ready to submit your order for - # fulfillment. In addition to the information required for `INFO_PENDING`, - # the order must contain all required information, such as zone network - # configuration, hardware physical and installation information, etc. - # Further changes to any order information will no longer be allowed. - INFO_COMPLETE = 2 - end - end - - # A request to cancel an order. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the order. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class CancelOrderRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list sites. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location to list sites in. - # Format: `projects/{project}/locations/{location}` - # - # To list sites across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListSitesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of sites. - # @!attribute [rw] sites - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Site>] - # The list of sites. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. Only used for queries to the wildcard - # location `-`. If non-empty, it indicates that the results are incomplete. - class ListSitesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a site. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the site. - # Format: `projects/{project}/locations/{location}/sites/{site}` - class GetSiteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create a site. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location to create the site in. - # Format: `projects/{project}/locations/{location}` - # @!attribute [rw] site_id - # @return [::String] - # Optional. ID used to uniquely identify the Site within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The site.name field in the request will be ignored. - # @!attribute [rw] site - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] - # Required. The site to create. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class CreateSiteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update a site. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A mask to specify the fields in the Site to overwrite with this - # update. The fields specified in the update_mask are relative to the site, - # not the full request. A field will be overwritten if it is in the mask. If - # you don't provide a mask then all fields will be overwritten. - # @!attribute [rw] site - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Site] - # Required. The site to update. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class UpdateSiteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete a site. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the site. - # Format: `projects/{project}/locations/{location}/sites/{site}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class DeleteSiteRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list hardware groups. - # @!attribute [rw] parent - # @return [::String] - # Required. The order to list hardware groups in. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListHardwareGroupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of hardware groups. - # @!attribute [rw] hardware_groups - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup>] - # The list of hardware groups. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListHardwareGroupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a hardware group. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the hardware group. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` - class GetHardwareGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create a hardware group. - # @!attribute [rw] parent - # @return [::String] - # Required. The order to create the hardware group in. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @!attribute [rw] hardware_group_id - # @return [::String] - # Optional. ID used to uniquely identify the HardwareGroup within its parent - # scope. This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The hardware_group.name field in the request will be ignored. - # @!attribute [rw] hardware_group - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] - # Required. The hardware group to create. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class CreateHardwareGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update a hardware group. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A mask to specify the fields in the HardwareGroup to overwrite - # with this update. The fields specified in the update_mask are relative to - # the hardware group, not the full request. A field will be overwritten if it - # is in the mask. If you don't provide a mask then all fields will be - # overwritten. - # @!attribute [rw] hardware_group - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup] - # Required. The hardware group to update. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class UpdateHardwareGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete a hardware group. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the hardware group. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/hardwareGroups/{hardware_group}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class DeleteHardwareGroupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list hardware. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location to list hardware in. - # Format: `projects/{project}/locations/{location}` - # - # To list hardware across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListHardwareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of hardware. - # @!attribute [rw] hardware - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware>] - # The list of hardware. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. Only used for queries to the wildcard - # location `-`. If non-empty, it indicates that the results are incomplete. - class ListHardwareResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get hardware. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the hardware. - # Format: `projects/{project}/locations/{location}/hardware/{hardware}` - class GetHardwareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create hardware. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location to create hardware in. - # Format: `projects/{project}/locations/{location}` - # @!attribute [rw] hardware_id - # @return [::String] - # Optional. ID used to uniquely identify the Hardware within its parent - # scope. This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The hardware.name field in the request will be ignored. - # @!attribute [rw] hardware - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] - # Required. The resource to create. - class CreateHardwareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update hardware. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A mask to specify the fields in the Hardware to overwrite with - # this update. The fields specified in the update_mask are relative to the - # hardware, not the full request. A field will be overwritten if it is in the - # mask. If you don't provide a mask then all fields will be overwritten. - # @!attribute [rw] hardware - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware] - # Required. The hardware to update. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class UpdateHardwareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete hardware. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the hardware. - # Format: `projects/{project}/locations/{location}/hardware/{hardware}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class DeleteHardwareRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list comments. - # @!attribute [rw] parent - # @return [::String] - # Required. The order to list comments on. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListCommentsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list comments. - # @!attribute [rw] comments - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Comment>] - # The list of comments. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListCommentsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a comment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the comment. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` - class GetCommentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create a comment. - # @!attribute [rw] parent - # @return [::String] - # Required. The order to create the comment on. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @!attribute [rw] comment_id - # @return [::String] - # Optional. ID used to uniquely identify the Comment within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The comment.name field in the request will be ignored. - # @!attribute [rw] comment - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Comment] - # Required. The comment to create. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class CreateCommentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to record an action on a comment. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the comment. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/comments/{comment}` - # @!attribute [rw] action_type - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest::ActionType] - # Required. The action type of the recorded action. - class RecordActionOnCommentRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Valid action types of Comment. - module ActionType - # Action is unspecified. - ACTION_TYPE_UNSPECIFIED = 0 - - # Mark comment as read. - READ = 1 - - # Mark comment as unread. - UNREAD = 2 - end - end - - # A request to list change log entries. - # @!attribute [rw] parent - # @return [::String] - # Required. The order to list change log entries for. - # Format: `projects/{project}/locations/{location}/orders/{order}` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListChangeLogEntriesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of change log entries. - # @!attribute [rw] change_log_entries - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry>] - # The list of change log entries. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListChangeLogEntriesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a change log entry. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the change log entry. - # Format: - # `projects/{project}/locations/{location}/orders/{order}/changeLogEntries/{change_log_entry}` - class GetChangeLogEntryRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list SKUs. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location to list SKUs in. - # Format: `projects/{project}/locations/{location}` - # - # To list SKUs across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListSkusRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of SKUs. - # @!attribute [rw] skus - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Sku>] - # The list of SKUs. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. Only used for queries to the wildcard - # location `-`. If non-empty, it indicates that the results are incomplete. - class ListSkusResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get an SKU. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the SKU. - # Format: `projects/{project}/locations/{location}/skus/{sku}` - class GetSkuRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to list zones. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location to list zones in. - # Format: `projects/{project}/locations/{location}` - # - # To list zones across all locations, substitute `-` (the hyphen or - # dash character) for the location and check the unreachable field in - # the response message. - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. Requested page size. Server may return fewer items than - # requested. If unspecified, server will pick an appropriate default. - # @!attribute [rw] page_token - # @return [::String] - # Optional. A token identifying a page of results the server should return. - # @!attribute [rw] filter - # @return [::String] - # Optional. Filtering condition. See [AIP-160](https://google.aip.dev/160). - # @!attribute [rw] order_by - # @return [::String] - # Optional. Hint for how to order the results. - class ListZonesRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of zones. - # @!attribute [rw] zones - # @return [::Array<::Google::Cloud::GDCHardwareManagement::V1alpha::Zone>] - # The list of zones. - # @!attribute [rw] next_page_token - # @return [::String] - # A token identifying a page of results the server should return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. Only used for queries to the wildcard - # location `-`. If non-empty, it indicates that the results are incomplete. - class ListZonesResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to get a zone. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the zone. - # Format: `projects/{project}/locations/{location}/zones/{zone}` - class GetZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to create a zone. - # @!attribute [rw] parent - # @return [::String] - # Required. The project and location to create the zone in. - # Format: `projects/{project}/locations/{location}` - # @!attribute [rw] zone_id - # @return [::String] - # Optional. ID used to uniquely identify the Zone within its parent scope. - # This field should contain at most 63 characters and must start with - # lowercase characters. - # Only lowercase characters, numbers and `-` are accepted. - # The `-` character cannot be the first or the last one. - # A system generated ID will be used if the field is not set. - # - # The zone.name field in the request will be ignored. - # @!attribute [rw] zone - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone] - # Required. The zone to create. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class CreateZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to update a zone. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Required. A mask to specify the fields in the Zone to overwrite with this - # update. The fields specified in the update_mask are relative to the zone, - # not the full request. A field will be overwritten if it is in the mask. If - # you don't provide a mask then all fields will be overwritten. - # @!attribute [rw] zone - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::Zone] - # Required. The zone to update. - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class UpdateZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to delete a zone. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the zone. - # Format: `projects/{project}/locations/{location}/zones/{zone}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - class DeleteZoneRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A request to signal the state of a zone. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the zone. - # Format: `projects/{project}/locations/{location}/zones/{zone}` - # @!attribute [rw] request_id - # @return [::String] - # Optional. An optional unique identifier for this request. See - # [AIP-155](https://google.aip.dev/155). - # @!attribute [rw] state_signal - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest::StateSignal] - # Optional. The state signal to send for this zone. Either state_signal or - # provisioning_state_signal must be set, but not both. - # @!attribute [rw] provisioning_state_signal - # @return [::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest::ProvisioningStateSignal] - # Optional. The provisioning state signal to send for this zone. Either - # state_signal or provisioning_state_signal must be set, but not both. - # @!attribute [rw] step - # @return [::String] - # Optional. The step being executed. Provides a finer grained status when the - # state_signal is FACTORY_TURNUP_CHECKS_STARTED or - # FACTORY_TURNUP_CHECKS_FAILED. - # @!attribute [rw] details - # @return [::String] - # Optional. Additional details, such as an error message when state_signal is - # FACTORY_TURNUP_CHECKS_FAILED. - class SignalZoneStateRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Valid state signals for a zone. - module StateSignal - # State signal of the zone is unspecified. - STATE_SIGNAL_UNSPECIFIED = 0 - - # Factory turnup checks have started. - FACTORY_TURNUP_CHECKS_STARTED = 3 - - # The Zone is ready for site turnup. - FACTORY_TURNUP_CHECKS_PASSED = 1 - - # The Zone is ready for site turnup. Deprecated, but not deleted. - READY_FOR_SITE_TURNUP = 1 - - # The Zone failed in factory turnup checks. - FACTORY_TURNUP_CHECKS_FAILED = 2 - - # Verify that a valid cluster intent is present. - VERIFY_CLUSTER_INTENT_PRESENCE = 4 - end - - # Valid provisioning state signals for a zone. - module ProvisioningStateSignal - # Provisioning state signal is unspecified. - PROVISIONING_STATE_SIGNAL_UNSPECIFIED = 0 - - # Provisioning is in progress. - PROVISIONING_IN_PROGRESS = 1 - - # Provisioning is complete. - PROVISIONING_COMPLETE = 2 - end - 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. 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 been cancelled successfully - # 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 - - # A request to change the requested date of an order. - # @!attribute [rw] name - # @return [::String] - # Required. The name of the order to update. - # Format: projects/\\{project}/locations/\\{location}/orders/\\{order} - # @!attribute [rw] requested_date - # @return [::Google::Type::Date] - # Required. The date to which the customer or Google wants to set the - # scheduled installation date. - class RequestOrderDateChangeRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/date.rb deleted file mode 100644 index 14ec426522d9..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/date.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! - - -module Google - module Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values - # * A month and day value, with a zero year, such as an anniversary - # * A year on its own, with zero month and day values - # * A year and month value, with a zero day, such as a credit card expiration - # date - # - # Related types are {::Google::Type::TimeOfDay google.type.TimeOfDay} and - # `google.protobuf.Timestamp`. - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/datetime.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/datetime.rb deleted file mode 100644 index d15ba7af54e4..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/datetime.rb +++ /dev/null @@ -1,103 +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 civil time (or occasionally physical time). - # - # This type can represent a civil time in one of a few possible ways: - # - # * When utc_offset is set and time_zone is unset: a civil time on a calendar - # day with a particular offset from UTC. - # * When time_zone is set and utc_offset is unset: a civil time on a calendar - # day in a particular time zone. - # * When neither time_zone nor utc_offset is set: a civil time on a calendar - # day in local time. - # - # The date is relative to the Proleptic Gregorian Calendar. - # - # If year is 0, the DateTime is considered not to have a specific year. month - # and day must have valid, non-zero values. - # - # This type may also be used to represent a physical time if all the date and - # time fields are set and either case of the `time_offset` oneof is set. - # Consider using `Timestamp` message for physical time instead. If your use - # case also would like to store the user's timezone, that can be done in - # another field. - # - # This type is more flexible than some applications may want. Make sure to - # document and validate your application's limitations. - # @!attribute [rw] year - # @return [::Integer] - # Optional. Year of date. Must be from 1 to 9999, or 0 if specifying a - # datetime without a year. - # @!attribute [rw] month - # @return [::Integer] - # Required. Month of year. Must be from 1 to 12. - # @!attribute [rw] day - # @return [::Integer] - # Required. Day of month. Must be from 1 to 31 and valid for the year and - # month. - # @!attribute [rw] hours - # @return [::Integer] - # Required. Hours of day in 24 hour format. Should be from 0 to 23. An API - # may choose to allow the value "24:00:00" for scenarios like business - # closing time. - # @!attribute [rw] minutes - # @return [::Integer] - # Required. Minutes of hour of day. Must be from 0 to 59. - # @!attribute [rw] seconds - # @return [::Integer] - # Required. Seconds of minutes of the time. Must normally be from 0 to 59. An - # API may allow the value 60 if it allows leap-seconds. - # @!attribute [rw] nanos - # @return [::Integer] - # Required. Fractions of seconds in nanoseconds. Must be from 0 to - # 999,999,999. - # @!attribute [rw] utc_offset - # @return [::Google::Protobuf::Duration] - # UTC offset. Must be whole seconds, between -18 hours and +18 hours. - # For example, a UTC offset of -4:00 would be represented as - # { seconds: -14400 }. - # - # Note: The following fields are mutually exclusive: `utc_offset`, `time_zone`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] time_zone - # @return [::Google::Type::TimeZone] - # Time zone. - # - # Note: The following fields are mutually exclusive: `time_zone`, `utc_offset`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class DateTime - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Represents a time zone from the - # [IANA Time Zone Database](https://www.iana.org/time-zones). - # @!attribute [rw] id - # @return [::String] - # IANA Time Zone Database time zone, e.g. "America/New_York". - # @!attribute [rw] version - # @return [::String] - # Optional. IANA Time Zone Database version number, e.g. "2019a". - class TimeZone - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/dayofweek.rb deleted file mode 100644 index 973211b9ffe7..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/dayofweek.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! - - -module Google - module Type - # Represents a day of the week. - module DayOfWeek - # The day of the week is unspecified. - DAY_OF_WEEK_UNSPECIFIED = 0 - - # Monday - MONDAY = 1 - - # Tuesday - TUESDAY = 2 - - # Wednesday - WEDNESDAY = 3 - - # Thursday - THURSDAY = 4 - - # Friday - FRIDAY = 5 - - # Saturday - SATURDAY = 6 - - # Sunday - SUNDAY = 7 - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/postal_address.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/postal_address.rb deleted file mode 100644 index 9cd0c16495dd..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/postal_address.rb +++ /dev/null @@ -1,135 +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 postal address, e.g. for postal delivery or payments addresses. - # Given a postal address, a postal service can deliver items to a premise, P.O. - # Box or similar. - # It is not intended to model geographical locations (roads, towns, - # mountains). - # - # In typical usage an address would be created via user input or from importing - # existing data, depending on the type of process. - # - # Advice on address input / editing: - # - Use an i18n-ready address widget such as - # https://github.com/google/libaddressinput) - # - Users should not be presented with UI elements for input or editing of - # fields outside countries where that field is used. - # - # For more guidance on how to use this schema, please see: - # https://support.google.com/business/answer/6397478 - # @!attribute [rw] revision - # @return [::Integer] - # The schema revision of the `PostalAddress`. This must be set to 0, which is - # the latest revision. - # - # All new revisions **must** be backward compatible with old revisions. - # @!attribute [rw] region_code - # @return [::String] - # Required. CLDR region code of the country/region of the address. This - # is never inferred and it is up to the user to ensure the value is - # correct. See http://cldr.unicode.org/ and - # http://www.unicode.org/cldr/charts/30/supplemental/territory_information.html - # for details. Example: "CH" for Switzerland. - # @!attribute [rw] language_code - # @return [::String] - # Optional. BCP-47 language code of the contents of this address (if - # known). This is often the UI language of the input form or is expected - # to match one of the languages used in the address' country/region, or their - # transliterated equivalents. - # This can affect formatting in certain countries, but is not critical - # to the correctness of the data and will never affect any validation or - # other non-formatting related operations. - # - # If this value is not known, it should be omitted (rather than specifying a - # possibly incorrect default). - # - # Examples: "zh-Hant", "ja", "ja-Latn", "en". - # @!attribute [rw] postal_code - # @return [::String] - # Optional. Postal code of the address. Not all countries use or require - # postal codes to be present, but where they are used, they may trigger - # additional validation with other parts of the address (e.g. state/zip - # validation in the U.S.A.). - # @!attribute [rw] sorting_code - # @return [::String] - # Optional. Additional, country-specific, sorting code. This is not used - # in most regions. Where it is used, the value is either a string like - # "CEDEX", optionally followed by a number (e.g. "CEDEX 7"), or just a number - # alone, representing the "sector code" (Jamaica), "delivery area indicator" - # (Malawi) or "post office indicator" (e.g. Côte d'Ivoire). - # @!attribute [rw] administrative_area - # @return [::String] - # Optional. Highest administrative subdivision which is used for postal - # addresses of a country or region. - # For example, this can be a state, a province, an oblast, or a prefecture. - # Specifically, for Spain this is the province and not the autonomous - # community (e.g. "Barcelona" and not "Catalonia"). - # Many countries don't use an administrative area in postal addresses. E.g. - # in Switzerland this should be left unpopulated. - # @!attribute [rw] locality - # @return [::String] - # Optional. Generally refers to the city/town portion of the address. - # Examples: US city, IT comune, UK post town. - # In regions of the world where localities are not well defined or do not fit - # into this structure well, leave locality empty and use address_lines. - # @!attribute [rw] sublocality - # @return [::String] - # Optional. Sublocality of the address. - # For example, this can be neighborhoods, boroughs, districts. - # @!attribute [rw] address_lines - # @return [::Array<::String>] - # Unstructured address lines describing the lower levels of an address. - # - # Because values in address_lines do not have type information and may - # sometimes contain multiple values in a single field (e.g. - # "Austin, TX"), it is important that the line order is clear. The order of - # address lines should be "envelope order" for the country/region of the - # address. In places where this can vary (e.g. Japan), address_language is - # used to make it explicit (e.g. "ja" for large-to-small ordering and - # "ja-Latn" or "en" for small-to-large). This way, the most specific line of - # an address can be selected based on the language. - # - # The minimum permitted structural representation of an address consists - # of a region_code with all remaining information placed in the - # address_lines. It would be possible to format such an address very - # approximately without geocoding, but no semantic reasoning could be - # made about any of the address components until it was at least - # partially resolved. - # - # Creating an address only containing a region_code and address_lines, and - # then geocoding is the recommended way to handle completely unstructured - # addresses (as opposed to guessing which parts of the address should be - # localities or administrative areas). - # @!attribute [rw] recipients - # @return [::Array<::String>] - # Optional. The recipient at the address. - # This field may, under certain circumstances, contain multiline information. - # For example, it might contain "care of" information. - # @!attribute [rw] organization - # @return [::String] - # Optional. The name of the organization at the address. - class PostalAddress - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/timeofday.rb deleted file mode 100644 index b0c888c8c14a..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/proto_docs/google/type/timeofday.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! - - -module Google - module Type - # Represents a time of day. The date and time zone are either not significant - # or are specified elsewhere. An API may choose to allow leap seconds. Related - # types are {::Google::Type::Date google.type.Date} and - # `google.protobuf.Timestamp`. - # @!attribute [rw] hours - # @return [::Integer] - # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose - # to allow the value "24:00:00" for scenarios like business closing time. - # @!attribute [rw] minutes - # @return [::Integer] - # Minutes of hour of day. Must be from 0 to 59. - # @!attribute [rw] seconds - # @return [::Integer] - # Seconds of minutes of the time. Must normally be from 0 to 59. An API may - # allow the value 60 if it allows leap-seconds. - # @!attribute [rw] nanos - # @return [::Integer] - # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - class TimeOfDay - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/Gemfile b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/Gemfile deleted file mode 100644 index bc4dfa6ce8bb..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/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-gdc_hardware_management-v1alpha", path: "../" -else - gem "google-cloud-gdc_hardware_management-v1alpha" -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-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/cancel_order.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/cancel_order.rb deleted file mode 100644 index e5bd5c423c3b..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/cancel_order.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CancelOrder_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the cancel_order call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#cancel_order. -# -def cancel_order - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new - - # Call the cancel_order method. - result = client.cancel_order request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CancelOrder_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_comment.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_comment.rb deleted file mode 100644 index 062eb7e3ef99..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_comment.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the create_comment call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_comment. -# -def create_comment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new - - # Call the create_comment method. - result = client.create_comment request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware.rb deleted file mode 100644 index c32bad4e6a94..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the create_hardware call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_hardware. -# -def create_hardware - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new - - # Call the create_hardware method. - result = client.create_hardware request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware_group.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware_group.rb deleted file mode 100644 index 50d51125fa19..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the create_hardware_group call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_hardware_group. -# -def create_hardware_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new - - # Call the create_hardware_group method. - result = client.create_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_order.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_order.rb deleted file mode 100644 index 8c945f8aa66e..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_order.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the create_order call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_order. -# -def create_order - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new - - # Call the create_order method. - result = client.create_order request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_site.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_site.rb deleted file mode 100644 index 7e1b922105b5..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_site.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the create_site call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_site. -# -def create_site - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new - - # Call the create_site method. - result = client.create_site request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_zone.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/create_zone.rb deleted file mode 100644 index 4651805796c6..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the create_zone call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_zone. -# -def create_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware.rb deleted file mode 100644 index e26abc148d39..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the delete_hardware call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_hardware. -# -def delete_hardware - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new - - # Call the delete_hardware method. - result = client.delete_hardware request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware_group.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware_group.rb deleted file mode 100644 index 57375279b7b7..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the delete_hardware_group call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_hardware_group. -# -def delete_hardware_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new - - # Call the delete_hardware_group method. - result = client.delete_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_order.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_order.rb deleted file mode 100644 index 2e6a508f59c6..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_order.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the delete_order call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_order. -# -def delete_order - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new - - # Call the delete_order method. - result = client.delete_order request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_site.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_site.rb deleted file mode 100644 index 1f66ee279ec0..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_site.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteSite_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the delete_site call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_site. -# -def delete_site - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new - - # Call the delete_site method. - result = client.delete_site request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteSite_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_zone.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/delete_zone.rb deleted file mode 100644 index 6928b1a8ce3f..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the delete_zone call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_zone. -# -def delete_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_change_log_entry.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_change_log_entry.rb deleted file mode 100644 index 79c9468fa048..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_change_log_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the get_change_log_entry call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_change_log_entry. -# -def get_change_log_entry - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new - - # Call the get_change_log_entry method. - result = client.get_change_log_entry request - - # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry. - p result -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_comment.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_comment.rb deleted file mode 100644 index daf60605d6ad..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_comment.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the get_comment call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_comment. -# -def get_comment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new - - # Call the get_comment method. - result = client.get_comment request - - # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment. - p result -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware.rb deleted file mode 100644 index 6a4cdf59e3dc..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the get_hardware call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_hardware. -# -def get_hardware - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new - - # Call the get_hardware method. - result = client.get_hardware request - - # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Hardware. - p result -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware_group.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware_group.rb deleted file mode 100644 index 029aa4e5843f..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the get_hardware_group call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_hardware_group. -# -def get_hardware_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new - - # Call the get_hardware_group method. - result = client.get_hardware_group request - - # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup. - p result -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_order.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_order.rb deleted file mode 100644 index 57af00353628..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_order.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the get_order call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_order. -# -def get_order - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new - - # Call the get_order method. - result = client.get_order request - - # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Order. - p result -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_site.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_site.rb deleted file mode 100644 index 26c42c9b8c06..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_site.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the get_site call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_site. -# -def get_site - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new - - # Call the get_site method. - result = client.get_site request - - # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Site. - p result -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_sku.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_sku.rb deleted file mode 100644 index cbf346bbb908..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_sku.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the get_sku call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_sku. -# -def get_sku - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new - - # Call the get_sku method. - result = client.get_sku request - - # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Sku. - p result -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_zone.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/get_zone.rb deleted file mode 100644 index 7f966c999986..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the get_zone call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_zone. -# -def get_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest.new - - # Call the get_zone method. - result = client.get_zone request - - # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Zone. - p result -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_change_log_entries.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_change_log_entries.rb deleted file mode 100644 index 233c809f62cb..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_change_log_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the list_change_log_entries call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_change_log_entries. -# -def list_change_log_entries - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.new - - # Call the list_change_log_entries method. - result = client.list_change_log_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::GDCHardwareManagement::V1alpha::ChangeLogEntry. - p item - end -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_comments.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_comments.rb deleted file mode 100644 index d262606f7295..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_comments.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the list_comments call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_comments. -# -def list_comments - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.new - - # Call the list_comments method. - result = client.list_comments request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment. - p item - end -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware.rb deleted file mode 100644 index 43d212bbdabf..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the list_hardware call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_hardware. -# -def list_hardware - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.new - - # Call the list_hardware method. - result = client.list_hardware request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware. - p item - end -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware_groups.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware_groups.rb deleted file mode 100644 index ff05fedcd54c..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the list_hardware_groups call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_hardware_groups. -# -def list_hardware_groups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.new - - # Call the list_hardware_groups method. - result = client.list_hardware_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::GDCHardwareManagement::V1alpha::HardwareGroup. - p item - end -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_orders.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_orders.rb deleted file mode 100644 index 93864a8f35f2..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_orders.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the list_orders call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_orders. -# -def list_orders - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.new - - # Call the list_orders method. - result = client.list_orders request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Order. - p item - end -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_sites.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_sites.rb deleted file mode 100644 index b60a042059fb..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_sites.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the list_sites call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_sites. -# -def list_sites - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.new - - # Call the list_sites method. - result = client.list_sites request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Site. - p item - end -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_skus.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_skus.rb deleted file mode 100644 index 909dbe2038eb..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_skus.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the list_skus call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_skus. -# -def list_skus - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.new - - # Call the list_skus method. - result = client.list_skus request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku. - p item - end -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_zones.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/list_zones.rb deleted file mode 100644 index bea66ba9bc2f..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the list_zones call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_zones. -# -def list_zones - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::Zone. - p item - end -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/record_action_on_comment.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/record_action_on_comment.rb deleted file mode 100644 index 5a00e3446e6a..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/record_action_on_comment.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_RecordActionOnComment_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the record_action_on_comment call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#record_action_on_comment. -# -def record_action_on_comment - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new - - # Call the record_action_on_comment method. - result = client.record_action_on_comment request - - # The returned object is of type Google::Cloud::GDCHardwareManagement::V1alpha::Comment. - p result -end -# [END gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_RecordActionOnComment_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/request_order_date_change.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/request_order_date_change.rb deleted file mode 100644 index 723bf8387b20..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/request_order_date_change.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_RequestOrderDateChange_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the request_order_date_change call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#request_order_date_change. -# -def request_order_date_change - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new - - # Call the request_order_date_change method. - result = client.request_order_date_change request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_RequestOrderDateChange_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/signal_zone_state.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/signal_zone_state.rb deleted file mode 100644 index 70f0d340ff17..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/signal_zone_state.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the signal_zone_state call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#signal_zone_state. -# -def signal_zone_state - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new - - # Call the signal_zone_state method. - result = client.signal_zone_state request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/submit_order.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/submit_order.rb deleted file mode 100644 index 93d353c3f9bd..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/submit_order.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the submit_order call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#submit_order. -# -def submit_order - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new - - # Call the submit_order method. - result = client.submit_order request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware.rb deleted file mode 100644 index c40036ffab3c..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the update_hardware call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_hardware. -# -def update_hardware - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new - - # Call the update_hardware method. - result = client.update_hardware request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware_group.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware_group.rb deleted file mode 100644 index 2b813dfc0196..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the update_hardware_group call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_hardware_group. -# -def update_hardware_group - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new - - # Call the update_hardware_group method. - result = client.update_hardware_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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_order.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_order.rb deleted file mode 100644 index 75de15ad44ff..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_order.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the update_order call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_order. -# -def update_order - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new - - # Call the update_order method. - result = client.update_order request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_site.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_site.rb deleted file mode 100644 index afa54b028217..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_site.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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the update_site call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_site. -# -def update_site - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new - - # Call the update_site method. - result = client.update_site request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_zone.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/update_zone.rb deleted file mode 100644 index fd3682f19c7c..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/gdc_hardware_management/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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_sync] -require "google/cloud/gdc_hardware_management/v1alpha" - -## -# Snippet for the update_zone call in the GDCHardwareManagement service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_zone. -# -def update_zone - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GDCHardwareManagement::V1alpha::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 gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_sync] diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/snippet_metadata_google.cloud.gdchardwaremanagement.v1alpha.json b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/snippet_metadata_google.cloud.gdchardwaremanagement.v1alpha.json deleted file mode 100644 index bec0bf6c87e3..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/snippets/snippet_metadata_google.cloud.gdchardwaremanagement.v1alpha.json +++ /dev/null @@ -1,1495 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-gdc_hardware_management-v1alpha", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.gdchardwaremanagement.v1alpha", - "version": "v1alpha" - } - ] - }, - "snippets": [ - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListOrders_sync", - "title": "Snippet for the list_orders call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_orders.", - "file": "gdc_hardware_management/list_orders.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_orders", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_orders", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "ListOrders", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListOrders", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetOrder_sync", - "title": "Snippet for the get_order call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_order.", - "file": "gdc_hardware_management/get_order.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_order", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_order", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Order", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "GetOrder", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetOrder", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateOrder_sync", - "title": "Snippet for the create_order call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_order.", - "file": "gdc_hardware_management/create_order.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_order", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_order", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "CreateOrder", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CreateOrder", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateOrder_sync", - "title": "Snippet for the update_order call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_order.", - "file": "gdc_hardware_management/update_order.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_order", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_order", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "UpdateOrder", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.UpdateOrder", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteOrder_sync", - "title": "Snippet for the delete_order call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_order.", - "file": "gdc_hardware_management/delete_order.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_order", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_order", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "DeleteOrder", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.DeleteOrder", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SubmitOrder_sync", - "title": "Snippet for the submit_order call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#submit_order.", - "file": "gdc_hardware_management/submit_order.rb", - "language": "RUBY", - "client_method": { - "short_name": "submit_order", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#submit_order", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "SubmitOrder", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.SubmitOrder", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CancelOrder_sync", - "title": "Snippet for the cancel_order call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#cancel_order.", - "file": "gdc_hardware_management/cancel_order.rb", - "language": "RUBY", - "client_method": { - "short_name": "cancel_order", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#cancel_order", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "CancelOrder", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CancelOrder", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSites_sync", - "title": "Snippet for the list_sites call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_sites.", - "file": "gdc_hardware_management/list_sites.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_sites", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_sites", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "ListSites", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListSites", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSite_sync", - "title": "Snippet for the get_site call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_site.", - "file": "gdc_hardware_management/get_site.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_site", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_site", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Site", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "GetSite", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetSite", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateSite_sync", - "title": "Snippet for the create_site call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_site.", - "file": "gdc_hardware_management/create_site.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_site", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_site", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "CreateSite", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CreateSite", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateSite_sync", - "title": "Snippet for the update_site call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_site.", - "file": "gdc_hardware_management/update_site.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_site", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_site", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "UpdateSite", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.UpdateSite", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteSite_sync", - "title": "Snippet for the delete_site call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_site.", - "file": "gdc_hardware_management/delete_site.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_site", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_site", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "DeleteSite", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.DeleteSite", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardwareGroups_sync", - "title": "Snippet for the list_hardware_groups call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_hardware_groups.", - "file": "gdc_hardware_management/list_hardware_groups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_hardware_groups", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_hardware_groups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "ListHardwareGroups", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListHardwareGroups", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardwareGroup_sync", - "title": "Snippet for the get_hardware_group call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_hardware_group.", - "file": "gdc_hardware_management/get_hardware_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_hardware_group", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_hardware_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "GetHardwareGroup", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetHardwareGroup", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardwareGroup_sync", - "title": "Snippet for the create_hardware_group call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_hardware_group.", - "file": "gdc_hardware_management/create_hardware_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_hardware_group", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_hardware_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "CreateHardwareGroup", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CreateHardwareGroup", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardwareGroup_sync", - "title": "Snippet for the update_hardware_group call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_hardware_group.", - "file": "gdc_hardware_management/update_hardware_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_hardware_group", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_hardware_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "UpdateHardwareGroup", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.UpdateHardwareGroup", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardwareGroup_sync", - "title": "Snippet for the delete_hardware_group call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_hardware_group.", - "file": "gdc_hardware_management/delete_hardware_group.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_hardware_group", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_hardware_group", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "DeleteHardwareGroup", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.DeleteHardwareGroup", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListHardware_sync", - "title": "Snippet for the list_hardware call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_hardware.", - "file": "gdc_hardware_management/list_hardware.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_hardware", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_hardware", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "ListHardware", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListHardware", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetHardware_sync", - "title": "Snippet for the get_hardware call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_hardware.", - "file": "gdc_hardware_management/get_hardware.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_hardware", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_hardware", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "GetHardware", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetHardware", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateHardware_sync", - "title": "Snippet for the create_hardware call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_hardware.", - "file": "gdc_hardware_management/create_hardware.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_hardware", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_hardware", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "CreateHardware", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CreateHardware", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateHardware_sync", - "title": "Snippet for the update_hardware call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_hardware.", - "file": "gdc_hardware_management/update_hardware.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_hardware", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_hardware", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "UpdateHardware", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.UpdateHardware", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteHardware_sync", - "title": "Snippet for the delete_hardware call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_hardware.", - "file": "gdc_hardware_management/delete_hardware.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_hardware", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_hardware", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "DeleteHardware", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.DeleteHardware", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListComments_sync", - "title": "Snippet for the list_comments call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_comments.", - "file": "gdc_hardware_management/list_comments.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_comments", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_comments", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "ListComments", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListComments", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetComment_sync", - "title": "Snippet for the get_comment call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_comment.", - "file": "gdc_hardware_management/get_comment.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_comment", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_comment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Comment", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "GetComment", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetComment", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateComment_sync", - "title": "Snippet for the create_comment call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_comment.", - "file": "gdc_hardware_management/create_comment.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_comment", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_comment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "CreateComment", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CreateComment", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_RecordActionOnComment_sync", - "title": "Snippet for the record_action_on_comment call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#record_action_on_comment.", - "file": "gdc_hardware_management/record_action_on_comment.rb", - "language": "RUBY", - "client_method": { - "short_name": "record_action_on_comment", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#record_action_on_comment", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Comment", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "RecordActionOnComment", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.RecordActionOnComment", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListChangeLogEntries_sync", - "title": "Snippet for the list_change_log_entries call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_change_log_entries.", - "file": "gdc_hardware_management/list_change_log_entries.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_change_log_entries", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_change_log_entries", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "ListChangeLogEntries", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListChangeLogEntries", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetChangeLogEntry_sync", - "title": "Snippet for the get_change_log_entry call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_change_log_entry.", - "file": "gdc_hardware_management/get_change_log_entry.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_change_log_entry", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_change_log_entry", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "GetChangeLogEntry", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetChangeLogEntry", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListSkus_sync", - "title": "Snippet for the list_skus call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_skus.", - "file": "gdc_hardware_management/list_skus.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_skus", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_skus", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "ListSkus", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListSkus", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetSku_sync", - "title": "Snippet for the get_sku call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_sku.", - "file": "gdc_hardware_management/get_sku.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_sku", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_sku", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Sku", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "GetSku", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetSku", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_ListZones_sync", - "title": "Snippet for the list_zones call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_zones.", - "file": "gdc_hardware_management/list_zones.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_zones", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#list_zones", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::ListZonesResponse", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "ListZones", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.ListZones", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_GetZone_sync", - "title": "Snippet for the get_zone call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_zone.", - "file": "gdc_hardware_management/get_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_zone", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#get_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::GetZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GDCHardwareManagement::V1alpha::Zone", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "GetZone", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.GetZone", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_CreateZone_sync", - "title": "Snippet for the create_zone call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_zone.", - "file": "gdc_hardware_management/create_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_zone", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#create_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "CreateZone", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.CreateZone", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_UpdateZone_sync", - "title": "Snippet for the update_zone call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_zone.", - "file": "gdc_hardware_management/update_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_zone", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#update_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "UpdateZone", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.UpdateZone", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_DeleteZone_sync", - "title": "Snippet for the delete_zone call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_zone.", - "file": "gdc_hardware_management/delete_zone.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_zone", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#delete_zone", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "DeleteZone", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.DeleteZone", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_SignalZoneState_sync", - "title": "Snippet for the signal_zone_state call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#signal_zone_state.", - "file": "gdc_hardware_management/signal_zone_state.rb", - "language": "RUBY", - "client_method": { - "short_name": "signal_zone_state", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#signal_zone_state", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "SignalZoneState", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.SignalZoneState", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gdchardwaremanagement_v1alpha_generated_GDCHardwareManagement_RequestOrderDateChange_sync", - "title": "Snippet for the request_order_date_change call in the GDCHardwareManagement service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#request_order_date_change.", - "file": "gdc_hardware_management/request_order_date_change.rb", - "language": "RUBY", - "client_method": { - "short_name": "request_order_date_change", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client#request_order_date_change", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "GDCHardwareManagement::Client", - "full_name": "::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client" - }, - "method": { - "short_name": "RequestOrderDateChange", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement.RequestOrderDateChange", - "service": { - "short_name": "GDCHardwareManagement", - "full_name": "google.cloud.gdchardwaremanagement.v1alpha.GDCHardwareManagement" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_operations_test.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_operations_test.rb deleted file mode 100644 index 84f131151d1f..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_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/gdchardwaremanagement/v1alpha/service_pb" -require "google/cloud/gdchardwaremanagement/v1alpha/service_services_pb" -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management" - -class ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_paths_test.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_paths_test.rb deleted file mode 100644 index b4561b9b4999..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_paths_test.rb +++ /dev/null @@ -1,151 +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/gdc_hardware_management/v1alpha/gdc_hardware_management" - -class ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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_change_log_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.change_log_entry_path project: "value0", location: "value1", order: "value2", change_log_entry: "value3" - assert_equal "projects/value0/locations/value1/orders/value2/changeLogEntries/value3", path - end - end - - def test_comment_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.comment_path project: "value0", location: "value1", order: "value2", comment: "value3" - assert_equal "projects/value0/locations/value1/orders/value2/comments/value3", path - end - end - - def test_hardware_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.hardware_path project: "value0", location: "value1", hardware: "value2" - assert_equal "projects/value0/locations/value1/hardware/value2", path - end - end - - def test_hardware_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.hardware_group_path project: "value0", location: "value1", order: "value2", hardware_group: "value3" - assert_equal "projects/value0/locations/value1/orders/value2/hardwareGroups/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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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_order_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.order_path project: "value0", location: "value1", order: "value2" - assert_equal "projects/value0/locations/value1/orders/value2", path - end - end - - def test_site_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.site_path project: "value0", location: "value1", site: "value2" - assert_equal "projects/value0/locations/value1/sites/value2", path - end - end - - def test_sku_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.sku_path project: "value0", location: "value1", sku: "value2" - assert_equal "projects/value0/locations/value1/skus/value2", 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.zone_path project: "value0", location: "value1", zone: "value2" - assert_equal "projects/value0/locations/value1/zones/value2", path - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_rest_test.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_rest_test.rb deleted file mode 100644 index 2af55a6e9488..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_rest_test.rb +++ /dev/null @@ -1,2172 +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/gdchardwaremanagement/v1alpha/service_pb" -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management/rest" - - -class ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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_list_orders - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse.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_orders_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_orders_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_orders_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_orders({ parent: parent, page_size: 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_orders parent: parent, page_size: 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_orders ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.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_orders({ 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_orders(::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.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_orders_client_stub.call_count - end - end - end - - def test_get_order - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Order.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_order_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_order_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_order_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_order({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_order name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_order ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_order({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_order(::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_order_client_stub.call_count - end - end - end - - def test_create_order - # 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" - order_id = "hello world" - order = {} - request_id = "hello world" - - create_order_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_create_order_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_order_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_order({ parent: parent, order_id: order_id, order: order, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_order parent: parent, order_id: order_id, order: order, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_order ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new(parent: parent, order_id: order_id, order: order, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_order({ parent: parent, order_id: order_id, order: order, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_order(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new(parent: parent, order_id: order_id, order: order, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_order_client_stub.call_count - end - end - end - - def test_update_order - # 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 = {} - order = {} - request_id = "hello world" - - update_order_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_update_order_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_order_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_order({ update_mask: update_mask, order: order, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_order update_mask: update_mask, order: order, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_order ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new(update_mask: update_mask, order: order, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_order({ update_mask: update_mask, order: order, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_order(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new(update_mask: update_mask, order: order, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_order_client_stub.call_count - end - end - end - - def test_delete_order - # 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" - request_id = "hello world" - force = true - - delete_order_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_delete_order_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_order_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_order({ name: name, request_id: request_id, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_order name: name, request_id: request_id, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_order ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new(name: name, request_id: request_id, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_order({ name: name, request_id: request_id, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_order(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new(name: name, request_id: request_id, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_order_client_stub.call_count - end - end - end - - def test_submit_order - # 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" - request_id = "hello world" - type = :TYPE_UNSPECIFIED - - submit_order_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_submit_order_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, submit_order_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.submit_order({ name: name, request_id: request_id, type: type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.submit_order name: name, request_id: request_id, type: type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.submit_order ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new(name: name, request_id: request_id, type: type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.submit_order({ name: name, request_id: request_id, type: type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.submit_order(::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new(name: name, request_id: request_id, type: type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, submit_order_client_stub.call_count - end - end - end - - def test_cancel_order - # 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" - request_id = "hello world" - - cancel_order_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_cancel_order_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, cancel_order_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.cancel_order({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.cancel_order name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.cancel_order ::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.cancel_order({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.cancel_order(::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, cancel_order_client_stub.call_count - end - end - end - - def test_list_sites - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse.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_sites_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_sites_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_sites_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_sites({ parent: parent, page_size: 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_sites parent: parent, page_size: 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_sites ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.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_sites({ 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_sites(::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.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_sites_client_stub.call_count - end - end - end - - def test_get_site - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Site.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_site_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_site_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_site_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_site({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_site name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_site ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_site({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_site(::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_site_client_stub.call_count - end - end - end - - def test_create_site - # 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" - site_id = "hello world" - site = {} - request_id = "hello world" - - create_site_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_create_site_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_site_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_site({ parent: parent, site_id: site_id, site: site, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_site parent: parent, site_id: site_id, site: site, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_site ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new(parent: parent, site_id: site_id, site: site, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_site({ parent: parent, site_id: site_id, site: site, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_site(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new(parent: parent, site_id: site_id, site: site, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_site_client_stub.call_count - end - end - end - - def test_update_site - # 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 = {} - site = {} - request_id = "hello world" - - update_site_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_update_site_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_site_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_site({ update_mask: update_mask, site: site, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_site update_mask: update_mask, site: site, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_site ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new(update_mask: update_mask, site: site, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_site({ update_mask: update_mask, site: site, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_site(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new(update_mask: update_mask, site: site, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_site_client_stub.call_count - end - end - end - - def test_delete_site - # 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" - request_id = "hello world" - - delete_site_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_delete_site_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_site_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_site({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_site name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_site ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_site({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_site(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_site_client_stub.call_count - end - end - end - - def test_list_hardware_groups - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse.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_hardware_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_hardware_groups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_hardware_groups_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_hardware_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_hardware_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_hardware_groups ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.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_hardware_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_hardware_groups(::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.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_hardware_groups_client_stub.call_count - end - end - end - - def test_get_hardware_group - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_hardware_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_hardware_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_hardware_group_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_hardware_group({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_hardware_group name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_hardware_group({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_hardware_group_client_stub.call_count - end - end - end - - def test_create_hardware_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" - hardware_group_id = "hello world" - hardware_group = {} - request_id = "hello world" - - create_hardware_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_create_hardware_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_hardware_group_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_hardware_group({ parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_hardware_group parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new(parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_hardware_group({ parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new(parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_hardware_group_client_stub.call_count - end - end - end - - def test_update_hardware_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. - update_mask = {} - hardware_group = {} - request_id = "hello world" - - update_hardware_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_update_hardware_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_hardware_group_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_hardware_group({ update_mask: update_mask, hardware_group: hardware_group, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_hardware_group update_mask: update_mask, hardware_group: hardware_group, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new(update_mask: update_mask, hardware_group: hardware_group, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_hardware_group({ update_mask: update_mask, hardware_group: hardware_group, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new(update_mask: update_mask, hardware_group: hardware_group, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_hardware_group_client_stub.call_count - end - end - end - - def test_delete_hardware_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" - request_id = "hello world" - - delete_hardware_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_delete_hardware_group_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_hardware_group_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_hardware_group({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_hardware_group name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_hardware_group({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_hardware_group_client_stub.call_count - end - end - end - - def test_list_hardware - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse.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_hardware_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_hardware_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_hardware_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_hardware({ parent: parent, page_size: 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_hardware parent: parent, page_size: 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_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.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_hardware({ 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_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.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_hardware_client_stub.call_count - end - end - end - - def test_get_hardware - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_hardware_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_hardware_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_hardware_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_hardware({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_hardware name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_hardware({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_hardware_client_stub.call_count - end - end - end - - def test_create_hardware - # 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" - hardware_id = "hello world" - hardware = {} - - create_hardware_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_create_hardware_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_hardware_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_hardware({ parent: parent, hardware_id: hardware_id, hardware: hardware }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_hardware parent: parent, hardware_id: hardware_id, hardware: hardware do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new(parent: parent, hardware_id: hardware_id, hardware: hardware) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_hardware({ parent: parent, hardware_id: hardware_id, hardware: hardware }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new(parent: parent, hardware_id: hardware_id, hardware: hardware), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_hardware_client_stub.call_count - end - end - end - - def test_update_hardware - # 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 = {} - hardware = {} - request_id = "hello world" - - update_hardware_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_update_hardware_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_hardware_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_hardware({ update_mask: update_mask, hardware: hardware, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_hardware update_mask: update_mask, hardware: hardware, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new(update_mask: update_mask, hardware: hardware, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_hardware({ update_mask: update_mask, hardware: hardware, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new(update_mask: update_mask, hardware: hardware, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_hardware_client_stub.call_count - end - end - end - - def test_delete_hardware - # 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" - request_id = "hello world" - - delete_hardware_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_delete_hardware_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_hardware_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_hardware({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_hardware name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_hardware({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new(name: name, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_hardware_client_stub.call_count - end - end - end - - def test_list_comments - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse.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_comments_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_comments_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_comments_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_comments({ parent: parent, page_size: 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_comments parent: parent, page_size: 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_comments ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.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_comments({ 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_comments(::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.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_comments_client_stub.call_count - end - end - end - - def test_get_comment - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_comment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_comment_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_comment({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_comment name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_comment ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_comment({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_comment(::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_comment_client_stub.call_count - end - end - end - - def test_create_comment - # 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" - comment_id = "hello world" - comment = {} - request_id = "hello world" - - create_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_create_comment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_comment_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_comment({ parent: parent, comment_id: comment_id, comment: comment, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_comment parent: parent, comment_id: comment_id, comment: comment, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_comment ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new(parent: parent, comment_id: comment_id, comment: comment, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_comment({ parent: parent, comment_id: comment_id, comment: comment, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_comment(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new(parent: parent, comment_id: comment_id, comment: comment, request_id: request_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_comment_client_stub.call_count - end - end - end - - def test_record_action_on_comment - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - action_type = :ACTION_TYPE_UNSPECIFIED - - record_action_on_comment_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_record_action_on_comment_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, record_action_on_comment_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.record_action_on_comment({ name: name, action_type: action_type }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.record_action_on_comment name: name, action_type: action_type do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.record_action_on_comment ::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new(name: name, action_type: action_type) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.record_action_on_comment({ name: name, action_type: action_type }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.record_action_on_comment(::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new(name: name, action_type: action_type), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, record_action_on_comment_client_stub.call_count - end - end - end - - def test_list_change_log_entries - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse.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_change_log_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_change_log_entries_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_change_log_entries_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_change_log_entries({ parent: parent, page_size: 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_change_log_entries parent: parent, page_size: 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_change_log_entries ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.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_change_log_entries({ 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_change_log_entries(::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.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_change_log_entries_client_stub.call_count - end - end - end - - def test_get_change_log_entry - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_change_log_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_change_log_entry_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_change_log_entry_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_change_log_entry({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_change_log_entry name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_change_log_entry ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_change_log_entry({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_change_log_entry(::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_change_log_entry_client_stub.call_count - end - end - end - - def test_list_skus - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse.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_skus_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_skus_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_skus_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_skus({ parent: parent, page_size: 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_skus parent: parent, page_size: 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_skus ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.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_skus({ 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_skus(::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.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_skus_client_stub.call_count - end - end - end - - def test_get_sku - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_sku_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_sku_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_sku_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_sku({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_sku name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_sku ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_sku({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_sku(::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_sku_client_stub.call_count - end - end - end - - def test_list_zones - # Create test objects. - client_result = ::Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_list_zones_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_zones_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_get_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_zone_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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_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 = {} - request_id = "hello world" - - 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_create_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_zone_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, request_id: request_id }) 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, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_zone ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, request_id: request_id) 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, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_zone(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, request_id: request_id), 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 = {} - request_id = "hello world" - - 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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_update_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_zone_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_zone({ update_mask: update_mask, zone: zone, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_zone update_mask: update_mask, zone: zone, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_zone ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, request_id: request_id) 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, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_zone(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, request_id: request_id), 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" - request_id = "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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_delete_zone_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_zone_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_zone({ name: name, request_id: request_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_zone name: name, request_id: request_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_zone ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest.new(name: name, request_id: request_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_zone({ name: name, request_id: request_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_zone(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteZoneRequest.new(name: name, request_id: request_id), 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_signal_zone_state - # 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" - request_id = "hello world" - state_signal = :STATE_SIGNAL_UNSPECIFIED - provisioning_state_signal = :PROVISIONING_STATE_SIGNAL_UNSPECIFIED - step = "hello world" - details = "hello world" - - signal_zone_state_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_signal_zone_state_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, signal_zone_state_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.signal_zone_state({ name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.signal_zone_state name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.signal_zone_state ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new(name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.signal_zone_state({ name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.signal_zone_state(::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new(name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, signal_zone_state_client_stub.call_count - end - end - end - - def test_request_order_date_change - # 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" - requested_date = {} - - request_order_date_change_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::ServiceStub.stub :transcode_request_order_date_change_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, request_order_date_change_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.request_order_date_change({ name: name, requested_date: requested_date }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.request_order_date_change name: name, requested_date: requested_date do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.request_order_date_change ::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new(name: name, requested_date: requested_date) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.request_order_date_change({ name: name, requested_date: requested_date }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.request_order_date_change(::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new(name: name, requested_date: requested_date), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, request_order_date_change_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_test.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_test.rb deleted file mode 100644 index 112185b2e09a..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management_test.rb +++ /dev/null @@ -1,2554 +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/gdchardwaremanagement/v1alpha/service_pb" -require "google/cloud/gdc_hardware_management/v1alpha/gdc_hardware_management" - -class ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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_list_orders - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_orders_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_orders, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest, 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_orders_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_orders({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_orders parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_orders ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.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_orders({ 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_orders(::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.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_orders_client_stub.call_rpc_count - end - end - - def test_get_order - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::Order.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_order_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_order, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_order_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_order({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_order name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_order ::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_order({ 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_order(::Google::Cloud::GDCHardwareManagement::V1alpha::GetOrderRequest.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_order_client_stub.call_rpc_count - end - end - - def test_create_order - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - order_id = "hello world" - order = {} - request_id = "hello world" - - create_order_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_order, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["order_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Order), request["order"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_order_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_order({ parent: parent, order_id: order_id, order: order, request_id: request_id }) do |response, 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_order parent: parent, order_id: order_id, order: order, request_id: request_id do |response, 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_order ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new(parent: parent, order_id: order_id, order: order, request_id: request_id) do |response, operation| - assert_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_order({ parent: parent, order_id: order_id, order: order, request_id: request_id }, grpc_options) do |response, operation| - assert_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_order(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateOrderRequest.new(parent: parent, order_id: order_id, order: order, request_id: request_id), grpc_options) do |response, operation| - assert_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_order_client_stub.call_rpc_count - end - end - - def test_update_order - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - order = {} - request_id = "hello world" - - update_order_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_order, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Order), request["order"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_order_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_order({ update_mask: update_mask, order: order, request_id: request_id }) do |response, 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_order update_mask: update_mask, order: order, request_id: request_id do |response, 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_order ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new(update_mask: update_mask, order: order, request_id: request_id) do |response, operation| - assert_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_order({ update_mask: update_mask, order: order, request_id: request_id }, grpc_options) do |response, operation| - assert_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_order(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateOrderRequest.new(update_mask: update_mask, order: order, request_id: request_id), grpc_options) do |response, operation| - assert_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_order_client_stub.call_rpc_count - end - end - - def test_delete_order - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - force = true - - delete_order_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_order, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_order_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_order({ name: name, request_id: request_id, 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_order name: name, request_id: request_id, 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_order ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new(name: name, request_id: request_id, 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_order({ name: name, request_id: request_id, 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_order(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteOrderRequest.new(name: name, request_id: request_id, 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_order_client_stub.call_rpc_count - end - end - - def test_submit_order - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - type = :TYPE_UNSPECIFIED - - submit_order_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :submit_order, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal :TYPE_UNSPECIFIED, request["type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, submit_order_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.submit_order({ name: name, request_id: request_id, type: type }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.submit_order name: name, request_id: request_id, type: type do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.submit_order ::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new(name: name, request_id: request_id, type: type) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.submit_order({ name: name, request_id: request_id, type: type }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.submit_order(::Google::Cloud::GDCHardwareManagement::V1alpha::SubmitOrderRequest.new(name: name, request_id: request_id, type: type), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, submit_order_client_stub.call_rpc_count - end - end - - def test_cancel_order - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - cancel_order_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :cancel_order, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, cancel_order_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.cancel_order({ name: name, request_id: request_id }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.cancel_order name: name, request_id: request_id do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.cancel_order ::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new(name: name, request_id: request_id) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.cancel_order({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.cancel_order(::Google::Cloud::GDCHardwareManagement::V1alpha::CancelOrderRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, cancel_order_client_stub.call_rpc_count - end - end - - def test_list_sites - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_sites_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_sites, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest, 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_sites_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_sites({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_sites parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_sites ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.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_sites({ 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_sites(::Google::Cloud::GDCHardwareManagement::V1alpha::ListSitesRequest.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_sites_client_stub.call_rpc_count - end - end - - def test_get_site - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::Site.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_site_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_site, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_site_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_site({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_site name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_site ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_site({ 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_site(::Google::Cloud::GDCHardwareManagement::V1alpha::GetSiteRequest.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_site_client_stub.call_rpc_count - end - end - - def test_create_site - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - site_id = "hello world" - site = {} - request_id = "hello world" - - create_site_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_site, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["site_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Site), request["site"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_site_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_site({ parent: parent, site_id: site_id, site: site, request_id: request_id }) do |response, 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_site parent: parent, site_id: site_id, site: site, request_id: request_id do |response, 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_site ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new(parent: parent, site_id: site_id, site: site, request_id: request_id) do |response, operation| - assert_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_site({ parent: parent, site_id: site_id, site: site, request_id: request_id }, grpc_options) do |response, operation| - assert_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_site(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateSiteRequest.new(parent: parent, site_id: site_id, site: site, request_id: request_id), grpc_options) do |response, operation| - assert_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_site_client_stub.call_rpc_count - end - end - - def test_update_site - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - site = {} - request_id = "hello world" - - update_site_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_site, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Site), request["site"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_site_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_site({ update_mask: update_mask, site: site, request_id: request_id }) do |response, 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_site update_mask: update_mask, site: site, request_id: request_id do |response, 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_site ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new(update_mask: update_mask, site: site, request_id: request_id) do |response, operation| - assert_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_site({ update_mask: update_mask, site: site, request_id: request_id }, grpc_options) do |response, operation| - assert_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_site(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateSiteRequest.new(update_mask: update_mask, site: site, request_id: request_id), grpc_options) do |response, operation| - assert_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_site_client_stub.call_rpc_count - end - end - - def test_delete_site - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_site_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_site, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_site_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_site({ name: name, request_id: request_id }) do |response, 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_site name: name, request_id: request_id do |response, 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_site ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new(name: name, request_id: request_id) do |response, operation| - assert_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_site({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_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_site(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteSiteRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_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_site_client_stub.call_rpc_count - end - end - - def test_list_hardware_groups - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_hardware_groups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_hardware_groups, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest, 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_hardware_groups_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_hardware_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_hardware_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_hardware_groups ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.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_hardware_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_hardware_groups(::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareGroupsRequest.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_hardware_groups_client_stub.call_rpc_count - end - end - - def test_get_hardware_group - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_hardware_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_hardware_group, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_hardware_group_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_hardware_group({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_hardware_group name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_hardware_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_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareGroupRequest.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_hardware_group_client_stub.call_rpc_count - end - end - - def test_create_hardware_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" - hardware_group_id = "hello world" - hardware_group = {} - request_id = "hello world" - - create_hardware_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_hardware_group, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["hardware_group_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup), request["hardware_group"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_hardware_group_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_hardware_group({ parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id }) do |response, 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_hardware_group parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id do |response, 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_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new(parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id) do |response, operation| - assert_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_hardware_group({ parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id }, grpc_options) do |response, operation| - assert_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_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareGroupRequest.new(parent: parent, hardware_group_id: hardware_group_id, hardware_group: hardware_group, request_id: request_id), grpc_options) do |response, operation| - assert_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_hardware_group_client_stub.call_rpc_count - end - end - - def test_update_hardware_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. - update_mask = {} - hardware_group = {} - request_id = "hello world" - - update_hardware_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_hardware_group, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::HardwareGroup), request["hardware_group"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_hardware_group_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_hardware_group({ update_mask: update_mask, hardware_group: hardware_group, request_id: request_id }) do |response, 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_hardware_group update_mask: update_mask, hardware_group: hardware_group, request_id: request_id do |response, 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_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new(update_mask: update_mask, hardware_group: hardware_group, request_id: request_id) do |response, operation| - assert_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_hardware_group({ update_mask: update_mask, hardware_group: hardware_group, request_id: request_id }, grpc_options) do |response, operation| - assert_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_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareGroupRequest.new(update_mask: update_mask, hardware_group: hardware_group, request_id: request_id), grpc_options) do |response, operation| - assert_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_hardware_group_client_stub.call_rpc_count - end - end - - def test_delete_hardware_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" - request_id = "hello world" - - delete_hardware_group_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_hardware_group, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_hardware_group_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_hardware_group({ name: name, request_id: request_id }) do |response, 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_hardware_group name: name, request_id: request_id do |response, 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_hardware_group ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new(name: name, request_id: request_id) do |response, operation| - assert_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_hardware_group({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_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_hardware_group(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareGroupRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_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_hardware_group_client_stub.call_rpc_count - end - end - - def test_list_hardware - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_hardware_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_hardware, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest, 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_hardware_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_hardware({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_hardware parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.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_hardware({ 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_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::ListHardwareRequest.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_hardware_client_stub.call_rpc_count - end - end - - def test_get_hardware - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_hardware_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_hardware, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_hardware_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_hardware({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_hardware name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_hardware({ 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_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::GetHardwareRequest.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_hardware_client_stub.call_rpc_count - end - end - - def test_create_hardware - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - hardware_id = "hello world" - hardware = {} - - create_hardware_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_hardware, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["hardware_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware), request["hardware"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_hardware_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_hardware({ parent: parent, hardware_id: hardware_id, hardware: hardware }) do |response, 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_hardware parent: parent, hardware_id: hardware_id, hardware: hardware do |response, 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_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new(parent: parent, hardware_id: hardware_id, hardware: hardware) do |response, operation| - assert_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_hardware({ parent: parent, hardware_id: hardware_id, hardware: hardware }, grpc_options) do |response, operation| - assert_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_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateHardwareRequest.new(parent: parent, hardware_id: hardware_id, hardware: hardware), grpc_options) do |response, operation| - assert_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_hardware_client_stub.call_rpc_count - end - end - - def test_update_hardware - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.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 = {} - hardware = {} - request_id = "hello world" - - update_hardware_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_hardware, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Hardware), request["hardware"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_hardware_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_hardware({ update_mask: update_mask, hardware: hardware, request_id: request_id }) do |response, 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_hardware update_mask: update_mask, hardware: hardware, request_id: request_id do |response, 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_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new(update_mask: update_mask, hardware: hardware, request_id: request_id) do |response, operation| - assert_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_hardware({ update_mask: update_mask, hardware: hardware, request_id: request_id }, grpc_options) do |response, operation| - assert_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_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateHardwareRequest.new(update_mask: update_mask, hardware: hardware, request_id: request_id), grpc_options) do |response, operation| - assert_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_hardware_client_stub.call_rpc_count - end - end - - def test_delete_hardware - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - - delete_hardware_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_hardware, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_hardware_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_hardware({ name: name, request_id: request_id }) do |response, 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_hardware name: name, request_id: request_id do |response, 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_hardware ::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new(name: name, request_id: request_id) do |response, operation| - assert_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_hardware({ name: name, request_id: request_id }, grpc_options) do |response, operation| - assert_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_hardware(::Google::Cloud::GDCHardwareManagement::V1alpha::DeleteHardwareRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_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_hardware_client_stub.call_rpc_count - end - end - - def test_list_comments - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_comments_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_comments, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest, 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_comments_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_comments({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_comments parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_comments ::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.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_comments({ 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_comments(::Google::Cloud::GDCHardwareManagement::V1alpha::ListCommentsRequest.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_comments_client_stub.call_rpc_count - end - end - - def test_get_comment - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_comment, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_comment_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_comment({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_comment name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_comment ::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_comment({ 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_comment(::Google::Cloud::GDCHardwareManagement::V1alpha::GetCommentRequest.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_comment_client_stub.call_rpc_count - end - end - - def test_create_comment - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - comment_id = "hello world" - comment = {} - request_id = "hello world" - - create_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_comment, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["comment_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment), request["comment"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_comment_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_comment({ parent: parent, comment_id: comment_id, comment: comment, request_id: request_id }) do |response, 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_comment parent: parent, comment_id: comment_id, comment: comment, request_id: request_id do |response, 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_comment ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new(parent: parent, comment_id: comment_id, comment: comment, request_id: request_id) do |response, operation| - assert_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_comment({ parent: parent, comment_id: comment_id, comment: comment, request_id: request_id }, grpc_options) do |response, operation| - assert_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_comment(::Google::Cloud::GDCHardwareManagement::V1alpha::CreateCommentRequest.new(parent: parent, comment_id: comment_id, comment: comment, request_id: request_id), grpc_options) do |response, operation| - assert_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_comment_client_stub.call_rpc_count - end - end - - def test_record_action_on_comment - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::Comment.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - action_type = :ACTION_TYPE_UNSPECIFIED - - record_action_on_comment_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :record_action_on_comment, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest, request - assert_equal "hello world", request["name"] - assert_equal :ACTION_TYPE_UNSPECIFIED, request["action_type"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, record_action_on_comment_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.record_action_on_comment({ name: name, action_type: action_type }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.record_action_on_comment name: name, action_type: action_type do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.record_action_on_comment ::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new(name: name, action_type: action_type) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.record_action_on_comment({ name: name, action_type: action_type }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.record_action_on_comment(::Google::Cloud::GDCHardwareManagement::V1alpha::RecordActionOnCommentRequest.new(name: name, action_type: action_type), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, record_action_on_comment_client_stub.call_rpc_count - end - end - - def test_list_change_log_entries - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_change_log_entries_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_change_log_entries, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest, 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_change_log_entries_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_change_log_entries({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_change_log_entries parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_change_log_entries ::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.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_change_log_entries({ 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_change_log_entries(::Google::Cloud::GDCHardwareManagement::V1alpha::ListChangeLogEntriesRequest.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_change_log_entries_client_stub.call_rpc_count - end - end - - def test_get_change_log_entry - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ChangeLogEntry.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_change_log_entry_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_change_log_entry, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_change_log_entry_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_change_log_entry({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_change_log_entry name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_change_log_entry ::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_change_log_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.get_change_log_entry(::Google::Cloud::GDCHardwareManagement::V1alpha::GetChangeLogEntryRequest.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_change_log_entry_client_stub.call_rpc_count - end - end - - def test_list_skus - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_skus_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_skus, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest, 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_skus_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_skus({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_skus parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_skus ::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.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_skus({ 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_skus(::Google::Cloud::GDCHardwareManagement::V1alpha::ListSkusRequest.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_skus_client_stub.call_rpc_count - end - end - - def test_get_sku - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::Sku.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_sku_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_sku, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_sku_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_sku({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_sku name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_sku ::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_sku({ 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_sku(::Google::Cloud::GDCHardwareManagement::V1alpha::GetSkuRequest.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_sku_client_stub.call_rpc_count - end - end - - def test_list_zones - # Create GRPC objects. - grpc_response = ::Google::Cloud::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::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::GDCHardwareManagement::V1alpha::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_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 = {} - request_id = "hello world" - - create_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_zone, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::CreateZoneRequest, request - assert_equal "hello world", request["parent"] - assert_equal "hello world", request["zone_id"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Zone), request["zone"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_zone_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_zone({ parent: parent, zone_id: zone_id, zone: zone, request_id: request_id }) do |response, 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, request_id: request_id do |response, 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::GDCHardwareManagement::V1alpha::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, request_id: request_id) do |response, operation| - assert_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, request_id: request_id }, grpc_options) do |response, operation| - assert_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::GDCHardwareManagement::V1alpha::CreateZoneRequest.new(parent: parent, zone_id: zone_id, zone: zone, request_id: request_id), grpc_options) do |response, operation| - assert_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 = {} - request_id = "hello world" - - update_zone_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_zone, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::UpdateZoneRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GDCHardwareManagement::V1alpha::Zone), request["zone"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_zone_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_zone({ update_mask: update_mask, zone: zone, request_id: request_id }) do |response, 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, request_id: request_id do |response, 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::GDCHardwareManagement::V1alpha::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, request_id: request_id) do |response, operation| - assert_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, request_id: request_id }, grpc_options) do |response, operation| - assert_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::GDCHardwareManagement::V1alpha::UpdateZoneRequest.new(update_mask: update_mask, zone: zone, request_id: request_id), grpc_options) do |response, operation| - assert_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" - request_id = "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::GDCHardwareManagement::V1alpha::DeleteZoneRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_zone_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_zone({ name: name, request_id: request_id }) do |response, 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, request_id: request_id do |response, 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::GDCHardwareManagement::V1alpha::DeleteZoneRequest.new(name: name, request_id: request_id) do |response, operation| - assert_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, request_id: request_id }, grpc_options) do |response, operation| - assert_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::GDCHardwareManagement::V1alpha::DeleteZoneRequest.new(name: name, request_id: request_id), grpc_options) do |response, operation| - assert_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_signal_zone_state - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - request_id = "hello world" - state_signal = :STATE_SIGNAL_UNSPECIFIED - provisioning_state_signal = :PROVISIONING_STATE_SIGNAL_UNSPECIFIED - step = "hello world" - details = "hello world" - - signal_zone_state_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :signal_zone_state, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["request_id"] - assert_equal :STATE_SIGNAL_UNSPECIFIED, request["state_signal"] - assert_equal :PROVISIONING_STATE_SIGNAL_UNSPECIFIED, request["provisioning_state_signal"] - assert_equal "hello world", request["step"] - assert_equal "hello world", request["details"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, signal_zone_state_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.signal_zone_state({ name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.signal_zone_state name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.signal_zone_state ::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new(name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.signal_zone_state({ name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.signal_zone_state(::Google::Cloud::GDCHardwareManagement::V1alpha::SignalZoneStateRequest.new(name: name, request_id: request_id, state_signal: state_signal, provisioning_state_signal: provisioning_state_signal, step: step, details: details), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, signal_zone_state_client_stub.call_rpc_count - end - end - - def test_request_order_date_change - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - name = "hello world" - requested_date = {} - - request_order_date_change_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :request_order_date_change, name - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest, request - assert_equal "hello world", request["name"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Type::Date), request["requested_date"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, request_order_date_change_client_stub do - # Create client - client = ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.request_order_date_change({ name: name, requested_date: requested_date }) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use named arguments - client.request_order_date_change name: name, requested_date: requested_date do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.request_order_date_change ::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new(name: name, requested_date: requested_date) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.request_order_date_change({ name: name, requested_date: requested_date }, grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.request_order_date_change(::Google::Cloud::GDCHardwareManagement::V1alpha::RequestOrderDateChangeRequest.new(name: name, requested_date: requested_date), grpc_options) do |response, operation| - assert_kind_of Gapic::Operation, response - assert_equal grpc_response, response.grpc_op - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, request_order_date_change_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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/helper.rb b/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management-v1alpha/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/.gitignore b/owl-bot-staging/google-cloud-gdc_hardware_management/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/.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-gdc_hardware_management/.repo-metadata.json b/owl-bot-staging/google-cloud-gdc_hardware_management/.repo-metadata.json deleted file mode 100644 index 58f603c68772..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/.repo-metadata.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "api_id": "gdchardwaremanagement.googleapis.com", - "api_shortname": "gdchardwaremanagement", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management/latest", - "distribution_name": "google-cloud-gdc_hardware_management", - "is_cloud": true, - "language": "ruby", - "name": "gdchardwaremanagement", - "name_pretty": "GDC Hardware Management API", - "product_documentation": "https://cloud.google.com/distributed-cloud/edge/latest/docs", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-gdc_hardware_management is the official client library for the GDC Hardware Management API.", - "ruby-cloud-product-url": "https://cloud.google.com/distributed-cloud/edge/latest/docs", - "ruby-cloud-service-override": "GdcHardwareManagement=GDCHardwareManagement", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/.rubocop.yml b/owl-bot-staging/google-cloud-gdc_hardware_management/.rubocop.yml deleted file mode 100644 index cd246d63e504..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-gdc_hardware_management.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-gdc_hardware_management.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/.toys.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/.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-gdc_hardware_management/.yardopts b/owl-bot-staging/google-cloud-gdc_hardware_management/.yardopts deleted file mode 100644 index 0f53bd9cb248..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="GDC Hardware Management API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gdc_hardware_management/AUTHENTICATION.md deleted file mode 100644 index e5b6738b28f4..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-gdc_hardware_management 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-gdc_hardware_management 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/gdc_hardware_management" - -client = Google::Cloud::GDCHardwareManagement.gdc_hardware_management do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/gdc_hardware_management" - -Google::Cloud::GDCHardwareManagement.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::GDCHardwareManagement.gdc_hardware_management -``` - -### 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-gdc_hardware_management -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/gdc_hardware_management" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::GDCHardwareManagement.gdc_hardware_management -``` - -### 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-gdc_hardware_management/CHANGELOG.md b/owl-bot-staging/google-cloud-gdc_hardware_management/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/Gemfile b/owl-bot-staging/google-cloud-gdc_hardware_management/Gemfile deleted file mode 100644 index 729754f8e5ea..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-gdc_hardware_management-v1alpha"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-gdc_hardware_management.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/LICENSE.md b/owl-bot-staging/google-cloud-gdc_hardware_management/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/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-gdc_hardware_management/README.md b/owl-bot-staging/google-cloud-gdc_hardware_management/README.md deleted file mode 100644 index 6fe26aecdb9d..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the GDC Hardware Management API - -API Client library for the GDC Hardware Management API - -google-cloud-gdc_hardware_management is the official client library for the GDC Hardware Management API. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-gdc_hardware_management-v*`. -The gem `google-cloud-gdc_hardware_management` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management/latest) -for this library, google-cloud-gdc_hardware_management, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-gdc_hardware_management-v1alpha](https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management-v1alpha/latest). - -See also the [Product Documentation](https://cloud.google.com/distributed-cloud/edge/latest/docs) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-gdc_hardware_management -``` - -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/gdchardwaremanagement.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/gdc_hardware_management" - -client = Google::Cloud::GDCHardwareManagement.gdc_hardware_management -request = ::Google::Cloud::GDCHardwareManagement::V1alpha::ListOrdersRequest.new # (request fields as keyword arguments...) -response = client.list_orders request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-gdc_hardware_management-v1alpha](https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management-v1alpha/latest). - -## 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-gdc_hardware_management`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-gdc_hardware_management-v1alpha`. -_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-gdc_hardware_management`. -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-gdc_hardware_management-v1alpha`. - -### 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-gdc_hardware_management/Rakefile b/owl-bot-staging/google-cloud-gdc_hardware_management/Rakefile deleted file mode 100644 index 4592da7cd041..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/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 = true -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-gdc_hardware_management 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/gdc_hardware_management/v1alpha/gdc_hardware_management/credentials" - ::Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::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-gdc_hardware_management 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-gdc_hardware_management 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-gdc_hardware_management 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-gdc_hardware_management gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-gdc_hardware_management" - header "google-cloud-gdc_hardware_management rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-gdc_hardware_management yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-gdc_hardware_management 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-gdc_hardware_management 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-gdc_hardware_management 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-gdc_hardware_management/google-cloud-gdc_hardware_management.gemspec b/owl-bot-staging/google-cloud-gdc_hardware_management/google-cloud-gdc_hardware_management.gemspec deleted file mode 100644 index 7b3c0c3a7e9b..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/google-cloud-gdc_hardware_management.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/gdc_hardware_management/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-gdc_hardware_management" - gem.version = Google::Cloud::GDCHardwareManagement::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-gdc_hardware_management is the official client library for the GDC Hardware Management API." - gem.summary = "API Client library for the GDC Hardware Management API" - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-gdc_hardware_management-v1alpha", ">= 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google-cloud-gdc_hardware_management.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google-cloud-gdc_hardware_management.rb deleted file mode 100644 index 854e8fd3b75d..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google-cloud-gdc_hardware_management.rb +++ /dev/null @@ -1,19 +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/gdc_hardware_management" unless defined? Google::Cloud::GDCHardwareManagement::VERSION diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management.rb deleted file mode 100644 index 5c4f9ec8f21a..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management.rb +++ /dev/null @@ -1,156 +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 this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/gdc_hardware_management/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :gdc_hardware_management do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module GDCHardwareManagement - ## - # Create a new client object for GDCHardwareManagement. - # - # By default, this returns an instance of - # [Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-gdc_hardware_management-v1alpha/latest/Google-Cloud-GDCHardwareManagement-V1alpha-GDCHardwareManagement-Client) - # for a gRPC client for version V1alpha of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the GDCHardwareManagement service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the GDCHardwareManagement service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::GDCHardwareManagement.gdc_hardware_management_available?}. - # - # ## About GDCHardwareManagement - # - # The GDC Hardware Management service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1alpha`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.gdc_hardware_management version: :v1alpha, transport: :grpc, &block - require "google/cloud/gdc_hardware_management/#{version.to_s.downcase}" - - package_name = Google::Cloud::GDCHardwareManagement - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::GDCHardwareManagement.const_get(package_name).const_get(:GDCHardwareManagement) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the GDCHardwareManagement service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::GDCHardwareManagement.gdc_hardware_management}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the GDCHardwareManagement service, - # or if the versioned client gem needs an update to support the GDCHardwareManagement service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1alpha`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.gdc_hardware_management_available? version: :v1alpha, transport: :grpc - require "google/cloud/gdc_hardware_management/#{version.to_s.downcase}" - package_name = Google::Cloud::GDCHardwareManagement - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::GDCHardwareManagement.const_get package_name - return false unless service_module.const_defined? :GDCHardwareManagement - service_module = service_module.const_get :GDCHardwareManagement - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-gdc_hardware_management library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # 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 [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.gdc_hardware_management if block_given? - - ::Google::Cloud.configure.gdc_hardware_management - end - end - end -end - -helper_path = ::File.join __dir__, "gdc_hardware_management", "helpers.rb" -require "google/cloud/gdc_hardware_management/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management/version.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management/version.rb deleted file mode 100644 index 0b5a1d30736c..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/lib/google/cloud/gdc_hardware_management/version.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! - - -module Google - module Cloud - module GDCHardwareManagement - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/client_test.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/client_test.rb deleted file mode 100644 index 05a3538b6acc..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/client_test.rb +++ /dev/null @@ -1,64 +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 "google/cloud/gdc_hardware_management" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::GDCHardwareManagement::ClientConstructionMinitest < 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_gdc_hardware_management_grpc - skip unless Google::Cloud::GDCHardwareManagement.gdc_hardware_management_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::GDCHardwareManagement.gdc_hardware_management transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Client, client - end - end - - def test_gdc_hardware_management_rest - skip unless Google::Cloud::GDCHardwareManagement.gdc_hardware_management_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::GDCHardwareManagement.gdc_hardware_management transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::GDCHardwareManagement::V1alpha::GDCHardwareManagement::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/version_test.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/version_test.rb deleted file mode 100644 index 443e46b92916..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/test/google/cloud/gdc_hardware_management/version_test.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 "helper" -require "google/cloud/gdc_hardware_management/version" - -class Google::Cloud::GDCHardwareManagement::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::GDCHardwareManagement::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-gdc_hardware_management/test/helper.rb b/owl-bot-staging/google-cloud-gdc_hardware_management/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-gdc_hardware_management/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/.gitignore b/owl-bot-staging/google-cloud-gemini_data_analytics/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/.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-gemini_data_analytics/.repo-metadata.json b/owl-bot-staging/google-cloud-gemini_data_analytics/.repo-metadata.json deleted file mode 100644 index 4c8c7a0be67b..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "geminidataanalytics.googleapis.com", - "api_shortname": "geminidataanalytics", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics/latest", - "distribution_name": "google-cloud-gemini_data_analytics", - "is_cloud": true, - "language": "ruby", - "name": "geminidataanalytics", - "name_pretty": "Data Analytics API with Gemini API", - "product_documentation": "https://cloud.google.com/gemini/docs/conversational-analytics-api/overview", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "google-cloud-gemini_data_analytics is the official client library for the Data Analytics API with Gemini API.", - "ruby-cloud-product-url": "https://cloud.google.com/gemini/docs/conversational-analytics-api/overview", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/.rubocop.yml b/owl-bot-staging/google-cloud-gemini_data_analytics/.rubocop.yml deleted file mode 100644 index 8ca99ad7aeac..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-gemini_data_analytics.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-gemini_data_analytics.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/.toys.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/.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-gemini_data_analytics/.yardopts b/owl-bot-staging/google-cloud-gemini_data_analytics/.yardopts deleted file mode 100644 index 54879d43e83a..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Data Analytics API with Gemini API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gemini_data_analytics/AUTHENTICATION.md deleted file mode 100644 index 31b252334589..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-gemini_data_analytics 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-gemini_data_analytics 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/gemini_data_analytics" - -client = Google::Cloud::GeminiDataAnalytics.data_agent_service do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/gemini_data_analytics" - -Google::Cloud::GeminiDataAnalytics.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::GeminiDataAnalytics.data_agent_service -``` - -### 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-gemini_data_analytics -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/gemini_data_analytics" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::GeminiDataAnalytics.data_agent_service -``` - -### 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-gemini_data_analytics/CHANGELOG.md b/owl-bot-staging/google-cloud-gemini_data_analytics/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/Gemfile b/owl-bot-staging/google-cloud-gemini_data_analytics/Gemfile deleted file mode 100644 index 25cff00273b3..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-gemini_data_analytics-v1beta"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-gemini_data_analytics.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/LICENSE.md b/owl-bot-staging/google-cloud-gemini_data_analytics/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/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-gemini_data_analytics/README.md b/owl-bot-staging/google-cloud-gemini_data_analytics/README.md deleted file mode 100644 index b1a04f66a6d3..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Data Analytics API with Gemini API - -API Client library for the Data Analytics API with Gemini API - -google-cloud-gemini_data_analytics is the official client library for the Data Analytics API with Gemini API. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-gemini_data_analytics-v*`. -The gem `google-cloud-gemini_data_analytics` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics/latest) -for this library, google-cloud-gemini_data_analytics, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-gemini_data_analytics-v1beta](https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1beta/latest). - -See also the [Product Documentation](https://cloud.google.com/gemini/docs/conversational-analytics-api/overview) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-gemini_data_analytics -``` - -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/geminidataanalytics.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/gemini_data_analytics" - -client = Google::Cloud::GeminiDataAnalytics.data_agent_service -request = ::Google::Cloud::GeminiDataAnalytics::V1beta::ListDataAgentsRequest.new # (request fields as keyword arguments...) -response = client.list_data_agents request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-gemini_data_analytics-v1beta](https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1beta/latest). - -## 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-gemini_data_analytics`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-gemini_data_analytics-v1beta`. -_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-gemini_data_analytics`. -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-gemini_data_analytics-v1beta`. - -### 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-gemini_data_analytics/Rakefile b/owl-bot-staging/google-cloud-gemini_data_analytics/Rakefile deleted file mode 100644 index 6dd374104478..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/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 = true -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-gemini_data_analytics 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/gemini_data_analytics/v1beta/data_agent_service/credentials" - ::Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::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-gemini_data_analytics 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-gemini_data_analytics 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-gemini_data_analytics 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-gemini_data_analytics gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-gemini_data_analytics" - header "google-cloud-gemini_data_analytics rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-gemini_data_analytics yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-gemini_data_analytics 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-gemini_data_analytics 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-gemini_data_analytics 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-gemini_data_analytics/google-cloud-gemini_data_analytics.gemspec b/owl-bot-staging/google-cloud-gemini_data_analytics/google-cloud-gemini_data_analytics.gemspec deleted file mode 100644 index 627aa670acc1..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/google-cloud-gemini_data_analytics.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/gemini_data_analytics/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-gemini_data_analytics" - gem.version = Google::Cloud::GeminiDataAnalytics::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "google-cloud-gemini_data_analytics is the official client library for the Data Analytics API with Gemini API." - gem.summary = "API Client library for the Data Analytics API with Gemini API" - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-gemini_data_analytics-v1beta", ">= 0.0", "< 2.a" -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google-cloud-gemini_data_analytics.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google-cloud-gemini_data_analytics.rb deleted file mode 100644 index 6f0cf3b63371..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google-cloud-gemini_data_analytics.rb +++ /dev/null @@ -1,19 +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/gemini_data_analytics" unless defined? Google::Cloud::GeminiDataAnalytics::VERSION diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics.rb deleted file mode 100644 index f6a692ea15f0..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics.rb +++ /dev/null @@ -1,228 +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 this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/gemini_data_analytics/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :gemini_data_analytics do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module GeminiDataAnalytics - ## - # Create a new client object for DataAgentService. - # - # By default, this returns an instance of - # [Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1beta/latest/Google-Cloud-GeminiDataAnalytics-V1beta-DataAgentService-Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the DataAgentService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the DataAgentService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::GeminiDataAnalytics.data_agent_service_available?}. - # - # ## About DataAgentService - # - # Service describing handlers for resources. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.data_agent_service version: :v1beta, transport: :grpc, &block - require "google/cloud/gemini_data_analytics/#{version.to_s.downcase}" - - package_name = Google::Cloud::GeminiDataAnalytics - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::GeminiDataAnalytics.const_get(package_name).const_get(:DataAgentService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the DataAgentService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::GeminiDataAnalytics.data_agent_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the DataAgentService service, - # or if the versioned client gem needs an update to support the DataAgentService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.data_agent_service_available? version: :v1beta, transport: :grpc - require "google/cloud/gemini_data_analytics/#{version.to_s.downcase}" - package_name = Google::Cloud::GeminiDataAnalytics - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::GeminiDataAnalytics.const_get package_name - return false unless service_module.const_defined? :DataAgentService - service_module = service_module.const_get :DataAgentService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Create a new client object for DataChatService. - # - # By default, this returns an instance of - # [Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-gemini_data_analytics-v1beta/latest/Google-Cloud-GeminiDataAnalytics-V1beta-DataChatService-Client) - # for a gRPC client for version V1beta of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the DataChatService service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the DataChatService service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::GeminiDataAnalytics.data_chat_service_available?}. - # - # ## About DataChatService - # - # Service to ask a natural language question on top of BigQuery - # and Looker Studio datasources to get back streamed responses of various kinds - # to help provide a rich conversational answer. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.data_chat_service version: :v1beta, transport: :grpc, &block - require "google/cloud/gemini_data_analytics/#{version.to_s.downcase}" - - package_name = Google::Cloud::GeminiDataAnalytics - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::GeminiDataAnalytics.const_get(package_name).const_get(:DataChatService) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the DataChatService service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::GeminiDataAnalytics.data_chat_service}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the DataChatService service, - # or if the versioned client gem needs an update to support the DataChatService service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1beta`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.data_chat_service_available? version: :v1beta, transport: :grpc - require "google/cloud/gemini_data_analytics/#{version.to_s.downcase}" - package_name = Google::Cloud::GeminiDataAnalytics - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::GeminiDataAnalytics.const_get package_name - return false unless service_module.const_defined? :DataChatService - service_module = service_module.const_get :DataChatService - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-gemini_data_analytics library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # 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 [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.gemini_data_analytics if block_given? - - ::Google::Cloud.configure.gemini_data_analytics - end - end - end -end - -helper_path = ::File.join __dir__, "gemini_data_analytics", "helpers.rb" -require "google/cloud/gemini_data_analytics/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics/version.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics/version.rb deleted file mode 100644 index df5e5d498354..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/lib/google/cloud/gemini_data_analytics/version.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! - - -module Google - module Cloud - module GeminiDataAnalytics - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/client_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/client_test.rb deleted file mode 100644 index 9a6ea222ad44..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/client_test.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! - -require "helper" -require "google/cloud/gemini_data_analytics" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::GeminiDataAnalytics::ClientConstructionMinitest < 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_agent_service_grpc - skip unless Google::Cloud::GeminiDataAnalytics.data_agent_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::GeminiDataAnalytics.data_agent_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Client, client - end - end - - def test_data_agent_service_rest - skip unless Google::Cloud::GeminiDataAnalytics.data_agent_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::GeminiDataAnalytics.data_agent_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::GeminiDataAnalytics::V1beta::DataAgentService::Rest::Client, client - end - end - - def test_data_chat_service_grpc - skip unless Google::Cloud::GeminiDataAnalytics.data_chat_service_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::GeminiDataAnalytics.data_chat_service transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Client, client - end - end - - def test_data_chat_service_rest - skip unless Google::Cloud::GeminiDataAnalytics.data_chat_service_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::GeminiDataAnalytics.data_chat_service transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::GeminiDataAnalytics::V1beta::DataChatService::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/version_test.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/version_test.rb deleted file mode 100644 index 3473549d65d2..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/test/google/cloud/gemini_data_analytics/version_test.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 "helper" -require "google/cloud/gemini_data_analytics/version" - -class Google::Cloud::GeminiDataAnalytics::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::GeminiDataAnalytics::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-gemini_data_analytics/test/helper.rb b/owl-bot-staging/google-cloud-gemini_data_analytics/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-gemini_data_analytics/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/.gitignore b/owl-bot-staging/google-cloud-gke_backup-v1/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/.repo-metadata.json b/owl-bot-staging/google-cloud-gke_backup-v1/.repo-metadata.json deleted file mode 100644 index 0eda48010934..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "gkebackup.googleapis.com", - "api_shortname": "gkebackup", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest", - "distribution_name": "google-cloud-gke_backup-v1", - "is_cloud": true, - "language": "ruby", - "name": "gkebackup", - "name_pretty": "Backup for GKE V1 API", - "product_documentation": "https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Backup for GKE lets you protect, manage, and restore your containerized applications and data for stateful workloads running on Google Kubernetes Engine clusters. Note that google-cloud-gke_backup-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gke_backup instead. See the readme for more details.", - "ruby-cloud-product-url": "https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/.rubocop.yml b/owl-bot-staging/google-cloud-gke_backup-v1/.rubocop.yml deleted file mode 100644 index bdd7d3ac54fd..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/.rubocop.yml +++ /dev/null @@ -1,33 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-gke_backup-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-gke_backup-v1.rb" diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/.toys.rb b/owl-bot-staging/google-cloud-gke_backup-v1/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/.yardopts b/owl-bot-staging/google-cloud-gke_backup-v1/.yardopts deleted file mode 100644 index 391c905bb074..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/.yardopts +++ /dev/null @@ -1,12 +0,0 @@ ---no-private ---title="Backup for GKE 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-gke_backup-v1/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gke_backup-v1/AUTHENTICATION.md deleted file mode 100644 index 665050fca1c0..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-gke_backup-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-gke_backup-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/gke_backup/v1" - -client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/gke_backup/v1" - -::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::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-gke_backup-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/gke_backup/v1" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::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-gke_backup-v1/CHANGELOG.md b/owl-bot-staging/google-cloud-gke_backup-v1/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/Gemfile b/owl-bot-staging/google-cloud-gke_backup-v1/Gemfile deleted file mode 100644 index 6442df18fa2f..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/Gemfile +++ /dev/null @@ -1,11 +0,0 @@ -source "https://rubygems.org" - -gemspec - -gem "google-style", "~> 1.31.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/LICENSE.md b/owl-bot-staging/google-cloud-gke_backup-v1/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/README.md b/owl-bot-staging/google-cloud-gke_backup-v1/README.md deleted file mode 100644 index ff40bfe72de1..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/README.md +++ /dev/null @@ -1,154 +0,0 @@ -# Ruby Client for the Backup for GKE V1 API - -Backup for GKE is a managed Kubernetes workload backup and restore service for GKE clusters. - -Backup for GKE lets you protect, manage, and restore your containerized applications and data for stateful workloads running on Google Kubernetes Engine clusters. - -https://github.com/googleapis/google-cloud-ruby - -This gem is a _versioned_ client. It provides basic client classes for a -specific version of the Backup for GKE V1 API. Most users should consider using -the main client gem, -[google-cloud-gke_backup](https://rubygems.org/gems/google-cloud-gke_backup). -See the section below titled *Which client should I use?* for more information. - -## Installation - -``` -$ gem install google-cloud-gke_backup-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/gkebackup.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -## Quick Start - -```ruby -require "google/cloud/gke_backup/v1" - -client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new -request = ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new # (request fields as keyword arguments...) -response = client.create_backup_plan request -``` - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest) -for class and method documentation. - -See also the [Product Documentation](https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/) -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/gke_backup/v1" -require "logger" - -client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::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-gke_backup`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-gke_backup-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-gke_backup`. -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-gke_backup-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-gke_backup-v1/Rakefile b/owl-bot-staging/google-cloud-gke_backup-v1/Rakefile deleted file mode 100644 index 2a4f5cd5f3cc..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-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/gke_backup/v1/backup_for_gke/credentials" - ::Google::Cloud::GkeBackup::V1::BackupForGKE::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-gke_backup-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-gke_backup-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-gke_backup-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-gke_backup-v1 gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-gke_backup-v1" - header "google-cloud-gke_backup-v1 rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-gke_backup-v1 yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-gke_backup-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-gke_backup-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-gke_backup-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-gke_backup-v1/gapic_metadata.json b/owl-bot-staging/google-cloud-gke_backup-v1/gapic_metadata.json deleted file mode 100644 index 1ac2e53f7f86..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/gapic_metadata.json +++ /dev/null @@ -1,213 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "ruby", - "protoPackage": "google.cloud.gkebackup.v1", - "libraryPackage": "::Google::Cloud::GkeBackup::V1", - "services": { - "BackupForGKE": { - "clients": { - "grpc": { - "libraryClient": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client", - "rpcs": { - "CreateBackupPlan": { - "methods": [ - "create_backup_plan" - ] - }, - "ListBackupPlans": { - "methods": [ - "list_backup_plans" - ] - }, - "GetBackupPlan": { - "methods": [ - "get_backup_plan" - ] - }, - "UpdateBackupPlan": { - "methods": [ - "update_backup_plan" - ] - }, - "DeleteBackupPlan": { - "methods": [ - "delete_backup_plan" - ] - }, - "CreateBackupChannel": { - "methods": [ - "create_backup_channel" - ] - }, - "ListBackupChannels": { - "methods": [ - "list_backup_channels" - ] - }, - "GetBackupChannel": { - "methods": [ - "get_backup_channel" - ] - }, - "UpdateBackupChannel": { - "methods": [ - "update_backup_channel" - ] - }, - "DeleteBackupChannel": { - "methods": [ - "delete_backup_channel" - ] - }, - "ListBackupPlanBindings": { - "methods": [ - "list_backup_plan_bindings" - ] - }, - "GetBackupPlanBinding": { - "methods": [ - "get_backup_plan_binding" - ] - }, - "CreateBackup": { - "methods": [ - "create_backup" - ] - }, - "ListBackups": { - "methods": [ - "list_backups" - ] - }, - "GetBackup": { - "methods": [ - "get_backup" - ] - }, - "UpdateBackup": { - "methods": [ - "update_backup" - ] - }, - "DeleteBackup": { - "methods": [ - "delete_backup" - ] - }, - "ListVolumeBackups": { - "methods": [ - "list_volume_backups" - ] - }, - "GetVolumeBackup": { - "methods": [ - "get_volume_backup" - ] - }, - "CreateRestorePlan": { - "methods": [ - "create_restore_plan" - ] - }, - "ListRestorePlans": { - "methods": [ - "list_restore_plans" - ] - }, - "GetRestorePlan": { - "methods": [ - "get_restore_plan" - ] - }, - "UpdateRestorePlan": { - "methods": [ - "update_restore_plan" - ] - }, - "DeleteRestorePlan": { - "methods": [ - "delete_restore_plan" - ] - }, - "CreateRestoreChannel": { - "methods": [ - "create_restore_channel" - ] - }, - "ListRestoreChannels": { - "methods": [ - "list_restore_channels" - ] - }, - "GetRestoreChannel": { - "methods": [ - "get_restore_channel" - ] - }, - "UpdateRestoreChannel": { - "methods": [ - "update_restore_channel" - ] - }, - "DeleteRestoreChannel": { - "methods": [ - "delete_restore_channel" - ] - }, - "ListRestorePlanBindings": { - "methods": [ - "list_restore_plan_bindings" - ] - }, - "GetRestorePlanBinding": { - "methods": [ - "get_restore_plan_binding" - ] - }, - "CreateRestore": { - "methods": [ - "create_restore" - ] - }, - "ListRestores": { - "methods": [ - "list_restores" - ] - }, - "GetRestore": { - "methods": [ - "get_restore" - ] - }, - "UpdateRestore": { - "methods": [ - "update_restore" - ] - }, - "DeleteRestore": { - "methods": [ - "delete_restore" - ] - }, - "ListVolumeRestores": { - "methods": [ - "list_volume_restores" - ] - }, - "GetVolumeRestore": { - "methods": [ - "get_volume_restore" - ] - }, - "GetBackupIndexDownloadUrl": { - "methods": [ - "get_backup_index_download_url" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/google-cloud-gke_backup-v1.gemspec b/owl-bot-staging/google-cloud-gke_backup-v1/google-cloud-gke_backup-v1.gemspec deleted file mode 100644 index 60f453624325..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/google-cloud-gke_backup-v1.gemspec +++ /dev/null @@ -1,30 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/gke_backup/v1/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-gke_backup-v1" - gem.version = Google::Cloud::GkeBackup::V1::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Backup for GKE lets you protect, manage, and restore your containerized applications and data for stateful workloads running on Google Kubernetes Engine clusters. Note that google-cloud-gke_backup-v1 is a version-specific client library. For most uses, we recommend installing the main client library google-cloud-gke_backup instead. See the readme for more details." - gem.summary = "Backup for GKE is a managed Kubernetes workload backup and restore service for GKE clusters." - 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.1" - - 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-gke_backup-v1/lib/google-cloud-gke_backup-v1.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google-cloud-gke_backup-v1.rb deleted file mode 100644 index 87ed457ef266..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google-cloud-gke_backup-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/gke_backup/v1" diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1.rb deleted file mode 100644 index 8c3bbcdef3fc..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1.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/gke_backup/v1/backup_for_gke" -require "google/cloud/gke_backup/v1/version" - -module Google - module Cloud - module GkeBackup - ## - # API client module. - # - # @example Load this package, including all its services, and instantiate a gRPC client - # - # require "google/cloud/gke_backup/v1" - # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # @example Load this package, including all its services, and instantiate a REST client - # - # require "google/cloud/gke_backup/v1" - # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - module V1 - end - end - end -end - -helper_path = ::File.join __dir__, "v1", "_helpers.rb" -require "google/cloud/gke_backup/v1/_helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke.rb deleted file mode 100644 index 8d22ff475e9e..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke.rb +++ /dev/null @@ -1,57 +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/gke_backup/v1/version" - -require "google/cloud/gke_backup/v1/backup_for_gke/credentials" -require "google/cloud/gke_backup/v1/backup_for_gke/paths" -require "google/cloud/gke_backup/v1/backup_for_gke/operations" -require "google/cloud/gke_backup/v1/backup_for_gke/client" -require "google/cloud/gke_backup/v1/backup_for_gke/rest" - -module Google - module Cloud - module GkeBackup - module V1 - ## - # BackupForGKE allows Kubernetes administrators to configure, execute, and - # manage backup and restore operations for their GKE clusters. - # - # @example Load this service and instantiate a gRPC client - # - # require "google/cloud/gke_backup/v1/backup_for_gke" - # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # @example Load this service and instantiate a REST client - # - # require "google/cloud/gke_backup/v1/backup_for_gke/rest" - # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - module BackupForGKE - end - end - end - end -end - -helper_path = ::File.join __dir__, "backup_for_gke", "helpers.rb" -require "google/cloud/gke_backup/v1/backup_for_gke/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb deleted file mode 100644 index 6fe6a5aecaa8..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/client.rb +++ /dev/null @@ -1,4776 +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/gkebackup/v1/gkebackup_pb" -require "google/cloud/location" -require "google/iam/v1" - -module Google - module Cloud - module GkeBackup - module V1 - module BackupForGKE - ## - # Client for the BackupForGKE service. - # - # BackupForGKE allows Kubernetes administrators to configure, execute, and - # manage backup and restore operations for their GKE clusters. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :backup_for_gke_stub - - ## - # Configure the BackupForGKE Client class. - # - # See {::Google::Cloud::GkeBackup::V1::BackupForGKE::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BackupForGKE clients - # ::Google::Cloud::GkeBackup::V1::BackupForGKE::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", "GkeBackup", "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_backup_plan.timeout = 300.0 - - default_config.rpcs.list_backup_plans.timeout = 60.0 - default_config.rpcs.list_backup_plans.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_plan.timeout = 60.0 - default_config.rpcs.get_backup_plan.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup_plan.timeout = 60.0 - - default_config.rpcs.delete_backup_plan.timeout = 60.0 - - default_config.rpcs.create_backup_channel.timeout = 60.0 - - default_config.rpcs.list_backup_channels.timeout = 60.0 - default_config.rpcs.list_backup_channels.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_channel.timeout = 60.0 - default_config.rpcs.get_backup_channel.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup_channel.timeout = 60.0 - - default_config.rpcs.delete_backup_channel.timeout = 60.0 - - default_config.rpcs.list_backup_plan_bindings.timeout = 60.0 - default_config.rpcs.list_backup_plan_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_plan_binding.timeout = 60.0 - default_config.rpcs.get_backup_plan_binding.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_backup.timeout = 120.0 - - default_config.rpcs.list_backups.timeout = 60.0 - default_config.rpcs.list_backups.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup.timeout = 60.0 - default_config.rpcs.get_backup.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup.timeout = 60.0 - - default_config.rpcs.delete_backup.timeout = 300.0 - - default_config.rpcs.list_volume_backups.timeout = 60.0 - default_config.rpcs.list_volume_backups.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_volume_backup.timeout = 60.0 - default_config.rpcs.get_volume_backup.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_restore_plan.timeout = 120.0 - - default_config.rpcs.list_restore_plans.timeout = 60.0 - default_config.rpcs.list_restore_plans.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_restore_plan.timeout = 60.0 - default_config.rpcs.get_restore_plan.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_restore_plan.timeout = 60.0 - - default_config.rpcs.delete_restore_plan.timeout = 60.0 - - default_config.rpcs.create_restore_channel.timeout = 60.0 - - default_config.rpcs.list_restore_channels.timeout = 60.0 - default_config.rpcs.list_restore_channels.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_restore_channel.timeout = 60.0 - default_config.rpcs.get_restore_channel.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_restore_channel.timeout = 60.0 - - default_config.rpcs.delete_restore_channel.timeout = 60.0 - - default_config.rpcs.list_restore_plan_bindings.timeout = 60.0 - default_config.rpcs.list_restore_plan_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_restore_plan_binding.timeout = 60.0 - default_config.rpcs.get_restore_plan_binding.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_restore.timeout = 120.0 - - default_config.rpcs.list_restores.timeout = 60.0 - default_config.rpcs.list_restores.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_restore.timeout = 60.0 - default_config.rpcs.get_restore.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_restore.timeout = 60.0 - - default_config.rpcs.delete_restore.timeout = 60.0 - - default_config.rpcs.list_volume_restores.timeout = 60.0 - default_config.rpcs.list_volume_restores.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_volume_restore.timeout = 60.0 - default_config.rpcs.get_volume_restore.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_index_download_url.timeout = 60.0 - default_config.rpcs.get_backup_index_download_url.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BackupForGKE 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::GkeBackup::V1::BackupForGKE::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 - @backup_for_gke_stub.universe_domain - end - - ## - # Create a new BackupForGKE client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BackupForGKE 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/gkebackup/v1/gkebackup_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 - - @backup_for_gke_stub = ::Gapic::ServiceStub.new( - ::Google::Cloud::GkeBackup::V1::BackupForGKE::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 - ) - - @backup_for_gke_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 = @backup_for_gke_stub.endpoint - config.universe_domain = @backup_for_gke_stub.universe_domain - config.logger = @backup_for_gke_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 = @backup_for_gke_stub.endpoint - config.universe_domain = @backup_for_gke_stub.universe_domain - config.logger = @backup_for_gke_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::GkeBackup::V1::BackupForGKE::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 - @backup_for_gke_stub.logger - end - - # Service calls - - ## - # Creates a new BackupPlan in a given location. - # - # @overload create_backup_plan(request, options = nil) - # Pass arguments to `create_backup_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_plan(parent: nil, backup_plan: nil, backup_plan_id: nil) - # Pass arguments to `create_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 within which to create the BackupPlan. - # Format: `projects/*/locations/*` - # @param backup_plan [::Google::Cloud::GkeBackup::V1::BackupPlan, ::Hash] - # Required. The BackupPlan resource object to create. - # @param backup_plan_id [::String] - # Required. The client-provided short name for the BackupPlan resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of BackupPlans in this location - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new - # - # # Call the create_backup_plan method. - # result = client.create_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest - - # Converts hash and nil to 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_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backup_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :create_backup_plan, 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 BackupPlans in a given location. - # - # @overload list_backup_plans(request, options = nil) - # Pass arguments to `list_backup_plans` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backup_plans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 that contains the BackupPlans to list. - # Format: `projects/*/locations/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.new - # - # # Call the list_backup_plans method. - # result = client.list_backup_plans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupPlan. - # p item - # end - # - def list_backup_plans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest - - # Converts hash and nil to 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_backup_plans.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backup_plans.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_plans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :list_backup_plans, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backup_plans, 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 - - ## - # Retrieve the details of a single BackupPlan. - # - # @overload get_backup_plan(request, options = nil) - # Pass arguments to `get_backup_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_plan(name: nil) - # Pass arguments to `get_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified BackupPlan name. - # Format: `projects/*/locations/*/backupPlans/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeBackup::V1::BackupPlan] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeBackup::V1::BackupPlan] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new - # - # # Call the get_backup_plan method. - # result = client.get_backup_plan request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlan. - # p result - # - def get_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest - - # Converts hash and nil to 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_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backup_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :get_backup_plan, 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 - - ## - # Update a BackupPlan. - # - # @overload update_backup_plan(request, options = nil) - # Pass arguments to `update_backup_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_plan(backup_plan: nil, update_mask: nil) - # Pass arguments to `update_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_plan [::Google::Cloud::GkeBackup::V1::BackupPlan, ::Hash] - # Required. A new version of the BackupPlan resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. This is used to specify the fields to be overwritten in the - # BackupPlan targeted for update. The values for each of these - # updated fields will be taken from the `backup_plan` provided - # with this request. Field names are relative to the root of the resource - # (e.g., `description`, `backup_config.include_volume_data`, etc.) - # If no `update_mask` is provided, all fields in `backup_plan` will be - # written to the target BackupPlan resource. - # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored - # and are not used to update the target BackupPlan. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new - # - # # Call the update_backup_plan method. - # result = client.update_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest - - # Converts hash and nil to 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_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup_plan&.name - header_params["backup_plan.name"] = request.backup_plan.name - end - - request_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_backup_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :update_backup_plan, 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 existing BackupPlan. - # - # @overload delete_backup_plan(request, options = nil) - # Pass arguments to `delete_backup_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup_plan(name: nil, etag: nil) - # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified BackupPlan name. - # Format: `projects/*/locations/*/backupPlans/*` - # @param etag [::String] - # Optional. If provided, this value must match the current value of the - # target BackupPlan's {::Google::Cloud::GkeBackup::V1::BackupPlan#etag etag} field - # or the request is rejected. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.new - # - # # Call the delete_backup_plan method. - # result = client.delete_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest - - # Converts hash and nil to 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_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backup_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :delete_backup_plan, 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 new BackupChannel in a given location. - # - # @overload create_backup_channel(request, options = nil) - # Pass arguments to `create_backup_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_channel(parent: nil, backup_channel: nil, backup_channel_id: nil) - # Pass arguments to `create_backup_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 within which to create the BackupChannel. - # Format: `projects/*/locations/*` - # @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash] - # Required. The BackupChannel resource object to create. - # @param backup_channel_id [::String] - # Optional. The client-provided short name for the BackupChannel resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of BackupChannels in this location - # If the user does not provide a name, a uuid will be used as the name. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new - # - # # Call the create_backup_channel method. - # result = client.create_backup_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest - - # Converts hash and nil to 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_backup_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backup_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :create_backup_channel, 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 BackupChannels in a given location. - # - # @overload list_backup_channels(request, options = nil) - # Pass arguments to `list_backup_channels` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backup_channels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 that contains the BackupChannels to list. - # Format: `projects/*/locations/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token} - # received from a previous `ListBackupChannels` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupChannels` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.new - # - # # Call the list_backup_channels method. - # result = client.list_backup_channels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupChannel. - # p item - # end - # - def list_backup_channels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest - - # Converts hash and nil to 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_backup_channels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backup_channels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_channels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :list_backup_channels, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backup_channels, 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 - - ## - # Retrieve the details of a single BackupChannel. - # - # @overload get_backup_channel(request, options = nil) - # Pass arguments to `get_backup_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_channel(name: nil) - # Pass arguments to `get_backup_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified BackupChannel name. - # Format: `projects/*/locations/*/backupChannels/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeBackup::V1::BackupChannel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeBackup::V1::BackupChannel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new - # - # # Call the get_backup_channel method. - # result = client.get_backup_channel request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupChannel. - # p result - # - def get_backup_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest - - # Converts hash and nil to 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_backup_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backup_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :get_backup_channel, 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 - - ## - # Update a BackupChannel. - # - # @overload update_backup_channel(request, options = nil) - # Pass arguments to `update_backup_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_channel(backup_channel: nil, update_mask: nil) - # Pass arguments to `update_backup_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash] - # Required. A new version of the BackupChannel resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. This is used to specify the fields to be overwritten in the - # BackupChannel targeted for update. The values for each of these - # updated fields will be taken from the `backup_channel` provided - # with this request. Field names are relative to the root of the resource - # (e.g., `description`, `labels`, etc.) - # If no `update_mask` is provided, all fields in `backup_channel` will - # be written to the target BackupChannel resource. Note that - # OUTPUT_ONLY and IMMUTABLE fields in `backup_channel` are ignored and - # are not used to update the target BackupChannel. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new - # - # # Call the update_backup_channel method. - # result = client.update_backup_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest - - # Converts hash and nil to 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_backup_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup_channel&.name - header_params["backup_channel.name"] = request.backup_channel.name - end - - request_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_backup_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :update_backup_channel, 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 existing BackupChannel. - # - # @overload delete_backup_channel(request, options = nil) - # Pass arguments to `delete_backup_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup_channel(name: nil, etag: nil, force: nil) - # Pass arguments to `delete_backup_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified BackupChannel name. - # Format: `projects/*/locations/*/backupChannels/*` - # @param etag [::String] - # Optional. If provided, this value must match the current value of the - # target BackupChannel's {::Google::Cloud::GkeBackup::V1::BackupChannel#etag etag} - # field or the request is rejected. - # @param force [::Boolean] - # Optional. If set to true, any BackupPlanAssociations below this - # BackupChannel will also be deleted. Otherwise, the request will only - # succeed if the BackupChannel has no BackupPlanAssociations. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new - # - # # Call the delete_backup_channel method. - # result = client.delete_backup_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest - - # Converts hash and nil to 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_backup_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backup_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :delete_backup_channel, 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 BackupPlanBindings in a given location. - # - # @overload list_backup_plan_bindings(request, options = nil) - # Pass arguments to `list_backup_plan_bindings` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backup_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backup_plan_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 BackupChannel that contains the BackupPlanBindings to list. - # Format: `projects/*/locations/*/backupChannels/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlanBindings` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlanBindings` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.new - # - # # Call the list_backup_plan_bindings method. - # result = client.list_backup_plan_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::GkeBackup::V1::BackupPlanBinding. - # p item - # end - # - def list_backup_plan_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest - - # Converts hash and nil to 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_backup_plan_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::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backup_plan_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backup_plan_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :list_backup_plan_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backup_plan_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 - - ## - # Retrieve the details of a single BackupPlanBinding. - # - # @overload get_backup_plan_binding(request, options = nil) - # Pass arguments to `get_backup_plan_binding` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_plan_binding(name: nil) - # Pass arguments to `get_backup_plan_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. Fully qualified BackupPlanBinding name. - # Format: - # `projects/*/locations/*/backupChannels/*/backupPlanBindings/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeBackup::V1::BackupPlanBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new - # - # # Call the get_backup_plan_binding method. - # result = client.get_backup_plan_binding request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlanBinding. - # p result - # - def get_backup_plan_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest - - # Converts hash and nil to 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_backup_plan_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::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backup_plan_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_plan_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :get_backup_plan_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 - - ## - # Creates a Backup for the given BackupPlan. - # - # @overload create_backup(request, options = nil) - # Pass arguments to `create_backup` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::CreateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup(parent: nil, backup: nil, backup_id: nil) - # Pass arguments to `create_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The BackupPlan within which to create the Backup. - # Format: `projects/*/locations/*/backupPlans/*` - # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash] - # Optional. The Backup resource to create. - # @param backup_id [::String] - # Optional. The client-provided short name for the Backup resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of Backups in this BackupPlan - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::CreateBackupRequest.new - # - # # Call the create_backup method. - # result = client.create_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupRequest - - # Converts hash and nil to 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :create_backup, 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 the Backups for a given BackupPlan. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil) - # Pass arguments to `list_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The BackupPlan that contains the Backups to list. - # Format: `projects/*/locations/*/backupPlans/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token} - # received from a previous `ListBackups` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackups` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @param return_partial_success [::Boolean] - # Optional. If set to true, the response will return partial results when - # some regions are unreachable and the unreachable field will be populated. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListBackupsRequest.new - # - # # Call the list_backups method. - # result = client.list_backups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup. - # p item - # end - # - def list_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupsRequest - - # Converts hash and nil to 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_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :list_backups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_backups, 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 - - ## - # Retrieve the details of a single Backup. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup(name: nil) - # Pass arguments to `get_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Full name of the Backup resource. - # Format: `projects/*/locations/*/backupPlans/*/backups/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeBackup::V1::Backup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeBackup::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::Backup. - # p result - # - def get_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupRequest - - # Converts hash and nil to 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :get_backup, 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 - - ## - # Update a Backup. - # - # @overload update_backup(request, options = nil) - # Pass arguments to `update_backup` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::UpdateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup(backup: nil, update_mask: nil) - # Pass arguments to `update_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash] - # Required. A new version of the Backup resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. This is used to specify the fields to be overwritten in the - # Backup targeted for update. The values for each of these - # updated fields will be taken from the `backup_plan` provided - # with this request. Field names are relative to the root of the resource. - # If no `update_mask` is provided, all fields in `backup` will be - # written to the target Backup resource. - # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored - # and are not used to update the target Backup. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new - # - # # Call the update_backup method. - # result = client.update_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest - - # Converts hash and nil to 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup&.name - header_params["backup.name"] = request.backup.name - end - - request_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_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :update_backup, 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 existing Backup. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_backup(name: nil, etag: nil, force: nil) - # Pass arguments to `delete_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the Backup resource. - # Format: `projects/*/locations/*/backupPlans/*/backups/*` - # @param etag [::String] - # Optional. If provided, this value must match the current value of the - # target Backup's {::Google::Cloud::GkeBackup::V1::Backup#etag etag} field or the - # request is rejected. - # @param force [::Boolean] - # Optional. If set to true, any VolumeBackups below this Backup will also be - # deleted. Otherwise, the request will only succeed if the Backup has no - # VolumeBackups. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest - - # Converts hash and nil to 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :delete_backup, 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 the VolumeBackups for a given Backup. - # - # @overload list_volume_backups(request, options = nil) - # Pass arguments to `list_volume_backups` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_volume_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_volume_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The Backup that contains the VolumeBackups to list. - # Format: `projects/*/locations/*/backupPlans/*/backups/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token} - # received from a previous `ListVolumeBackups` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListVolumeBackups` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.new - # - # # Call the list_volume_backups method. - # result = client.list_volume_backups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup. - # p item - # end - # - def list_volume_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest - - # Converts hash and nil to 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_volume_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_volume_backups.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_volume_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :list_volume_backups, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_volume_backups, 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 - - ## - # Retrieve the details of a single VolumeBackup. - # - # @overload get_volume_backup(request, options = nil) - # Pass arguments to `get_volume_backup` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_volume_backup(name: nil) - # Pass arguments to `get_volume_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Full name of the VolumeBackup resource. - # Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeBackup::V1::VolumeBackup] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new - # - # # Call the get_volume_backup method. - # result = client.get_volume_backup request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeBackup. - # p result - # - def get_volume_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest - - # Converts hash and nil to 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_volume_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_volume_backup.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_volume_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :get_volume_backup, 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 new RestorePlan in a given location. - # - # @overload create_restore_plan(request, options = nil) - # Pass arguments to `create_restore_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_restore_plan(parent: nil, restore_plan: nil, restore_plan_id: nil) - # Pass arguments to `create_restore_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 within which to create the RestorePlan. - # Format: `projects/*/locations/*` - # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash] - # Required. The RestorePlan resource object to create. - # @param restore_plan_id [::String] - # Required. The client-provided short name for the RestorePlan resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of RestorePlans in this location - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new - # - # # Call the create_restore_plan method. - # result = client.create_restore_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest - - # Converts hash and nil to 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_restore_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restore_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_restore_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :create_restore_plan, 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 RestorePlans in a given location. - # - # @overload list_restore_plans(request, options = nil) - # Pass arguments to `list_restore_plans` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_restore_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_restore_plans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 that contains the RestorePlans to list. - # Format: `projects/*/locations/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token} - # received from a previous `ListRestorePlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListRestorePlans` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.new - # - # # Call the list_restore_plans method. - # result = client.list_restore_plans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan. - # p item - # end - # - def list_restore_plans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest - - # Converts hash and nil to 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_restore_plans.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restore_plans.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_restore_plans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :list_restore_plans, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plans, 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 - - ## - # Retrieve the details of a single RestorePlan. - # - # @overload get_restore_plan(request, options = nil) - # Pass arguments to `get_restore_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_restore_plan(name: nil) - # Pass arguments to `get_restore_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified RestorePlan name. - # Format: `projects/*/locations/*/restorePlans/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeBackup::V1::RestorePlan] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeBackup::V1::RestorePlan] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new - # - # # Call the get_restore_plan method. - # result = client.get_restore_plan request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlan. - # p result - # - def get_restore_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest - - # Converts hash and nil to 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_restore_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restore_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_restore_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :get_restore_plan, 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 - - ## - # Update a RestorePlan. - # - # @overload update_restore_plan(request, options = nil) - # Pass arguments to `update_restore_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_restore_plan(restore_plan: nil, update_mask: nil) - # Pass arguments to `update_restore_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash] - # Required. A new version of the RestorePlan resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. This is used to specify the fields to be overwritten in the - # RestorePlan targeted for update. The values for each of these - # updated fields will be taken from the `restore_plan` provided - # with this request. Field names are relative to the root of the resource. - # If no `update_mask` is provided, all fields in `restore_plan` will be - # written to the target RestorePlan resource. - # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored - # and are not used to update the target RestorePlan. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new - # - # # Call the update_restore_plan method. - # result = client.update_restore_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest - - # Converts hash and nil to 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_restore_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.restore_plan&.name - header_params["restore_plan.name"] = request.restore_plan.name - end - - request_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_restore_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_restore_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :update_restore_plan, 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 existing RestorePlan. - # - # @overload delete_restore_plan(request, options = nil) - # Pass arguments to `delete_restore_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_restore_plan(name: nil, etag: nil, force: nil) - # Pass arguments to `delete_restore_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified RestorePlan name. - # Format: `projects/*/locations/*/restorePlans/*` - # @param etag [::String] - # Optional. If provided, this value must match the current value of the - # target RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#etag etag} - # field or the request is rejected. - # @param force [::Boolean] - # Optional. If set to true, any Restores below this RestorePlan will also be - # deleted. Otherwise, the request will only succeed if the RestorePlan has no - # Restores. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new - # - # # Call the delete_restore_plan method. - # result = client.delete_restore_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest - - # Converts hash and nil to 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_restore_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restore_plan.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_restore_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :delete_restore_plan, 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 new RestoreChannel in a given location. - # - # @overload create_restore_channel(request, options = nil) - # Pass arguments to `create_restore_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_restore_channel(parent: nil, restore_channel: nil, restore_channel_id: nil) - # Pass arguments to `create_restore_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 within which to create the RestoreChannel. - # Format: `projects/*/locations/*` - # @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash] - # Required. The RestoreChannel resource object to create. - # @param restore_channel_id [::String] - # Optional. The client-provided short name for the RestoreChannel resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of RestoreChannels in this location - # If the user does not provide a name, a uuid will be used as the name. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new - # - # # Call the create_restore_channel method. - # result = client.create_restore_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest - - # Converts hash and nil to 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_restore_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restore_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_restore_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :create_restore_channel, 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 RestoreChannels in a given location. - # - # @overload list_restore_channels(request, options = nil) - # Pass arguments to `list_restore_channels` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_restore_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_restore_channels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 that contains the RestoreChannels to list. - # Format: `projects/*/locations/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token} - # received from a previous `ListRestoreChannels` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListRestoreChannels` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.new - # - # # Call the list_restore_channels method. - # result = client.list_restore_channels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestoreChannel. - # p item - # end - # - def list_restore_channels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest - - # Converts hash and nil to 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_restore_channels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restore_channels.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_restore_channels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :list_restore_channels, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restore_channels, 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 - - ## - # Retrieve the details of a single RestoreChannel. - # - # @overload get_restore_channel(request, options = nil) - # Pass arguments to `get_restore_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_restore_channel(name: nil) - # Pass arguments to `get_restore_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified RestoreChannel name. - # Format: `projects/*/locations/*/restoreChannels/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeBackup::V1::RestoreChannel] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeBackup::V1::RestoreChannel] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new - # - # # Call the get_restore_channel method. - # result = client.get_restore_channel request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::RestoreChannel. - # p result - # - def get_restore_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest - - # Converts hash and nil to 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_restore_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restore_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_restore_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :get_restore_channel, 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 - - ## - # Update a RestoreChannel. - # - # @overload update_restore_channel(request, options = nil) - # Pass arguments to `update_restore_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_restore_channel(restore_channel: nil, update_mask: nil) - # Pass arguments to `update_restore_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash] - # Required. A new version of the RestoreChannel resource that contains - # updated fields. This may be sparsely populated if an `update_mask` is - # provided. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. This is used to specify the fields to be overwritten in the - # RestoreChannel targeted for update. The values for each of these - # updated fields will be taken from the `restore_channel` provided - # with this request. Field names are relative to the root of the resource - # (e.g., `description`, `destination_project_id`, etc.) - # If no `update_mask` is provided, all fields in `restore_channel` will - # be written to the target RestoreChannel resource. Note that - # OUTPUT_ONLY and IMMUTABLE fields in `restore_channel` are ignored and - # are not used to update the target RestoreChannel. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new - # - # # Call the update_restore_channel method. - # result = client.update_restore_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest - - # Converts hash and nil to 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_restore_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.restore_channel&.name - header_params["restore_channel.name"] = request.restore_channel.name - end - - request_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_restore_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_restore_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :update_restore_channel, 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 existing RestoreChannel. - # - # @overload delete_restore_channel(request, options = nil) - # Pass arguments to `delete_restore_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_restore_channel(name: nil, etag: nil) - # Pass arguments to `delete_restore_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified RestoreChannel name. - # Format: `projects/*/locations/*/restoreChannels/*` - # @param etag [::String] - # Optional. If provided, this value must match the current value of the - # target RestoreChannel's - # {::Google::Cloud::GkeBackup::V1::RestoreChannel#etag etag} field or the request - # is rejected. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.new - # - # # Call the delete_restore_channel method. - # result = client.delete_restore_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest - - # Converts hash and nil to 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_restore_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restore_channel.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_restore_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :delete_restore_channel, 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 RestorePlanBindings in a given location. - # - # @overload list_restore_plan_bindings(request, options = nil) - # Pass arguments to `list_restore_plan_bindings` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_restore_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_restore_plan_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 RestoreChannel that contains the ListRestorePlanBindings to - # list. Format: `projects/*/locations/*/restoreChannels/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token} - # received from a previous `ListRestorePlanBindings` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListRestorePlanBindings` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.new - # - # # Call the list_restore_plan_bindings method. - # result = client.list_restore_plan_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::GkeBackup::V1::RestorePlanBinding. - # p item - # end - # - def list_restore_plan_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest - - # Converts hash and nil to 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_restore_plan_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::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restore_plan_bindings.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_restore_plan_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :list_restore_plan_bindings, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plan_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 - - ## - # Retrieve the details of a single RestorePlanBinding. - # - # @overload get_restore_plan_binding(request, options = nil) - # Pass arguments to `get_restore_plan_binding` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_restore_plan_binding(name: nil) - # Pass arguments to `get_restore_plan_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. Fully qualified RestorePlanBinding name. - # Format: - # `projects/*/locations/*/restoreChannels/*/restorePlanBindings/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeBackup::V1::RestorePlanBinding] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeBackup::V1::RestorePlanBinding] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new - # - # # Call the get_restore_plan_binding method. - # result = client.get_restore_plan_binding request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlanBinding. - # p result - # - def get_restore_plan_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest - - # Converts hash and nil to 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_restore_plan_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::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restore_plan_binding.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_restore_plan_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :get_restore_plan_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 - - ## - # Creates a new Restore for the given RestorePlan. - # - # @overload create_restore(request, options = nil) - # Pass arguments to `create_restore` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::CreateRestoreRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::CreateRestoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_restore(parent: nil, restore: nil, restore_id: nil) - # Pass arguments to `create_restore` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The RestorePlan within which to create the Restore. - # Format: `projects/*/locations/*/restorePlans/*` - # @param restore [::Google::Cloud::GkeBackup::V1::Restore, ::Hash] - # Required. The restore resource to create. - # @param restore_id [::String] - # Required. The client-provided short name for the Restore resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of Restores in this RestorePlan. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new - # - # # Call the create_restore method. - # result = client.create_restore request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestoreRequest - - # Converts hash and nil to 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_restore.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restore.timeout, - metadata: metadata, - retry_policy: @config.rpcs.create_restore.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :create_restore, 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 the Restores for a given RestorePlan. - # - # @overload list_restores(request, options = nil) - # Pass arguments to `list_restores` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListRestoresRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListRestoresRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_restores` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The RestorePlan that contains the Restores to list. - # Format: `projects/*/locations/*/restorePlans/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token} - # received from a previous `ListRestores` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to `ListRestores` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListRestoresRequest.new - # - # # Call the list_restores method. - # result = client.list_restores request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::Restore. - # p item - # end - # - def list_restores request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestoresRequest - - # Converts hash and nil to 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_restores.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restores.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_restores.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :list_restores, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_restores, 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 the details of a single Restore. - # - # @overload get_restore(request, options = nil) - # Pass arguments to `get_restore` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetRestoreRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetRestoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_restore(name: nil) - # Pass arguments to `get_restore` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the restore resource. - # Format: `projects/*/locations/*/restorePlans/*/restores/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeBackup::V1::Restore] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeBackup::V1::Restore] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetRestoreRequest.new - # - # # Call the get_restore method. - # result = client.get_restore request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::Restore. - # p result - # - def get_restore request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestoreRequest - - # Converts hash and nil to 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_restore.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restore.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_restore.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :get_restore, 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 - - ## - # Update a Restore. - # - # @overload update_restore(request, options = nil) - # Pass arguments to `update_restore` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_restore(restore: nil, update_mask: nil) - # Pass arguments to `update_restore` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param restore [::Google::Cloud::GkeBackup::V1::Restore, ::Hash] - # Required. A new version of the Restore resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. This is used to specify the fields to be overwritten in the - # Restore targeted for update. The values for each of these - # updated fields will be taken from the `restore` provided - # with this request. Field names are relative to the root of the resource. - # If no `update_mask` is provided, all fields in `restore` will be - # written to the target Restore resource. - # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored - # and are not used to update the target Restore. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new - # - # # Call the update_restore method. - # result = client.update_restore request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest - - # Converts hash and nil to 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_restore.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.restore&.name - header_params["restore.name"] = request.restore.name - end - - request_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_restore.timeout, - metadata: metadata, - retry_policy: @config.rpcs.update_restore.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :update_restore, 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 existing Restore. - # - # @overload delete_restore(request, options = nil) - # Pass arguments to `delete_restore` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload delete_restore(name: nil, etag: nil, force: nil) - # Pass arguments to `delete_restore` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Full name of the Restore - # Format: `projects/*/locations/*/restorePlans/*/restores/*` - # @param etag [::String] - # Optional. If provided, this value must match the current value of the - # target Restore's {::Google::Cloud::GkeBackup::V1::Restore#etag etag} field or - # the request is rejected. - # @param force [::Boolean] - # Optional. If set to true, any VolumeRestores below this restore will also - # be deleted. Otherwise, the request will only succeed if the restore has no - # VolumeRestores. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new - # - # # Call the delete_restore method. - # result = client.delete_restore request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest - - # Converts hash and nil to 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_restore.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_restore.timeout, - metadata: metadata, - retry_policy: @config.rpcs.delete_restore.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :delete_restore, 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 the VolumeRestores for a given Restore. - # - # @overload list_volume_restores(request, options = nil) - # Pass arguments to `list_volume_restores` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload list_volume_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_volume_restores` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The Restore that contains the VolumeRestores to list. - # Format: `projects/*/locations/*/restorePlans/*/restores/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token} - # received from a previous `ListVolumeRestores` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListVolumeRestores` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Gapic::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.new - # - # # Call the list_volume_restores method. - # result = client.list_volume_restores request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeRestore. - # p item - # end - # - def list_volume_restores request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest - - # Converts hash and nil to 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_volume_restores.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_volume_restores.timeout, - metadata: metadata, - retry_policy: @config.rpcs.list_volume_restores.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :list_volume_restores, request, options: options do |response, operation| - response = ::Gapic::PagedEnumerable.new @backup_for_gke_stub, :list_volume_restores, 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 - - ## - # Retrieve the details of a single VolumeRestore. - # - # @overload get_volume_restore(request, options = nil) - # Pass arguments to `get_volume_restore` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_volume_restore(name: nil) - # Pass arguments to `get_volume_restore` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Full name of the VolumeRestore resource. - # Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeBackup::V1::VolumeRestore] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeBackup::V1::VolumeRestore] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new - # - # # Call the get_volume_restore method. - # result = client.get_volume_restore request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeRestore. - # p result - # - def get_volume_restore request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest - - # Converts hash and nil to 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_volume_restore.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-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_volume_restore.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_volume_restore.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :get_volume_restore, 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 the link to the backupIndex. - # - # @overload get_backup_index_download_url(request, options = nil) - # Pass arguments to `get_backup_index_download_url` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries, etc. Optional. - # - # @overload get_backup_index_download_url(backup: nil) - # Pass arguments to `get_backup_index_download_url` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup [::String] - # Required. Full name of Backup resource. - # Format: - # projects/\\{project}/locations/\\{location}/backupPlans/\\{backup_plan}/backups/\\{backup} - # - # @yield [response, operation] Access the result along with the RPC operation - # @yieldparam response [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse] - # @yieldparam operation [::GRPC::ActiveCall::Operation] - # - # @return [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse] - # - # @raise [::Google::Cloud::Error] if the RPC is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new - # - # # Call the get_backup_index_download_url method. - # result = client.get_backup_index_download_url request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse. - # p result - # - def get_backup_index_download_url request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest - - # Converts hash and nil to 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_backup_index_download_url.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION - metadata[:"x-goog-api-version"] = API_VERSION unless API_VERSION.empty? - metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id - - header_params = {} - if request.backup - header_params["backup"] = request.backup - end - - request_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_backup_index_download_url.timeout, - metadata: metadata, - retry_policy: @config.rpcs.get_backup_index_download_url.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.call_rpc :get_backup_index_download_url, 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 BackupForGKE API. - # - # This class represents the configuration for BackupForGKE, - # 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::GkeBackup::V1::BackupForGKE::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_backup_plan to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_backup_plan.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_backup_plan.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::GkeBackup::V1::BackupForGKE::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 = "gkebackup.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 BackupForGKE 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_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan - ## - # RPC-specific configuration for `list_backup_plans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plans - ## - # RPC-specific configuration for `get_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan - ## - # RPC-specific configuration for `update_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan - ## - # RPC-specific configuration for `delete_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan - ## - # RPC-specific configuration for `create_backup_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_channel - ## - # RPC-specific configuration for `list_backup_channels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_channels - ## - # RPC-specific configuration for `get_backup_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_channel - ## - # RPC-specific configuration for `update_backup_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_channel - ## - # RPC-specific configuration for `delete_backup_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_channel - ## - # RPC-specific configuration for `list_backup_plan_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_bindings - ## - # RPC-specific configuration for `get_backup_plan_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_binding - ## - # RPC-specific configuration for `create_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `get_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup - ## - # RPC-specific configuration for `update_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup - ## - # RPC-specific configuration for `delete_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup - ## - # RPC-specific configuration for `list_volume_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_volume_backups - ## - # RPC-specific configuration for `get_volume_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_volume_backup - ## - # RPC-specific configuration for `create_restore_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_restore_plan - ## - # RPC-specific configuration for `list_restore_plans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_restore_plans - ## - # RPC-specific configuration for `get_restore_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_restore_plan - ## - # RPC-specific configuration for `update_restore_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_restore_plan - ## - # RPC-specific configuration for `delete_restore_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_restore_plan - ## - # RPC-specific configuration for `create_restore_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :create_restore_channel - ## - # RPC-specific configuration for `list_restore_channels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_restore_channels - ## - # RPC-specific configuration for `get_restore_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :get_restore_channel - ## - # RPC-specific configuration for `update_restore_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :update_restore_channel - ## - # RPC-specific configuration for `delete_restore_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_restore_channel - ## - # RPC-specific configuration for `list_restore_plan_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_restore_plan_bindings - ## - # RPC-specific configuration for `get_restore_plan_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_restore_plan_binding - ## - # RPC-specific configuration for `create_restore` - # @return [::Gapic::Config::Method] - # - attr_reader :create_restore - ## - # RPC-specific configuration for `list_restores` - # @return [::Gapic::Config::Method] - # - attr_reader :list_restores - ## - # RPC-specific configuration for `get_restore` - # @return [::Gapic::Config::Method] - # - attr_reader :get_restore - ## - # RPC-specific configuration for `update_restore` - # @return [::Gapic::Config::Method] - # - attr_reader :update_restore - ## - # RPC-specific configuration for `delete_restore` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_restore - ## - # RPC-specific configuration for `list_volume_restores` - # @return [::Gapic::Config::Method] - # - attr_reader :list_volume_restores - ## - # RPC-specific configuration for `get_volume_restore` - # @return [::Gapic::Config::Method] - # - attr_reader :get_volume_restore - ## - # RPC-specific configuration for `get_backup_index_download_url` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_index_download_url - - # @private - def initialize parent_rpcs = nil - create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan - @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config - list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans - @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config - get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan - @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config - update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan - @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config - delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan - @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config - create_backup_channel_config = parent_rpcs.create_backup_channel if parent_rpcs.respond_to? :create_backup_channel - @create_backup_channel = ::Gapic::Config::Method.new create_backup_channel_config - list_backup_channels_config = parent_rpcs.list_backup_channels if parent_rpcs.respond_to? :list_backup_channels - @list_backup_channels = ::Gapic::Config::Method.new list_backup_channels_config - get_backup_channel_config = parent_rpcs.get_backup_channel if parent_rpcs.respond_to? :get_backup_channel - @get_backup_channel = ::Gapic::Config::Method.new get_backup_channel_config - update_backup_channel_config = parent_rpcs.update_backup_channel if parent_rpcs.respond_to? :update_backup_channel - @update_backup_channel = ::Gapic::Config::Method.new update_backup_channel_config - delete_backup_channel_config = parent_rpcs.delete_backup_channel if parent_rpcs.respond_to? :delete_backup_channel - @delete_backup_channel = ::Gapic::Config::Method.new delete_backup_channel_config - list_backup_plan_bindings_config = parent_rpcs.list_backup_plan_bindings if parent_rpcs.respond_to? :list_backup_plan_bindings - @list_backup_plan_bindings = ::Gapic::Config::Method.new list_backup_plan_bindings_config - get_backup_plan_binding_config = parent_rpcs.get_backup_plan_binding if parent_rpcs.respond_to? :get_backup_plan_binding - @get_backup_plan_binding = ::Gapic::Config::Method.new get_backup_plan_binding_config - create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup - @create_backup = ::Gapic::Config::Method.new create_backup_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup - @get_backup = ::Gapic::Config::Method.new get_backup_config - update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup - @update_backup = ::Gapic::Config::Method.new update_backup_config - delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup - @delete_backup = ::Gapic::Config::Method.new delete_backup_config - list_volume_backups_config = parent_rpcs.list_volume_backups if parent_rpcs.respond_to? :list_volume_backups - @list_volume_backups = ::Gapic::Config::Method.new list_volume_backups_config - get_volume_backup_config = parent_rpcs.get_volume_backup if parent_rpcs.respond_to? :get_volume_backup - @get_volume_backup = ::Gapic::Config::Method.new get_volume_backup_config - create_restore_plan_config = parent_rpcs.create_restore_plan if parent_rpcs.respond_to? :create_restore_plan - @create_restore_plan = ::Gapic::Config::Method.new create_restore_plan_config - list_restore_plans_config = parent_rpcs.list_restore_plans if parent_rpcs.respond_to? :list_restore_plans - @list_restore_plans = ::Gapic::Config::Method.new list_restore_plans_config - get_restore_plan_config = parent_rpcs.get_restore_plan if parent_rpcs.respond_to? :get_restore_plan - @get_restore_plan = ::Gapic::Config::Method.new get_restore_plan_config - update_restore_plan_config = parent_rpcs.update_restore_plan if parent_rpcs.respond_to? :update_restore_plan - @update_restore_plan = ::Gapic::Config::Method.new update_restore_plan_config - delete_restore_plan_config = parent_rpcs.delete_restore_plan if parent_rpcs.respond_to? :delete_restore_plan - @delete_restore_plan = ::Gapic::Config::Method.new delete_restore_plan_config - create_restore_channel_config = parent_rpcs.create_restore_channel if parent_rpcs.respond_to? :create_restore_channel - @create_restore_channel = ::Gapic::Config::Method.new create_restore_channel_config - list_restore_channels_config = parent_rpcs.list_restore_channels if parent_rpcs.respond_to? :list_restore_channels - @list_restore_channels = ::Gapic::Config::Method.new list_restore_channels_config - get_restore_channel_config = parent_rpcs.get_restore_channel if parent_rpcs.respond_to? :get_restore_channel - @get_restore_channel = ::Gapic::Config::Method.new get_restore_channel_config - update_restore_channel_config = parent_rpcs.update_restore_channel if parent_rpcs.respond_to? :update_restore_channel - @update_restore_channel = ::Gapic::Config::Method.new update_restore_channel_config - delete_restore_channel_config = parent_rpcs.delete_restore_channel if parent_rpcs.respond_to? :delete_restore_channel - @delete_restore_channel = ::Gapic::Config::Method.new delete_restore_channel_config - list_restore_plan_bindings_config = parent_rpcs.list_restore_plan_bindings if parent_rpcs.respond_to? :list_restore_plan_bindings - @list_restore_plan_bindings = ::Gapic::Config::Method.new list_restore_plan_bindings_config - get_restore_plan_binding_config = parent_rpcs.get_restore_plan_binding if parent_rpcs.respond_to? :get_restore_plan_binding - @get_restore_plan_binding = ::Gapic::Config::Method.new get_restore_plan_binding_config - create_restore_config = parent_rpcs.create_restore if parent_rpcs.respond_to? :create_restore - @create_restore = ::Gapic::Config::Method.new create_restore_config - list_restores_config = parent_rpcs.list_restores if parent_rpcs.respond_to? :list_restores - @list_restores = ::Gapic::Config::Method.new list_restores_config - get_restore_config = parent_rpcs.get_restore if parent_rpcs.respond_to? :get_restore - @get_restore = ::Gapic::Config::Method.new get_restore_config - update_restore_config = parent_rpcs.update_restore if parent_rpcs.respond_to? :update_restore - @update_restore = ::Gapic::Config::Method.new update_restore_config - delete_restore_config = parent_rpcs.delete_restore if parent_rpcs.respond_to? :delete_restore - @delete_restore = ::Gapic::Config::Method.new delete_restore_config - list_volume_restores_config = parent_rpcs.list_volume_restores if parent_rpcs.respond_to? :list_volume_restores - @list_volume_restores = ::Gapic::Config::Method.new list_volume_restores_config - get_volume_restore_config = parent_rpcs.get_volume_restore if parent_rpcs.respond_to? :get_volume_restore - @get_volume_restore = ::Gapic::Config::Method.new get_volume_restore_config - get_backup_index_download_url_config = parent_rpcs.get_backup_index_download_url if parent_rpcs.respond_to? :get_backup_index_download_url - @get_backup_index_download_url = ::Gapic::Config::Method.new get_backup_index_download_url_config - - yield self if block_given? - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/credentials.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/credentials.rb deleted file mode 100644 index 8d81051aaedd..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/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 GkeBackup - module V1 - module BackupForGKE - # Credentials for the BackupForGKE 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-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/operations.rb deleted file mode 100644 index 86c04e445389..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/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 GkeBackup - module V1 - module BackupForGKE - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BackupForGKE 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 BackupForGKE 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::GkeBackup::V1::VERSION - metadata[:"x-goog-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::GkeBackup::V1::VERSION - metadata[:"x-goog-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::GkeBackup::V1::VERSION - metadata[:"x-goog-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::GkeBackup::V1::VERSION - metadata[:"x-goog-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::GkeBackup::V1::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 = "gkebackup.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-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/paths.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/paths.rb deleted file mode 100644 index 59f417c3db20..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/paths.rb +++ /dev/null @@ -1,296 +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 GkeBackup - module V1 - module BackupForGKE - # Path helper methods for the BackupForGKE API. - module Paths - ## - # Create a fully-qualified Backup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}` - # - # @param project [String] - # @param location [String] - # @param backup_plan [String] - # @param backup [String] - # - # @return [::String] - def backup_path project:, location:, backup_plan:, backup: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "backup_plan cannot contain /" if backup_plan.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}/backups/#{backup}" - end - - ## - # Create a fully-qualified BackupChannel resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupChannels/{backup_channel}` - # - # @param project [String] - # @param location [String] - # @param backup_channel [String] - # - # @return [::String] - def backup_channel_path project:, location:, backup_channel: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupChannels/#{backup_channel}" - end - - ## - # Create a fully-qualified BackupPlan resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}` - # - # @param project [String] - # @param location [String] - # @param backup_plan [String] - # - # @return [::String] - def backup_plan_path project:, location:, backup_plan: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}" - end - - ## - # Create a fully-qualified BackupPlanBinding resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupChannels/{backup_channel}/backupPlanBindings/{backup_plan_binding}` - # - # @param project [String] - # @param location [String] - # @param backup_channel [String] - # @param backup_plan_binding [String] - # - # @return [::String] - def backup_plan_binding_path project:, location:, backup_channel:, backup_plan_binding: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "backup_channel cannot contain /" if backup_channel.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupChannels/#{backup_channel}/backupPlanBindings/#{backup_plan_binding}" - end - - ## - # Create a fully-qualified Cluster resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/clusters/{cluster}` - # - # @param project [String] - # @param location [String] - # @param cluster [String] - # - # @return [::String] - def cluster_path project:, location:, cluster: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/clusters/#{cluster}" - end - - ## - # Create a fully-qualified CryptoKey resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}` - # - # @param project [String] - # @param location [String] - # @param key_ring [String] - # @param crypto_key [String] - # - # @return [::String] - def crypto_key_path project:, location:, key_ring:, crypto_key: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "key_ring cannot contain /" if key_ring.to_s.include? "/" - - "projects/#{project}/locations/#{location}/keyRings/#{key_ring}/cryptoKeys/#{crypto_key}" - 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 Restore resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}` - # - # @param project [String] - # @param location [String] - # @param restore_plan [String] - # @param restore [String] - # - # @return [::String] - def restore_path project:, location:, restore_plan:, restore: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "restore_plan cannot contain /" if restore_plan.to_s.include? "/" - - "projects/#{project}/locations/#{location}/restorePlans/#{restore_plan}/restores/#{restore}" - end - - ## - # Create a fully-qualified RestoreChannel resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/restoreChannels/{restore_channel}` - # - # @param project [String] - # @param location [String] - # @param restore_channel [String] - # - # @return [::String] - def restore_channel_path project:, location:, restore_channel: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/restoreChannels/#{restore_channel}" - end - - ## - # Create a fully-qualified RestorePlan resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/restorePlans/{restore_plan}` - # - # @param project [String] - # @param location [String] - # @param restore_plan [String] - # - # @return [::String] - def restore_plan_path project:, location:, restore_plan: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - - "projects/#{project}/locations/#{location}/restorePlans/#{restore_plan}" - end - - ## - # Create a fully-qualified RestorePlanBinding resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/restoreChannels/{restore_channel}/restorePlanBindings/{restore_plan_binding}` - # - # @param project [String] - # @param location [String] - # @param restore_channel [String] - # @param restore_plan_binding [String] - # - # @return [::String] - def restore_plan_binding_path project:, location:, restore_channel:, restore_plan_binding: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "restore_channel cannot contain /" if restore_channel.to_s.include? "/" - - "projects/#{project}/locations/#{location}/restoreChannels/#{restore_channel}/restorePlanBindings/#{restore_plan_binding}" - end - - ## - # Create a fully-qualified VolumeBackup resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}/volumeBackups/{volume_backup}` - # - # @param project [String] - # @param location [String] - # @param backup_plan [String] - # @param backup [String] - # @param volume_backup [String] - # - # @return [::String] - def volume_backup_path project:, location:, backup_plan:, backup:, volume_backup: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "backup_plan cannot contain /" if backup_plan.to_s.include? "/" - raise ::ArgumentError, "backup cannot contain /" if backup.to_s.include? "/" - - "projects/#{project}/locations/#{location}/backupPlans/#{backup_plan}/backups/#{backup}/volumeBackups/#{volume_backup}" - end - - ## - # Create a fully-qualified VolumeRestore resource string. - # - # The resource will be in the following format: - # - # `projects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}/volumeRestores/{volume_restore}` - # - # @param project [String] - # @param location [String] - # @param restore_plan [String] - # @param restore [String] - # @param volume_restore [String] - # - # @return [::String] - def volume_restore_path project:, location:, restore_plan:, restore:, volume_restore: - raise ::ArgumentError, "project cannot contain /" if project.to_s.include? "/" - raise ::ArgumentError, "location cannot contain /" if location.to_s.include? "/" - raise ::ArgumentError, "restore_plan cannot contain /" if restore_plan.to_s.include? "/" - raise ::ArgumentError, "restore cannot contain /" if restore.to_s.include? "/" - - "projects/#{project}/locations/#{location}/restorePlans/#{restore_plan}/restores/#{restore}/volumeRestores/#{volume_restore}" - end - - extend self - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest.rb deleted file mode 100644 index 3c78a03c463a..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/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/gke_backup/v1/version" -require "google/cloud/gke_backup/v1/bindings_override" - -require "google/cloud/gke_backup/v1/backup_for_gke/credentials" -require "google/cloud/gke_backup/v1/backup_for_gke/paths" -require "google/cloud/gke_backup/v1/backup_for_gke/rest/operations" -require "google/cloud/gke_backup/v1/backup_for_gke/rest/client" - -module Google - module Cloud - module GkeBackup - module V1 - ## - # BackupForGKE allows Kubernetes administrators to configure, execute, and - # manage backup and restore operations for their GKE clusters. - # - # To load this service and instantiate a REST client: - # - # require "google/cloud/gke_backup/v1/backup_for_gke/rest" - # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - module BackupForGKE - # Client for the REST transport - module Rest - end - end - end - end - end -end - -helper_path = ::File.join __dir__, "rest", "helpers.rb" -require "google/cloud/gke_backup/v1/backup_for_gke/rest/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb deleted file mode 100644 index a2a043342a49..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/client.rb +++ /dev/null @@ -1,4469 +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/gkebackup/v1/gkebackup_pb" -require "google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub" -require "google/cloud/location/rest" -require "google/iam/v1/rest" - -module Google - module Cloud - module GkeBackup - module V1 - module BackupForGKE - module Rest - ## - # REST client for the BackupForGKE service. - # - # BackupForGKE allows Kubernetes administrators to configure, execute, and - # manage backup and restore operations for their GKE clusters. - # - class Client - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$" - - include Paths - - # @private - attr_reader :backup_for_gke_stub - - ## - # Configure the BackupForGKE Client class. - # - # See {::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client::Configuration} - # for a description of the configuration fields. - # - # @example - # - # # Modify the configuration for all BackupForGKE clients - # ::Google::Cloud::GkeBackup::V1::BackupForGKE::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", "GkeBackup", "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_backup_plan.timeout = 300.0 - - default_config.rpcs.list_backup_plans.timeout = 60.0 - default_config.rpcs.list_backup_plans.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_plan.timeout = 60.0 - default_config.rpcs.get_backup_plan.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup_plan.timeout = 60.0 - - default_config.rpcs.delete_backup_plan.timeout = 60.0 - - default_config.rpcs.create_backup_channel.timeout = 60.0 - - default_config.rpcs.list_backup_channels.timeout = 60.0 - default_config.rpcs.list_backup_channels.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_channel.timeout = 60.0 - default_config.rpcs.get_backup_channel.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup_channel.timeout = 60.0 - - default_config.rpcs.delete_backup_channel.timeout = 60.0 - - default_config.rpcs.list_backup_plan_bindings.timeout = 60.0 - default_config.rpcs.list_backup_plan_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_plan_binding.timeout = 60.0 - default_config.rpcs.get_backup_plan_binding.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_backup.timeout = 120.0 - - default_config.rpcs.list_backups.timeout = 60.0 - default_config.rpcs.list_backups.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup.timeout = 60.0 - default_config.rpcs.get_backup.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_backup.timeout = 60.0 - - default_config.rpcs.delete_backup.timeout = 300.0 - - default_config.rpcs.list_volume_backups.timeout = 60.0 - default_config.rpcs.list_volume_backups.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_volume_backup.timeout = 60.0 - default_config.rpcs.get_volume_backup.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_restore_plan.timeout = 120.0 - - default_config.rpcs.list_restore_plans.timeout = 60.0 - default_config.rpcs.list_restore_plans.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_restore_plan.timeout = 60.0 - default_config.rpcs.get_restore_plan.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_restore_plan.timeout = 60.0 - - default_config.rpcs.delete_restore_plan.timeout = 60.0 - - default_config.rpcs.create_restore_channel.timeout = 60.0 - - default_config.rpcs.list_restore_channels.timeout = 60.0 - default_config.rpcs.list_restore_channels.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_restore_channel.timeout = 60.0 - default_config.rpcs.get_restore_channel.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_restore_channel.timeout = 60.0 - - default_config.rpcs.delete_restore_channel.timeout = 60.0 - - default_config.rpcs.list_restore_plan_bindings.timeout = 60.0 - default_config.rpcs.list_restore_plan_bindings.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_restore_plan_binding.timeout = 60.0 - default_config.rpcs.get_restore_plan_binding.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.create_restore.timeout = 120.0 - - default_config.rpcs.list_restores.timeout = 60.0 - default_config.rpcs.list_restores.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_restore.timeout = 60.0 - default_config.rpcs.get_restore.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.update_restore.timeout = 60.0 - - default_config.rpcs.delete_restore.timeout = 60.0 - - default_config.rpcs.list_volume_restores.timeout = 60.0 - default_config.rpcs.list_volume_restores.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_volume_restore.timeout = 60.0 - default_config.rpcs.get_volume_restore.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config.rpcs.get_backup_index_download_url.timeout = 60.0 - default_config.rpcs.get_backup_index_download_url.retry_policy = { - initial_delay: 1.0, max_delay: 60.0, multiplier: 1.3, retry_codes: [14] - } - - default_config - end - yield @configure if block_given? - @configure - end - - ## - # Configure the BackupForGKE 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::GkeBackup::V1::BackupForGKE::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 - @backup_for_gke_stub.universe_domain - end - - ## - # Create a new BackupForGKE REST client object. - # - # @example - # - # # Create a client using the default configuration - # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a client using a custom configuration - # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - # config.timeout = 10.0 - # end - # - # @yield [config] Configure the BackupForGKE 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::GkeBackup::V1::BackupForGKE::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 - - @backup_for_gke_stub = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.new( - endpoint: @config.endpoint, - endpoint_template: DEFAULT_ENDPOINT_TEMPLATE, - universe_domain: @config.universe_domain, - credentials: credentials, - logger: @config.logger - ) - - @backup_for_gke_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 = @backup_for_gke_stub.endpoint - config.universe_domain = @backup_for_gke_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @backup_for_gke_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 = @backup_for_gke_stub.endpoint - config.universe_domain = @backup_for_gke_stub.universe_domain - config.bindings_override = @config.bindings_override - config.logger = @backup_for_gke_stub.logger if config.respond_to? :logger= - end - end - - ## - # Get the associated client for long-running operations. - # - # @return [::Google::Cloud::GkeBackup::V1::BackupForGKE::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 - @backup_for_gke_stub.logger - end - - # Service calls - - ## - # Creates a new BackupPlan in a given location. - # - # @overload create_backup_plan(request, options = nil) - # Pass arguments to `create_backup_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_plan(parent: nil, backup_plan: nil, backup_plan_id: nil) - # Pass arguments to `create_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 within which to create the BackupPlan. - # Format: `projects/*/locations/*` - # @param backup_plan [::Google::Cloud::GkeBackup::V1::BackupPlan, ::Hash] - # Required. The BackupPlan resource object to create. - # @param backup_plan_id [::String] - # Required. The client-provided short name for the BackupPlan resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of BackupPlans in this location - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new - # - # # Call the create_backup_plan method. - # result = client.create_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest - - # Converts hash and nil to an 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_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.create_backup_plan 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 BackupPlans in a given location. - # - # @overload list_backup_plans(request, options = nil) - # Pass arguments to `list_backup_plans` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backup_plans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 that contains the BackupPlans to list. - # Format: `projects/*/locations/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlan>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.new - # - # # Call the list_backup_plans method. - # result = client.list_backup_plans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupPlan. - # p item - # end - # - def list_backup_plans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest - - # Converts hash and nil to an 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_backup_plans.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_plans.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_plans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.list_backup_plans request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backup_plans, "backup_plans", 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 - - ## - # Retrieve the details of a single BackupPlan. - # - # @overload get_backup_plan(request, options = nil) - # Pass arguments to `get_backup_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_plan(name: nil) - # Pass arguments to `get_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified BackupPlan name. - # Format: `projects/*/locations/*/backupPlans/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupPlan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::BackupPlan] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new - # - # # Call the get_backup_plan method. - # result = client.get_backup_plan request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlan. - # p result - # - def get_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest - - # Converts hash and nil to an 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_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.get_backup_plan 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 BackupPlan. - # - # @overload update_backup_plan(request, options = nil) - # Pass arguments to `update_backup_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_plan(backup_plan: nil, update_mask: nil) - # Pass arguments to `update_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_plan [::Google::Cloud::GkeBackup::V1::BackupPlan, ::Hash] - # Required. A new version of the BackupPlan resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. This is used to specify the fields to be overwritten in the - # BackupPlan targeted for update. The values for each of these - # updated fields will be taken from the `backup_plan` provided - # with this request. Field names are relative to the root of the resource - # (e.g., `description`, `backup_config.include_volume_data`, etc.) - # If no `update_mask` is provided, all fields in `backup_plan` will be - # written to the target BackupPlan resource. - # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored - # and are not used to update the target BackupPlan. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new - # - # # Call the update_backup_plan method. - # result = client.update_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest - - # Converts hash and nil to an 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_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.update_backup_plan 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 existing BackupPlan. - # - # @overload delete_backup_plan(request, options = nil) - # Pass arguments to `delete_backup_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup_plan(name: nil, etag: nil) - # Pass arguments to `delete_backup_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified BackupPlan name. - # Format: `projects/*/locations/*/backupPlans/*` - # @param etag [::String] - # Optional. If provided, this value must match the current value of the - # target BackupPlan's {::Google::Cloud::GkeBackup::V1::BackupPlan#etag etag} field - # or the request is rejected. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.new - # - # # Call the delete_backup_plan method. - # result = client.delete_backup_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest - - # Converts hash and nil to an 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_backup_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.delete_backup_plan 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 new BackupChannel in a given location. - # - # @overload create_backup_channel(request, options = nil) - # Pass arguments to `create_backup_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_channel(parent: nil, backup_channel: nil, backup_channel_id: nil) - # Pass arguments to `create_backup_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 within which to create the BackupChannel. - # Format: `projects/*/locations/*` - # @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash] - # Required. The BackupChannel resource object to create. - # @param backup_channel_id [::String] - # Optional. The client-provided short name for the BackupChannel resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of BackupChannels in this location - # If the user does not provide a name, a uuid will be used as the name. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new - # - # # Call the create_backup_channel method. - # result = client.create_backup_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest - - # Converts hash and nil to an 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_backup_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.create_backup_channel 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 BackupChannels in a given location. - # - # @overload list_backup_channels(request, options = nil) - # Pass arguments to `list_backup_channels` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backup_channels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 that contains the BackupChannels to list. - # Format: `projects/*/locations/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token} - # received from a previous `ListBackupChannels` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupChannels` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupChannel>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.new - # - # # Call the list_backup_channels method. - # result = client.list_backup_channels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupChannel. - # p item - # end - # - def list_backup_channels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest - - # Converts hash and nil to an 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_backup_channels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_channels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_channels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.list_backup_channels request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backup_channels, "backup_channels", 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 - - ## - # Retrieve the details of a single BackupChannel. - # - # @overload get_backup_channel(request, options = nil) - # Pass arguments to `get_backup_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_channel(name: nil) - # Pass arguments to `get_backup_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified BackupChannel name. - # Format: `projects/*/locations/*/backupChannels/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupChannel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::BackupChannel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new - # - # # Call the get_backup_channel method. - # result = client.get_backup_channel request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupChannel. - # p result - # - def get_backup_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest - - # Converts hash and nil to an 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_backup_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.get_backup_channel 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 BackupChannel. - # - # @overload update_backup_channel(request, options = nil) - # Pass arguments to `update_backup_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup_channel(backup_channel: nil, update_mask: nil) - # Pass arguments to `update_backup_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup_channel [::Google::Cloud::GkeBackup::V1::BackupChannel, ::Hash] - # Required. A new version of the BackupChannel resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. This is used to specify the fields to be overwritten in the - # BackupChannel targeted for update. The values for each of these - # updated fields will be taken from the `backup_channel` provided - # with this request. Field names are relative to the root of the resource - # (e.g., `description`, `labels`, etc.) - # If no `update_mask` is provided, all fields in `backup_channel` will - # be written to the target BackupChannel resource. Note that - # OUTPUT_ONLY and IMMUTABLE fields in `backup_channel` are ignored and - # are not used to update the target BackupChannel. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new - # - # # Call the update_backup_channel method. - # result = client.update_backup_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest - - # Converts hash and nil to an 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_backup_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.update_backup_channel 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 existing BackupChannel. - # - # @overload delete_backup_channel(request, options = nil) - # Pass arguments to `delete_backup_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup_channel(name: nil, etag: nil, force: nil) - # Pass arguments to `delete_backup_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified BackupChannel name. - # Format: `projects/*/locations/*/backupChannels/*` - # @param etag [::String] - # Optional. If provided, this value must match the current value of the - # target BackupChannel's {::Google::Cloud::GkeBackup::V1::BackupChannel#etag etag} - # field or the request is rejected. - # @param force [::Boolean] - # Optional. If set to true, any BackupPlanAssociations below this - # BackupChannel will also be deleted. Otherwise, the request will only - # succeed if the BackupChannel has no BackupPlanAssociations. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new - # - # # Call the delete_backup_channel method. - # result = client.delete_backup_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest - - # Converts hash and nil to an 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_backup_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.delete_backup_channel 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 BackupPlanBindings in a given location. - # - # @overload list_backup_plan_bindings(request, options = nil) - # Pass arguments to `list_backup_plan_bindings` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backup_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_backup_plan_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 BackupChannel that contains the BackupPlanBindings to list. - # Format: `projects/*/locations/*/backupChannels/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlanBindings` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlanBindings` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.new - # - # # Call the list_backup_plan_bindings method. - # result = client.list_backup_plan_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::GkeBackup::V1::BackupPlanBinding. - # p item - # end - # - def list_backup_plan_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest - - # Converts hash and nil to an 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_backup_plan_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::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_plan_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backup_plan_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.list_backup_plan_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backup_plan_bindings, "backup_plan_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 - - ## - # Retrieve the details of a single BackupPlanBinding. - # - # @overload get_backup_plan_binding(request, options = nil) - # Pass arguments to `get_backup_plan_binding` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_plan_binding(name: nil) - # Pass arguments to `get_backup_plan_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. Fully qualified BackupPlanBinding name. - # Format: - # `projects/*/locations/*/backupChannels/*/backupPlanBindings/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupPlanBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new - # - # # Call the get_backup_plan_binding method. - # result = client.get_backup_plan_binding request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlanBinding. - # p result - # - def get_backup_plan_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest - - # Converts hash and nil to an 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_backup_plan_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::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_plan_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_plan_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.get_backup_plan_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 - - ## - # Creates a Backup for the given BackupPlan. - # - # @overload create_backup(request, options = nil) - # Pass arguments to `create_backup` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::CreateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::CreateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup(parent: nil, backup: nil, backup_id: nil) - # Pass arguments to `create_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The BackupPlan within which to create the Backup. - # Format: `projects/*/locations/*/backupPlans/*` - # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash] - # Optional. The Backup resource to create. - # @param backup_id [::String] - # Optional. The client-provided short name for the Backup resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of Backups in this BackupPlan - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::CreateBackupRequest.new - # - # # Call the create_backup method. - # result = client.create_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateBackupRequest - - # Converts hash and nil to an 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.create_backup 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 the Backups for a given BackupPlan. - # - # @overload list_backups(request, options = nil) - # Pass arguments to `list_backups` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil, return_partial_success: nil) - # Pass arguments to `list_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The BackupPlan that contains the Backups to list. - # Format: `projects/*/locations/*/backupPlans/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token} - # received from a previous `ListBackups` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackups` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @param return_partial_success [::Boolean] - # Optional. If set to true, the response will return partial results when - # some regions are unreachable and the unreachable field will be populated. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Backup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListBackupsRequest.new - # - # # Call the list_backups method. - # result = client.list_backups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup. - # p item - # end - # - def list_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListBackupsRequest - - # Converts hash and nil to an 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_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.list_backups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_backups, "backups", 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 - - ## - # Retrieve the details of a single Backup. - # - # @overload get_backup(request, options = nil) - # Pass arguments to `get_backup` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup(name: nil) - # Pass arguments to `get_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Full name of the Backup resource. - # Format: `projects/*/locations/*/backupPlans/*/backups/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::Backup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetBackupRequest.new - # - # # Call the get_backup method. - # result = client.get_backup request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::Backup. - # p result - # - def get_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupRequest - - # Converts hash and nil to an 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.get_backup 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 Backup. - # - # @overload update_backup(request, options = nil) - # Pass arguments to `update_backup` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::UpdateBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::UpdateBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_backup(backup: nil, update_mask: nil) - # Pass arguments to `update_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup [::Google::Cloud::GkeBackup::V1::Backup, ::Hash] - # Required. A new version of the Backup resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. This is used to specify the fields to be overwritten in the - # Backup targeted for update. The values for each of these - # updated fields will be taken from the `backup_plan` provided - # with this request. Field names are relative to the root of the resource. - # If no `update_mask` is provided, all fields in `backup` will be - # written to the target Backup resource. - # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored - # and are not used to update the target Backup. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new - # - # # Call the update_backup method. - # result = client.update_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest - - # Converts hash and nil to an 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.update_backup 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 existing Backup. - # - # @overload delete_backup(request, options = nil) - # Pass arguments to `delete_backup` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::DeleteBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::DeleteBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_backup(name: nil, etag: nil, force: nil) - # Pass arguments to `delete_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the Backup resource. - # Format: `projects/*/locations/*/backupPlans/*/backups/*` - # @param etag [::String] - # Optional. If provided, this value must match the current value of the - # target Backup's {::Google::Cloud::GkeBackup::V1::Backup#etag etag} field or the - # request is rejected. - # @param force [::Boolean] - # Optional. If set to true, any VolumeBackups below this Backup will also be - # deleted. Otherwise, the request will only succeed if the Backup has no - # VolumeBackups. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new - # - # # Call the delete_backup method. - # result = client.delete_backup request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest - - # Converts hash and nil to an 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_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.delete_backup 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 the VolumeBackups for a given Backup. - # - # @overload list_volume_backups(request, options = nil) - # Pass arguments to `list_volume_backups` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_volume_backups(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_volume_backups` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The Backup that contains the VolumeBackups to list. - # Format: `projects/*/locations/*/backupPlans/*/backups/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token} - # received from a previous `ListVolumeBackups` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListVolumeBackups` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeBackup>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.new - # - # # Call the list_volume_backups method. - # result = client.list_volume_backups request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup. - # p item - # end - # - def list_volume_backups request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest - - # Converts hash and nil to an 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_volume_backups.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_volume_backups.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_volume_backups.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.list_volume_backups request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_volume_backups, "volume_backups", 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 - - ## - # Retrieve the details of a single VolumeBackup. - # - # @overload get_volume_backup(request, options = nil) - # Pass arguments to `get_volume_backup` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_volume_backup(name: nil) - # Pass arguments to `get_volume_backup` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Full name of the VolumeBackup resource. - # Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::VolumeBackup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new - # - # # Call the get_volume_backup method. - # result = client.get_volume_backup request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeBackup. - # p result - # - def get_volume_backup request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest - - # Converts hash and nil to an 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_volume_backup.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_volume_backup.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_volume_backup.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.get_volume_backup 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 new RestorePlan in a given location. - # - # @overload create_restore_plan(request, options = nil) - # Pass arguments to `create_restore_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_restore_plan(parent: nil, restore_plan: nil, restore_plan_id: nil) - # Pass arguments to `create_restore_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 within which to create the RestorePlan. - # Format: `projects/*/locations/*` - # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash] - # Required. The RestorePlan resource object to create. - # @param restore_plan_id [::String] - # Required. The client-provided short name for the RestorePlan resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of RestorePlans in this location - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new - # - # # Call the create_restore_plan method. - # result = client.create_restore_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest - - # Converts hash and nil to an 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_restore_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_restore_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.create_restore_plan 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 RestorePlans in a given location. - # - # @overload list_restore_plans(request, options = nil) - # Pass arguments to `list_restore_plans` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_restore_plans(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_restore_plans` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 that contains the RestorePlans to list. - # Format: `projects/*/locations/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token} - # received from a previous `ListRestorePlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListRestorePlans` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlan>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.new - # - # # Call the list_restore_plans method. - # result = client.list_restore_plans request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan. - # p item - # end - # - def list_restore_plans request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest - - # Converts hash and nil to an 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_restore_plans.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore_plans.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_restore_plans.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.list_restore_plans request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plans, "restore_plans", 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 - - ## - # Retrieve the details of a single RestorePlan. - # - # @overload get_restore_plan(request, options = nil) - # Pass arguments to `get_restore_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_restore_plan(name: nil) - # Pass arguments to `get_restore_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified RestorePlan name. - # Format: `projects/*/locations/*/restorePlans/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestorePlan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::RestorePlan] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new - # - # # Call the get_restore_plan method. - # result = client.get_restore_plan request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlan. - # p result - # - def get_restore_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest - - # Converts hash and nil to an 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_restore_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_restore_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.get_restore_plan 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 RestorePlan. - # - # @overload update_restore_plan(request, options = nil) - # Pass arguments to `update_restore_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_restore_plan(restore_plan: nil, update_mask: nil) - # Pass arguments to `update_restore_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param restore_plan [::Google::Cloud::GkeBackup::V1::RestorePlan, ::Hash] - # Required. A new version of the RestorePlan resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. This is used to specify the fields to be overwritten in the - # RestorePlan targeted for update. The values for each of these - # updated fields will be taken from the `restore_plan` provided - # with this request. Field names are relative to the root of the resource. - # If no `update_mask` is provided, all fields in `restore_plan` will be - # written to the target RestorePlan resource. - # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored - # and are not used to update the target RestorePlan. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new - # - # # Call the update_restore_plan method. - # result = client.update_restore_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest - - # Converts hash and nil to an 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_restore_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_restore_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.update_restore_plan 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 existing RestorePlan. - # - # @overload delete_restore_plan(request, options = nil) - # Pass arguments to `delete_restore_plan` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_restore_plan(name: nil, etag: nil, force: nil) - # Pass arguments to `delete_restore_plan` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified RestorePlan name. - # Format: `projects/*/locations/*/restorePlans/*` - # @param etag [::String] - # Optional. If provided, this value must match the current value of the - # target RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#etag etag} - # field or the request is rejected. - # @param force [::Boolean] - # Optional. If set to true, any Restores below this RestorePlan will also be - # deleted. Otherwise, the request will only succeed if the RestorePlan has no - # Restores. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new - # - # # Call the delete_restore_plan method. - # result = client.delete_restore_plan request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore_plan request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest - - # Converts hash and nil to an 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_restore_plan.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore_plan.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_restore_plan.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.delete_restore_plan 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 new RestoreChannel in a given location. - # - # @overload create_restore_channel(request, options = nil) - # Pass arguments to `create_restore_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_restore_channel(parent: nil, restore_channel: nil, restore_channel_id: nil) - # Pass arguments to `create_restore_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 within which to create the RestoreChannel. - # Format: `projects/*/locations/*` - # @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash] - # Required. The RestoreChannel resource object to create. - # @param restore_channel_id [::String] - # Optional. The client-provided short name for the RestoreChannel resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of RestoreChannels in this location - # If the user does not provide a name, a uuid will be used as the name. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new - # - # # Call the create_restore_channel method. - # result = client.create_restore_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest - - # Converts hash and nil to an 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_restore_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_restore_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.create_restore_channel 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 RestoreChannels in a given location. - # - # @overload list_restore_channels(request, options = nil) - # Pass arguments to `list_restore_channels` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_restore_channels(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_restore_channels` via keyword arguments. Note that at - # least one keyword argument is required. To specify no 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 that contains the RestoreChannels to list. - # Format: `projects/*/locations/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token} - # received from a previous `ListRestoreChannels` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListRestoreChannels` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestoreChannel>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.new - # - # # Call the list_restore_channels method. - # result = client.list_restore_channels request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::RestoreChannel. - # p item - # end - # - def list_restore_channels request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest - - # Converts hash and nil to an 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_restore_channels.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore_channels.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_restore_channels.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.list_restore_channels request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restore_channels, "restore_channels", 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 - - ## - # Retrieve the details of a single RestoreChannel. - # - # @overload get_restore_channel(request, options = nil) - # Pass arguments to `get_restore_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_restore_channel(name: nil) - # Pass arguments to `get_restore_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified RestoreChannel name. - # Format: `projects/*/locations/*/restoreChannels/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestoreChannel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::RestoreChannel] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new - # - # # Call the get_restore_channel method. - # result = client.get_restore_channel request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::RestoreChannel. - # p result - # - def get_restore_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest - - # Converts hash and nil to an 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_restore_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_restore_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.get_restore_channel 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 RestoreChannel. - # - # @overload update_restore_channel(request, options = nil) - # Pass arguments to `update_restore_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_restore_channel(restore_channel: nil, update_mask: nil) - # Pass arguments to `update_restore_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param restore_channel [::Google::Cloud::GkeBackup::V1::RestoreChannel, ::Hash] - # Required. A new version of the RestoreChannel resource that contains - # updated fields. This may be sparsely populated if an `update_mask` is - # provided. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. This is used to specify the fields to be overwritten in the - # RestoreChannel targeted for update. The values for each of these - # updated fields will be taken from the `restore_channel` provided - # with this request. Field names are relative to the root of the resource - # (e.g., `description`, `destination_project_id`, etc.) - # If no `update_mask` is provided, all fields in `restore_channel` will - # be written to the target RestoreChannel resource. Note that - # OUTPUT_ONLY and IMMUTABLE fields in `restore_channel` are ignored and - # are not used to update the target RestoreChannel. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new - # - # # Call the update_restore_channel method. - # result = client.update_restore_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest - - # Converts hash and nil to an 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_restore_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_restore_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.update_restore_channel 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 existing RestoreChannel. - # - # @overload delete_restore_channel(request, options = nil) - # Pass arguments to `delete_restore_channel` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_restore_channel(name: nil, etag: nil) - # Pass arguments to `delete_restore_channel` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Fully qualified RestoreChannel name. - # Format: `projects/*/locations/*/restoreChannels/*` - # @param etag [::String] - # Optional. If provided, this value must match the current value of the - # target RestoreChannel's - # {::Google::Cloud::GkeBackup::V1::RestoreChannel#etag etag} field or the request - # is rejected. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.new - # - # # Call the delete_restore_channel method. - # result = client.delete_restore_channel request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore_channel request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest - - # Converts hash and nil to an 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_restore_channel.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore_channel.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_restore_channel.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.delete_restore_channel 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 RestorePlanBindings in a given location. - # - # @overload list_restore_plan_bindings(request, options = nil) - # Pass arguments to `list_restore_plan_bindings` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_restore_plan_bindings(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_restore_plan_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 RestoreChannel that contains the ListRestorePlanBindings to - # list. Format: `projects/*/locations/*/restoreChannels/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token} - # received from a previous `ListRestorePlanBindings` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListRestorePlanBindings` must match the call that provided the page - # token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.new - # - # # Call the list_restore_plan_bindings method. - # result = client.list_restore_plan_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::GkeBackup::V1::RestorePlanBinding. - # p item - # end - # - def list_restore_plan_bindings request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest - - # Converts hash and nil to an 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_restore_plan_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::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore_plan_bindings.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_restore_plan_bindings.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.list_restore_plan_bindings request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restore_plan_bindings, "restore_plan_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 - - ## - # Retrieve the details of a single RestorePlanBinding. - # - # @overload get_restore_plan_binding(request, options = nil) - # Pass arguments to `get_restore_plan_binding` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_restore_plan_binding(name: nil) - # Pass arguments to `get_restore_plan_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. Fully qualified RestorePlanBinding name. - # Format: - # `projects/*/locations/*/restoreChannels/*/restorePlanBindings/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestorePlanBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::RestorePlanBinding] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new - # - # # Call the get_restore_plan_binding method. - # result = client.get_restore_plan_binding request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlanBinding. - # p result - # - def get_restore_plan_binding request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest - - # Converts hash and nil to an 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_restore_plan_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::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore_plan_binding.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_restore_plan_binding.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.get_restore_plan_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 - - ## - # Creates a new Restore for the given RestorePlan. - # - # @overload create_restore(request, options = nil) - # Pass arguments to `create_restore` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::CreateRestoreRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::CreateRestoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_restore(parent: nil, restore: nil, restore_id: nil) - # Pass arguments to `create_restore` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The RestorePlan within which to create the Restore. - # Format: `projects/*/locations/*/restorePlans/*` - # @param restore [::Google::Cloud::GkeBackup::V1::Restore, ::Hash] - # Required. The restore resource to create. - # @param restore_id [::String] - # Required. The client-provided short name for the Restore resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of Restores in this RestorePlan. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new - # - # # Call the create_restore method. - # result = client.create_restore request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::CreateRestoreRequest - - # Converts hash and nil to an 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_restore.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.create_restore.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.create_restore 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 the Restores for a given RestorePlan. - # - # @overload list_restores(request, options = nil) - # Pass arguments to `list_restores` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListRestoresRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListRestoresRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_restores` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The RestorePlan that contains the Restores to list. - # Format: `projects/*/locations/*/restorePlans/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token} - # received from a previous `ListRestores` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to `ListRestores` - # must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::Restore>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListRestoresRequest.new - # - # # Call the list_restores method. - # result = client.list_restores request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::Restore. - # p item - # end - # - def list_restores request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListRestoresRequest - - # Converts hash and nil to an 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_restores.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restores.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_restores.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.list_restores request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_restores, "restores", 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 the details of a single Restore. - # - # @overload get_restore(request, options = nil) - # Pass arguments to `get_restore` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetRestoreRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetRestoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_restore(name: nil) - # Pass arguments to `get_restore` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Name of the restore resource. - # Format: `projects/*/locations/*/restorePlans/*/restores/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::Restore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::Restore] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetRestoreRequest.new - # - # # Call the get_restore method. - # result = client.get_restore request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::Restore. - # p result - # - def get_restore request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetRestoreRequest - - # Converts hash and nil to an 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_restore.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_restore.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.get_restore 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 Restore. - # - # @overload update_restore(request, options = nil) - # Pass arguments to `update_restore` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter 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_restore(restore: nil, update_mask: nil) - # Pass arguments to `update_restore` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param restore [::Google::Cloud::GkeBackup::V1::Restore, ::Hash] - # Required. A new version of the Restore resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @param update_mask [::Google::Protobuf::FieldMask, ::Hash] - # Optional. This is used to specify the fields to be overwritten in the - # Restore targeted for update. The values for each of these - # updated fields will be taken from the `restore` provided - # with this request. Field names are relative to the root of the resource. - # If no `update_mask` is provided, all fields in `restore` will be - # written to the target Restore resource. - # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored - # and are not used to update the target Restore. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new - # - # # Call the update_restore method. - # result = client.update_restore request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest - - # Converts hash and nil to an 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_restore.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.update_restore.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.update_restore 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 existing Restore. - # - # @overload delete_restore(request, options = nil) - # Pass arguments to `delete_restore` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload delete_restore(name: nil, etag: nil, force: nil) - # Pass arguments to `delete_restore` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Full name of the Restore - # Format: `projects/*/locations/*/restorePlans/*/restores/*` - # @param etag [::String] - # Optional. If provided, this value must match the current value of the - # target Restore's {::Google::Cloud::GkeBackup::V1::Restore#etag etag} field or - # the request is rejected. - # @param force [::Boolean] - # Optional. If set to true, any VolumeRestores below this restore will also - # be deleted. Otherwise, the request will only succeed if the restore has no - # VolumeRestores. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::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/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new - # - # # Call the delete_restore method. - # result = client.delete_restore request - # - # # The returned object is of type Gapic::Operation. You can use it to - # # check the status of an operation, cancel it, or wait for results. - # # Here is how 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_restore request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest - - # Converts hash and nil to an 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_restore.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_restore.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.delete_restore.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.delete_restore 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 the VolumeRestores for a given Restore. - # - # @overload list_volume_restores(request, options = nil) - # Pass arguments to `list_volume_restores` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload list_volume_restores(parent: nil, page_size: nil, page_token: nil, filter: nil, order_by: nil) - # Pass arguments to `list_volume_restores` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param parent [::String] - # Required. The Restore that contains the VolumeRestores to list. - # Format: `projects/*/locations/*/restorePlans/*/restores/*` - # @param page_size [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @param page_token [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token} - # received from a previous `ListVolumeRestores` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListVolumeRestores` must match the call that provided the page token. - # @param filter [::String] - # Optional. Field match expression used to filter the results. - # @param order_by [::String] - # Optional. Field by which to sort the results. - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Gapic::Rest::PagedEnumerable<::Google::Cloud::GkeBackup::V1::VolumeRestore>] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.new - # - # # Call the list_volume_restores method. - # result = client.list_volume_restores request - # - # # The returned object is of type Gapic::PagedEnumerable. You can iterate - # # over elements, and API calls will be issued to fetch pages as needed. - # result.each do |item| - # # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeRestore. - # p item - # end - # - def list_volume_restores request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest - - # Converts hash and nil to an 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_volume_restores.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_volume_restores.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.list_volume_restores.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.list_volume_restores request, options do |result, operation| - result = ::Gapic::Rest::PagedEnumerable.new @backup_for_gke_stub, :list_volume_restores, "volume_restores", 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 - - ## - # Retrieve the details of a single VolumeRestore. - # - # @overload get_volume_restore(request, options = nil) - # Pass arguments to `get_volume_restore` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_volume_restore(name: nil) - # Pass arguments to `get_volume_restore` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param name [::String] - # Required. Full name of the VolumeRestore resource. - # Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::VolumeRestore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::VolumeRestore] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new - # - # # Call the get_volume_restore method. - # result = client.get_volume_restore request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeRestore. - # p result - # - def get_volume_restore request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest - - # Converts hash and nil to an 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_volume_restore.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_volume_restore.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_volume_restore.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.get_volume_restore 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 the link to the backupIndex. - # - # @overload get_backup_index_download_url(request, options = nil) - # Pass arguments to `get_backup_index_download_url` via a request object, either of type - # {::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest} or an equivalent Hash. - # - # @param request [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest, ::Hash] - # A request object representing the call parameters. Required. To specify no - # parameters, or to keep all the default parameter values, pass an empty Hash. - # @param options [::Gapic::CallOptions, ::Hash] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @overload get_backup_index_download_url(backup: nil) - # Pass arguments to `get_backup_index_download_url` via keyword arguments. Note that at - # least one keyword argument is required. To specify no parameters, or to keep all - # the default parameter values, pass an empty Hash as a request object (see above). - # - # @param backup [::String] - # Required. Full name of Backup resource. - # Format: - # projects/\\{project}/locations/\\{location}/backupPlans/\\{backup_plan}/backups/\\{backup} - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse] - # - # @raise [::Google::Cloud::Error] if the REST call is aborted. - # - # @example Basic example - # require "google/cloud/gke_backup/v1" - # - # # Create a client object. The client can be reused for multiple calls. - # client = Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - # # Create a request. To set request fields, pass in keyword arguments. - # request = Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new - # - # # Call the get_backup_index_download_url method. - # result = client.get_backup_index_download_url request - # - # # The returned object is of type Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse. - # p result - # - def get_backup_index_download_url request, options = nil - raise ::ArgumentError, "request must be provided" if request.nil? - - request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest - - # Converts hash and nil to an 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_backup_index_download_url.metadata.to_h - - # Set x-goog-api-client, x-goog-user-project and x-goog-api-version headers - call_metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \ - lib_name: @config.lib_name, lib_version: @config.lib_version, - gapic_version: ::Google::Cloud::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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_backup_index_download_url.timeout, - metadata: call_metadata, - retry_policy: @config.rpcs.get_backup_index_download_url.retry_policy - - options.apply_defaults timeout: @config.timeout, - metadata: @config.metadata, - retry_policy: @config.retry_policy - - @backup_for_gke_stub.get_backup_index_download_url 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 BackupForGKE REST API. - # - # This class represents the configuration for BackupForGKE 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::GkeBackup::V1::BackupForGKE::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_backup_plan to 20 seconds, - # # and all remaining timeouts to 10 seconds. - # ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.configure do |config| - # config.timeout = 10.0 - # config.rpcs.create_backup_plan.timeout = 20.0 - # end - # - # # Apply the above configuration only to a new client. - # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - # config.timeout = 10.0 - # config.rpcs.create_backup_plan.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 = "gkebackup.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 BackupForGKE 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_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_plan - ## - # RPC-specific configuration for `list_backup_plans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plans - ## - # RPC-specific configuration for `get_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan - ## - # RPC-specific configuration for `update_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_plan - ## - # RPC-specific configuration for `delete_backup_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_plan - ## - # RPC-specific configuration for `create_backup_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup_channel - ## - # RPC-specific configuration for `list_backup_channels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_channels - ## - # RPC-specific configuration for `get_backup_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_channel - ## - # RPC-specific configuration for `update_backup_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup_channel - ## - # RPC-specific configuration for `delete_backup_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup_channel - ## - # RPC-specific configuration for `list_backup_plan_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backup_plan_bindings - ## - # RPC-specific configuration for `get_backup_plan_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_plan_binding - ## - # RPC-specific configuration for `create_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :create_backup - ## - # RPC-specific configuration for `list_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_backups - ## - # RPC-specific configuration for `get_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup - ## - # RPC-specific configuration for `update_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :update_backup - ## - # RPC-specific configuration for `delete_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_backup - ## - # RPC-specific configuration for `list_volume_backups` - # @return [::Gapic::Config::Method] - # - attr_reader :list_volume_backups - ## - # RPC-specific configuration for `get_volume_backup` - # @return [::Gapic::Config::Method] - # - attr_reader :get_volume_backup - ## - # RPC-specific configuration for `create_restore_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :create_restore_plan - ## - # RPC-specific configuration for `list_restore_plans` - # @return [::Gapic::Config::Method] - # - attr_reader :list_restore_plans - ## - # RPC-specific configuration for `get_restore_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :get_restore_plan - ## - # RPC-specific configuration for `update_restore_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :update_restore_plan - ## - # RPC-specific configuration for `delete_restore_plan` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_restore_plan - ## - # RPC-specific configuration for `create_restore_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :create_restore_channel - ## - # RPC-specific configuration for `list_restore_channels` - # @return [::Gapic::Config::Method] - # - attr_reader :list_restore_channels - ## - # RPC-specific configuration for `get_restore_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :get_restore_channel - ## - # RPC-specific configuration for `update_restore_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :update_restore_channel - ## - # RPC-specific configuration for `delete_restore_channel` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_restore_channel - ## - # RPC-specific configuration for `list_restore_plan_bindings` - # @return [::Gapic::Config::Method] - # - attr_reader :list_restore_plan_bindings - ## - # RPC-specific configuration for `get_restore_plan_binding` - # @return [::Gapic::Config::Method] - # - attr_reader :get_restore_plan_binding - ## - # RPC-specific configuration for `create_restore` - # @return [::Gapic::Config::Method] - # - attr_reader :create_restore - ## - # RPC-specific configuration for `list_restores` - # @return [::Gapic::Config::Method] - # - attr_reader :list_restores - ## - # RPC-specific configuration for `get_restore` - # @return [::Gapic::Config::Method] - # - attr_reader :get_restore - ## - # RPC-specific configuration for `update_restore` - # @return [::Gapic::Config::Method] - # - attr_reader :update_restore - ## - # RPC-specific configuration for `delete_restore` - # @return [::Gapic::Config::Method] - # - attr_reader :delete_restore - ## - # RPC-specific configuration for `list_volume_restores` - # @return [::Gapic::Config::Method] - # - attr_reader :list_volume_restores - ## - # RPC-specific configuration for `get_volume_restore` - # @return [::Gapic::Config::Method] - # - attr_reader :get_volume_restore - ## - # RPC-specific configuration for `get_backup_index_download_url` - # @return [::Gapic::Config::Method] - # - attr_reader :get_backup_index_download_url - - # @private - def initialize parent_rpcs = nil - create_backup_plan_config = parent_rpcs.create_backup_plan if parent_rpcs.respond_to? :create_backup_plan - @create_backup_plan = ::Gapic::Config::Method.new create_backup_plan_config - list_backup_plans_config = parent_rpcs.list_backup_plans if parent_rpcs.respond_to? :list_backup_plans - @list_backup_plans = ::Gapic::Config::Method.new list_backup_plans_config - get_backup_plan_config = parent_rpcs.get_backup_plan if parent_rpcs.respond_to? :get_backup_plan - @get_backup_plan = ::Gapic::Config::Method.new get_backup_plan_config - update_backup_plan_config = parent_rpcs.update_backup_plan if parent_rpcs.respond_to? :update_backup_plan - @update_backup_plan = ::Gapic::Config::Method.new update_backup_plan_config - delete_backup_plan_config = parent_rpcs.delete_backup_plan if parent_rpcs.respond_to? :delete_backup_plan - @delete_backup_plan = ::Gapic::Config::Method.new delete_backup_plan_config - create_backup_channel_config = parent_rpcs.create_backup_channel if parent_rpcs.respond_to? :create_backup_channel - @create_backup_channel = ::Gapic::Config::Method.new create_backup_channel_config - list_backup_channels_config = parent_rpcs.list_backup_channels if parent_rpcs.respond_to? :list_backup_channels - @list_backup_channels = ::Gapic::Config::Method.new list_backup_channels_config - get_backup_channel_config = parent_rpcs.get_backup_channel if parent_rpcs.respond_to? :get_backup_channel - @get_backup_channel = ::Gapic::Config::Method.new get_backup_channel_config - update_backup_channel_config = parent_rpcs.update_backup_channel if parent_rpcs.respond_to? :update_backup_channel - @update_backup_channel = ::Gapic::Config::Method.new update_backup_channel_config - delete_backup_channel_config = parent_rpcs.delete_backup_channel if parent_rpcs.respond_to? :delete_backup_channel - @delete_backup_channel = ::Gapic::Config::Method.new delete_backup_channel_config - list_backup_plan_bindings_config = parent_rpcs.list_backup_plan_bindings if parent_rpcs.respond_to? :list_backup_plan_bindings - @list_backup_plan_bindings = ::Gapic::Config::Method.new list_backup_plan_bindings_config - get_backup_plan_binding_config = parent_rpcs.get_backup_plan_binding if parent_rpcs.respond_to? :get_backup_plan_binding - @get_backup_plan_binding = ::Gapic::Config::Method.new get_backup_plan_binding_config - create_backup_config = parent_rpcs.create_backup if parent_rpcs.respond_to? :create_backup - @create_backup = ::Gapic::Config::Method.new create_backup_config - list_backups_config = parent_rpcs.list_backups if parent_rpcs.respond_to? :list_backups - @list_backups = ::Gapic::Config::Method.new list_backups_config - get_backup_config = parent_rpcs.get_backup if parent_rpcs.respond_to? :get_backup - @get_backup = ::Gapic::Config::Method.new get_backup_config - update_backup_config = parent_rpcs.update_backup if parent_rpcs.respond_to? :update_backup - @update_backup = ::Gapic::Config::Method.new update_backup_config - delete_backup_config = parent_rpcs.delete_backup if parent_rpcs.respond_to? :delete_backup - @delete_backup = ::Gapic::Config::Method.new delete_backup_config - list_volume_backups_config = parent_rpcs.list_volume_backups if parent_rpcs.respond_to? :list_volume_backups - @list_volume_backups = ::Gapic::Config::Method.new list_volume_backups_config - get_volume_backup_config = parent_rpcs.get_volume_backup if parent_rpcs.respond_to? :get_volume_backup - @get_volume_backup = ::Gapic::Config::Method.new get_volume_backup_config - create_restore_plan_config = parent_rpcs.create_restore_plan if parent_rpcs.respond_to? :create_restore_plan - @create_restore_plan = ::Gapic::Config::Method.new create_restore_plan_config - list_restore_plans_config = parent_rpcs.list_restore_plans if parent_rpcs.respond_to? :list_restore_plans - @list_restore_plans = ::Gapic::Config::Method.new list_restore_plans_config - get_restore_plan_config = parent_rpcs.get_restore_plan if parent_rpcs.respond_to? :get_restore_plan - @get_restore_plan = ::Gapic::Config::Method.new get_restore_plan_config - update_restore_plan_config = parent_rpcs.update_restore_plan if parent_rpcs.respond_to? :update_restore_plan - @update_restore_plan = ::Gapic::Config::Method.new update_restore_plan_config - delete_restore_plan_config = parent_rpcs.delete_restore_plan if parent_rpcs.respond_to? :delete_restore_plan - @delete_restore_plan = ::Gapic::Config::Method.new delete_restore_plan_config - create_restore_channel_config = parent_rpcs.create_restore_channel if parent_rpcs.respond_to? :create_restore_channel - @create_restore_channel = ::Gapic::Config::Method.new create_restore_channel_config - list_restore_channels_config = parent_rpcs.list_restore_channels if parent_rpcs.respond_to? :list_restore_channels - @list_restore_channels = ::Gapic::Config::Method.new list_restore_channels_config - get_restore_channel_config = parent_rpcs.get_restore_channel if parent_rpcs.respond_to? :get_restore_channel - @get_restore_channel = ::Gapic::Config::Method.new get_restore_channel_config - update_restore_channel_config = parent_rpcs.update_restore_channel if parent_rpcs.respond_to? :update_restore_channel - @update_restore_channel = ::Gapic::Config::Method.new update_restore_channel_config - delete_restore_channel_config = parent_rpcs.delete_restore_channel if parent_rpcs.respond_to? :delete_restore_channel - @delete_restore_channel = ::Gapic::Config::Method.new delete_restore_channel_config - list_restore_plan_bindings_config = parent_rpcs.list_restore_plan_bindings if parent_rpcs.respond_to? :list_restore_plan_bindings - @list_restore_plan_bindings = ::Gapic::Config::Method.new list_restore_plan_bindings_config - get_restore_plan_binding_config = parent_rpcs.get_restore_plan_binding if parent_rpcs.respond_to? :get_restore_plan_binding - @get_restore_plan_binding = ::Gapic::Config::Method.new get_restore_plan_binding_config - create_restore_config = parent_rpcs.create_restore if parent_rpcs.respond_to? :create_restore - @create_restore = ::Gapic::Config::Method.new create_restore_config - list_restores_config = parent_rpcs.list_restores if parent_rpcs.respond_to? :list_restores - @list_restores = ::Gapic::Config::Method.new list_restores_config - get_restore_config = parent_rpcs.get_restore if parent_rpcs.respond_to? :get_restore - @get_restore = ::Gapic::Config::Method.new get_restore_config - update_restore_config = parent_rpcs.update_restore if parent_rpcs.respond_to? :update_restore - @update_restore = ::Gapic::Config::Method.new update_restore_config - delete_restore_config = parent_rpcs.delete_restore if parent_rpcs.respond_to? :delete_restore - @delete_restore = ::Gapic::Config::Method.new delete_restore_config - list_volume_restores_config = parent_rpcs.list_volume_restores if parent_rpcs.respond_to? :list_volume_restores - @list_volume_restores = ::Gapic::Config::Method.new list_volume_restores_config - get_volume_restore_config = parent_rpcs.get_volume_restore if parent_rpcs.respond_to? :get_volume_restore - @get_volume_restore = ::Gapic::Config::Method.new get_volume_restore_config - get_backup_index_download_url_config = parent_rpcs.get_backup_index_download_url if parent_rpcs.respond_to? :get_backup_index_download_url - @get_backup_index_download_url = ::Gapic::Config::Method.new get_backup_index_download_url_config - - yield self if block_given? - end - end - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb deleted file mode 100644 index 4a4ab7171215..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/operations.rb +++ /dev/null @@ -1,925 +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 GkeBackup - module V1 - module BackupForGKE - module Rest - # Service that implements Longrunning Operations API. - class Operations - # @private - API_VERSION = "" - - # @private - DEFAULT_ENDPOINT_TEMPLATE = "gkebackup.$UNIVERSE_DOMAIN$" - - # @private - attr_reader :operations_stub - - ## - # Configuration for the BackupForGKE 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 BackupForGKE 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::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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::GkeBackup::V1::VERSION, - transports_version_send: [:rest] - - call_metadata[:"x-goog-api-version"] = API_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 = "gkebackup.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] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_operation REST call - # - # @param request_pb [::Google::Longrunning::GetOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_get_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_operation REST call - # - # @param request_pb [::Google::Longrunning::DeleteOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_delete_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the cancel_operation REST call - # - # @param request_pb [::Google::Longrunning::CancelOperationRequest] - # A request object representing the call parameters. Required. - # @return [Array(String, [String, nil], Hash{String => String})] - # Uri, Body, Query string parameters - def self.transcode_cancel_operation_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{name}:cancel", - body: "*", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/operations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb deleted file mode 100644 index 3e489d411cc2..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/backup_for_gke/rest/service_stub.rb +++ /dev/null @@ -1,2472 +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/gkebackup/v1/gkebackup_pb" - -module Google - module Cloud - module GkeBackup - module V1 - module BackupForGKE - module Rest - ## - # REST service stub for the BackupForGKE 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_backup_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_plan", - 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_backup_plans REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse] - # A result object deserialized from the server's reply - def list_backup_plans request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plans_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_plans", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse.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_backup_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupPlan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::BackupPlan] - # A result object deserialized from the server's reply - def get_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::BackupPlan.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_backup_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_plan", - 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_backup_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_plan", - 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_backup_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_channel_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_channel", - 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_backup_channels REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse] - # A result object deserialized from the server's reply - def list_backup_channels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_channels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_channels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse.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_backup_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupChannel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::BackupChannel] - # A result object deserialized from the server's reply - def get_backup_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_channel_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_channel", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::BackupChannel.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_backup_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_channel_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_channel", - 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_backup_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_channel_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_channel", - 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_backup_plan_bindings REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse] - # A result object deserialized from the server's reply - def list_backup_plan_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backup_plan_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_backup_plan_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse.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_backup_plan_binding REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::BackupPlanBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding] - # A result object deserialized from the server's reply - def get_backup_plan_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_plan_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_backup_plan_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::BackupPlanBinding.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_backup REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup", - 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_backups REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListBackupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::ListBackupsResponse] - # A result object deserialized from the server's reply - def list_backups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_backups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::ListBackupsResponse.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_backup REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::Backup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::Backup] - # A result object deserialized from the server's reply - def get_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::Backup.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_backup REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup", - 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_backup REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup", - 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_volume_backups REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse] - # A result object deserialized from the server's reply - def list_volume_backups request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_volume_backups_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_volume_backups", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse.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_volume_backup REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::VolumeBackup] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup] - # A result object deserialized from the server's reply - def get_volume_backup request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_volume_backup_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_volume_backup", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::VolumeBackup.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_restore_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_restore_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_restore_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore_plan", - 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_restore_plans REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse] - # A result object deserialized from the server's reply - def list_restore_plans request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_restore_plans_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore_plans", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse.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_restore_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestorePlan] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::RestorePlan] - # A result object deserialized from the server's reply - def get_restore_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_restore_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore_plan", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::RestorePlan.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_restore_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_restore_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_restore_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore_plan", - 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_restore_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_restore_plan request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_restore_plan_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore_plan", - 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_restore_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_restore_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_restore_channel_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore_channel", - 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_restore_channels REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse] - # A result object deserialized from the server's reply - def list_restore_channels request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_restore_channels_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore_channels", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse.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_restore_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestoreChannel] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::RestoreChannel] - # A result object deserialized from the server's reply - def get_restore_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_restore_channel_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore_channel", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::RestoreChannel.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_restore_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_restore_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_restore_channel_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore_channel", - 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_restore_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_restore_channel request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_restore_channel_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore_channel", - 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_restore_plan_bindings REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse] - # A result object deserialized from the server's reply - def list_restore_plan_bindings request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_restore_plan_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_restore_plan_bindings", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse.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_restore_plan_binding REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::RestorePlanBinding] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::RestorePlanBinding] - # A result object deserialized from the server's reply - def get_restore_plan_binding request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_restore_plan_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_restore_plan_binding", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::RestorePlanBinding.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_restore REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateRestoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_restore request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_create_restore_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore", - 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_restores REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestoresRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListRestoresResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::ListRestoresResponse] - # A result object deserialized from the server's reply - def list_restores request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_restores_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restores", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::ListRestoresResponse.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_restore REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::Restore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::Restore] - # A result object deserialized from the server's reply - def get_restore request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_restore_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::Restore.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_restore REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_restore request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_update_restore_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore", - 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_restore REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @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_restore request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_delete_restore_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_restore", - 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_volume_restores REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse] - # A result object deserialized from the server's reply - def list_volume_restores request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_list_volume_restores_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_volume_restores", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse.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_volume_restore REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::VolumeRestore] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::VolumeRestore] - # A result object deserialized from the server's reply - def get_volume_restore request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_volume_restore_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_volume_restore", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::VolumeRestore.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_backup_index_download_url REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest] - # A request object representing the call parameters. Required. - # @param options [::Gapic::CallOptions] - # Overrides the default settings for this call, e.g, timeout, retries etc. Optional. - # - # @yield [result, operation] Access the result along with the TransportOperation object - # @yieldparam result [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse] - # @yieldparam operation [::Gapic::Rest::TransportOperation] - # - # @return [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse] - # A result object deserialized from the server's reply - def get_backup_index_download_url request_pb, options = nil - raise ::ArgumentError, "request must be provided" if request_pb.nil? - - verb, uri, query_string_params, body = ServiceStub.transcode_get_backup_index_download_url_request request_pb - query_string_params = if query_string_params.any? - query_string_params.to_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_backup_index_download_url", - options: options - ) - operation = ::Gapic::Rest::TransportOperation.new response - result = ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse.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_backup_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest] - # 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_backup_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backupPlans", - body: "backup_plan", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_plans REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest] - # 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_backup_plans_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupPlans", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest] - # 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_backup_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest] - # 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_backup_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup_plan.name}", - body: "backup_plan", - matches: [ - ["backup_plan.name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest] - # 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_backup_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest] - # 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_backup_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backupChannels", - body: "backup_channel", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_channels REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest] - # 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_backup_channels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupChannels", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest] - # 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_backup_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupChannels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest] - # 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_backup_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup_channel.name}", - body: "backup_channel", - matches: [ - ["backup_channel.name", %r{^projects/[^/]+/locations/[^/]+/backupChannels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest] - # 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_backup_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupChannels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backup_plan_bindings REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest] - # 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_backup_plan_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backupPlanBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupChannels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_plan_binding REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest] - # 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_backup_plan_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupChannels/[^/]+/backupPlanBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_backup REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateBackupRequest] - # 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_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/backups", - body: "backup", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_backups REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListBackupsRequest] - # 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_backups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/backups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupRequest] - # 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_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_backup REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateBackupRequest] - # 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_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{backup.name}", - body: "backup", - matches: [ - ["backup.name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_backup REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteBackupRequest] - # 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_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_volume_backups REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest] - # 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_volume_backups_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/volumeBackups", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_volume_backup REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest] - # 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_volume_backup_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/volumeBackups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_restore_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest] - # 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_restore_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/restorePlans", - body: "restore_plan", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_restore_plans REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest] - # 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_restore_plans_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/restorePlans", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_restore_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest] - # 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_restore_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_restore_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest] - # 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_restore_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{restore_plan.name}", - body: "restore_plan", - matches: [ - ["restore_plan.name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_restore_plan REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest] - # 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_restore_plan_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_restore_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest] - # 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_restore_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/restoreChannels", - body: "restore_channel", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_restore_channels REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest] - # 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_restore_channels_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/restoreChannels", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_restore_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest] - # 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_restore_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/restoreChannels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_restore_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest] - # 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_restore_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{restore_channel.name}", - body: "restore_channel", - matches: [ - ["restore_channel.name", %r{^projects/[^/]+/locations/[^/]+/restoreChannels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_restore_channel REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest] - # 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_restore_channel_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/restoreChannels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_restore_plan_bindings REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest] - # 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_restore_plan_bindings_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/restorePlanBindings", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/restoreChannels/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_restore_plan_binding REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest] - # 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_restore_plan_binding_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/restoreChannels/[^/]+/restorePlanBindings/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the create_restore REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::CreateRestoreRequest] - # 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_restore_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :post, - uri_template: "/v1/{parent}/restores", - body: "restore", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_restores REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListRestoresRequest] - # 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_restores_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/restores", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_restore REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetRestoreRequest] - # 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_restore_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the update_restore REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest] - # 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_restore_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :patch, - uri_template: "/v1/{restore.name}", - body: "restore", - matches: [ - ["restore.name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the delete_restore REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest] - # 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_restore_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :delete, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the list_volume_restores REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest] - # 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_volume_restores_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{parent}/volumeRestores", - matches: [ - ["parent", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_volume_restore REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest] - # 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_volume_restore_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{name}", - matches: [ - ["name", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/volumeRestores/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - - ## - # @private - # - # GRPC transcoding helper method for the get_backup_index_download_url REST call - # - # @param request_pb [::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest] - # 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_backup_index_download_url_request request_pb - transcoder = Gapic::Rest::GrpcTranscoder.new - .with_bindings( - uri_method: :get, - uri_template: "/v1/{backup}:getBackupIndexDownloadUrl", - matches: [ - ["backup", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] - ] - ) - transcoder.transcode request_pb - end - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/bindings_override.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/bindings_override.rb deleted file mode 100644 index 3cecd22eea98..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/bindings_override.rb +++ /dev/null @@ -1,228 +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 GkeBackup - ## - # @example Loading just the REST part of this package, including all its services, and instantiating a REST client - # - # require "google/cloud/gke_backup/v1/rest" - # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - module V1 - ## - # @private - # Initialize the mixin bindings configuration - # - def self.configure - @configure ||= begin - namespace = ["Google", "Cloud", "GkeBackup"] - 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/[^/]+/backupPlans/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/volumeBackups/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] - ], - body: nil - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :get, - uri_template: "/v1/{resource}:getIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/volumeRestores/[^/]+/?$}, 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/[^/]+/backupPlans/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/volumeBackups/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:setIamPolicy", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/volumeRestores/[^/]+/?$}, 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/[^/]+/backupPlans/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/backupPlans/[^/]+/backups/[^/]+/volumeBackups/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/?$}, false] - ], - body: "*" - ), - Gapic::Rest::GrpcTranscoder::HttpBinding.create_with_validation( - uri_method: :post, - uri_template: "/v1/{resource}:testIamPermissions", - matches: [ - ["resource", %r{^projects/[^/]+/locations/[^/]+/restorePlans/[^/]+/restores/[^/]+/volumeRestores/[^/]+/?$}, false] - ], - body: "*" - ) - ] - default_config - end - yield @configure if block_given? - @configure - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/rest.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/rest.rb deleted file mode 100644 index d2eccfd5c930..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/rest.rb +++ /dev/null @@ -1,38 +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/gke_backup/v1/backup_for_gke/rest" -require "google/cloud/gke_backup/v1/bindings_override" -require "google/cloud/gke_backup/v1/version" - -module Google - module Cloud - module GkeBackup - ## - # To load just the REST part of this package, including all its services, and instantiate a REST client: - # - # @example - # - # require "google/cloud/gke_backup/v1/rest" - # client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new - # - module V1 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/version.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/v1/version.rb deleted file mode 100644 index 5231353fab35..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gke_backup/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 GkeBackup - module V1 - VERSION = "0.0.1" - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_channel_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_channel_pb.rb deleted file mode 100644 index 27547c0e4c68..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_channel_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkebackup/v1/backup_channel.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n.google/cloud/gkebackup/v1/backup_channel.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x04\n\rBackupChannel\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12#\n\x13\x64\x65stination_project\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12I\n\x06labels\x18\x06 \x03(\x0b\x32\x34.google.cloud.gkebackup.v1.BackupChannel.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x64\x65stination_project_id\x18\t \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:\x94\x01\xea\x41\x90\x01\n&gkebackup.googleapis.com/BackupChannel\x12Gprojects/{project}/locations/{location}/backupChannels/{backup_channel}*\x0e\x62\x61\x63kupChannels2\rbackupChannelB\xc9\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x12\x42\x61\x63kupChannelProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GkeBackup - module V1 - BackupChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupChannel").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_pb.rb deleted file mode 100644 index 919732eb274b..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_pb.rb +++ /dev/null @@ -1,51 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkebackup/v1/backup.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/gkebackup/v1/common_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/gkebackup/v1/backup.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/gkebackup/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xbe\x0e\n\x06\x42\x61\x63kup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\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\x13\n\x06manual\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12\x42\n\x06labels\x18\x06 \x03(\x0b\x32-.google.cloud.gkebackup.v1.Backup.LabelsEntryB\x03\xe0\x41\x01\x12\x1d\n\x10\x64\x65lete_lock_days\x18\x07 \x01(\x05\x42\x03\xe0\x41\x01\x12@\n\x17\x64\x65lete_lock_expire_time\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x18\n\x0bretain_days\x18\t \x01(\x05\x42\x03\xe0\x41\x01\x12;\n\x12retain_expire_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x45\n\x0e\x65ncryption_key\x18\x0b \x01(\x0b\x32(.google.cloud.gkebackup.v1.EncryptionKeyB\x03\xe0\x41\x03\x12\x1d\n\x0e\x61ll_namespaces\x18\x0c \x01(\x08\x42\x03\xe0\x41\x03H\x00\x12I\n\x13selected_namespaces\x18\r \x01(\x0b\x32%.google.cloud.gkebackup.v1.NamespacesB\x03\xe0\x41\x03H\x00\x12P\n\x15selected_applications\x18\x0e \x01(\x0b\x32*.google.cloud.gkebackup.v1.NamespacedNamesB\x03\xe0\x41\x03H\x00\x12!\n\x14\x63ontains_volume_data\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\x12\x1d\n\x10\x63ontains_secrets\x18\x10 \x01(\x08\x42\x03\xe0\x41\x03\x12P\n\x10\x63luster_metadata\x18\x11 \x01(\x0b\x32\x31.google.cloud.gkebackup.v1.Backup.ClusterMetadataB\x03\xe0\x41\x03\x12;\n\x05state\x18\x12 \x01(\x0e\x32\'.google.cloud.gkebackup.v1.Backup.StateB\x03\xe0\x41\x03\x12\x19\n\x0cstate_reason\x18\x13 \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\x14 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0eresource_count\x18\x15 \x01(\x05\x42\x03\xe0\x41\x03\x12\x19\n\x0cvolume_count\x18\x16 \x01(\x05\x42\x03\xe0\x41\x03\x12\x17\n\nsize_bytes\x18\x17 \x01(\x03\x42\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x18 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65scription\x18\x19 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tpod_count\x18\x1a \x01(\x05\x42\x03\xe0\x41\x03\x12%\n\x18\x63onfig_backup_size_bytes\x18\x1b \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0fpermissive_mode\x18\x1c \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x1d \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x1e \x01(\x08\x42\x03\xe0\x41\x03\x1a\xb6\x02\n\x0f\x43lusterMetadata\x12\x14\n\x07\x63luster\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0bk8s_version\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12j\n\x13\x62\x61\x63kup_crd_versions\x18\x03 \x03(\x0b\x32H.google.cloud.gkebackup.v1.Backup.ClusterMetadata.BackupCrdVersionsEntryB\x03\xe0\x41\x03\x12\x1a\n\x0bgke_version\x18\x04 \x01(\tB\x03\xe0\x41\x03H\x00\x12\x1d\n\x0e\x61nthos_version\x18\x05 \x01(\tB\x03\xe0\x41\x03H\x00\x1a\x38\n\x16\x42\x61\x63kupCrdVersionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x12\n\x10platform_version\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"f\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05:x\xea\x41u\n\x1fgkebackup.googleapis.com/Backup\x12Rprojects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}B\x0e\n\x0c\x62\x61\x63kup_scopeB\xc2\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x0b\x42\x61\x63kupProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.gkebackup.v1.EncryptionKey", "google/cloud/gkebackup/v1/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 - -module Google - module Cloud - module GkeBackup - module V1 - Backup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Backup").msgclass - Backup::ClusterMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Backup.ClusterMetadata").msgclass - Backup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Backup.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_binding_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_binding_pb.rb deleted file mode 100644 index f4e4374aadbc..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_binding_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkebackup/v1/backup_plan_binding.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/cloud/gkebackup/v1/common_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n3google/cloud/gkebackup/v1/backup_plan_binding.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/gkebackup/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8e\x0e\n\x11\x42\x61\x63kupPlanBinding\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\x43\n\x0b\x62\x61\x63kup_plan\x18\x05 \x01(\tB.\xe0\x41\x05\xe0\x41\x03\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan\x12<\n\x07\x63luster\x18\x06 \x01(\tB+\xe0\x41\x05\xe0\x41\x03\xfa\x41\"\n container.googleapis.com/Cluster\x12`\n\x13\x62\x61\x63kup_plan_details\x18\x07 \x01(\x0b\x32>.google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetailsB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x03\x1a\x9b\t\n\x11\x42\x61\x63kupPlanDetails\x12 \n\x13protected_pod_count\x18\x01 \x01(\x05\x42\x03\xe0\x41\x03\x12X\n\x05state\x18\x02 \x01(\x0e\x32\x44.google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails.StateB\x03\xe0\x41\x03\x12\x44\n\x1blast_successful_backup_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x43\n\x1anext_scheduled_backup_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x1b\n\x0erpo_risk_level\x18\x05 \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16last_successful_backup\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12v\n\x15\x62\x61\x63kup_config_details\x18\x07 \x01(\x0b\x32R.google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails.BackupConfigDetailsB\x03\xe0\x41\x03\x12|\n\x18retention_policy_details\x18\x08 \x01(\x0b\x32U.google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails.RetentionPolicyDetailsB\x03\xe0\x41\x03\x1a\xe8\x02\n\x13\x42\x61\x63kupConfigDetails\x12\x1d\n\x0e\x61ll_namespaces\x18\x01 \x01(\x08\x42\x03\xe0\x41\x03H\x00\x12I\n\x13selected_namespaces\x18\x02 \x01(\x0b\x32%.google.cloud.gkebackup.v1.NamespacesB\x03\xe0\x41\x03H\x00\x12P\n\x15selected_applications\x18\x03 \x01(\x0b\x32*.google.cloud.gkebackup.v1.NamespacedNamesB\x03\xe0\x41\x03H\x00\x12 \n\x13include_volume_data\x18\x05 \x01(\x08\x42\x03\xe0\x41\x03\x12\x1c\n\x0finclude_secrets\x18\x06 \x01(\x08\x42\x03\xe0\x41\x03\x12\x45\n\x0e\x65ncryption_key\x18\x07 \x01(\x0b\x32(.google.cloud.gkebackup.v1.EncryptionKeyB\x03\xe0\x41\x03\x42\x0e\n\x0c\x62\x61\x63kup_scope\x1a_\n\x16RetentionPolicyDetails\x12$\n\x17\x62\x61\x63kup_delete_lock_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1f\n\x12\x62\x61\x63kup_retain_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\"{\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_PENDING\x10\x01\x12\x10\n\x0cPROVISIONING\x10\x02\x12\t\n\x05READY\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0f\n\x0b\x44\x45\x41\x43TIVATED\x10\x05\x12\x0c\n\x08\x44\x45LETING\x10\x06:\xc9\x01\xea\x41\xc5\x01\n*gkebackup.googleapis.com/BackupPlanBinding\x12pprojects/{project}/locations/{location}/backupChannels/{backup_channel}/backupPlanBindings/{backup_plan_binding}*\x12\x62\x61\x63kupPlanBindings2\x11\x62\x61\x63kupPlanBindingB\xcd\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x16\x42\x61\x63kupPlanBindingProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.gkebackup.v1.Namespaces", "google/cloud/gkebackup/v1/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 - -module Google - module Cloud - module GkeBackup - module V1 - BackupPlanBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlanBinding").msgclass - BackupPlanBinding::BackupPlanDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails").msgclass - BackupPlanBinding::BackupPlanDetails::BackupConfigDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails.BackupConfigDetails").msgclass - BackupPlanBinding::BackupPlanDetails::RetentionPolicyDetails = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails.RetentionPolicyDetails").msgclass - BackupPlanBinding::BackupPlanDetails::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlanBinding.BackupPlanDetails.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb deleted file mode 100644 index dbf29498bf2f..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/backup_plan_pb.rb +++ /dev/null @@ -1,63 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkebackup/v1/backup_plan.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/gkebackup/v1/common_pb' -require 'google/protobuf/duration_pb' -require 'google/protobuf/timestamp_pb' -require 'google/type/date_pb' -require 'google/type/dayofweek_pb' -require 'google/type/timeofday_pb' - - -descriptor_data = "\n+google/cloud/gkebackup/v1/backup_plan.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/gkebackup/v1/common.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\x1a\x1bgoogle/type/dayofweek.proto\x1a\x1bgoogle/type/timeofday.proto\"\xe2\x0e\n\nBackupPlan\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\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<\n\x07\x63luster\x18\x06 \x01(\tB+\xe0\x41\x05\xe0\x41\x02\xfa\x41\"\n container.googleapis.com/Cluster\x12T\n\x10retention_policy\x18\x07 \x01(\x0b\x32\x35.google.cloud.gkebackup.v1.BackupPlan.RetentionPolicyB\x03\xe0\x41\x01\x12\x46\n\x06labels\x18\x08 \x03(\x0b\x32\x31.google.cloud.gkebackup.v1.BackupPlan.LabelsEntryB\x03\xe0\x41\x01\x12L\n\x0f\x62\x61\x63kup_schedule\x18\t \x01(\x0b\x32..google.cloud.gkebackup.v1.BackupPlan.ScheduleB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x03\x12\x18\n\x0b\x64\x65\x61\x63tivated\x18\x0b \x01(\x08\x42\x03\xe0\x41\x01\x12N\n\rbackup_config\x18\x0c \x01(\x0b\x32\x32.google.cloud.gkebackup.v1.BackupPlan.BackupConfigB\x03\xe0\x41\x01\x12 \n\x13protected_pod_count\x18\r \x01(\x05\x42\x03\xe0\x41\x03\x12?\n\x05state\x18\x0e \x01(\x0e\x32+.google.cloud.gkebackup.v1.BackupPlan.StateB\x03\xe0\x41\x03\x12\x19\n\x0cstate_reason\x18\x0f \x01(\tB\x03\xe0\x41\x03\x12\x1b\n\x0erpo_risk_level\x18\x10 \x01(\x05\x42\x03\xe0\x41\x03\x12\x1c\n\x0frpo_risk_reason\x18\x11 \x01(\tB\x03\xe0\x41\x03\x12\x46\n\x0e\x62\x61\x63kup_channel\x18\x12 \x01(\tB.\xe0\x41\x03\xfa\x41(\n&gkebackup.googleapis.com/BackupChannel\x12\x44\n\x1blast_successful_backup_time\x18\x13 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1am\n\x0fRetentionPolicy\x12$\n\x17\x62\x61\x63kup_delete_lock_days\x18\x01 \x01(\x05\x42\x03\xe0\x41\x01\x12\x1f\n\x12\x62\x61\x63kup_retain_days\x18\x02 \x01(\x05\x42\x03\xe0\x41\x01\x12\x13\n\x06locked\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xbf\x01\n\x08Schedule\x12\x1a\n\rcron_schedule\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x13\n\x06paused\x18\x02 \x01(\x08\x42\x03\xe0\x41\x01\x12=\n\nrpo_config\x18\x03 \x01(\x0b\x32$.google.cloud.gkebackup.v1.RpoConfigB\x03\xe0\x41\x01\x12\x43\n\x1anext_scheduled_backup_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x1a\xf0\x02\n\x0c\x42\x61\x63kupConfig\x12\x18\n\x0e\x61ll_namespaces\x18\x01 \x01(\x08H\x00\x12\x44\n\x13selected_namespaces\x18\x02 \x01(\x0b\x32%.google.cloud.gkebackup.v1.NamespacesH\x00\x12K\n\x15selected_applications\x18\x03 \x01(\x0b\x32*.google.cloud.gkebackup.v1.NamespacedNamesH\x00\x12 \n\x13include_volume_data\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1c\n\x0finclude_secrets\x18\x05 \x01(\x08\x42\x03\xe0\x41\x01\x12\x45\n\x0e\x65ncryption_key\x18\x06 \x01(\x0b\x32(.google.cloud.gkebackup.v1.EncryptionKeyB\x03\xe0\x41\x01\x12\x1c\n\x0fpermissive_mode\x18\x07 \x01(\x08\x42\x03\xe0\x41\x01\x42\x0e\n\x0c\x62\x61\x63kup_scope\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"{\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_PENDING\x10\x01\x12\x10\n\x0cPROVISIONING\x10\x02\x12\t\n\x05READY\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0f\n\x0b\x44\x45\x41\x43TIVATED\x10\x05\x12\x0c\n\x08\x44\x45LETING\x10\x06:k\xea\x41h\n#gkebackup.googleapis.com/BackupPlan\x12\x41projects/{project}/locations/{location}/backupPlans/{backup_plan}\"x\n\tRpoConfig\x12\x1f\n\x12target_rpo_minutes\x18\x01 \x01(\x05\x42\x03\xe0\x41\x02\x12J\n\x11\x65xclusion_windows\x18\x02 \x03(\x0b\x32*.google.cloud.gkebackup.v1.ExclusionWindowB\x03\xe0\x41\x01\"\xde\x02\n\x0f\x45xclusionWindow\x12/\n\nstart_time\x18\x01 \x01(\x0b\x32\x16.google.type.TimeOfDayB\x03\xe0\x41\x02\x12\x30\n\x08\x64uration\x18\x02 \x01(\x0b\x32\x19.google.protobuf.DurationB\x03\xe0\x41\x02\x12\x33\n\x16single_occurrence_date\x18\x03 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x0f\n\x05\x64\x61ily\x18\x04 \x01(\x08H\x00\x12P\n\x0c\x64\x61ys_of_week\x18\x05 \x01(\x0b\x32\x38.google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekListH\x00\x1a\x42\n\rDayOfWeekList\x12\x31\n\x0c\x64\x61ys_of_week\x18\x01 \x03(\x0e\x32\x16.google.type.DayOfWeekB\x03\xe0\x41\x01\x42\x0c\n\nrecurrenceB\xc6\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x0f\x42\x61\x63kupPlanProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.gkebackup.v1.Namespaces", "google/cloud/gkebackup/v1/common.proto"], - ["google.type.TimeOfDay", "google/type/timeofday.proto"], - ["google.protobuf.Duration", "google/protobuf/duration.proto"], - ["google.type.Date", "google/type/date.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GkeBackup - module V1 - BackupPlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan").msgclass - BackupPlan::RetentionPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan.RetentionPolicy").msgclass - BackupPlan::Schedule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan.Schedule").msgclass - BackupPlan::BackupConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan.BackupConfig").msgclass - BackupPlan::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.BackupPlan.State").enummodule - RpoConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RpoConfig").msgclass - ExclusionWindow = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ExclusionWindow").msgclass - ExclusionWindow::DayOfWeekList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ExclusionWindow.DayOfWeekList").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/common_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/common_pb.rb deleted file mode 100644 index 3ad3f16cef39..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/common_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkebackup/v1/common.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' - - -descriptor_data = "\n&google/cloud/gkebackup/v1/common.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\"%\n\nNamespaces\x12\x17\n\nnamespaces\x18\x01 \x03(\tB\x03\xe0\x41\x01\";\n\x0eNamespacedName\x12\x16\n\tnamespace\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01\"[\n\x0fNamespacedNames\x12H\n\x10namespaced_names\x18\x01 \x03(\x0b\x32).google.cloud.gkebackup.v1.NamespacedNameB\x03\xe0\x41\x01\"Z\n\rEncryptionKey\x12I\n\x16gcp_kms_encryption_key\x18\x01 \x01(\tB)\xe0\x41\x01\xfa\x41#\n!cloudkms.googleapis.com/CryptoKey\"T\n\x0eVolumeTypeEnum\"B\n\nVolumeType\x12\x1b\n\x17VOLUME_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13GCE_PERSISTENT_DISK\x10\x01\x42\xc2\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x0b\x43ommonProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GkeBackup - module V1 - Namespaces = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Namespaces").msgclass - NamespacedName = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.NamespacedName").msgclass - NamespacedNames = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.NamespacedNames").msgclass - EncryptionKey = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.EncryptionKey").msgclass - VolumeTypeEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeTypeEnum").msgclass - VolumeTypeEnum::VolumeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeType").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb deleted file mode 100644 index d189fd5b240a..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_pb.rb +++ /dev/null @@ -1,121 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkebackup/v1/gkebackup.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/gkebackup/v1/backup_pb' -require 'google/cloud/gkebackup/v1/backup_channel_pb' -require 'google/cloud/gkebackup/v1/backup_plan_pb' -require 'google/cloud/gkebackup/v1/backup_plan_binding_pb' -require 'google/cloud/gkebackup/v1/restore_pb' -require 'google/cloud/gkebackup/v1/restore_channel_pb' -require 'google/cloud/gkebackup/v1/restore_plan_pb' -require 'google/cloud/gkebackup/v1/restore_plan_binding_pb' -require 'google/cloud/gkebackup/v1/volume_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/gkebackup/v1/gkebackup.proto\x12\x19google.cloud.gkebackup.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/gkebackup/v1/backup.proto\x1a.google/cloud/gkebackup/v1/backup_channel.proto\x1a+google/cloud/gkebackup/v1/backup_plan.proto\x1a\x33google/cloud/gkebackup/v1/backup_plan_binding.proto\x1a\'google/cloud/gkebackup/v1/restore.proto\x1a/google/cloud/gkebackup/v1/restore_channel.proto\x1a,google/cloud/gkebackup/v1/restore_plan.proto\x1a\x34google/cloud/gkebackup/v1/restore_plan_binding.proto\x1a&google/cloud/gkebackup/v1/volume.proto\x1a#google/longrunning/operations.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\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\"\xb2\x01\n\x17\x43reateBackupPlanRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12?\n\x0b\x62\x61\x63kup_plan\x18\x02 \x01(\x0b\x32%.google.cloud.gkebackup.v1.BackupPlanB\x03\xe0\x41\x02\x12\x1b\n\x0e\x62\x61\x63kup_plan_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xb0\x01\n\x16ListBackupPlansRequest\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\"\x84\x01\n\x17ListBackupPlansResponse\x12;\n\x0c\x62\x61\x63kup_plans\x18\x01 \x03(\x0b\x32%.google.cloud.gkebackup.v1.BackupPlan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Q\n\x14GetBackupPlanRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan\"\x90\x01\n\x17UpdateBackupPlanRequest\x12?\n\x0b\x62\x61\x63kup_plan\x18\x01 \x01(\x0b\x32%.google.cloud.gkebackup.v1.BackupPlanB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"g\n\x17\x44\x65leteBackupPlanRequest\x12\x39\n\x04name\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xbe\x01\n\x1a\x43reateBackupChannelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x45\n\x0e\x62\x61\x63kup_channel\x18\x02 \x01(\x0b\x32(.google.cloud.gkebackup.v1.BackupChannelB\x03\xe0\x41\x02\x12\x1e\n\x11\x62\x61\x63kup_channel_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xb3\x01\n\x19ListBackupChannelsRequest\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\x1aListBackupChannelsResponse\x12\x41\n\x0f\x62\x61\x63kup_channels\x18\x01 \x03(\x0b\x32(.google.cloud.gkebackup.v1.BackupChannel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"W\n\x17GetBackupChannelRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&gkebackup.googleapis.com/BackupChannel\"\x99\x01\n\x1aUpdateBackupChannelRequest\x12\x45\n\x0e\x62\x61\x63kup_channel\x18\x01 \x01(\x0b\x32(.google.cloud.gkebackup.v1.BackupChannelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"\x81\x01\n\x1a\x44\x65leteBackupChannelRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&gkebackup.googleapis.com/BackupChannel\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xbc\x01\n\x1dListBackupPlanBindingsRequest\x12>\n\x06parent\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&gkebackup.googleapis.com/BackupChannel\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\"\x9a\x01\n\x1eListBackupPlanBindingsResponse\x12J\n\x14\x62\x61\x63kup_plan_bindings\x18\x01 \x03(\x0b\x32,.google.cloud.gkebackup.v1.BackupPlanBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"_\n\x1bGetBackupPlanBindingRequest\x12@\n\x04name\x18\x01 \x01(\tB2\xe0\x41\x02\xfa\x41,\n*gkebackup.googleapis.com/BackupPlanBinding\"\xa2\x01\n\x13\x43reateBackupRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan\x12\x36\n\x06\x62\x61\x63kup\x18\x02 \x01(\x0b\x32!.google.cloud.gkebackup.v1.BackupB\x03\xe0\x41\x01\x12\x16\n\tbackup_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xd3\x01\n\x12ListBackupsRequest\x12;\n\x06parent\x18\x01 \x01(\tB+\xe0\x41\x02\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan\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\x12#\n\x16return_partial_success\x18\x06 \x01(\x08\x42\x03\xe0\x41\x01\"w\n\x13ListBackupsResponse\x12\x32\n\x07\x62\x61\x63kups\x18\x01 \x03(\x0b\x32!.google.cloud.gkebackup.v1.Backup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"I\n\x10GetBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkebackup.googleapis.com/Backup\"\x83\x01\n\x13UpdateBackupRequest\x12\x36\n\x06\x62\x61\x63kup\x18\x01 \x01(\x0b\x32!.google.cloud.gkebackup.v1.BackupB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"s\n\x13\x44\x65leteBackupRequest\x12\x35\n\x04name\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkebackup.googleapis.com/Backup\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xb0\x01\n\x18ListVolumeBackupsRequest\x12\x37\n\x06parent\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkebackup.googleapis.com/Backup\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\"u\n\x19ListVolumeBackupsResponse\x12?\n\x0evolume_backups\x18\x01 \x03(\x0b\x32\'.google.cloud.gkebackup.v1.VolumeBackup\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"U\n\x16GetVolumeBackupRequest\x12;\n\x04name\x18\x01 \x01(\tB-\xe0\x41\x02\xfa\x41\'\n%gkebackup.googleapis.com/VolumeBackup\"\xb6\x01\n\x18\x43reateRestorePlanRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12\x41\n\x0crestore_plan\x18\x02 \x01(\x0b\x32&.google.cloud.gkebackup.v1.RestorePlanB\x03\xe0\x41\x02\x12\x1c\n\x0frestore_plan_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xb1\x01\n\x17ListRestorePlansRequest\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\"\x87\x01\n\x18ListRestorePlansResponse\x12=\n\rrestore_plans\x18\x01 \x03(\x0b\x32&.google.cloud.gkebackup.v1.RestorePlan\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"S\n\x15GetRestorePlanRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$gkebackup.googleapis.com/RestorePlan\"\x93\x01\n\x18UpdateRestorePlanRequest\x12\x41\n\x0crestore_plan\x18\x01 \x01(\x0b\x32&.google.cloud.gkebackup.v1.RestorePlanB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"}\n\x18\x44\x65leteRestorePlanRequest\x12:\n\x04name\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$gkebackup.googleapis.com/RestorePlan\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xc2\x01\n\x1b\x43reateRestoreChannelRequest\x12\x39\n\x06parent\x18\x01 \x01(\tB)\xe0\x41\x02\xfa\x41#\n!locations.googleapis.com/Location\x12G\n\x0frestore_channel\x18\x02 \x01(\x0b\x32).google.cloud.gkebackup.v1.RestoreChannelB\x03\xe0\x41\x02\x12\x1f\n\x12restore_channel_id\x18\x03 \x01(\tB\x03\xe0\x41\x01\"\xb4\x01\n\x1aListRestoreChannelsRequest\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\x1bListRestoreChannelsResponse\x12\x43\n\x10restore_channels\x18\x01 \x03(\x0b\x32).google.cloud.gkebackup.v1.RestoreChannel\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"Y\n\x18GetRestoreChannelRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'gkebackup.googleapis.com/RestoreChannel\"\x9c\x01\n\x1bUpdateRestoreChannelRequest\x12G\n\x0frestore_channel\x18\x01 \x01(\x0b\x32).google.cloud.gkebackup.v1.RestoreChannelB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"o\n\x1b\x44\x65leteRestoreChannelRequest\x12=\n\x04name\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'gkebackup.googleapis.com/RestoreChannel\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\"\xbe\x01\n\x1eListRestorePlanBindingsRequest\x12?\n\x06parent\x18\x01 \x01(\tB/\xe0\x41\x02\xfa\x41)\n\'gkebackup.googleapis.com/RestoreChannel\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\"\xa2\x01\n\x1fListRestorePlanBindingsResponse\x12L\n\x15restore_plan_bindings\x18\x01 \x03(\x0b\x32-.google.cloud.gkebackup.v1.RestorePlanBinding\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x18\n\x0bunreachable\x18\x03 \x03(\tB\x03\xe0\x41\x06\"a\n\x1cGetRestorePlanBindingRequest\x12\x41\n\x04name\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+gkebackup.googleapis.com/RestorePlanBinding\"\xa7\x01\n\x14\x43reateRestoreRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$gkebackup.googleapis.com/RestorePlan\x12\x38\n\x07restore\x18\x02 \x01(\x0b\x32\".google.cloud.gkebackup.v1.RestoreB\x03\xe0\x41\x02\x12\x17\n\nrestore_id\x18\x03 \x01(\tB\x03\xe0\x41\x02\"\xb0\x01\n\x13ListRestoresRequest\x12<\n\x06parent\x18\x01 \x01(\tB,\xe0\x41\x02\xfa\x41&\n$gkebackup.googleapis.com/RestorePlan\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\x14ListRestoresResponse\x12\x34\n\x08restores\x18\x01 \x03(\x0b\x32\".google.cloud.gkebackup.v1.Restore\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\x12\x13\n\x0bunreachable\x18\x03 \x03(\t\"K\n\x11GetRestoreRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkebackup.googleapis.com/Restore\"\x86\x01\n\x14UpdateRestoreRequest\x12\x38\n\x07restore\x18\x01 \x01(\x0b\x32\".google.cloud.gkebackup.v1.RestoreB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x01\"u\n\x14\x44\x65leteRestoreRequest\x12\x36\n\x04name\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkebackup.googleapis.com/Restore\x12\x11\n\x04\x65tag\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05\x66orce\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\"\xb2\x01\n\x19ListVolumeRestoresRequest\x12\x38\n\x06parent\x18\x01 \x01(\tB(\xe0\x41\x02\xfa\x41\"\n gkebackup.googleapis.com/Restore\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\"x\n\x1aListVolumeRestoresResponse\x12\x41\n\x0fvolume_restores\x18\x01 \x03(\x0b\x32(.google.cloud.gkebackup.v1.VolumeRestore\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t\"W\n\x17GetVolumeRestoreRequest\x12<\n\x04name\x18\x01 \x01(\tB.\xe0\x41\x02\xfa\x41(\n&gkebackup.googleapis.com/VolumeRestore\"[\n GetBackupIndexDownloadUrlRequest\x12\x37\n\x06\x62\x61\x63kup\x18\x01 \x01(\tB\'\xe0\x41\x02\xfa\x41!\n\x1fgkebackup.googleapis.com/Backup\"<\n!GetBackupIndexDownloadUrlResponse\x12\x17\n\nsigned_url\x18\x01 \x01(\tB\x03\xe0\x41\x02\x32\xd1\x43\n\x0c\x42\x61\x63kupForGKE\x12\xf2\x01\n\x10\x43reateBackupPlan\x12\x32.google.cloud.gkebackup.v1.CreateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8a\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41!parent,backup_plan,backup_plan_id\x82\xd3\xe4\x93\x02>\"//v1/{parent=projects/*/locations/*}/backupPlans:\x0b\x62\x61\x63kup_plan\x12\xba\x01\n\x0fListBackupPlans\x12\x31.google.cloud.gkebackup.v1.ListBackupPlansRequest\x1a\x32.google.cloud.gkebackup.v1.ListBackupPlansResponse\"@\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x31\x12//v1/{parent=projects/*/locations/*}/backupPlans\x12\xa7\x01\n\rGetBackupPlan\x12/.google.cloud.gkebackup.v1.GetBackupPlanRequest\x1a%.google.cloud.gkebackup.v1.BackupPlan\">\xda\x41\x04name\x82\xd3\xe4\x93\x02\x31\x12//v1/{name=projects/*/locations/*/backupPlans/*}\x12\xf4\x01\n\x10UpdateBackupPlan\x12\x32.google.cloud.gkebackup.v1.UpdateBackupPlanRequest\x1a\x1d.google.longrunning.Operation\"\x8c\x01\xca\x41\x1f\n\nBackupPlan\x12\x11OperationMetadata\xda\x41\x17\x62\x61\x63kup_plan,update_mask\x82\xd3\xe4\x93\x02J2;/v1/{backup_plan.name=projects/*/locations/*/backupPlans/*}:\x0b\x62\x61\x63kup_plan\x12\xd2\x01\n\x10\x44\x65leteBackupPlan\x12\x32.google.cloud.gkebackup.v1.DeleteBackupPlanRequest\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/*/backupPlans/*}\x12\x87\x02\n\x13\x43reateBackupChannel\x12\x35.google.cloud.gkebackup.v1.CreateBackupChannelRequest\x1a\x1d.google.longrunning.Operation\"\x99\x01\xca\x41\"\n\rBackupChannel\x12\x11OperationMetadata\xda\x41\'parent,backup_channel,backup_channel_id\x82\xd3\xe4\x93\x02\x44\"2/v1/{parent=projects/*/locations/*}/backupChannels:\x0e\x62\x61\x63kup_channel\x12\xc6\x01\n\x12ListBackupChannels\x12\x34.google.cloud.gkebackup.v1.ListBackupChannelsRequest\x1a\x35.google.cloud.gkebackup.v1.ListBackupChannelsResponse\"C\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{parent=projects/*/locations/*}/backupChannels\x12\xb3\x01\n\x10GetBackupChannel\x12\x32.google.cloud.gkebackup.v1.GetBackupChannelRequest\x1a(.google.cloud.gkebackup.v1.BackupChannel\"A\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34\x12\x32/v1/{name=projects/*/locations/*/backupChannels/*}\x12\x89\x02\n\x13UpdateBackupChannel\x12\x35.google.cloud.gkebackup.v1.UpdateBackupChannelRequest\x1a\x1d.google.longrunning.Operation\"\x9b\x01\xca\x41\"\n\rBackupChannel\x12\x11OperationMetadata\xda\x41\x1a\x62\x61\x63kup_channel,update_mask\x82\xd3\xe4\x93\x02S2A/v1/{backup_channel.name=projects/*/locations/*/backupChannels/*}:\x0e\x62\x61\x63kup_channel\x12\xdb\x01\n\x13\x44\x65leteBackupChannel\x12\x35.google.cloud.gkebackup.v1.DeleteBackupChannelRequest\x1a\x1d.google.longrunning.Operation\"n\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x34*2/v1/{name=projects/*/locations/*/backupChannels/*}\x12\xe7\x01\n\x16ListBackupPlanBindings\x12\x38.google.cloud.gkebackup.v1.ListBackupPlanBindingsRequest\x1a\x39.google.cloud.gkebackup.v1.ListBackupPlanBindingsResponse\"X\xda\x41\x06parent\x82\xd3\xe4\x93\x02I\x12G/v1/{parent=projects/*/locations/*/backupChannels/*}/backupPlanBindings\x12\xd4\x01\n\x14GetBackupPlanBinding\x12\x36.google.cloud.gkebackup.v1.GetBackupPlanBindingRequest\x1a,.google.cloud.gkebackup.v1.BackupPlanBinding\"V\xda\x41\x04name\x82\xd3\xe4\x93\x02I\x12G/v1/{name=projects/*/locations/*/backupChannels/*/backupPlanBindings/*}\x12\xe1\x01\n\x0c\x43reateBackup\x12..google.cloud.gkebackup.v1.CreateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x81\x01\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x17parent,backup,backup_id\x82\xd3\xe4\x93\x02\x43\"9/v1/{parent=projects/*/locations/*/backupPlans/*}/backups:\x06\x62\x61\x63kup\x12\xb8\x01\n\x0bListBackups\x12-.google.cloud.gkebackup.v1.ListBackupsRequest\x1a..google.cloud.gkebackup.v1.ListBackupsResponse\"J\xda\x41\x06parent\x82\xd3\xe4\x93\x02;\x12\x39/v1/{parent=projects/*/locations/*/backupPlans/*}/backups\x12\xa5\x01\n\tGetBackup\x12+.google.cloud.gkebackup.v1.GetBackupRequest\x1a!.google.cloud.gkebackup.v1.Backup\"H\xda\x41\x04name\x82\xd3\xe4\x93\x02;\x12\x39/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}\x12\xe3\x01\n\x0cUpdateBackup\x12..google.cloud.gkebackup.v1.UpdateBackupRequest\x1a\x1d.google.longrunning.Operation\"\x83\x01\xca\x41\x1b\n\x06\x42\x61\x63kup\x12\x11OperationMetadata\xda\x41\x12\x62\x61\x63kup,update_mask\x82\xd3\xe4\x93\x02J2@/v1/{backup.name=projects/*/locations/*/backupPlans/*/backups/*}:\x06\x62\x61\x63kup\x12\xd4\x01\n\x0c\x44\x65leteBackup\x12..google.cloud.gkebackup.v1.DeleteBackupRequest\x1a\x1d.google.longrunning.Operation\"u\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02;*9/v1/{name=projects/*/locations/*/backupPlans/*/backups/*}\x12\xda\x01\n\x11ListVolumeBackups\x12\x33.google.cloud.gkebackup.v1.ListVolumeBackupsRequest\x1a\x34.google.cloud.gkebackup.v1.ListVolumeBackupsResponse\"Z\xda\x41\x06parent\x82\xd3\xe4\x93\x02K\x12I/v1/{parent=projects/*/locations/*/backupPlans/*/backups/*}/volumeBackups\x12\xc7\x01\n\x0fGetVolumeBackup\x12\x31.google.cloud.gkebackup.v1.GetVolumeBackupRequest\x1a\'.google.cloud.gkebackup.v1.VolumeBackup\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\x12I/v1/{name=projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*}\x12\xf9\x01\n\x11\x43reateRestorePlan\x12\x33.google.cloud.gkebackup.v1.CreateRestorePlanRequest\x1a\x1d.google.longrunning.Operation\"\x8f\x01\xca\x41 \n\x0bRestorePlan\x12\x11OperationMetadata\xda\x41#parent,restore_plan,restore_plan_id\x82\xd3\xe4\x93\x02@\"0/v1/{parent=projects/*/locations/*}/restorePlans:\x0crestore_plan\x12\xbe\x01\n\x10ListRestorePlans\x12\x32.google.cloud.gkebackup.v1.ListRestorePlansRequest\x1a\x33.google.cloud.gkebackup.v1.ListRestorePlansResponse\"A\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{parent=projects/*/locations/*}/restorePlans\x12\xab\x01\n\x0eGetRestorePlan\x12\x30.google.cloud.gkebackup.v1.GetRestorePlanRequest\x1a&.google.cloud.gkebackup.v1.RestorePlan\"?\xda\x41\x04name\x82\xd3\xe4\x93\x02\x32\x12\x30/v1/{name=projects/*/locations/*/restorePlans/*}\x12\xfb\x01\n\x11UpdateRestorePlan\x12\x33.google.cloud.gkebackup.v1.UpdateRestorePlanRequest\x1a\x1d.google.longrunning.Operation\"\x91\x01\xca\x41 \n\x0bRestorePlan\x12\x11OperationMetadata\xda\x41\x18restore_plan,update_mask\x82\xd3\xe4\x93\x02M2=/v1/{restore_plan.name=projects/*/locations/*/restorePlans/*}:\x0crestore_plan\x12\xd5\x01\n\x11\x44\x65leteRestorePlan\x12\x33.google.cloud.gkebackup.v1.DeleteRestorePlanRequest\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/*/restorePlans/*}\x12\x8e\x02\n\x14\x43reateRestoreChannel\x12\x36.google.cloud.gkebackup.v1.CreateRestoreChannelRequest\x1a\x1d.google.longrunning.Operation\"\x9e\x01\xca\x41#\n\x0eRestoreChannel\x12\x11OperationMetadata\xda\x41)parent,restore_channel,restore_channel_id\x82\xd3\xe4\x93\x02\x46\"3/v1/{parent=projects/*/locations/*}/restoreChannels:\x0frestore_channel\x12\xca\x01\n\x13ListRestoreChannels\x12\x35.google.cloud.gkebackup.v1.ListRestoreChannelsRequest\x1a\x36.google.cloud.gkebackup.v1.ListRestoreChannelsResponse\"D\xda\x41\x06parent\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{parent=projects/*/locations/*}/restoreChannels\x12\xb7\x01\n\x11GetRestoreChannel\x12\x33.google.cloud.gkebackup.v1.GetRestoreChannelRequest\x1a).google.cloud.gkebackup.v1.RestoreChannel\"B\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35\x12\x33/v1/{name=projects/*/locations/*/restoreChannels/*}\x12\x90\x02\n\x14UpdateRestoreChannel\x12\x36.google.cloud.gkebackup.v1.UpdateRestoreChannelRequest\x1a\x1d.google.longrunning.Operation\"\xa0\x01\xca\x41#\n\x0eRestoreChannel\x12\x11OperationMetadata\xda\x41\x1brestore_channel,update_mask\x82\xd3\xe4\x93\x02V2C/v1/{restore_channel.name=projects/*/locations/*/restoreChannels/*}:\x0frestore_channel\x12\xde\x01\n\x14\x44\x65leteRestoreChannel\x12\x36.google.cloud.gkebackup.v1.DeleteRestoreChannelRequest\x1a\x1d.google.longrunning.Operation\"o\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02\x35*3/v1/{name=projects/*/locations/*/restoreChannels/*}\x12\xec\x01\n\x17ListRestorePlanBindings\x12\x39.google.cloud.gkebackup.v1.ListRestorePlanBindingsRequest\x1a:.google.cloud.gkebackup.v1.ListRestorePlanBindingsResponse\"Z\xda\x41\x06parent\x82\xd3\xe4\x93\x02K\x12I/v1/{parent=projects/*/locations/*/restoreChannels/*}/restorePlanBindings\x12\xd9\x01\n\x15GetRestorePlanBinding\x12\x37.google.cloud.gkebackup.v1.GetRestorePlanBindingRequest\x1a-.google.cloud.gkebackup.v1.RestorePlanBinding\"X\xda\x41\x04name\x82\xd3\xe4\x93\x02K\x12I/v1/{name=projects/*/locations/*/restoreChannels/*/restorePlanBindings/*}\x12\xe9\x01\n\rCreateRestore\x12/.google.cloud.gkebackup.v1.CreateRestoreRequest\x1a\x1d.google.longrunning.Operation\"\x87\x01\xca\x41\x1c\n\x07Restore\x12\x11OperationMetadata\xda\x41\x19parent,restore,restore_id\x82\xd3\xe4\x93\x02\x46\";/v1/{parent=projects/*/locations/*/restorePlans/*}/restores:\x07restore\x12\xbd\x01\n\x0cListRestores\x12..google.cloud.gkebackup.v1.ListRestoresRequest\x1a/.google.cloud.gkebackup.v1.ListRestoresResponse\"L\xda\x41\x06parent\x82\xd3\xe4\x93\x02=\x12;/v1/{parent=projects/*/locations/*/restorePlans/*}/restores\x12\xaa\x01\n\nGetRestore\x12,.google.cloud.gkebackup.v1.GetRestoreRequest\x1a\".google.cloud.gkebackup.v1.Restore\"J\xda\x41\x04name\x82\xd3\xe4\x93\x02=\x12;/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}\x12\xeb\x01\n\rUpdateRestore\x12/.google.cloud.gkebackup.v1.UpdateRestoreRequest\x1a\x1d.google.longrunning.Operation\"\x89\x01\xca\x41\x1c\n\x07Restore\x12\x11OperationMetadata\xda\x41\x13restore,update_mask\x82\xd3\xe4\x93\x02N2C/v1/{restore.name=projects/*/locations/*/restorePlans/*/restores/*}:\x07restore\x12\xd8\x01\n\rDeleteRestore\x12/.google.cloud.gkebackup.v1.DeleteRestoreRequest\x1a\x1d.google.longrunning.Operation\"w\xca\x41*\n\x15google.protobuf.Empty\x12\x11OperationMetadata\xda\x41\x04name\x82\xd3\xe4\x93\x02=*;/v1/{name=projects/*/locations/*/restorePlans/*/restores/*}\x12\xe0\x01\n\x12ListVolumeRestores\x12\x34.google.cloud.gkebackup.v1.ListVolumeRestoresRequest\x1a\x35.google.cloud.gkebackup.v1.ListVolumeRestoresResponse\"]\xda\x41\x06parent\x82\xd3\xe4\x93\x02N\x12L/v1/{parent=projects/*/locations/*/restorePlans/*/restores/*}/volumeRestores\x12\xcd\x01\n\x10GetVolumeRestore\x12\x32.google.cloud.gkebackup.v1.GetVolumeRestoreRequest\x1a(.google.cloud.gkebackup.v1.VolumeRestore\"[\xda\x41\x04name\x82\xd3\xe4\x93\x02N\x12L/v1/{name=projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*}\x12\xfe\x01\n\x19GetBackupIndexDownloadUrl\x12;.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest\x1a<.google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlResponse\"f\xda\x41\x06\x62\x61\x63kup\x82\xd3\xe4\x93\x02W\x12U/v1/{backup=projects/*/locations/*/backupPlans/*/backups/*}:getBackupIndexDownloadUrl\x1aL\xca\x41\x18gkebackup.googleapis.com\xd2\x41.https://www.googleapis.com/auth/cloud-platformB\xa1\x03\n\x1d\x63om.google.cloud.gkebackup.v1B\x0eGKEBackupProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1\xea\x41^\n container.googleapis.com/Cluster\x12:projects/{project}/locations/{location}/clusters/{cluster}\xea\x41x\n!cloudkms.googleapis.com/CryptoKey\x12Sprojects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}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.cloud.gkebackup.v1.BackupPlan", "google/cloud/gkebackup/v1/backup_plan.proto"], - ["google.protobuf.FieldMask", "google/protobuf/field_mask.proto"], - ["google.cloud.gkebackup.v1.BackupChannel", "google/cloud/gkebackup/v1/backup_channel.proto"], - ["google.cloud.gkebackup.v1.BackupPlanBinding", "google/cloud/gkebackup/v1/backup_plan_binding.proto"], - ["google.cloud.gkebackup.v1.Backup", "google/cloud/gkebackup/v1/backup.proto"], - ["google.cloud.gkebackup.v1.VolumeBackup", "google/cloud/gkebackup/v1/volume.proto"], - ["google.cloud.gkebackup.v1.RestorePlan", "google/cloud/gkebackup/v1/restore_plan.proto"], - ["google.cloud.gkebackup.v1.RestoreChannel", "google/cloud/gkebackup/v1/restore_channel.proto"], - ["google.cloud.gkebackup.v1.RestorePlanBinding", "google/cloud/gkebackup/v1/restore_plan_binding.proto"], - ["google.cloud.gkebackup.v1.Restore", "google/cloud/gkebackup/v1/restore.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GkeBackup - module V1 - OperationMetadata = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.OperationMetadata").msgclass - CreateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.CreateBackupPlanRequest").msgclass - ListBackupPlansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupPlansRequest").msgclass - ListBackupPlansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupPlansResponse").msgclass - GetBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetBackupPlanRequest").msgclass - UpdateBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.UpdateBackupPlanRequest").msgclass - DeleteBackupPlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.DeleteBackupPlanRequest").msgclass - CreateBackupChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.CreateBackupChannelRequest").msgclass - ListBackupChannelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupChannelsRequest").msgclass - ListBackupChannelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupChannelsResponse").msgclass - GetBackupChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetBackupChannelRequest").msgclass - UpdateBackupChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.UpdateBackupChannelRequest").msgclass - DeleteBackupChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.DeleteBackupChannelRequest").msgclass - ListBackupPlanBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupPlanBindingsRequest").msgclass - ListBackupPlanBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupPlanBindingsResponse").msgclass - GetBackupPlanBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetBackupPlanBindingRequest").msgclass - CreateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.CreateBackupRequest").msgclass - ListBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupsRequest").msgclass - ListBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListBackupsResponse").msgclass - GetBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetBackupRequest").msgclass - UpdateBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.UpdateBackupRequest").msgclass - DeleteBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.DeleteBackupRequest").msgclass - ListVolumeBackupsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListVolumeBackupsRequest").msgclass - ListVolumeBackupsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListVolumeBackupsResponse").msgclass - GetVolumeBackupRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetVolumeBackupRequest").msgclass - CreateRestorePlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.CreateRestorePlanRequest").msgclass - ListRestorePlansRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestorePlansRequest").msgclass - ListRestorePlansResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestorePlansResponse").msgclass - GetRestorePlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetRestorePlanRequest").msgclass - UpdateRestorePlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.UpdateRestorePlanRequest").msgclass - DeleteRestorePlanRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.DeleteRestorePlanRequest").msgclass - CreateRestoreChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.CreateRestoreChannelRequest").msgclass - ListRestoreChannelsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestoreChannelsRequest").msgclass - ListRestoreChannelsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestoreChannelsResponse").msgclass - GetRestoreChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetRestoreChannelRequest").msgclass - UpdateRestoreChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.UpdateRestoreChannelRequest").msgclass - DeleteRestoreChannelRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.DeleteRestoreChannelRequest").msgclass - ListRestorePlanBindingsRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestorePlanBindingsRequest").msgclass - ListRestorePlanBindingsResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestorePlanBindingsResponse").msgclass - GetRestorePlanBindingRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetRestorePlanBindingRequest").msgclass - CreateRestoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.CreateRestoreRequest").msgclass - ListRestoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestoresRequest").msgclass - ListRestoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListRestoresResponse").msgclass - GetRestoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetRestoreRequest").msgclass - UpdateRestoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.UpdateRestoreRequest").msgclass - DeleteRestoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.DeleteRestoreRequest").msgclass - ListVolumeRestoresRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListVolumeRestoresRequest").msgclass - ListVolumeRestoresResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ListVolumeRestoresResponse").msgclass - GetVolumeRestoreRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetVolumeRestoreRequest").msgclass - GetBackupIndexDownloadUrlRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlRequest").msgclass - GetBackupIndexDownloadUrlResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.GetBackupIndexDownloadUrlResponse").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_services_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_services_pb.rb deleted file mode 100644 index 6f86aab972cb..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/gkebackup_services_pb.rb +++ /dev/null @@ -1,122 +0,0 @@ -# Generated by the protocol buffer compiler. DO NOT EDIT! -# Source: google/cloud/gkebackup/v1/gkebackup.proto for package 'Google.Cloud.GkeBackup.V1' -# Original file comments: -# Copyright 2025 Google LLC -# -# Licensed under the Apache License, Version 2.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/gkebackup/v1/gkebackup_pb' - -module Google - module Cloud - module GkeBackup - module V1 - module BackupForGKE - # BackupForGKE allows Kubernetes administrators to configure, execute, and - # manage backup and restore operations for their GKE clusters. - class Service - - include ::GRPC::GenericService - - self.marshal_class_method = :encode - self.unmarshal_class_method = :decode - self.service_name = 'google.cloud.gkebackup.v1.BackupForGKE' - - # Creates a new BackupPlan in a given location. - rpc :CreateBackupPlan, ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest, ::Google::Longrunning::Operation - # Lists BackupPlans in a given location. - rpc :ListBackupPlans, ::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest, ::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse - # Retrieve the details of a single BackupPlan. - rpc :GetBackupPlan, ::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest, ::Google::Cloud::GkeBackup::V1::BackupPlan - # Update a BackupPlan. - rpc :UpdateBackupPlan, ::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest, ::Google::Longrunning::Operation - # Deletes an existing BackupPlan. - rpc :DeleteBackupPlan, ::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest, ::Google::Longrunning::Operation - # Creates a new BackupChannel in a given location. - rpc :CreateBackupChannel, ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest, ::Google::Longrunning::Operation - # Lists BackupChannels in a given location. - rpc :ListBackupChannels, ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest, ::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse - # Retrieve the details of a single BackupChannel. - rpc :GetBackupChannel, ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest, ::Google::Cloud::GkeBackup::V1::BackupChannel - # Update a BackupChannel. - rpc :UpdateBackupChannel, ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest, ::Google::Longrunning::Operation - # Deletes an existing BackupChannel. - rpc :DeleteBackupChannel, ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest, ::Google::Longrunning::Operation - # Lists BackupPlanBindings in a given location. - rpc :ListBackupPlanBindings, ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest, ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse - # Retrieve the details of a single BackupPlanBinding. - rpc :GetBackupPlanBinding, ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest, ::Google::Cloud::GkeBackup::V1::BackupPlanBinding - # Creates a Backup for the given BackupPlan. - rpc :CreateBackup, ::Google::Cloud::GkeBackup::V1::CreateBackupRequest, ::Google::Longrunning::Operation - # Lists the Backups for a given BackupPlan. - rpc :ListBackups, ::Google::Cloud::GkeBackup::V1::ListBackupsRequest, ::Google::Cloud::GkeBackup::V1::ListBackupsResponse - # Retrieve the details of a single Backup. - rpc :GetBackup, ::Google::Cloud::GkeBackup::V1::GetBackupRequest, ::Google::Cloud::GkeBackup::V1::Backup - # Update a Backup. - rpc :UpdateBackup, ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest, ::Google::Longrunning::Operation - # Deletes an existing Backup. - rpc :DeleteBackup, ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest, ::Google::Longrunning::Operation - # Lists the VolumeBackups for a given Backup. - rpc :ListVolumeBackups, ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse - # Retrieve the details of a single VolumeBackup. - rpc :GetVolumeBackup, ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, ::Google::Cloud::GkeBackup::V1::VolumeBackup - # Creates a new RestorePlan in a given location. - rpc :CreateRestorePlan, ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, ::Google::Longrunning::Operation - # Lists RestorePlans in a given location. - rpc :ListRestorePlans, ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, ::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse - # Retrieve the details of a single RestorePlan. - rpc :GetRestorePlan, ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, ::Google::Cloud::GkeBackup::V1::RestorePlan - # Update a RestorePlan. - rpc :UpdateRestorePlan, ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, ::Google::Longrunning::Operation - # Deletes an existing RestorePlan. - rpc :DeleteRestorePlan, ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, ::Google::Longrunning::Operation - # Creates a new RestoreChannel in a given location. - rpc :CreateRestoreChannel, ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest, ::Google::Longrunning::Operation - # Lists RestoreChannels in a given location. - rpc :ListRestoreChannels, ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest, ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse - # Retrieve the details of a single RestoreChannel. - rpc :GetRestoreChannel, ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest, ::Google::Cloud::GkeBackup::V1::RestoreChannel - # Update a RestoreChannel. - rpc :UpdateRestoreChannel, ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest, ::Google::Longrunning::Operation - # Deletes an existing RestoreChannel. - rpc :DeleteRestoreChannel, ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest, ::Google::Longrunning::Operation - # Lists RestorePlanBindings in a given location. - rpc :ListRestorePlanBindings, ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest, ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse - # Retrieve the details of a single RestorePlanBinding. - rpc :GetRestorePlanBinding, ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest, ::Google::Cloud::GkeBackup::V1::RestorePlanBinding - # Creates a new Restore for the given RestorePlan. - rpc :CreateRestore, ::Google::Cloud::GkeBackup::V1::CreateRestoreRequest, ::Google::Longrunning::Operation - # Lists the Restores for a given RestorePlan. - rpc :ListRestores, ::Google::Cloud::GkeBackup::V1::ListRestoresRequest, ::Google::Cloud::GkeBackup::V1::ListRestoresResponse - # Retrieves the details of a single Restore. - rpc :GetRestore, ::Google::Cloud::GkeBackup::V1::GetRestoreRequest, ::Google::Cloud::GkeBackup::V1::Restore - # Update a Restore. - rpc :UpdateRestore, ::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest, ::Google::Longrunning::Operation - # Deletes an existing Restore. - rpc :DeleteRestore, ::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest, ::Google::Longrunning::Operation - # Lists the VolumeRestores for a given Restore. - rpc :ListVolumeRestores, ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest, ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse - # Retrieve the details of a single VolumeRestore. - rpc :GetVolumeRestore, ::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest, ::Google::Cloud::GkeBackup::V1::VolumeRestore - # Retrieve the link to the backupIndex. - rpc :GetBackupIndexDownloadUrl, ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest, ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse - end - - Stub = Service.rpc_stub_class - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_channel_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_channel_pb.rb deleted file mode 100644 index 9171f3c8b4cf..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_channel_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkebackup/v1/restore_channel.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n/google/cloud/gkebackup/v1/restore_channel.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb7\x04\n\x0eRestoreChannel\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x08\x12#\n\x13\x64\x65stination_project\x18\x02 \x01(\tB\x06\xe0\x41\x05\xe0\x41\x02\x12\x18\n\x03uid\x18\x03 \x01(\tB\x0b\xe0\x41\x03\xe2\x8c\xcf\xd7\x08\x02\x08\x01\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\x12J\n\x06labels\x18\x06 \x03(\x0b\x32\x35.google.cloud.gkebackup.v1.RestoreChannel.LabelsEntryB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x07 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\x08 \x01(\tB\x03\xe0\x41\x03\x12#\n\x16\x64\x65stination_project_id\x18\t \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:\x99\x01\xea\x41\x95\x01\n\'gkebackup.googleapis.com/RestoreChannel\x12Iprojects/{project}/locations/{location}/restoreChannels/{restore_channel}*\x0frestoreChannels2\x0erestoreChannelB\xca\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x13RestoreChannelProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GkeBackup - module V1 - RestoreChannel = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreChannel").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_pb.rb deleted file mode 100644 index 4d6232bd18d3..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_pb.rb +++ /dev/null @@ -1,67 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkebackup/v1/restore.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/gkebackup/v1/common_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n\'google/cloud/gkebackup/v1/restore.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/gkebackup/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xee\n\n\x07Restore\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\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:\n\x06\x62\x61\x63kup\x18\x06 \x01(\tB*\xe0\x41\x05\xe0\x41\x02\xfa\x41!\n\x1fgkebackup.googleapis.com/Backup\x12\x39\n\x07\x63luster\x18\x07 \x01(\tB(\xe0\x41\x03\xfa\x41\"\n container.googleapis.com/Cluster\x12\x45\n\x0erestore_config\x18\x08 \x01(\x0b\x32(.google.cloud.gkebackup.v1.RestoreConfigB\x03\xe0\x41\x03\x12>\n\x06labels\x18\t \x03(\x0b\x32..google.cloud.gkebackup.v1.Restore.LabelsEntry\x12<\n\x05state\x18\n \x01(\x0e\x32(.google.cloud.gkebackup.v1.Restore.StateB\x03\xe0\x41\x03\x12\x19\n\x0cstate_reason\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\x0c \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12%\n\x18resources_restored_count\x18\r \x01(\x05\x42\x03\xe0\x41\x03\x12%\n\x18resources_excluded_count\x18\x0e \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16resources_failed_count\x18\x0f \x01(\x05\x42\x03\xe0\x41\x03\x12#\n\x16volumes_restored_count\x18\x10 \x01(\x05\x42\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x11 \x01(\tB\x03\xe0\x41\x03\x12\x41\n\x06\x66ilter\x18\x12 \x01(\x0b\x32).google.cloud.gkebackup.v1.Restore.FilterB\x06\xe0\x41\x05\xe0\x41\x01\x12p\n$volume_data_restore_policy_overrides\x18\x13 \x03(\x0b\x32:.google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverrideB\x06\xe0\x41\x05\xe0\x41\x01\x1a\xa2\x01\n\x06\x46ilter\x12K\n\x11inclusion_filters\x18\x01 \x03(\x0b\x32+.google.cloud.gkebackup.v1.ResourceSelectorB\x03\xe0\x41\x01\x12K\n\x11\x65xclusion_filters\x18\x02 \x03(\x0b\x32+.google.cloud.gkebackup.v1.ResourceSelectorB\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\"v\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x0f\n\x0bIN_PROGRESS\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05\x12\x0e\n\nVALIDATING\x10\x06:}\xea\x41z\n gkebackup.googleapis.com/Restore\x12Vprojects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}\"\xef\x1a\n\rRestoreConfig\x12i\n\x1avolume_data_restore_policy\x18\x01 \x01(\x0e\x32@.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyB\x03\xe0\x41\x01\x12u\n cluster_resource_conflict_policy\x18\x02 \x01(\x0e\x32\x46.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicyB\x03\xe0\x41\x01\x12u\n namespaced_resource_restore_mode\x18\x03 \x01(\x0e\x32\x46.google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreModeB\x03\xe0\x41\x01\x12q\n\x1e\x63luster_resource_restore_scope\x18\x04 \x01(\x0b\x32\x44.google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScopeB\x03\xe0\x41\x01\x12\x18\n\x0e\x61ll_namespaces\x18\x05 \x01(\x08H\x00\x12\x44\n\x13selected_namespaces\x18\x06 \x01(\x0b\x32%.google.cloud.gkebackup.v1.NamespacesH\x00\x12K\n\x15selected_applications\x18\x07 \x01(\x0b\x32*.google.cloud.gkebackup.v1.NamespacedNamesH\x00\x12\x17\n\rno_namespaces\x18\t \x01(\x08H\x00\x12\x44\n\x13\x65xcluded_namespaces\x18\n \x01(\x0b\x32%.google.cloud.gkebackup.v1.NamespacesH\x00\x12Z\n\x12substitution_rules\x18\x08 \x03(\x0b\x32\x39.google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRuleB\x03\xe0\x41\x01\x12^\n\x14transformation_rules\x18\x0b \x03(\x0b\x32;.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleB\x03\xe0\x41\x01\x12y\n#volume_data_restore_policy_bindings\x18\x0c \x03(\x0b\x32G.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBindingB\x03\xe0\x41\x01\x12Q\n\rrestore_order\x18\r \x01(\x0b\x32\x35.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrderB\x03\xe0\x41\x01\x1a\x44\n\tGroupKind\x12\x1b\n\x0eresource_group\x18\x01 \x01(\tB\x03\xe0\x41\x01\x12\x1a\n\rresource_kind\x18\x02 \x01(\tB\x03\xe0\x41\x01\x1a\x86\x02\n\x1b\x43lusterResourceRestoreScope\x12U\n\x14selected_group_kinds\x18\x01 \x03(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x01\x12U\n\x14\x65xcluded_group_kinds\x18\x02 \x03(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x01\x12\x1c\n\x0f\x61ll_group_kinds\x18\x03 \x01(\x08\x42\x03\xe0\x41\x01\x12\x1b\n\x0eno_group_kinds\x18\x04 \x01(\x08\x42\x03\xe0\x41\x01\x1a\xe3\x01\n\x10SubstitutionRule\x12\x1e\n\x11target_namespaces\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12S\n\x12target_group_kinds\x18\x02 \x03(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x01\x12\x1d\n\x10target_json_path\x18\x03 \x01(\tB\x03\xe0\x41\x02\x12#\n\x16original_value_pattern\x18\x04 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tnew_value\x18\x05 \x01(\tB\x03\xe0\x41\x01\x1a\x8a\x02\n\x18TransformationRuleAction\x12U\n\x02op\x18\x01 \x01(\x0e\x32\x44.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.OpB\x03\xe0\x41\x02\x12\x16\n\tfrom_path\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x11\n\x04path\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12\x12\n\x05value\x18\x04 \x01(\tB\x03\xe0\x41\x01\"X\n\x02Op\x12\x12\n\x0eOP_UNSPECIFIED\x10\x00\x12\n\n\x06REMOVE\x10\x01\x12\x08\n\x04MOVE\x10\x02\x12\x08\n\x04\x43OPY\x10\x03\x12\x07\n\x03\x41\x44\x44\x10\x04\x12\x08\n\x04TEST\x10\x05\x12\x0b\n\x07REPLACE\x10\x06\x1a\x8f\x01\n\x0eResourceFilter\x12\x17\n\nnamespaces\x18\x01 \x03(\tB\x03\xe0\x41\x01\x12L\n\x0bgroup_kinds\x18\x02 \x03(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x01\x12\x16\n\tjson_path\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\xe4\x01\n\x12TransformationRule\x12]\n\rfield_actions\x18\x01 \x03(\x0b\x32\x41.google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleActionB\x03\xe0\x41\x02\x12U\n\x0fresource_filter\x18\x02 \x01(\x0b\x32\x37.google.cloud.gkebackup.v1.RestoreConfig.ResourceFilterB\x03\xe0\x41\x01\x12\x18\n\x0b\x64\x65scription\x18\x03 \x01(\tB\x03\xe0\x41\x01\x1a\xcd\x01\n\x1eVolumeDataRestorePolicyBinding\x12U\n\x06policy\x18\x01 \x01(\x0e\x32@.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyB\x03\xe0\x41\x02\x12K\n\x0bvolume_type\x18\x02 \x01(\x0e\x32\x34.google.cloud.gkebackup.v1.VolumeTypeEnum.VolumeTypeH\x00\x42\x07\n\x05scope\x1a\xb0\x02\n\x0cRestoreOrder\x12o\n\x17group_kind_dependencies\x18\x01 \x03(\x0b\x32I.google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependencyB\x03\xe0\x41\x01\x1a\xae\x01\n\x13GroupKindDependency\x12K\n\nsatisfying\x18\x01 \x01(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x02\x12J\n\trequiring\x18\x02 \x01(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x02\"\xaf\x01\n\x17VolumeDataRestorePolicy\x12*\n&VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED\x10\x00\x12#\n\x1fRESTORE_VOLUME_DATA_FROM_BACKUP\x10\x01\x12#\n\x1fREUSE_VOLUME_HANDLE_FROM_BACKUP\x10\x02\x12\x1e\n\x1aNO_VOLUME_DATA_RESTORATION\x10\x03\"\x83\x01\n\x1d\x43lusterResourceConflictPolicy\x12\x30\n,CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED\x10\x00\x12\x18\n\x14USE_EXISTING_VERSION\x10\x01\x12\x16\n\x12USE_BACKUP_VERSION\x10\x02\"\xe0\x01\n\x1dNamespacedResourceRestoreMode\x12\x30\n,NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED\x10\x00\x12\x16\n\x12\x44\x45LETE_AND_RESTORE\x10\x01\x12\x14\n\x10\x46\x41IL_ON_CONFLICT\x10\x02\x12\x1a\n\x16MERGE_SKIP_ON_CONFLICT\x10\x03\x12$\n MERGE_REPLACE_VOLUME_ON_CONFLICT\x10\x04\x12\x1d\n\x19MERGE_REPLACE_ON_CONFLICT\x10\x05\x42#\n!namespaced_resource_restore_scope\"\x87\x02\n\x10ResourceSelector\x12K\n\ngroup_kind\x18\x01 \x01(\x0b\x32\x32.google.cloud.gkebackup.v1.RestoreConfig.GroupKindB\x03\xe0\x41\x01\x12\x11\n\x04name\x18\x02 \x01(\tB\x03\xe0\x41\x01\x12\x16\n\tnamespace\x18\x03 \x01(\tB\x03\xe0\x41\x01\x12L\n\x06labels\x18\x04 \x03(\x0b\x32\x37.google.cloud.gkebackup.v1.ResourceSelector.LabelsEntryB\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\"\xc6\x01\n\x1fVolumeDataRestorePolicyOverride\x12U\n\x06policy\x18\x01 \x01(\x0e\x32@.google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyB\x03\xe0\x41\x02\x12\x43\n\rselected_pvcs\x18\x02 \x01(\x0b\x32*.google.cloud.gkebackup.v1.NamespacedNamesH\x00\x42\x07\n\x05scopeB\xc3\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x0cRestoreProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.gkebackup.v1.Namespaces", "google/cloud/gkebackup/v1/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 - -module Google - module Cloud - module GkeBackup - module V1 - Restore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Restore").msgclass - Restore::Filter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Restore.Filter").msgclass - Restore::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.Restore.State").enummodule - RestoreConfig = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig").msgclass - RestoreConfig::GroupKind = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.GroupKind").msgclass - RestoreConfig::ClusterResourceRestoreScope = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceRestoreScope").msgclass - RestoreConfig::SubstitutionRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.SubstitutionRule").msgclass - RestoreConfig::TransformationRuleAction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction").msgclass - RestoreConfig::TransformationRuleAction::Op = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.TransformationRuleAction.Op").enummodule - RestoreConfig::ResourceFilter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.ResourceFilter").msgclass - RestoreConfig::TransformationRule = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.TransformationRule").msgclass - RestoreConfig::VolumeDataRestorePolicyBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicyBinding").msgclass - RestoreConfig::RestoreOrder = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder").msgclass - RestoreConfig::RestoreOrder::GroupKindDependency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.RestoreOrder.GroupKindDependency").msgclass - RestoreConfig::VolumeDataRestorePolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.VolumeDataRestorePolicy").enummodule - RestoreConfig::ClusterResourceConflictPolicy = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.ClusterResourceConflictPolicy").enummodule - RestoreConfig::NamespacedResourceRestoreMode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestoreConfig.NamespacedResourceRestoreMode").enummodule - ResourceSelector = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.ResourceSelector").msgclass - VolumeDataRestorePolicyOverride = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeDataRestorePolicyOverride").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_binding_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_binding_pb.rb deleted file mode 100644 index faad4f1fe4d7..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_binding_pb.rb +++ /dev/null @@ -1,48 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkebackup/v1/restore_plan_binding.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/field_info_pb' -require 'google/api/resource_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n4google/cloud/gkebackup/v1/restore_plan_binding.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x1bgoogle/api/field_info.proto\x1a\x19google/api/resource.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x99\x04\n\x12RestorePlanBinding\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\x42\n\x0crestore_plan\x18\x05 \x01(\tB,\xe0\x41\x03\xfa\x41&\n$gkebackup.googleapis.com/RestorePlan\x12\x11\n\x04\x65tag\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12@\n\x0b\x62\x61\x63kup_plan\x18\x07 \x01(\tB+\xe0\x41\x03\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan:\xd0\x01\xea\x41\xcc\x01\n+gkebackup.googleapis.com/RestorePlanBinding\x12tprojects/{project}/locations/{location}/restoreChannels/{restore_channel}/restorePlanBindings/{restore_plan_binding}*\x13restorePlanBindings2\x12restorePlanBindingB\xce\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x17RestorePlanBindingProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GkeBackup - module V1 - RestorePlanBinding = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestorePlanBinding").msgclass - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_pb.rb deleted file mode 100644 index f97faadb07ae..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/restore_plan_pb.rb +++ /dev/null @@ -1,50 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkebackup/v1/restore_plan.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/gkebackup/v1/restore_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n,google/cloud/gkebackup/v1/restore_plan.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\'google/cloud/gkebackup/v1/restore.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xfe\x06\n\x0bRestorePlan\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\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\x43\n\x0b\x62\x61\x63kup_plan\x18\x06 \x01(\tB.\xe0\x41\x05\xe0\x41\x02\xfa\x41%\n#gkebackup.googleapis.com/BackupPlan\x12<\n\x07\x63luster\x18\x07 \x01(\tB+\xe0\x41\x05\xe0\x41\x02\xfa\x41\"\n container.googleapis.com/Cluster\x12\x45\n\x0erestore_config\x18\x08 \x01(\x0b\x32(.google.cloud.gkebackup.v1.RestoreConfigB\x03\xe0\x41\x02\x12G\n\x06labels\x18\t \x03(\x0b\x32\x32.google.cloud.gkebackup.v1.RestorePlan.LabelsEntryB\x03\xe0\x41\x01\x12\x11\n\x04\x65tag\x18\n \x01(\tB\x03\xe0\x41\x03\x12@\n\x05state\x18\x0b \x01(\x0e\x32,.google.cloud.gkebackup.v1.RestorePlan.StateB\x03\xe0\x41\x03\x12\x19\n\x0cstate_reason\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12H\n\x0frestore_channel\x18\r \x01(\tB/\xe0\x41\x03\xfa\x41)\n\'gkebackup.googleapis.com/RestoreChannel\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"X\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x13\n\x0f\x43LUSTER_PENDING\x10\x01\x12\t\n\x05READY\x10\x02\x12\n\n\x06\x46\x41ILED\x10\x03\x12\x0c\n\x08\x44\x45LETING\x10\x04:n\xea\x41k\n$gkebackup.googleapis.com/RestorePlan\x12\x43projects/{project}/locations/{location}/restorePlans/{restore_plan}B\xc7\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x10RestorePlanProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.gkebackup.v1.RestoreConfig", "google/cloud/gkebackup/v1/restore.proto"], - ] - imports.each do |type_name, expected_filename| - import_file = pool.lookup(type_name).file_descriptor - if import_file.name != expected_filename - warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}" - end - end - warn "Each proto file must use a consistent fully-qualified name." - warn "This will become an error in the next major version." -end - -module Google - module Cloud - module GkeBackup - module V1 - RestorePlan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestorePlan").msgclass - RestorePlan::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.RestorePlan.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/volume_pb.rb b/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/volume_pb.rb deleted file mode 100644 index 3a79c075afb1..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/lib/google/cloud/gkebackup/v1/volume_pb.rb +++ /dev/null @@ -1,54 +0,0 @@ -# frozen_string_literal: true -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: google/cloud/gkebackup/v1/volume.proto - -require 'google/protobuf' - -require 'google/api/field_behavior_pb' -require 'google/api/resource_pb' -require 'google/cloud/gkebackup/v1/common_pb' -require 'google/protobuf/timestamp_pb' - - -descriptor_data = "\n&google/cloud/gkebackup/v1/volume.proto\x12\x19google.cloud.gkebackup.v1\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a&google/cloud/gkebackup/v1/common.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xf1\x07\n\x0cVolumeBackup\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\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\x42\n\nsource_pvc\x18\x05 \x01(\x0b\x32).google.cloud.gkebackup.v1.NamespacedNameB\x03\xe0\x41\x03\x12!\n\x14volume_backup_handle\x18\x06 \x01(\tB\x03\xe0\x41\x03\x12O\n\x06\x66ormat\x18\x07 \x01(\x0e\x32:.google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormatB\x03\xe0\x41\x03\x12\x1a\n\rstorage_bytes\x18\x08 \x01(\x03\x42\x03\xe0\x41\x03\x12\x1c\n\x0f\x64isk_size_bytes\x18\t \x01(\x03\x42\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\n \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x41\n\x05state\x18\x0b \x01(\x0e\x32-.google.cloud.gkebackup.v1.VolumeBackup.StateB\x03\xe0\x41\x03\x12\x1a\n\rstate_message\x18\x0c \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\r \x01(\tB\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzs\x18\x0e \x01(\x08\x42\x03\xe0\x41\x03\x12\x1a\n\rsatisfies_pzi\x18\x0f \x01(\x08\x42\x03\xe0\x41\x03\"S\n\x12VolumeBackupFormat\x12$\n VOLUME_BACKUP_FORMAT_UNSPECIFIED\x10\x00\x12\x17\n\x13GCE_PERSISTENT_DISK\x10\x01\"\x86\x01\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\x10\n\x0cSNAPSHOTTING\x10\x02\x12\r\n\tUPLOADING\x10\x03\x12\r\n\tSUCCEEDED\x10\x04\x12\n\n\x06\x46\x41ILED\x10\x05\x12\x0c\n\x08\x44\x45LETING\x10\x06\x12\x0e\n\nCLEANED_UP\x10\x07:\x9d\x01\xea\x41\x99\x01\n%gkebackup.googleapis.com/VolumeBackup\x12pprojects/{project}/locations/{location}/backupPlans/{backup_plan}/backups/{backup}/volumeBackups/{volume_backup}\"\xe7\x06\n\rVolumeRestore\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x03\x12\x10\n\x03uid\x18\x02 \x01(\tB\x03\xe0\x41\x03\x12\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\x1a\n\rvolume_backup\x18\x05 \x01(\tB\x03\xe0\x41\x03\x12\x42\n\ntarget_pvc\x18\x06 \x01(\x0b\x32).google.cloud.gkebackup.v1.NamespacedNameB\x03\xe0\x41\x03\x12\x1a\n\rvolume_handle\x18\x07 \x01(\tB\x03\xe0\x41\x03\x12M\n\x0bvolume_type\x18\x08 \x01(\x0e\x32\x33.google.cloud.gkebackup.v1.VolumeRestore.VolumeTypeB\x03\xe0\x41\x03\x12\x36\n\rcomplete_time\x18\t \x01(\x0b\x32\x1a.google.protobuf.TimestampB\x03\xe0\x41\x03\x12\x42\n\x05state\x18\n \x01(\x0e\x32..google.cloud.gkebackup.v1.VolumeRestore.StateB\x03\xe0\x41\x03\x12\x1a\n\rstate_message\x18\x0b \x01(\tB\x03\xe0\x41\x03\x12\x11\n\x04\x65tag\x18\x0c \x01(\tB\x03\xe0\x41\x03\"B\n\nVolumeType\x12\x1b\n\x17VOLUME_TYPE_UNSPECIFIED\x10\x00\x12\x17\n\x13GCE_PERSISTENT_DISK\x10\x01\"d\n\x05State\x12\x15\n\x11STATE_UNSPECIFIED\x10\x00\x12\x0c\n\x08\x43REATING\x10\x01\x12\r\n\tRESTORING\x10\x02\x12\r\n\tSUCCEEDED\x10\x03\x12\n\n\x06\x46\x41ILED\x10\x04\x12\x0c\n\x08\x44\x45LETING\x10\x05:\xa4\x01\xea\x41\xa0\x01\n&gkebackup.googleapis.com/VolumeRestore\x12vprojects/{project}/locations/{location}/restorePlans/{restore_plan}/restores/{restore}/volumeRestores/{volume_restore}B\xc2\x01\n\x1d\x63om.google.cloud.gkebackup.v1B\x0bVolumeProtoP\x01Z;cloud.google.com/go/gkebackup/apiv1/gkebackuppb;gkebackuppb\xaa\x02\x19Google.Cloud.GkeBackup.V1\xca\x02\x19Google\\Cloud\\GkeBackup\\V1\xea\x02\x1cGoogle::Cloud::GkeBackup::V1b\x06proto3" - -pool = Google::Protobuf::DescriptorPool.generated_pool - -begin - pool.add_serialized_file(descriptor_data) -rescue TypeError - # Compatibility code: will be removed in the next major version. - require 'google/protobuf/descriptor_pb' - parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data) - parsed.clear_dependency - serialized = parsed.class.encode(parsed) - file = pool.add_serialized_file(serialized) - warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}" - imports = [ - ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"], - ["google.cloud.gkebackup.v1.NamespacedName", "google/cloud/gkebackup/v1/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 - -module Google - module Cloud - module GkeBackup - module V1 - VolumeBackup = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeBackup").msgclass - VolumeBackup::VolumeBackupFormat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeBackup.VolumeBackupFormat").enummodule - VolumeBackup::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeBackup.State").enummodule - VolumeRestore = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeRestore").msgclass - VolumeRestore::VolumeType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeRestore.VolumeType").enummodule - VolumeRestore::State = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.cloud.gkebackup.v1.VolumeRestore.State").enummodule - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/README.md b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/README.md deleted file mode 100644 index 755f1ad7e94e..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Backup for GKE 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-gke_backup-v1/proto_docs/google/api/client.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/client.rb deleted file mode 100644 index d59ba51a5612..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/api/field_behavior.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/field_behavior.rb deleted file mode 100644 index 582be187d115..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/api/field_info.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/field_info.rb deleted file mode 100644 index 0f5acf0a5538..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/api/launch_stage.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/launch_stage.rb deleted file mode 100644 index 9392a413fb1b..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/api/resource.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/api/resource.rb deleted file mode 100644 index 25dec4847ac1..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup.rb deleted file mode 100644 index 746ed529579e..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup.rb +++ /dev/null @@ -1,264 +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 GkeBackup - module V1 - # Represents a request to perform a single point-in-time capture of - # some portion of the state of a GKE cluster, the record of the backup - # operation itself, and an anchor for the underlying artifacts that - # comprise the Backup (the config backup and VolumeBackups). - # @!attribute [r] name - # @return [::String] - # Output only. The fully qualified name of the Backup. - # `projects/*/locations/*/backupPlans/*/backups/*` - # @!attribute [r] uid - # @return [::String] - # Output only. Server generated global unique identifier of - # [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this Backup resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this Backup resource was last updated. - # @!attribute [r] manual - # @return [::Boolean] - # Output only. This flag indicates whether this Backup resource was created - # manually by a user or via a schedule in the BackupPlan. A value of True - # means that the Backup was created manually. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. A set of custom labels supplied by user. - # @!attribute [rw] delete_lock_days - # @return [::Integer] - # Optional. Minimum age for this Backup (in days). If this field is set to a - # non-zero value, the Backup will be "locked" against deletion (either manual - # or automatic deletion) for the number of days provided (measured from the - # creation time of the Backup). MUST be an integer value between 0-90 - # (inclusive). - # - # Defaults to parent BackupPlan's - # {::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy#backup_delete_lock_days backup_delete_lock_days} - # setting and may only be increased - # (either at creation time or in a subsequent update). - # @!attribute [r] delete_lock_expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which an existing delete lock will expire for this - # backup (calculated from create_time + - # {::Google::Cloud::GkeBackup::V1::Backup#delete_lock_days delete_lock_days}). - # @!attribute [rw] retain_days - # @return [::Integer] - # Optional. The age (in days) after which this Backup will be automatically - # deleted. Must be an integer value >= 0: - # - # - If 0, no automatic deletion will occur for this Backup. - # - If not 0, this must be >= - # {::Google::Cloud::GkeBackup::V1::Backup#delete_lock_days delete_lock_days} and - # <= 365. - # - # Once a Backup is created, this value may only be increased. - # - # Defaults to the parent BackupPlan's - # {::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy#backup_retain_days backup_retain_days} - # value. - # @!attribute [r] retain_expire_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The time at which this Backup will be automatically deleted - # (calculated from create_time + - # {::Google::Cloud::GkeBackup::V1::Backup#retain_days retain_days}). - # @!attribute [r] encryption_key - # @return [::Google::Cloud::GkeBackup::V1::EncryptionKey] - # Output only. The customer managed encryption key that was used to encrypt - # the Backup's artifacts. Inherited from the parent BackupPlan's - # {::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig#encryption_key encryption_key} - # value. - # @!attribute [r] all_namespaces - # @return [::Boolean] - # Output only. If True, all namespaces were included in the Backup. - # - # Note: The following fields are mutually exclusive: `all_namespaces`, `selected_namespaces`, `selected_applications`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] selected_namespaces - # @return [::Google::Cloud::GkeBackup::V1::Namespaces] - # Output only. If set, the list of namespaces that were included in the - # Backup. - # - # Note: The following fields are mutually exclusive: `selected_namespaces`, `all_namespaces`, `selected_applications`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] selected_applications - # @return [::Google::Cloud::GkeBackup::V1::NamespacedNames] - # Output only. If set, the list of ProtectedApplications whose resources - # were included in the Backup. - # - # Note: The following fields are mutually exclusive: `selected_applications`, `all_namespaces`, `selected_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] contains_volume_data - # @return [::Boolean] - # Output only. Whether or not the Backup contains volume data. Controlled by - # the parent BackupPlan's - # {::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig#include_volume_data include_volume_data} - # value. - # @!attribute [r] contains_secrets - # @return [::Boolean] - # Output only. Whether or not the Backup contains Kubernetes Secrets. - # Controlled by the parent BackupPlan's - # {::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig#include_secrets include_secrets} - # value. - # @!attribute [r] cluster_metadata - # @return [::Google::Cloud::GkeBackup::V1::Backup::ClusterMetadata] - # Output only. Information about the GKE cluster from which this Backup was - # created. - # @!attribute [r] state - # @return [::Google::Cloud::GkeBackup::V1::Backup::State] - # Output only. Current state of the Backup - # @!attribute [r] state_reason - # @return [::String] - # Output only. Human-readable description of why the backup is in the current - # `state`. This field is only meant for human readability and should not be - # used programmatically as this field is not guaranteed to be consistent. - # @!attribute [r] complete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Completion time of the Backup - # @!attribute [r] resource_count - # @return [::Integer] - # Output only. The total number of Kubernetes resources included in the - # Backup. - # @!attribute [r] volume_count - # @return [::Integer] - # Output only. The total number of volume backups contained in the Backup. - # @!attribute [r] size_bytes - # @return [::Integer] - # Output only. The total size of the Backup in bytes = config backup size + - # sum(volume backup sizes) - # @!attribute [r] etag - # @return [::String] - # Output only. `etag` is used for optimistic concurrency control as a way to - # help prevent simultaneous updates of a backup from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform backup updates in order to avoid - # race conditions: An `etag` is returned in the response to `GetBackup`, - # and systems are expected to put that etag in the request to - # `UpdateBackup` or `DeleteBackup` to ensure that their change will be - # applied to the same version of the resource. - # @!attribute [rw] description - # @return [::String] - # Optional. User specified descriptive string for this Backup. - # @!attribute [r] pod_count - # @return [::Integer] - # Output only. The total number of Kubernetes Pods contained in the Backup. - # @!attribute [r] config_backup_size_bytes - # @return [::Integer] - # Output only. The size of the config backup in bytes. - # @!attribute [r] permissive_mode - # @return [::Boolean] - # Output only. If false, Backup will fail when Backup for GKE detects - # Kubernetes configuration that is non-standard or - # requires additional setup to restore. - # - # Inherited from the parent BackupPlan's - # {::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig#permissive_mode permissive_mode} - # value. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. [Output Only] Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. [Output Only] Reserved for future use. - class Backup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Information about the GKE cluster from which this Backup was created. - # @!attribute [r] cluster - # @return [::String] - # Output only. The source cluster from which this Backup was created. - # Valid formats: - # - # - `projects/*/locations/*/clusters/*` - # - `projects/*/zones/*/clusters/*` - # - # This is inherited from the parent BackupPlan's - # {::Google::Cloud::GkeBackup::V1::BackupPlan#cluster cluster} field. - # @!attribute [r] k8s_version - # @return [::String] - # Output only. The Kubernetes server version of the source cluster. - # @!attribute [r] backup_crd_versions - # @return [::Google::Protobuf::Map{::String => ::String}] - # Output only. A list of the Backup for GKE CRD versions found in the - # cluster. - # @!attribute [r] gke_version - # @return [::String] - # Output only. GKE version - # - # Note: The following fields are mutually exclusive: `gke_version`, `anthos_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] anthos_version - # @return [::String] - # Output only. Anthos version - # - # Note: The following fields are mutually exclusive: `anthos_version`, `gke_version`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ClusterMetadata - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # @!attribute [rw] key - # @return [::String] - # @!attribute [rw] value - # @return [::String] - class BackupCrdVersionsEntry - 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 - - # State - module State - # The Backup resource is in the process of being created. - STATE_UNSPECIFIED = 0 - - # The Backup resource has been created and the associated BackupJob - # Kubernetes resource has been injected into the source cluster. - CREATING = 1 - - # The gkebackup agent in the cluster has begun executing the backup - # operation. - IN_PROGRESS = 2 - - # The backup operation has completed successfully. - SUCCEEDED = 3 - - # The backup operation has failed. - FAILED = 4 - - # This Backup resource (and its associated artifacts) is in the process - # of being deleted. - DELETING = 5 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_channel.rb deleted file mode 100644 index 73729f855d2e..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_channel.rb +++ /dev/null @@ -1,86 +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 GkeBackup - module V1 - # A BackupChannel imposes constraints on where clusters can be backed up. - # The BackupChannel should be in the same project and region - # as the cluster being backed up. - # The backup can be created only in destination_project. - # @!attribute [rw] name - # @return [::String] - # Identifier. The fully qualified name of the BackupChannel. - # `projects/*/locations/*/backupChannels/*` - # @!attribute [rw] destination_project - # @return [::String] - # Required. Immutable. The project where Backups are allowed to be stored. - # The format is `projects/{projectId}` or `projects/{projectNumber}`. - # @!attribute [r] uid - # @return [::String] - # Output only. Server generated global unique identifier of - # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this BackupChannel resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this BackupChannel resource was last - # updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. A set of custom labels supplied by user. - # @!attribute [rw] description - # @return [::String] - # Optional. User specified descriptive string for this BackupChannel. - # @!attribute [r] etag - # @return [::String] - # Output only. `etag` is used for optimistic concurrency control as a way to - # help prevent simultaneous updates of a BackupChannel from overwriting each - # other. It is strongly suggested that systems make use of the 'etag' in the - # read-modify-write cycle to perform BackupChannel updates in order to - # avoid race conditions: An `etag` is returned in the response to - # `GetBackupChannel`, and systems are expected to put that etag in the - # request to `UpdateBackupChannel` or `DeleteBackupChannel` to - # ensure that their change will be applied to the same version of the - # resource. - # @!attribute [r] destination_project_id - # @return [::String] - # Output only. The project_id where Backups are allowed to be stored. - # Example Project ID: "my-project-id". - # This will be an OUTPUT_ONLY field to return the project_id of the - # destination project. - class BackupChannel - 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 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb deleted file mode 100644 index 35c5337bd66f..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan.rb +++ /dev/null @@ -1,367 +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 GkeBackup - module V1 - # Defines the configuration and scheduling for a "line" of Backups. - # @!attribute [r] name - # @return [::String] - # Output only. The full name of the BackupPlan resource. - # Format: `projects/*/locations/*/backupPlans/*` - # @!attribute [r] uid - # @return [::String] - # Output only. Server generated global unique identifier of - # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this BackupPlan resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this BackupPlan resource was last - # updated. - # @!attribute [rw] description - # @return [::String] - # Optional. User specified descriptive string for this BackupPlan. - # @!attribute [rw] cluster - # @return [::String] - # Required. Immutable. The source cluster from which Backups will be created - # via this BackupPlan. Valid formats: - # - # - `projects/*/locations/*/clusters/*` - # - `projects/*/zones/*/clusters/*` - # @!attribute [rw] retention_policy - # @return [::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy] - # Optional. RetentionPolicy governs lifecycle of Backups created under this - # plan. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. A set of custom labels supplied by user. - # @!attribute [rw] backup_schedule - # @return [::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule] - # Optional. Defines a schedule for automatic Backup creation via this - # BackupPlan. - # @!attribute [r] etag - # @return [::String] - # Output only. `etag` is used for optimistic concurrency control as a way to - # help prevent simultaneous updates of a backup plan from overwriting each - # other. It is strongly suggested that systems make use of the 'etag' in the - # read-modify-write cycle to perform BackupPlan updates in order to avoid - # race conditions: An `etag` is returned in the response to `GetBackupPlan`, - # and systems are expected to put that etag in the request to - # `UpdateBackupPlan` or `DeleteBackupPlan` to ensure that their change - # will be applied to the same version of the resource. - # @!attribute [rw] deactivated - # @return [::Boolean] - # Optional. This flag indicates whether this BackupPlan has been deactivated. - # Setting this field to True locks the BackupPlan such that no further - # updates will be allowed (except deletes), including the deactivated field - # itself. It also prevents any new Backups from being created via this - # BackupPlan (including scheduled Backups). - # - # Default: False - # @!attribute [rw] backup_config - # @return [::Google::Cloud::GkeBackup::V1::BackupPlan::BackupConfig] - # Optional. Defines the configuration of Backups created via this BackupPlan. - # @!attribute [r] protected_pod_count - # @return [::Integer] - # Output only. The number of Kubernetes Pods backed up in the - # last successful Backup created via this BackupPlan. - # @!attribute [r] state - # @return [::Google::Cloud::GkeBackup::V1::BackupPlan::State] - # Output only. State of the BackupPlan. This State field reflects the - # various stages a BackupPlan can be in - # during the Create operation. It will be set to "DEACTIVATED" - # if the BackupPlan is deactivated on an Update - # @!attribute [r] state_reason - # @return [::String] - # Output only. Human-readable description of why BackupPlan is in the current - # `state`. This field is only meant for human readability and should not be - # used programmatically as this field is not guaranteed to be consistent. - # @!attribute [r] rpo_risk_level - # @return [::Integer] - # Output only. A number that represents the current risk level of this - # BackupPlan from RPO perspective with 1 being no risk and 5 being highest - # risk. - # @!attribute [r] rpo_risk_reason - # @return [::String] - # Output only. Human-readable description of why the BackupPlan is in the - # current rpo_risk_level and action items if any. - # @!attribute [r] backup_channel - # @return [::String] - # Output only. The fully qualified name of the BackupChannel to be used to - # create a backup. This field is set only if the cluster being backed up is - # in a different project. - # `projects/*/locations/*/backupChannels/*` - # @!attribute [r] last_successful_backup_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Completion time of the last successful Backup. This is sourced - # from a successful Backup's complete_time field. This field is added to - # maintain consistency with BackupPlanBinding to display last successful - # backup time. - class BackupPlan - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # RetentionPolicy defines a Backup retention policy for a BackupPlan. - # @!attribute [rw] backup_delete_lock_days - # @return [::Integer] - # Optional. Minimum age for Backups created via this BackupPlan (in days). - # This field MUST be an integer value between 0-90 (inclusive). - # A Backup created under this BackupPlan will NOT be deletable until it - # reaches Backup's (create_time + backup_delete_lock_days). - # Updating this field of a BackupPlan does NOT affect existing Backups - # under it. Backups created AFTER a successful update will inherit - # the new value. - # - # Default: 0 (no delete blocking) - # @!attribute [rw] backup_retain_days - # @return [::Integer] - # Optional. The default maximum age of a Backup created via this - # BackupPlan. This field MUST be an integer value >= 0 and <= 365. If - # specified, a Backup created under this BackupPlan will be automatically - # deleted after its age reaches (create_time + backup_retain_days). If not - # specified, Backups created under this BackupPlan will NOT be subject to - # automatic deletion. Updating this field does NOT affect existing Backups - # under it. Backups created AFTER a successful update will automatically - # pick up the new value. NOTE: backup_retain_days must be >= - # {::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy#backup_delete_lock_days backup_delete_lock_days}. - # If - # {::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule#cron_schedule cron_schedule} - # is defined, then this must be - # <= 360 * the creation interval. If - # {::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule#rpo_config rpo_config} is - # defined, then this must be - # <= 360 * [target_rpo_minutes][Schedule.rpo_config.target_rpo_minutes] / - # (1440minutes/day). - # - # Default: 0 (no automatic deletion) - # @!attribute [rw] locked - # @return [::Boolean] - # Optional. This flag denotes whether the retention policy of this - # BackupPlan is locked. If set to True, no further update is allowed on - # this policy, including the `locked` field itself. - # - # Default: False - class RetentionPolicy - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines scheduling parameters for automatically creating Backups - # via this BackupPlan. - # @!attribute [rw] cron_schedule - # @return [::String] - # Optional. A standard [cron](https://wikipedia.com/wiki/cron) string that - # defines a repeating schedule for creating Backups via this BackupPlan. - # This is mutually exclusive with the - # {::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule#rpo_config rpo_config} - # field since at most one schedule can be defined for a BackupPlan. If this - # is defined, then - # {::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy#backup_retain_days backup_retain_days} - # must also be defined. - # - # Default (empty): no automatic backup creation will occur. - # @!attribute [rw] paused - # @return [::Boolean] - # Optional. This flag denotes whether automatic Backup creation is paused - # for this BackupPlan. - # - # Default: False - # @!attribute [rw] rpo_config - # @return [::Google::Cloud::GkeBackup::V1::RpoConfig] - # Optional. Defines the RPO schedule configuration for this BackupPlan. - # This is mutually exclusive with the - # {::Google::Cloud::GkeBackup::V1::BackupPlan::Schedule#cron_schedule cron_schedule} - # field since at most one schedule can be defined for a BackupPLan. If this - # is defined, then - # {::Google::Cloud::GkeBackup::V1::BackupPlan::RetentionPolicy#backup_retain_days backup_retain_days} - # must also be defined. - # - # Default (empty): no automatic backup creation will occur. - # @!attribute [r] next_scheduled_backup_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Start time of next scheduled backup under this BackupPlan by - # either cron_schedule or rpo config. - class Schedule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # BackupConfig defines the configuration of Backups created via this - # BackupPlan. - # @!attribute [rw] all_namespaces - # @return [::Boolean] - # If True, include all namespaced resources - # - # Note: The following fields are mutually exclusive: `all_namespaces`, `selected_namespaces`, `selected_applications`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] selected_namespaces - # @return [::Google::Cloud::GkeBackup::V1::Namespaces] - # If set, include just the resources in the listed namespaces. - # - # Note: The following fields are mutually exclusive: `selected_namespaces`, `all_namespaces`, `selected_applications`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] selected_applications - # @return [::Google::Cloud::GkeBackup::V1::NamespacedNames] - # If set, include just the resources referenced by the listed - # ProtectedApplications. - # - # Note: The following fields are mutually exclusive: `selected_applications`, `all_namespaces`, `selected_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] include_volume_data - # @return [::Boolean] - # Optional. This flag specifies whether volume data should be backed up - # when PVCs are included in the scope of a Backup. - # - # Default: False - # @!attribute [rw] include_secrets - # @return [::Boolean] - # Optional. This flag specifies whether Kubernetes Secret resources should - # be included when they fall into the scope of Backups. - # - # Default: False - # @!attribute [rw] encryption_key - # @return [::Google::Cloud::GkeBackup::V1::EncryptionKey] - # Optional. This defines a customer managed encryption key that will be - # used to encrypt the "config" portion (the Kubernetes resources) of - # Backups created via this plan. - # - # Default (empty): Config backup artifacts will not be encrypted. - # @!attribute [rw] permissive_mode - # @return [::Boolean] - # Optional. If false, Backups will fail when Backup for GKE detects - # Kubernetes configuration that is non-standard or - # requires additional setup to restore. - # - # Default: False - class BackupConfig - 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 - - # State - module State - # Default first value for Enums. - STATE_UNSPECIFIED = 0 - - # Waiting for cluster state to be RUNNING. - CLUSTER_PENDING = 1 - - # The BackupPlan is in the process of being created. - PROVISIONING = 2 - - # The BackupPlan has successfully been created and is ready for Backups. - READY = 3 - - # BackupPlan creation has failed. - FAILED = 4 - - # The BackupPlan has been deactivated. - DEACTIVATED = 5 - - # The BackupPlan is in the process of being deleted. - DELETING = 6 - end - end - - # Defines RPO scheduling configuration for automatically creating - # Backups via this BackupPlan. - # @!attribute [rw] target_rpo_minutes - # @return [::Integer] - # Required. Defines the target RPO for the BackupPlan in minutes, which means - # the target maximum data loss in time that is acceptable for this - # BackupPlan. This must be at least 60, i.e., 1 hour, and at most 86400, - # i.e., 60 days. - # @!attribute [rw] exclusion_windows - # @return [::Array<::Google::Cloud::GkeBackup::V1::ExclusionWindow>] - # Optional. User specified time windows during which backup can NOT happen - # for this BackupPlan - backups should start and finish outside of any given - # exclusion window. Note: backup jobs will be scheduled to start and - # finish outside the duration of the window as much as possible, but - # running jobs will not get canceled when it runs into the window. - # All the time and date values in exclusion_windows entry in the API are in - # UTC. - # We only allow <=1 recurrence (daily or weekly) exclusion window for a - # BackupPlan while no restriction on number of single occurrence - # windows. - class RpoConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines a time window during which no backup should - # happen. All time and date are in UTC. - # @!attribute [rw] start_time - # @return [::Google::Type::TimeOfDay] - # Required. Specifies the start time of the window using time of the day in - # UTC. - # @!attribute [rw] duration - # @return [::Google::Protobuf::Duration] - # Required. Specifies duration of the window. - # Duration must be >= 5 minutes and < (target RPO - 20 minutes). - # Additional restrictions based on the recurrence type to allow some time for - # backup to happen: - # - single_occurrence_date: no restriction, but UI may warn about this when - # duration >= target RPO - # - daily window: duration < 24 hours - # - weekly window: - # - days of week includes all seven days of a week: duration < 24 hours - # - all other weekly window: duration < 168 hours (i.e., 24 * 7 hours) - # @!attribute [rw] single_occurrence_date - # @return [::Google::Type::Date] - # No recurrence. The exclusion window occurs only once and on this - # date in UTC. - # - # Note: The following fields are mutually exclusive: `single_occurrence_date`, `daily`, `days_of_week`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] daily - # @return [::Boolean] - # The exclusion window occurs every day if set to "True". - # Specifying this field to "False" is an error. - # - # Note: The following fields are mutually exclusive: `daily`, `single_occurrence_date`, `days_of_week`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] days_of_week - # @return [::Google::Cloud::GkeBackup::V1::ExclusionWindow::DayOfWeekList] - # The exclusion window occurs on these days of each week in UTC. - # - # Note: The following fields are mutually exclusive: `days_of_week`, `single_occurrence_date`, `daily`. If a field in that set is populated, all other fields in the set will automatically be cleared. - class ExclusionWindow - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Holds repeated DaysOfWeek values as a container. - # @!attribute [rw] days_of_week - # @return [::Array<::Google::Type::DayOfWeek>] - # Optional. A list of days of week. - class DayOfWeekList - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan_binding.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan_binding.rb deleted file mode 100644 index 2fb17cd58110..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/backup_plan_binding.rb +++ /dev/null @@ -1,208 +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 GkeBackup - module V1 - # A BackupPlanBinding binds a BackupPlan with a BackupChannel. - # This resource is created automatically when a BackupPlan is created using a - # BackupChannel. This also serves as a holder for cross-project fields - # that need to be displayed in the current project. - # @!attribute [rw] name - # @return [::String] - # Identifier. The fully qualified name of the BackupPlanBinding. - # `projects/*/locations/*/backupChannels/*/backupPlanBindings/*` - # @!attribute [r] uid - # @return [::String] - # Output only. Server generated global unique identifier of - # [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this binding was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this binding was created. - # @!attribute [r] backup_plan - # @return [::String] - # Output only. Immutable. The fully qualified name of the BackupPlan bound - # with the parent BackupChannel. - # `projects/*/locations/*/backupPlans/{backup_plan}` - # @!attribute [r] cluster - # @return [::String] - # Output only. Immutable. The fully qualified name of the cluster that is - # being backed up Valid formats: - # - # - `projects/*/locations/*/clusters/*` - # - `projects/*/zones/*/clusters/*` - # @!attribute [r] backup_plan_details - # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding::BackupPlanDetails] - # Output only. Contains details about the backup plan/backup. - # @!attribute [r] etag - # @return [::String] - # Output only. `etag` is used for optimistic concurrency control as a way to - # help prevent simultaneous updates of a BackupPlanBinding from overwriting - # each other. It is strongly suggested that systems make use of the 'etag' in - # the read-modify-write cycle to perform BackupPlanBinding updates in - # order to avoid race conditions: An `etag` is returned in the response to - # `GetBackupPlanBinding`, and systems are expected to put that etag in - # the request to `UpdateBackupPlanBinding` or - # `DeleteBackupPlanBinding` to ensure that their change will be applied - # to the same version of the resource. - class BackupPlanBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Contains metadata about the backup plan/backup. - # @!attribute [r] protected_pod_count - # @return [::Integer] - # Output only. The number of Kubernetes Pods backed up in the - # last successful Backup created via this BackupPlan. - # @!attribute [r] state - # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding::BackupPlanDetails::State] - # Output only. State of the BackupPlan. - # @!attribute [r] last_successful_backup_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Completion time of the last successful Backup. This is - # sourced from a successful Backup's complete_time field. - # @!attribute [r] next_scheduled_backup_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Start time of next scheduled backup under this BackupPlan by - # either cron_schedule or rpo config. This is sourced from BackupPlan. - # @!attribute [r] rpo_risk_level - # @return [::Integer] - # Output only. A number that represents the current risk level of this - # BackupPlan from RPO perspective with 1 being no risk and 5 being highest - # risk. - # @!attribute [r] last_successful_backup - # @return [::String] - # Output only. The fully qualified name of the last successful Backup - # created under this BackupPlan. - # `projects/*/locations/*/backupPlans/*/backups/*` - # @!attribute [r] backup_config_details - # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding::BackupPlanDetails::BackupConfigDetails] - # Output only. Contains details about the BackupConfig of Backups created - # via this BackupPlan. - # @!attribute [r] retention_policy_details - # @return [::Google::Cloud::GkeBackup::V1::BackupPlanBinding::BackupPlanDetails::RetentionPolicyDetails] - # Output only. Contains details about the RetentionPolicy of Backups - # created via this BackupPlan. - class BackupPlanDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # BackupConfigDetails defines the configuration of Backups created via this - # BackupPlan. - # @!attribute [r] all_namespaces - # @return [::Boolean] - # Output only. If True, include all namespaced resources - # - # Note: The following fields are mutually exclusive: `all_namespaces`, `selected_namespaces`, `selected_applications`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] selected_namespaces - # @return [::Google::Cloud::GkeBackup::V1::Namespaces] - # Output only. If set, include just the resources in the listed - # namespaces. - # - # Note: The following fields are mutually exclusive: `selected_namespaces`, `all_namespaces`, `selected_applications`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] selected_applications - # @return [::Google::Cloud::GkeBackup::V1::NamespacedNames] - # Output only. If set, include just the resources referenced by the - # listed ProtectedApplications. - # - # Note: The following fields are mutually exclusive: `selected_applications`, `all_namespaces`, `selected_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [r] include_volume_data - # @return [::Boolean] - # Output only. This flag specifies whether volume data should be backed - # up when PVCs are included in the scope of a Backup. - # - # Default: False - # @!attribute [r] include_secrets - # @return [::Boolean] - # Output only. This flag specifies whether Kubernetes Secret resources - # should be included when they fall into the scope of Backups. - # - # Default: False - # @!attribute [r] encryption_key - # @return [::Google::Cloud::GkeBackup::V1::EncryptionKey] - # Output only. This defines a customer managed encryption key that will - # be used to encrypt the "config" portion (the Kubernetes resources) of - # Backups created via this plan. - # - # Default (empty): Config backup artifacts will not be encrypted. - class BackupConfigDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # RetentionPolicyDetails defines a Backup retention policy for a - # BackupPlan. - # @!attribute [rw] backup_delete_lock_days - # @return [::Integer] - # Optional. Minimum age for Backups created via this BackupPlan (in - # days). This field MUST be an integer value between 0-90 (inclusive). A - # Backup created under this BackupPlan will NOT be deletable until it - # reaches Backup's (create_time + backup_delete_lock_days). - # Updating this field of a BackupPlan does NOT affect existing Backups - # under it. Backups created AFTER a successful update will inherit - # the new value. - # - # Default: 0 (no delete blocking) - # @!attribute [rw] backup_retain_days - # @return [::Integer] - # Optional. The default maximum age of a Backup created via this - # BackupPlan. This field MUST be an integer value >= 0 and <= 365. If - # specified, a Backup created under this BackupPlan will be automatically - # deleted after its age reaches (create_time + backup_retain_days). If - # not specified, Backups created under this BackupPlan will NOT be - # subject to automatic deletion. - # Default: 0 (no automatic deletion) - class RetentionPolicyDetails - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # State - module State - # Default first value for Enums. - STATE_UNSPECIFIED = 0 - - # Waiting for cluster state to be RUNNING. - CLUSTER_PENDING = 1 - - # The BackupPlan is in the process of being created. - PROVISIONING = 2 - - # The BackupPlan has successfully been created and is ready for Backups. - READY = 3 - - # BackupPlan creation has failed. - FAILED = 4 - - # The BackupPlan has been deactivated. - DEACTIVATED = 5 - - # The BackupPlan is in the process of being deleted. - DELETING = 6 - end - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/common.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/common.rb deleted file mode 100644 index 6354ff63b070..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/common.rb +++ /dev/null @@ -1,82 +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 GkeBackup - module V1 - # A list of Kubernetes Namespaces. - # @!attribute [rw] namespaces - # @return [::Array<::String>] - # Optional. A list of Kubernetes Namespaces. - class Namespaces - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A reference to a namespaced resource in Kubernetes. - # @!attribute [rw] namespace - # @return [::String] - # Optional. The Namespace of the Kubernetes resource. - # @!attribute [rw] name - # @return [::String] - # Optional. The name of the Kubernetes resource. - class NamespacedName - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A list of namespaced Kubernetes resources. - # @!attribute [rw] namespaced_names - # @return [::Array<::Google::Cloud::GkeBackup::V1::NamespacedName>] - # Optional. A list of namespaced Kubernetes resources. - class NamespacedNames - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defined a customer managed encryption key that will be used to encrypt Backup - # artifacts. - # @!attribute [rw] gcp_kms_encryption_key - # @return [::String] - # Optional. Google Cloud KMS encryption key. Format: - # `projects/*/locations/*/keyRings/*/cryptoKeys/*` - class EncryptionKey - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Message to encapsulate VolumeType enum. - class VolumeTypeEnum - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Supported volume types. - module VolumeType - # Default - VOLUME_TYPE_UNSPECIFIED = 0 - - # Compute Engine Persistent Disk volume - GCE_PERSISTENT_DISK = 1 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb deleted file mode 100644 index 6ddcfad1c13d..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/gkebackup.rb +++ /dev/null @@ -1,1065 +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 GkeBackup - module V1 - # Represents the metadata of the 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 - # {::Google::Longrunning::Operation#error google.longrunning.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 - - # Request message for CreateBackupPlan. - # @!attribute [rw] parent - # @return [::String] - # Required. The location within which to create the BackupPlan. - # Format: `projects/*/locations/*` - # @!attribute [rw] backup_plan - # @return [::Google::Cloud::GkeBackup::V1::BackupPlan] - # Required. The BackupPlan resource object to create. - # @!attribute [rw] backup_plan_id - # @return [::String] - # Required. The client-provided short name for the BackupPlan resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of BackupPlans in this location - class CreateBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListBackupPlans. - # @!attribute [rw] parent - # @return [::String] - # Required. The location that contains the BackupPlans to list. - # Format: `projects/*/locations/*` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlans` must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Field match expression used to filter the results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field by which to sort the results. - class ListBackupPlansRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListBackupPlans. - # @!attribute [rw] backup_plans - # @return [::Array<::Google::Cloud::GkeBackup::V1::BackupPlan>] - # The list of BackupPlans matching the given criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest#page_token page_token} - # in a subsequent `ListBackupPlans` call to retrieve the next page of - # results. If this field is omitted or empty, then there are no more results - # to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupPlansResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetBackupPlan. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified BackupPlan name. - # Format: `projects/*/locations/*/backupPlans/*` - class GetBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateBackupPlan. - # @!attribute [rw] backup_plan - # @return [::Google::Cloud::GkeBackup::V1::BackupPlan] - # Required. A new version of the BackupPlan resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. This is used to specify the fields to be overwritten in the - # BackupPlan targeted for update. The values for each of these - # updated fields will be taken from the `backup_plan` provided - # with this request. Field names are relative to the root of the resource - # (e.g., `description`, `backup_config.include_volume_data`, etc.) - # If no `update_mask` is provided, all fields in `backup_plan` will be - # written to the target BackupPlan resource. - # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup_plan` are ignored - # and are not used to update the target BackupPlan. - class UpdateBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteBackupPlan. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified BackupPlan name. - # Format: `projects/*/locations/*/backupPlans/*` - # @!attribute [rw] etag - # @return [::String] - # Optional. If provided, this value must match the current value of the - # target BackupPlan's {::Google::Cloud::GkeBackup::V1::BackupPlan#etag etag} field - # or the request is rejected. - class DeleteBackupPlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateBackupChannel. - # @!attribute [rw] parent - # @return [::String] - # Required. The location within which to create the BackupChannel. - # Format: `projects/*/locations/*` - # @!attribute [rw] backup_channel - # @return [::Google::Cloud::GkeBackup::V1::BackupChannel] - # Required. The BackupChannel resource object to create. - # @!attribute [rw] backup_channel_id - # @return [::String] - # Optional. The client-provided short name for the BackupChannel resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of BackupChannels in this location - # If the user does not provide a name, a uuid will be used as the name. - class CreateBackupChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListBackupChannels. - # @!attribute [rw] parent - # @return [::String] - # Required. The location that contains the BackupChannels to list. - # Format: `projects/*/locations/*` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse#next_page_token next_page_token} - # received from a previous `ListBackupChannels` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupChannels` must match the call that provided the page - # token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Field match expression used to filter the results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field by which to sort the results. - class ListBackupChannelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListBackupChannels. - # @!attribute [rw] backup_channels - # @return [::Array<::Google::Cloud::GkeBackup::V1::BackupChannel>] - # The list of BackupChannels matching the given criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest#page_token page_token} - # in a subsequent `ListBackupChannels` call to retrieve the next page of - # results. If this field is omitted or empty, then there are no more results - # to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupChannelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetBackupChannel. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified BackupChannel name. - # Format: `projects/*/locations/*/backupChannels/*` - class GetBackupChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateBackupChannel. - # @!attribute [rw] backup_channel - # @return [::Google::Cloud::GkeBackup::V1::BackupChannel] - # Required. A new version of the BackupChannel resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. This is used to specify the fields to be overwritten in the - # BackupChannel targeted for update. The values for each of these - # updated fields will be taken from the `backup_channel` provided - # with this request. Field names are relative to the root of the resource - # (e.g., `description`, `labels`, etc.) - # If no `update_mask` is provided, all fields in `backup_channel` will - # be written to the target BackupChannel resource. Note that - # OUTPUT_ONLY and IMMUTABLE fields in `backup_channel` are ignored and - # are not used to update the target BackupChannel. - class UpdateBackupChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteBackupChannel. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified BackupChannel name. - # Format: `projects/*/locations/*/backupChannels/*` - # @!attribute [rw] etag - # @return [::String] - # Optional. If provided, this value must match the current value of the - # target BackupChannel's {::Google::Cloud::GkeBackup::V1::BackupChannel#etag etag} - # field or the request is rejected. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any BackupPlanAssociations below this - # BackupChannel will also be deleted. Otherwise, the request will only - # succeed if the BackupChannel has no BackupPlanAssociations. - class DeleteBackupChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListBackupPlanBindings. - # @!attribute [rw] parent - # @return [::String] - # Required. The BackupChannel that contains the BackupPlanBindings to list. - # Format: `projects/*/locations/*/backupChannels/*` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse#next_page_token next_page_token} - # received from a previous `ListBackupPlanBindings` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackupPlanBindings` must match the call that provided the page - # token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Field match expression used to filter the results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field by which to sort the results. - class ListBackupPlanBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListBackupPlanBindings. - # @!attribute [rw] backup_plan_bindings - # @return [::Array<::Google::Cloud::GkeBackup::V1::BackupPlanBinding>] - # The list of BackupPlanBindings matching the given criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest#page_token page_token} - # in a subsequent `ListBackupPlanBindingss` call to retrieve the next page of - # results. If this field is omitted or empty, then there are no more results - # to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupPlanBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetBackupPlanBinding. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified BackupPlanBinding name. - # Format: - # `projects/*/locations/*/backupChannels/*/backupPlanBindings/*` - class GetBackupPlanBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateBackup. - # @!attribute [rw] parent - # @return [::String] - # Required. The BackupPlan within which to create the Backup. - # Format: `projects/*/locations/*/backupPlans/*` - # @!attribute [rw] backup - # @return [::Google::Cloud::GkeBackup::V1::Backup] - # Optional. The Backup resource to create. - # @!attribute [rw] backup_id - # @return [::String] - # Optional. The client-provided short name for the Backup resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of Backups in this BackupPlan - class CreateBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListBackups. - # @!attribute [rw] parent - # @return [::String] - # Required. The BackupPlan that contains the Backups to list. - # Format: `projects/*/locations/*/backupPlans/*` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListBackupsResponse#next_page_token next_page_token} - # received from a previous `ListBackups` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListBackups` must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Field match expression used to filter the results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field by which to sort the results. - # @!attribute [rw] return_partial_success - # @return [::Boolean] - # Optional. If set to true, the response will return partial results when - # some regions are unreachable and the unreachable field will be populated. - class ListBackupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListBackups. - # @!attribute [rw] backups - # @return [::Array<::Google::Cloud::GkeBackup::V1::Backup>] - # The list of Backups matching the given criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::GkeBackup::V1::ListBackupsRequest#page_token page_token} in a - # subsequent `ListBackups` call to retrieve the next page of results. If this - # field is omitted or empty, then there are no more results to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListBackupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetBackup. - # @!attribute [rw] name - # @return [::String] - # Required. Full name of the Backup resource. - # Format: `projects/*/locations/*/backupPlans/*/backups/*` - class GetBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateBackup. - # @!attribute [rw] backup - # @return [::Google::Cloud::GkeBackup::V1::Backup] - # Required. A new version of the Backup resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. This is used to specify the fields to be overwritten in the - # Backup targeted for update. The values for each of these - # updated fields will be taken from the `backup_plan` provided - # with this request. Field names are relative to the root of the resource. - # If no `update_mask` is provided, all fields in `backup` will be - # written to the target Backup resource. - # Note that OUTPUT_ONLY and IMMUTABLE fields in `backup` are ignored - # and are not used to update the target Backup. - class UpdateBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteBackup. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the Backup resource. - # Format: `projects/*/locations/*/backupPlans/*/backups/*` - # @!attribute [rw] etag - # @return [::String] - # Optional. If provided, this value must match the current value of the - # target Backup's {::Google::Cloud::GkeBackup::V1::Backup#etag etag} field or the - # request is rejected. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any VolumeBackups below this Backup will also be - # deleted. Otherwise, the request will only succeed if the Backup has no - # VolumeBackups. - class DeleteBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListVolumeBackups. - # @!attribute [rw] parent - # @return [::String] - # Required. The Backup that contains the VolumeBackups to list. - # Format: `projects/*/locations/*/backupPlans/*/backups/*` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse#next_page_token next_page_token} - # received from a previous `ListVolumeBackups` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListVolumeBackups` must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Field match expression used to filter the results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field by which to sort the results. - class ListVolumeBackupsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListVolumeBackups. - # @!attribute [rw] volume_backups - # @return [::Array<::Google::Cloud::GkeBackup::V1::VolumeBackup>] - # The list of VolumeBackups matching the given criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest#page_token page_token} - # in a subsequent `ListVolumeBackups` call to retrieve the next page of - # results. If this field is omitted or empty, then there are no more results - # to return. - class ListVolumeBackupsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetVolumeBackup. - # @!attribute [rw] name - # @return [::String] - # Required. Full name of the VolumeBackup resource. - # Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*` - class GetVolumeBackupRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateRestorePlan. - # @!attribute [rw] parent - # @return [::String] - # Required. The location within which to create the RestorePlan. - # Format: `projects/*/locations/*` - # @!attribute [rw] restore_plan - # @return [::Google::Cloud::GkeBackup::V1::RestorePlan] - # Required. The RestorePlan resource object to create. - # @!attribute [rw] restore_plan_id - # @return [::String] - # Required. The client-provided short name for the RestorePlan resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of RestorePlans in this location - class CreateRestorePlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRestorePlans. - # @!attribute [rw] parent - # @return [::String] - # Required. The location that contains the RestorePlans to list. - # Format: `projects/*/locations/*` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse#next_page_token next_page_token} - # received from a previous `ListRestorePlans` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListRestorePlans` must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Field match expression used to filter the results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field by which to sort the results. - class ListRestorePlansRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRestorePlans. - # @!attribute [rw] restore_plans - # @return [::Array<::Google::Cloud::GkeBackup::V1::RestorePlan>] - # The list of RestorePlans matching the given criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest#page_token page_token} - # in a subsequent `ListRestorePlans` call to retrieve the next page of - # results. If this field is omitted or empty, then there are no more results - # to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListRestorePlansResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetRestorePlan. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified RestorePlan name. - # Format: `projects/*/locations/*/restorePlans/*` - class GetRestorePlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateRestorePlan. - # @!attribute [rw] restore_plan - # @return [::Google::Cloud::GkeBackup::V1::RestorePlan] - # Required. A new version of the RestorePlan resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. This is used to specify the fields to be overwritten in the - # RestorePlan targeted for update. The values for each of these - # updated fields will be taken from the `restore_plan` provided - # with this request. Field names are relative to the root of the resource. - # If no `update_mask` is provided, all fields in `restore_plan` will be - # written to the target RestorePlan resource. - # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore_plan` are ignored - # and are not used to update the target RestorePlan. - class UpdateRestorePlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteRestorePlan. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified RestorePlan name. - # Format: `projects/*/locations/*/restorePlans/*` - # @!attribute [rw] etag - # @return [::String] - # Optional. If provided, this value must match the current value of the - # target RestorePlan's {::Google::Cloud::GkeBackup::V1::RestorePlan#etag etag} - # field or the request is rejected. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any Restores below this RestorePlan will also be - # deleted. Otherwise, the request will only succeed if the RestorePlan has no - # Restores. - class DeleteRestorePlanRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateRestoreChannel. - # @!attribute [rw] parent - # @return [::String] - # Required. The location within which to create the RestoreChannel. - # Format: `projects/*/locations/*` - # @!attribute [rw] restore_channel - # @return [::Google::Cloud::GkeBackup::V1::RestoreChannel] - # Required. The RestoreChannel resource object to create. - # @!attribute [rw] restore_channel_id - # @return [::String] - # Optional. The client-provided short name for the RestoreChannel resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of RestoreChannels in this location - # If the user does not provide a name, a uuid will be used as the name. - class CreateRestoreChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRestoreChannels. - # @!attribute [rw] parent - # @return [::String] - # Required. The location that contains the RestoreChannels to list. - # Format: `projects/*/locations/*` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse#next_page_token next_page_token} - # received from a previous `ListRestoreChannels` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListRestoreChannels` must match the call that provided the page - # token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Field match expression used to filter the results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field by which to sort the results. - class ListRestoreChannelsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRestoreChannels. - # @!attribute [rw] restore_channels - # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreChannel>] - # The list of RestoreChannels matching the given criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest#page_token page_token} - # in a subsequent `ListRestoreChannels` call to retrieve the next page of - # results. If this field is omitted or empty, then there are no more results - # to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListRestoreChannelsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetRestoreChannel. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified RestoreChannel name. - # Format: `projects/*/locations/*/restoreChannels/*` - class GetRestoreChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateRestoreChannel. - # @!attribute [rw] restore_channel - # @return [::Google::Cloud::GkeBackup::V1::RestoreChannel] - # Required. A new version of the RestoreChannel resource that contains - # updated fields. This may be sparsely populated if an `update_mask` is - # provided. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. This is used to specify the fields to be overwritten in the - # RestoreChannel targeted for update. The values for each of these - # updated fields will be taken from the `restore_channel` provided - # with this request. Field names are relative to the root of the resource - # (e.g., `description`, `destination_project_id`, etc.) - # If no `update_mask` is provided, all fields in `restore_channel` will - # be written to the target RestoreChannel resource. Note that - # OUTPUT_ONLY and IMMUTABLE fields in `restore_channel` are ignored and - # are not used to update the target RestoreChannel. - class UpdateRestoreChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteRestoreChannel. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified RestoreChannel name. - # Format: `projects/*/locations/*/restoreChannels/*` - # @!attribute [rw] etag - # @return [::String] - # Optional. If provided, this value must match the current value of the - # target RestoreChannel's - # {::Google::Cloud::GkeBackup::V1::RestoreChannel#etag etag} field or the request - # is rejected. - class DeleteRestoreChannelRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRestorePlanBindings. - # @!attribute [rw] parent - # @return [::String] - # Required. The RestoreChannel that contains the ListRestorePlanBindings to - # list. Format: `projects/*/locations/*/restoreChannels/*` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse#next_page_token next_page_token} - # received from a previous `ListRestorePlanBindings` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListRestorePlanBindings` must match the call that provided the page - # token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Field match expression used to filter the results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field by which to sort the results. - class ListRestorePlanBindingsRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRestorePlanBindings. - # @!attribute [rw] restore_plan_bindings - # @return [::Array<::Google::Cloud::GkeBackup::V1::RestorePlanBinding>] - # The list of RestorePlanBindings matching the given criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest#page_token page_token} - # in a subsequent `ListRestorePlanBindings` call to retrieve the next page of - # results. If this field is omitted or empty, then there are no more results - # to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Unordered list. Locations that could not be reached. - class ListRestorePlanBindingsResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetRestorePlanBinding. - # @!attribute [rw] name - # @return [::String] - # Required. Fully qualified RestorePlanBinding name. - # Format: - # `projects/*/locations/*/restoreChannels/*/restorePlanBindings/*` - class GetRestorePlanBindingRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for CreateRestore. - # @!attribute [rw] parent - # @return [::String] - # Required. The RestorePlan within which to create the Restore. - # Format: `projects/*/locations/*/restorePlans/*` - # @!attribute [rw] restore - # @return [::Google::Cloud::GkeBackup::V1::Restore] - # Required. The restore resource to create. - # @!attribute [rw] restore_id - # @return [::String] - # Required. The client-provided short name for the Restore resource. - # This name must: - # - # - be between 1 and 63 characters long (inclusive) - # - consist of only lower-case ASCII letters, numbers, and dashes - # - start with a lower-case letter - # - end with a lower-case letter or number - # - be unique within the set of Restores in this RestorePlan. - class CreateRestoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListRestores. - # @!attribute [rw] parent - # @return [::String] - # Required. The RestorePlan that contains the Restores to list. - # Format: `projects/*/locations/*/restorePlans/*` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListRestoresResponse#next_page_token next_page_token} - # received from a previous `ListRestores` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to `ListRestores` - # must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Field match expression used to filter the results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field by which to sort the results. - class ListRestoresRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListRestores. - # @!attribute [rw] restores - # @return [::Array<::Google::Cloud::GkeBackup::V1::Restore>] - # The list of Restores matching the given criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::GkeBackup::V1::ListRestoresRequest#page_token page_token} in a - # subsequent `ListRestores` call to retrieve the next page of results. If - # this field is omitted or empty, then there are no more results to return. - # @!attribute [rw] unreachable - # @return [::Array<::String>] - # Locations that could not be reached. - class ListRestoresResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetRestore. - # @!attribute [rw] name - # @return [::String] - # Required. Name of the restore resource. - # Format: `projects/*/locations/*/restorePlans/*/restores/*` - class GetRestoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for UpdateRestore. - # @!attribute [rw] restore - # @return [::Google::Cloud::GkeBackup::V1::Restore] - # Required. A new version of the Restore resource that contains updated - # fields. This may be sparsely populated if an `update_mask` is provided. - # @!attribute [rw] update_mask - # @return [::Google::Protobuf::FieldMask] - # Optional. This is used to specify the fields to be overwritten in the - # Restore targeted for update. The values for each of these - # updated fields will be taken from the `restore` provided - # with this request. Field names are relative to the root of the resource. - # If no `update_mask` is provided, all fields in `restore` will be - # written to the target Restore resource. - # Note that OUTPUT_ONLY and IMMUTABLE fields in `restore` are ignored - # and are not used to update the target Restore. - class UpdateRestoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for DeleteRestore. - # @!attribute [rw] name - # @return [::String] - # Required. Full name of the Restore - # Format: `projects/*/locations/*/restorePlans/*/restores/*` - # @!attribute [rw] etag - # @return [::String] - # Optional. If provided, this value must match the current value of the - # target Restore's {::Google::Cloud::GkeBackup::V1::Restore#etag etag} field or - # the request is rejected. - # @!attribute [rw] force - # @return [::Boolean] - # Optional. If set to true, any VolumeRestores below this restore will also - # be deleted. Otherwise, the request will only succeed if the restore has no - # VolumeRestores. - class DeleteRestoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for ListVolumeRestores. - # @!attribute [rw] parent - # @return [::String] - # Required. The Restore that contains the VolumeRestores to list. - # Format: `projects/*/locations/*/restorePlans/*/restores/*` - # @!attribute [rw] page_size - # @return [::Integer] - # Optional. The target number of results to return in a single response. - # If not specified, a default value will be chosen by the service. - # Note that the response may include a partial list and a caller should - # only rely on the response's - # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token} - # to determine if there are more instances left to be queried. - # @!attribute [rw] page_token - # @return [::String] - # Optional. The value of - # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse#next_page_token next_page_token} - # received from a previous `ListVolumeRestores` call. - # Provide this to retrieve the subsequent page in a multi-page list of - # results. When paginating, all other parameters provided to - # `ListVolumeRestores` must match the call that provided the page token. - # @!attribute [rw] filter - # @return [::String] - # Optional. Field match expression used to filter the results. - # @!attribute [rw] order_by - # @return [::String] - # Optional. Field by which to sort the results. - class ListVolumeRestoresRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for ListVolumeRestores. - # @!attribute [rw] volume_restores - # @return [::Array<::Google::Cloud::GkeBackup::V1::VolumeRestore>] - # The list of VolumeRestores matching the given criteria. - # @!attribute [rw] next_page_token - # @return [::String] - # A token which may be sent as - # {::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest#page_token page_token} - # in a subsequent `ListVolumeRestores` call to retrieve the next page of - # results. If this field is omitted or empty, then there are no more results - # to return. - class ListVolumeRestoresResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetVolumeRestore. - # @!attribute [rw] name - # @return [::String] - # Required. Full name of the VolumeRestore resource. - # Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` - class GetVolumeRestoreRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Request message for GetBackupIndexDownloadUrl. - # @!attribute [rw] backup - # @return [::String] - # Required. Full name of Backup resource. - # Format: - # projects/\\{project}/locations/\\{location}/backupPlans/\\{backup_plan}/backups/\\{backup} - class GetBackupIndexDownloadUrlRequest - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Response message for GetBackupIndexDownloadUrl. - # @!attribute [rw] signed_url - # @return [::String] - # Required. The signed URL for downloading the backup index. - class GetBackupIndexDownloadUrlResponse - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore.rb deleted file mode 100644 index 15fe4ce0fde9..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore.rb +++ /dev/null @@ -1,680 +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 GkeBackup - module V1 - # Represents both a request to Restore some portion of a Backup into - # a target GKE cluster and a record of the restore operation itself. - # @!attribute [r] name - # @return [::String] - # Output only. The full name of the Restore resource. - # Format: `projects/*/locations/*/restorePlans/*/restores/*` - # @!attribute [r] uid - # @return [::String] - # Output only. Server generated global unique identifier of - # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this Restore resource was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this Restore resource was last - # updated. - # @!attribute [rw] description - # @return [::String] - # Optional. User specified descriptive string for this Restore. - # @!attribute [rw] backup - # @return [::String] - # Required. Immutable. A reference to the - # {::Google::Cloud::GkeBackup::V1::Backup Backup} used as the source from which - # this Restore will restore. Note that this Backup must be a sub-resource of - # the RestorePlan's - # {::Google::Cloud::GkeBackup::V1::RestorePlan#backup_plan backup_plan}. Format: - # `projects/*/locations/*/backupPlans/*/backups/*`. - # @!attribute [r] cluster - # @return [::String] - # Output only. The target cluster into which this Restore will restore data. - # Valid formats: - # - # - `projects/*/locations/*/clusters/*` - # - `projects/*/zones/*/clusters/*` - # - # Inherited from parent RestorePlan's - # {::Google::Cloud::GkeBackup::V1::RestorePlan#cluster cluster} value. - # @!attribute [r] restore_config - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig] - # Output only. Configuration of the Restore. Inherited from parent - # RestorePlan's - # {::Google::Cloud::GkeBackup::V1::RestorePlan#restore_config restore_config}. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # A set of custom labels supplied by user. - # @!attribute [r] state - # @return [::Google::Cloud::GkeBackup::V1::Restore::State] - # Output only. The current state of the Restore. - # @!attribute [r] state_reason - # @return [::String] - # Output only. Human-readable description of why the Restore is in its - # current state. This field is only meant for human readability and should - # not be used programmatically as this field is not guaranteed to be - # consistent. - # @!attribute [r] complete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. Timestamp of when the restore operation completed. - # @!attribute [r] resources_restored_count - # @return [::Integer] - # Output only. Number of resources restored during the restore execution. - # @!attribute [r] resources_excluded_count - # @return [::Integer] - # Output only. Number of resources excluded during the restore execution. - # @!attribute [r] resources_failed_count - # @return [::Integer] - # Output only. Number of resources that failed to be restored during the - # restore execution. - # @!attribute [r] volumes_restored_count - # @return [::Integer] - # Output only. Number of volumes restored during the restore execution. - # @!attribute [r] etag - # @return [::String] - # Output only. `etag` is used for optimistic concurrency control as a way to - # help prevent simultaneous updates of a restore from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform restore updates in order to avoid - # race conditions: An `etag` is returned in the response to `GetRestore`, - # and systems are expected to put that etag in the request to - # `UpdateRestore` or `DeleteRestore` to ensure that their change will be - # applied to the same version of the resource. - # @!attribute [rw] filter - # @return [::Google::Cloud::GkeBackup::V1::Restore::Filter] - # Optional. Immutable. Filters resources for `Restore`. If not specified, the - # scope of the restore will remain the same as defined in the `RestorePlan`. - # If this is specified and no resources are matched by the - # `inclusion_filters` or everything is excluded by the `exclusion_filters`, - # nothing will be restored. This filter can only be specified if the value of - # {::Google::Cloud::GkeBackup::V1::RestoreConfig#namespaced_resource_restore_mode namespaced_resource_restore_mode} - # is set to `MERGE_SKIP_ON_CONFLICT`, `MERGE_REPLACE_VOLUME_ON_CONFLICT` or - # `MERGE_REPLACE_ON_CONFLICT`. - # @!attribute [rw] volume_data_restore_policy_overrides - # @return [::Array<::Google::Cloud::GkeBackup::V1::VolumeDataRestorePolicyOverride>] - # Optional. Immutable. Overrides the volume data restore policies selected in - # the Restore Config for override-scoped resources. - class Restore - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines the filter for `Restore`. This filter can be used to further - # refine the resource selection of the `Restore` beyond the coarse-grained - # scope defined in the `RestorePlan`. `exclusion_filters` take precedence - # over `inclusion_filters`. If a resource matches both `inclusion_filters` - # and `exclusion_filters`, it will not be restored. - # @!attribute [rw] inclusion_filters - # @return [::Array<::Google::Cloud::GkeBackup::V1::ResourceSelector>] - # Optional. Selects resources for restoration. If specified, only resources - # which match `inclusion_filters` will be selected for restoration. A - # resource will be selected if it matches any `ResourceSelector` of the - # `inclusion_filters`. - # @!attribute [rw] exclusion_filters - # @return [::Array<::Google::Cloud::GkeBackup::V1::ResourceSelector>] - # Optional. Excludes resources from restoration. If specified, - # a resource will not be restored if it matches - # any `ResourceSelector` of the `exclusion_filters`. - class Filter - 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 - - # Possible values for state of the Restore. - module State - # The Restore resource is in the process of being created. - STATE_UNSPECIFIED = 0 - - # The Restore resource has been created and the associated RestoreJob - # Kubernetes resource has been injected into target cluster. - CREATING = 1 - - # The gkebackup agent in the cluster has begun executing the restore - # operation. - IN_PROGRESS = 2 - - # The restore operation has completed successfully. Restored workloads may - # not yet be operational. - SUCCEEDED = 3 - - # The restore operation has failed. - FAILED = 4 - - # This Restore resource is in the process of being deleted. - DELETING = 5 - - # The Kubernetes resources created by this Restore are being - # validated. - VALIDATING = 6 - end - end - - # Configuration of a restore. - # @!attribute [rw] volume_data_restore_policy - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] - # Optional. Specifies the mechanism to be used to restore volume data. - # Default: VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED (will be treated as - # NO_VOLUME_DATA_RESTORATION). - # @!attribute [rw] cluster_resource_conflict_policy - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ClusterResourceConflictPolicy] - # Optional. Defines the behavior for handling the situation where - # cluster-scoped resources being restored already exist in the target - # cluster. This MUST be set to a value other than - # CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED if - # {::Google::Cloud::GkeBackup::V1::RestoreConfig#cluster_resource_restore_scope cluster_resource_restore_scope} - # is not empty. - # @!attribute [rw] namespaced_resource_restore_mode - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::NamespacedResourceRestoreMode] - # Optional. Defines the behavior for handling the situation where sets of - # namespaced resources being restored already exist in the target cluster. - # This MUST be set to a value other than - # NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED. - # @!attribute [rw] cluster_resource_restore_scope - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ClusterResourceRestoreScope] - # Optional. Identifies the cluster-scoped resources to restore from the - # Backup. Not specifying it means NO cluster resource will be restored. - # @!attribute [rw] all_namespaces - # @return [::Boolean] - # Restore all namespaced resources in the Backup if set to "True". - # Specifying this field to "False" is an error. - # - # Note: The following fields are mutually exclusive: `all_namespaces`, `selected_namespaces`, `selected_applications`, `no_namespaces`, `excluded_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] selected_namespaces - # @return [::Google::Cloud::GkeBackup::V1::Namespaces] - # A list of selected Namespaces to restore from the Backup. The listed - # Namespaces and all resources contained in them will be restored. - # - # Note: The following fields are mutually exclusive: `selected_namespaces`, `all_namespaces`, `selected_applications`, `no_namespaces`, `excluded_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] selected_applications - # @return [::Google::Cloud::GkeBackup::V1::NamespacedNames] - # A list of selected ProtectedApplications to restore. The listed - # ProtectedApplications and all the resources to which they refer will be - # restored. - # - # Note: The following fields are mutually exclusive: `selected_applications`, `all_namespaces`, `selected_namespaces`, `no_namespaces`, `excluded_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] no_namespaces - # @return [::Boolean] - # Do not restore any namespaced resources if set to "True". - # Specifying this field to "False" is not allowed. - # - # Note: The following fields are mutually exclusive: `no_namespaces`, `all_namespaces`, `selected_namespaces`, `selected_applications`, `excluded_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] excluded_namespaces - # @return [::Google::Cloud::GkeBackup::V1::Namespaces] - # A list of selected namespaces excluded from restoration. All - # namespaces except those in this list will be restored. - # - # Note: The following fields are mutually exclusive: `excluded_namespaces`, `all_namespaces`, `selected_namespaces`, `selected_applications`, `no_namespaces`. If a field in that set is populated, all other fields in the set will automatically be cleared. - # @!attribute [rw] substitution_rules - # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::SubstitutionRule>] - # Optional. A list of transformation rules to be applied against Kubernetes - # resources as they are selected for restoration from a Backup. Rules are - # executed in order defined - this order matters, as changes made by a rule - # may impact the filtering logic of subsequent rules. An empty list means no - # substitution will occur. - # @!attribute [rw] transformation_rules - # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRule>] - # Optional. A list of transformation rules to be applied against Kubernetes - # resources as they are selected for restoration from a Backup. Rules are - # executed in order defined - this order matters, as changes made by a rule - # may impact the filtering logic of subsequent rules. An empty list means no - # transformation will occur. - # @!attribute [rw] volume_data_restore_policy_bindings - # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicyBinding>] - # Optional. A table that binds volumes by their scope to a restore policy. - # Bindings must have a unique scope. Any volumes not scoped in the bindings - # are subject to the policy defined in volume_data_restore_policy. - # @!attribute [rw] restore_order - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder] - # Optional. RestoreOrder contains custom ordering to use on a Restore. - class RestoreConfig - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # This is a direct map to the Kubernetes GroupKind type - # [GroupKind](https://godoc.org/k8s.io/apimachinery/pkg/runtime/schema#GroupKind) - # and is used for identifying specific "types" of resources to restore. - # @!attribute [rw] resource_group - # @return [::String] - # Optional. API group string of a Kubernetes resource, e.g. - # "apiextensions.k8s.io", "storage.k8s.io", etc. - # Note: use empty string for core API group. - # @!attribute [rw] resource_kind - # @return [::String] - # Optional. Kind of a Kubernetes resource, must be in UpperCamelCase - # (PascalCase) and singular form. E.g. "CustomResourceDefinition", - # "StorageClass", etc. - class GroupKind - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Defines the scope of cluster-scoped resources to restore. - # - # Some group kinds are not reasonable choices for a restore, and will cause - # an error if selected here. Any scope selection that would restore - # "all valid" resources automatically excludes these group kinds. - # - Node - # - ComponentStatus - # - gkebackup.gke.io/BackupJob - # - gkebackup.gke.io/RestoreJob - # - metrics.k8s.io/NodeMetrics - # - migration.k8s.io/StorageState - # - migration.k8s.io/StorageVersionMigration - # - snapshot.storage.k8s.io/VolumeSnapshotContent - # - storage.k8s.io/CSINode - # - storage.k8s.io/VolumeAttachment - # - # Some group kinds are driven by restore configuration elsewhere, - # and will cause an error if selected here. - # - Namespace - # - PersistentVolume - # @!attribute [rw] selected_group_kinds - # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] - # Optional. A list of cluster-scoped resource group kinds to restore from - # the backup. If specified, only the selected resources will be restored. - # Mutually exclusive to any other field in the message. - # @!attribute [rw] excluded_group_kinds - # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] - # Optional. A list of cluster-scoped resource group kinds to NOT restore - # from the backup. If specified, all valid cluster-scoped resources will be - # restored except for those specified in the list. - # Mutually exclusive to any other field in the message. - # @!attribute [rw] all_group_kinds - # @return [::Boolean] - # Optional. If True, all valid cluster-scoped resources will be restored. - # Mutually exclusive to any other field in the message. - # @!attribute [rw] no_group_kinds - # @return [::Boolean] - # Optional. If True, no cluster-scoped resources will be restored. - # This has the same restore scope as if the message is not defined. - # Mutually exclusive to any other field in the message. - class ClusterResourceRestoreScope - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A transformation rule to be applied against Kubernetes resources as they - # are selected for restoration from a Backup. A rule contains both filtering - # logic (which resources are subject to substitution) and substitution logic. - # @!attribute [rw] target_namespaces - # @return [::Array<::String>] - # Optional. (Filtering parameter) Any resource subject to substitution must - # be contained within one of the listed Kubernetes Namespace in the Backup. - # If this field is not provided, no namespace filtering will be performed - # (all resources in all Namespaces, including all cluster-scoped resources, - # will be candidates for substitution). - # To mix cluster-scoped and namespaced resources in the same rule, use an - # empty string ("") as one of the target namespaces. - # @!attribute [rw] target_group_kinds - # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] - # Optional. (Filtering parameter) Any resource subject to substitution must - # belong to one of the listed "types". If this field is not provided, no - # type filtering will be performed (all resources of all types matching - # previous filtering parameters will be candidates for substitution). - # @!attribute [rw] target_json_path - # @return [::String] - # Required. This is a [JSONPath] - # (https://kubernetes.io/docs/reference/kubectl/jsonpath/) - # expression that matches specific fields of candidate - # resources and it operates as both a filtering parameter (resources that - # are not matched with this expression will not be candidates for - # substitution) as well as a field identifier (identifies exactly which - # fields out of the candidate resources will be modified). - # @!attribute [rw] original_value_pattern - # @return [::String] - # Optional. (Filtering parameter) This is a [regular expression] - # (https://en.wikipedia.org/wiki/Regular_expression) - # that is compared against the fields matched by the target_json_path - # expression (and must also have passed the previous filters). - # Substitution will not be performed against fields whose - # value does not match this expression. If this field is NOT specified, - # then ALL fields matched by the target_json_path expression will undergo - # substitution. Note that an empty (e.g., "", rather than unspecified) - # value for this field will only match empty fields. - # @!attribute [rw] new_value - # @return [::String] - # Optional. This is the new value to set for any fields that pass the - # filtering and selection criteria. To remove a value from a Kubernetes - # resource, either leave this field unspecified, or set it to the empty - # string (""). - class SubstitutionRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # TransformationRuleAction defines a TransformationRule action based on the - # JSON Patch RFC (https://www.rfc-editor.org/rfc/rfc6902) - # @!attribute [rw] op - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction::Op] - # Required. op specifies the operation to perform. - # @!attribute [rw] from_path - # @return [::String] - # Optional. A string containing a JSON Pointer value that references the - # location in the target document to move the value from. - # @!attribute [rw] path - # @return [::String] - # Optional. A string containing a JSON-Pointer value that references a - # location within the target document where the operation is performed. - # @!attribute [rw] value - # @return [::String] - # Optional. A string that specifies the desired value in string format to - # use for transformation. - class TransformationRuleAction - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Possible values for operations of a transformation rule action. - module Op - # Unspecified operation - OP_UNSPECIFIED = 0 - - # The "remove" operation removes the value at the target location. - REMOVE = 1 - - # The "move" operation removes the value at a specified location and - # adds it to the target location. - MOVE = 2 - - # The "copy" operation copies the value at a specified location to the - # target location. - COPY = 3 - - # The "add" operation performs one of the following functions, - # depending upon what the target location references: - # 1. If the target location specifies an array index, a new value is - # inserted into the array at the specified index. - # 2. If the target location specifies an object member that does not - # already exist, a new member is added to the object. - # 3. If the target location specifies an object member that does exist, - # that member's value is replaced. - ADD = 4 - - # The "test" operation tests that a value at the target location is - # equal to a specified value. - TEST = 5 - - # The "replace" operation replaces the value at the target location - # with a new value. The operation object MUST contain a "value" member - # whose content specifies the replacement value. - REPLACE = 6 - end - end - - # ResourceFilter specifies matching criteria to limit the scope of a - # change to a specific set of kubernetes resources that are selected for - # restoration from a backup. - # @!attribute [rw] namespaces - # @return [::Array<::String>] - # Optional. (Filtering parameter) Any resource subject to transformation - # must be contained within one of the listed Kubernetes Namespace in the - # Backup. If this field is not provided, no namespace filtering will be - # performed (all resources in all Namespaces, including all cluster-scoped - # resources, will be candidates for transformation). - # @!attribute [rw] group_kinds - # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind>] - # Optional. (Filtering parameter) Any resource subject to transformation - # must belong to one of the listed "types". If this field is not provided, - # no type filtering will be performed (all resources of all types matching - # previous filtering parameters will be candidates for transformation). - # @!attribute [rw] json_path - # @return [::String] - # Optional. This is a [JSONPath] - # (https://github.com/json-path/JsonPath/blob/master/README.md) - # expression that matches specific fields of candidate - # resources and it operates as a filtering parameter (resources that - # are not matched with this expression will not be candidates for - # transformation). - class ResourceFilter - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # A transformation rule to be applied against Kubernetes resources as they - # are selected for restoration from a Backup. A rule contains both filtering - # logic (which resources are subject to transform) and transformation logic. - # @!attribute [rw] field_actions - # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::TransformationRuleAction>] - # Required. A list of transformation rule actions to take against candidate - # resources. Actions are executed in order defined - this order matters, as - # they could potentially interfere with each other and the first operation - # could affect the outcome of the second operation. - # @!attribute [rw] resource_filter - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::ResourceFilter] - # Optional. This field is used to specify a set of fields that should be - # used to determine which resources in backup should be acted upon by the - # supplied transformation rule actions, and this will ensure that only - # specific resources are affected by transformation rule actions. - # @!attribute [rw] description - # @return [::String] - # Optional. The description is a user specified string description of the - # transformation rule. - class TransformationRule - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Binds resources in the scope to the given VolumeDataRestorePolicy. - # @!attribute [rw] policy - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] - # Required. The VolumeDataRestorePolicy to apply when restoring volumes in - # scope. - # @!attribute [rw] volume_type - # @return [::Google::Cloud::GkeBackup::V1::VolumeTypeEnum::VolumeType] - # The volume type, as determined by the PVC's bound PV, - # to apply the policy to. - class VolumeDataRestorePolicyBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - - # Allows customers to specify dependencies between resources - # that Backup for GKE can use to compute a resasonable restore order. - # @!attribute [rw] group_kind_dependencies - # @return [::Array<::Google::Cloud::GkeBackup::V1::RestoreConfig::RestoreOrder::GroupKindDependency>] - # Optional. Contains a list of group kind dependency pairs provided - # by the customer, that is used by Backup for GKE to - # generate a group kind restore order. - class RestoreOrder - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Defines a dependency between two group kinds. - # @!attribute [rw] satisfying - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] - # Required. The satisfying group kind must be restored first - # in order to satisfy the dependency. - # @!attribute [rw] requiring - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] - # Required. The requiring group kind requires that the other - # group kind be restored first. - class GroupKindDependency - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - - # Defines how volume data should be restored. - module VolumeDataRestorePolicy - # Unspecified (illegal). - VOLUME_DATA_RESTORE_POLICY_UNSPECIFIED = 0 - - # For each PVC to be restored, create a new underlying volume and PV - # from the corresponding VolumeBackup contained within the Backup. - RESTORE_VOLUME_DATA_FROM_BACKUP = 1 - - # For each PVC to be restored, attempt to reuse the original PV contained - # in the Backup (with its original underlying volume). This option - # is likely only usable when restoring a workload to its original cluster. - REUSE_VOLUME_HANDLE_FROM_BACKUP = 2 - - # For each PVC to be restored, create PVC without any particular - # action to restore data. In this case, the normal Kubernetes provisioning - # logic would kick in, and this would likely result in either dynamically - # provisioning blank PVs or binding to statically provisioned PVs. - NO_VOLUME_DATA_RESTORATION = 3 - end - - # Defines the behavior for handling the situation where cluster-scoped - # resources being restored already exist in the target cluster. - module ClusterResourceConflictPolicy - # Unspecified. Only allowed if no cluster-scoped resources will be - # restored. - CLUSTER_RESOURCE_CONFLICT_POLICY_UNSPECIFIED = 0 - - # Do not attempt to restore the conflicting resource. - USE_EXISTING_VERSION = 1 - - # Delete the existing version before re-creating it from the Backup. - # This is a dangerous option which could cause unintentional - # data loss if used inappropriately. For example, deleting a CRD will - # cause Kubernetes to delete all CRs of that type. - USE_BACKUP_VERSION = 2 - end - - # Defines the behavior for handling the situation where sets of namespaced - # resources being restored already exist in the target cluster. - module NamespacedResourceRestoreMode - # Unspecified (invalid). - NAMESPACED_RESOURCE_RESTORE_MODE_UNSPECIFIED = 0 - - # When conflicting top-level resources (either Namespaces or - # ProtectedApplications, depending upon the scope) are encountered, this - # will first trigger a delete of the conflicting resource AND ALL OF ITS - # REFERENCED RESOURCES (e.g., all resources in the Namespace or all - # resources referenced by the ProtectedApplication) before restoring the - # resources from the Backup. This mode should only be used when you are - # intending to revert some portion of a cluster to an earlier state. - DELETE_AND_RESTORE = 1 - - # If conflicting top-level resources (either Namespaces or - # ProtectedApplications, depending upon the scope) are encountered at the - # beginning of a restore process, the Restore will fail. If a conflict - # occurs during the restore process itself (e.g., because an out of band - # process creates conflicting resources), a conflict will be reported. - FAIL_ON_CONFLICT = 2 - - # This mode merges the backup and the target cluster and skips the - # conflicting resources. If a single resource to restore exists in the - # cluster before restoration, the resource will be skipped, otherwise it - # will be restored. - MERGE_SKIP_ON_CONFLICT = 3 - - # This mode merges the backup and the target cluster and skips the - # conflicting resources except volume data. If a PVC to restore already - # exists, this mode will restore/reconnect the volume without overwriting - # the PVC. It is similar to MERGE_SKIP_ON_CONFLICT except that it will - # apply the volume data policy for the conflicting PVCs: - # - RESTORE_VOLUME_DATA_FROM_BACKUP: restore data only and respect the - # reclaim policy of the original PV; - # - REUSE_VOLUME_HANDLE_FROM_BACKUP: reconnect and respect the reclaim - # policy of the original PV; - # - NO_VOLUME_DATA_RESTORATION: new provision and respect the reclaim - # policy of the original PV. - # Note that this mode could cause data loss as the original PV can be - # retained or deleted depending on its reclaim policy. - MERGE_REPLACE_VOLUME_ON_CONFLICT = 4 - - # This mode merges the backup and the target cluster and replaces the - # conflicting resources with the ones in the backup. If a single resource - # to restore exists in the cluster before restoration, the resource will be - # replaced with the one from the backup. To replace an existing resource, - # the first attempt is to update the resource to match the one from the - # backup; if the update fails, the second attempt is to delete the resource - # and restore it from the backup. - # Note that this mode could cause data loss as it replaces the existing - # resources in the target cluster, and the original PV can be retained or - # deleted depending on its reclaim policy. - MERGE_REPLACE_ON_CONFLICT = 5 - end - end - - # Defines a selector to identify a single or a group of resources. - # Conditions in the selector are optional, but at least one field - # should be set to a non-empty value. If a condition is not specified, - # no restrictions will be applied on that dimension. - # If more than one condition is specified, a resource will be selected - # if and only if all conditions are met. - # @!attribute [rw] group_kind - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::GroupKind] - # Optional. Selects resources using their Kubernetes GroupKinds. If - # specified, only resources of provided GroupKind will be selected. - # @!attribute [rw] name - # @return [::String] - # Optional. Selects resources using their resource names. If specified, - # only resources with the provided name will be selected. - # @!attribute [rw] namespace - # @return [::String] - # Optional. Selects resources using their namespaces. This only applies to - # namespace scoped resources and cannot be used for selecting - # cluster scoped resources. If specified, only resources in the provided - # namespace will be selected. If not specified, the filter will apply to - # both cluster scoped and namespace scoped resources (e.g. name or label). - # The [Namespace](https://pkg.go.dev/k8s.io/api/core/v1#Namespace) resource - # itself will be restored if and only if any resources within the namespace - # are restored. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. Selects resources using Kubernetes - # [labels](https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/). - # If specified, a resource will be selected if and only if the resource - # has all of the provided labels and all the label values match. - class ResourceSelector - 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 - - # Defines an override to apply a VolumeDataRestorePolicy for scoped resources. - # @!attribute [rw] policy - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig::VolumeDataRestorePolicy] - # Required. The VolumeDataRestorePolicy to apply when restoring volumes in - # scope. - # @!attribute [rw] selected_pvcs - # @return [::Google::Cloud::GkeBackup::V1::NamespacedNames] - # A list of PVCs to apply the policy override to. - class VolumeDataRestorePolicyOverride - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_channel.rb deleted file mode 100644 index 7478087e3aaa..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_channel.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 Cloud - module GkeBackup - module V1 - # A RestoreChannel imposes constraints on where backups can be restored. - # The RestoreChannel should be in the same project and region - # as the backups. The backups can only be restored in the - # `destination_project`. - # @!attribute [rw] name - # @return [::String] - # Identifier. The fully qualified name of the RestoreChannel. - # `projects/*/locations/*/restoreChannels/*` - # @!attribute [rw] destination_project - # @return [::String] - # Required. Immutable. The project into which the backups will be restored. - # The format is `projects/{projectId}` or `projects/{projectNumber}`. - # @!attribute [r] uid - # @return [::String] - # Output only. Server generated global unique identifier of - # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this RestoreChannel was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this RestoreChannel was last updated. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. A set of custom labels supplied by user. - # @!attribute [rw] description - # @return [::String] - # Optional. User specified descriptive string for this RestoreChannel. - # @!attribute [r] etag - # @return [::String] - # Output only. `etag` is used for optimistic concurrency control as a way to - # help prevent simultaneous updates of a RestoreChannel from overwriting each - # other. It is strongly suggested that systems make use of the 'etag' in the - # read-modify-write cycle to perform RestoreChannel updates in order to - # avoid race conditions: An `etag` is returned in the response to - # `GetRestoreChannel`, and systems are expected to put that etag in the - # request to `UpdateRestoreChannel` or `DeleteRestoreChannel` to - # ensure that their change will be applied to the same version of the - # resource. - # @!attribute [r] destination_project_id - # @return [::String] - # Output only. The project_id where backups will be restored. - # Example Project ID: "my-project-id". - # This will be an OUTPUT_ONLY field to return the project_id of the - # destination project. - class RestoreChannel - 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 - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb deleted file mode 100644 index 9db6446b088f..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan.rb +++ /dev/null @@ -1,126 +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 GkeBackup - module V1 - # The configuration of a potential series of Restore operations to be performed - # against Backups belong to a particular BackupPlan. - # @!attribute [r] name - # @return [::String] - # Output only. The full name of the RestorePlan resource. - # Format: `projects/*/locations/*/restorePlans/*`. - # @!attribute [r] uid - # @return [::String] - # Output only. Server generated global unique identifier of - # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this RestorePlan resource was - # created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this RestorePlan resource was last - # updated. - # @!attribute [rw] description - # @return [::String] - # Optional. User specified descriptive string for this RestorePlan. - # @!attribute [rw] backup_plan - # @return [::String] - # Required. Immutable. A reference to the - # {::Google::Cloud::GkeBackup::V1::BackupPlan BackupPlan} from which Backups may - # be used as the source for Restores created via this RestorePlan. Format: - # `projects/*/locations/*/backupPlans/*`. - # @!attribute [rw] cluster - # @return [::String] - # Required. Immutable. The target cluster into which Restores created via - # this RestorePlan will restore data. NOTE: the cluster's region must be the - # same as the RestorePlan. Valid formats: - # - # - `projects/*/locations/*/clusters/*` - # - `projects/*/zones/*/clusters/*` - # @!attribute [rw] restore_config - # @return [::Google::Cloud::GkeBackup::V1::RestoreConfig] - # Required. Configuration of Restores created via this RestorePlan. - # @!attribute [rw] labels - # @return [::Google::Protobuf::Map{::String => ::String}] - # Optional. A set of custom labels supplied by user. - # @!attribute [r] etag - # @return [::String] - # Output only. `etag` is used for optimistic concurrency control as a way to - # help prevent simultaneous updates of a restore from overwriting each other. - # It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform restore updates in order to avoid - # race conditions: An `etag` is returned in the response to `GetRestorePlan`, - # and systems are expected to put that etag in the request to - # `UpdateRestorePlan` or `DeleteRestorePlan` to ensure that their change - # will be applied to the same version of the resource. - # @!attribute [r] state - # @return [::Google::Cloud::GkeBackup::V1::RestorePlan::State] - # Output only. State of the RestorePlan. This State field reflects the - # various stages a RestorePlan can be in - # during the Create operation. - # @!attribute [r] state_reason - # @return [::String] - # Output only. Human-readable description of why RestorePlan is in the - # current `state`. This field is only meant for human readability and should - # not be used programmatically as this field is not guaranteed to be - # consistent. - # @!attribute [r] restore_channel - # @return [::String] - # Output only. The fully qualified name of the RestoreChannel to be used to - # create a RestorePlan. This field is set only if the `backup_plan` is in a - # different project than the RestorePlan. Format: - # `projects/*/locations/*/restoreChannels/*` - class RestorePlan - 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 - - # State - module State - # Default first value for Enums. - STATE_UNSPECIFIED = 0 - - # Waiting for cluster state to be RUNNING. - CLUSTER_PENDING = 1 - - # The RestorePlan has successfully been created and is ready for Restores. - READY = 2 - - # RestorePlan creation has failed. - FAILED = 3 - - # The RestorePlan is in the process of being deleted. - DELETING = 4 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan_binding.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan_binding.rb deleted file mode 100644 index 5587783149a0..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/restore_plan_binding.rb +++ /dev/null @@ -1,68 +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 GkeBackup - module V1 - # A RestorePlanBinding binds a RestorePlan with a RestoreChannel. - # This resource is created automatically when a RestorePlan is created using a - # RestoreChannel. This also serves as a holder for cross-project fields - # that need to be displayed in the current project. - # @!attribute [rw] name - # @return [::String] - # Identifier. The fully qualified name of the RestorePlanBinding. - # `projects/*/locations/*/restoreChannels/*/restorePlanBindings/*` - # @!attribute [r] uid - # @return [::String] - # Output only. Server generated global unique identifier of - # [UUID4](https://en.wikipedia.org/wiki/Universally_unique_identifier) - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this binding was created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this binding was created. - # @!attribute [r] restore_plan - # @return [::String] - # Output only. The fully qualified name of the RestorePlan bound to this - # RestoreChannel. `projects/*/locations/*/restorePlans/{restore_plan}` - # @!attribute [r] etag - # @return [::String] - # Output only. `etag` is used for optimistic concurrency control as a way to - # help prevent simultaneous updates of a RestorePlanBinding from overwriting - # each other. It is strongly suggested that systems make use of the 'etag' in - # the read-modify-write cycle to perform RestorePlanBinding updates in - # order to avoid race conditions: An `etag` is returned in the response to - # `GetRestorePlanBinding`, and systems are expected to put that etag in - # the request to `UpdateRestorePlanBinding` or - # `DeleteRestorePlanBinding` to ensure that their change will be applied - # to the same version of the resource. - # @!attribute [r] backup_plan - # @return [::String] - # Output only. The fully qualified name of the BackupPlan bound to the - # specified RestorePlan. `projects/*/locations/*/backukpPlans/{backup_plan}` - class RestorePlanBinding - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/volume.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/volume.rb deleted file mode 100644 index 88558b631a1b..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/cloud/gkebackup/v1/volume.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 Cloud - module GkeBackup - module V1 - # Represents the backup of a specific persistent volume as a component of a - # Backup - both the record of the operation and a pointer to the underlying - # storage-specific artifacts. - # @!attribute [r] name - # @return [::String] - # Output only. The full name of the VolumeBackup resource. - # Format: `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`. - # @!attribute [r] uid - # @return [::String] - # Output only. Server generated global unique identifier of - # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this VolumeBackup resource was - # created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this VolumeBackup resource was last - # updated. - # @!attribute [r] source_pvc - # @return [::Google::Cloud::GkeBackup::V1::NamespacedName] - # Output only. A reference to the source Kubernetes PVC from which this - # VolumeBackup was created. - # @!attribute [r] volume_backup_handle - # @return [::String] - # Output only. A storage system-specific opaque handle to the underlying - # volume backup. - # @!attribute [r] format - # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup::VolumeBackupFormat] - # Output only. The format used for the volume backup. - # @!attribute [r] storage_bytes - # @return [::Integer] - # Output only. The aggregate size of the underlying artifacts associated with - # this VolumeBackup in the backup storage. This may change over time when - # multiple backups of the same volume share the same backup storage - # location. In particular, this is likely to increase in size when - # the immediately preceding backup of the same volume is deleted. - # @!attribute [r] disk_size_bytes - # @return [::Integer] - # Output only. The minimum size of the disk to which this VolumeBackup can be - # restored. - # @!attribute [r] complete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the associated underlying volume backup - # operation completed. - # @!attribute [r] state - # @return [::Google::Cloud::GkeBackup::V1::VolumeBackup::State] - # Output only. The current state of this VolumeBackup. - # @!attribute [r] state_message - # @return [::String] - # Output only. A human readable message explaining why the VolumeBackup is in - # its current state. This field is only meant for human consumption and - # should not be used programmatically as this field is not guaranteed to be - # consistent. - # @!attribute [r] etag - # @return [::String] - # Output only. `etag` is used for optimistic concurrency control as a way to - # help prevent simultaneous updates of a volume backup from overwriting each - # other. It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform volume backup updates in order to avoid - # race conditions. - # @!attribute [r] satisfies_pzs - # @return [::Boolean] - # Output only. [Output Only] Reserved for future use. - # @!attribute [r] satisfies_pzi - # @return [::Boolean] - # Output only. [Output Only] Reserved for future use. - class VolumeBackup - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Identifies the format used for the volume backup. - module VolumeBackupFormat - # Default value, not specified. - VOLUME_BACKUP_FORMAT_UNSPECIFIED = 0 - - # Compute Engine Persistent Disk snapshot based volume backup. - GCE_PERSISTENT_DISK = 1 - end - - # The current state of a VolumeBackup - module State - # This is an illegal state and should not be encountered. - STATE_UNSPECIFIED = 0 - - # A volume for the backup was identified and backup process is about to - # start. - CREATING = 1 - - # The volume backup operation has begun and is in the initial "snapshot" - # phase of the process. Any defined ProtectedApplication "pre" hooks will - # be executed before entering this state and "post" hooks will be executed - # upon leaving this state. - SNAPSHOTTING = 2 - - # The snapshot phase of the volume backup operation has completed and - # the snapshot is now being uploaded to backup storage. - UPLOADING = 3 - - # The volume backup operation has completed successfully. - SUCCEEDED = 4 - - # The volume backup operation has failed. - FAILED = 5 - - # This VolumeBackup resource (and its associated artifacts) is in the - # process of being deleted. - DELETING = 6 - - # The underlying artifacts of a volume backup (eg: persistent disk - # snapshots) are deleted. - CLEANED_UP = 7 - end - end - - # Represents the operation of restoring a volume from a VolumeBackup. - # @!attribute [r] name - # @return [::String] - # Output only. Full name of the VolumeRestore resource. - # Format: `projects/*/locations/*/restorePlans/*/restores/*/volumeRestores/*` - # @!attribute [r] uid - # @return [::String] - # Output only. Server generated global unique identifier of - # [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier) format. - # @!attribute [r] create_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this VolumeRestore resource was - # created. - # @!attribute [r] update_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when this VolumeRestore resource was last - # updated. - # @!attribute [r] volume_backup - # @return [::String] - # Output only. The full name of the VolumeBackup from which the volume will - # be restored. Format: - # `projects/*/locations/*/backupPlans/*/backups/*/volumeBackups/*`. - # @!attribute [r] target_pvc - # @return [::Google::Cloud::GkeBackup::V1::NamespacedName] - # Output only. The reference to the target Kubernetes PVC to be restored. - # @!attribute [r] volume_handle - # @return [::String] - # Output only. A storage system-specific opaque handler to the underlying - # volume created for the target PVC from the volume backup. - # @!attribute [r] volume_type - # @return [::Google::Cloud::GkeBackup::V1::VolumeRestore::VolumeType] - # Output only. The type of volume provisioned - # @!attribute [r] complete_time - # @return [::Google::Protobuf::Timestamp] - # Output only. The timestamp when the associated underlying volume - # restoration completed. - # @!attribute [r] state - # @return [::Google::Cloud::GkeBackup::V1::VolumeRestore::State] - # Output only. The current state of this VolumeRestore. - # @!attribute [r] state_message - # @return [::String] - # Output only. A human readable message explaining why the VolumeRestore is - # in its current state. - # @!attribute [r] etag - # @return [::String] - # Output only. `etag` is used for optimistic concurrency control as a way to - # help prevent simultaneous updates of a volume restore from overwriting each - # other. It is strongly suggested that systems make use of the `etag` in the - # read-modify-write cycle to perform volume restore updates in order to avoid - # race conditions. - class VolumeRestore - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - - # Supported volume types. - module VolumeType - # Default - VOLUME_TYPE_UNSPECIFIED = 0 - - # Compute Engine Persistent Disk volume - GCE_PERSISTENT_DISK = 1 - end - - # The current state of a VolumeRestore - module State - # This is an illegal state and should not be encountered. - STATE_UNSPECIFIED = 0 - - # A volume for the restore was identified and restore process is about to - # start. - CREATING = 1 - - # The volume is currently being restored. - RESTORING = 2 - - # The volume has been successfully restored. - SUCCEEDED = 3 - - # The volume restoration process failed. - FAILED = 4 - - # This VolumeRestore resource is in the process of being deleted. - DELETING = 5 - end - end - end - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/longrunning/operations.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/longrunning/operations.rb deleted file mode 100644 index 7a757f512165..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/protobuf/any.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/any.rb deleted file mode 100644 index 58691995f02e..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/protobuf/duration.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/duration.rb deleted file mode 100644 index ea59f1f91daf..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/protobuf/empty.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/empty.rb deleted file mode 100644 index 83e4481834a6..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/protobuf/field_mask.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/field_mask.rb deleted file mode 100644 index 7f3ffc78601a..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/protobuf/timestamp.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/protobuf/timestamp.rb deleted file mode 100644 index 74352be9c58c..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/rpc/status.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/rpc/status.rb deleted file mode 100644 index c1a1c07eb2db..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/type/date.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/date.rb deleted file mode 100644 index 14ec426522d9..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/date.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! - - -module Google - module Type - # Represents a whole or partial calendar date, such as a birthday. The time of - # day and time zone are either specified elsewhere or are insignificant. The - # date is relative to the Gregorian Calendar. This can represent one of the - # following: - # - # * A full date, with non-zero year, month, and day values - # * A month and day value, with a zero year, such as an anniversary - # * A year on its own, with zero month and day values - # * A year and month value, with a zero day, such as a credit card expiration - # date - # - # Related types are {::Google::Type::TimeOfDay google.type.TimeOfDay} and - # `google.protobuf.Timestamp`. - # @!attribute [rw] year - # @return [::Integer] - # Year of the date. Must be from 1 to 9999, or 0 to specify a date without - # a year. - # @!attribute [rw] month - # @return [::Integer] - # Month of a year. Must be from 1 to 12, or 0 to specify a year without a - # month and day. - # @!attribute [rw] day - # @return [::Integer] - # Day of a month. Must be from 1 to 31 and valid for the year and month, or 0 - # to specify a year by itself or a year and month where the day isn't - # significant. - class Date - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/dayofweek.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/dayofweek.rb deleted file mode 100644 index 973211b9ffe7..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/dayofweek.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! - - -module Google - module Type - # Represents a day of the week. - module DayOfWeek - # The day of the week is unspecified. - DAY_OF_WEEK_UNSPECIFIED = 0 - - # Monday - MONDAY = 1 - - # Tuesday - TUESDAY = 2 - - # Wednesday - WEDNESDAY = 3 - - # Thursday - THURSDAY = 4 - - # Friday - FRIDAY = 5 - - # Saturday - SATURDAY = 6 - - # Sunday - SUNDAY = 7 - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/expr.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/expr.rb deleted file mode 100644 index 53e7733b6592..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1/proto_docs/google/type/timeofday.rb b/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/timeofday.rb deleted file mode 100644 index b0c888c8c14a..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/proto_docs/google/type/timeofday.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! - - -module Google - module Type - # Represents a time of day. The date and time zone are either not significant - # or are specified elsewhere. An API may choose to allow leap seconds. Related - # types are {::Google::Type::Date google.type.Date} and - # `google.protobuf.Timestamp`. - # @!attribute [rw] hours - # @return [::Integer] - # Hours of day in 24 hour format. Should be from 0 to 23. An API may choose - # to allow the value "24:00:00" for scenarios like business closing time. - # @!attribute [rw] minutes - # @return [::Integer] - # Minutes of hour of day. Must be from 0 to 59. - # @!attribute [rw] seconds - # @return [::Integer] - # Seconds of minutes of the time. Must normally be from 0 to 59. An API may - # allow the value 60 if it allows leap-seconds. - # @!attribute [rw] nanos - # @return [::Integer] - # Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - class TimeOfDay - include ::Google::Protobuf::MessageExts - extend ::Google::Protobuf::MessageExts::ClassMethods - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/Gemfile b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/Gemfile deleted file mode 100644 index 89f79468ef2f..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-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-gke_backup-v1", path: "../" -else - gem "google-cloud-gke_backup-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-gke_backup-v1/snippets/backup_for_gke/create_backup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup.rb deleted file mode 100644 index 9dc71958dd80..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup.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 gkebackup_v1_generated_BackupForGKE_CreateBackup_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the create_backup call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup. -# -def create_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::CreateBackupRequest.new - - # Call the create_backup method. - result = client.create_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_CreateBackup_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_channel.rb deleted file mode 100644 index 74db8e912529..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_channel.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 gkebackup_v1_generated_BackupForGKE_CreateBackupChannel_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the create_backup_channel call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup_channel. -# -def create_backup_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new - - # Call the create_backup_channel method. - result = client.create_backup_channel request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_CreateBackupChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_plan.rb deleted file mode 100644 index 957dfc20c5c6..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_backup_plan.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 gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the create_backup_plan call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup_plan. -# -def create_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new - - # Call the create_backup_plan method. - result = client.create_backup_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore.rb deleted file mode 100644 index 63e786ae5aaa..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore.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 gkebackup_v1_generated_BackupForGKE_CreateRestore_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the create_restore call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore. -# -def create_restore - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new - - # Call the create_restore method. - result = client.create_restore request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_CreateRestore_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_channel.rb deleted file mode 100644 index 71363897d319..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_channel.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 gkebackup_v1_generated_BackupForGKE_CreateRestoreChannel_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the create_restore_channel call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore_channel. -# -def create_restore_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new - - # Call the create_restore_channel method. - result = client.create_restore_channel request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_CreateRestoreChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_plan.rb deleted file mode 100644 index e3f0621ede47..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/create_restore_plan.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 gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the create_restore_plan call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore_plan. -# -def create_restore_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new - - # Call the create_restore_plan method. - result = client.create_restore_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup.rb deleted file mode 100644 index 34938923549f..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup.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 gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the delete_backup call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup. -# -def delete_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new - - # Call the delete_backup method. - result = client.delete_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_channel.rb deleted file mode 100644 index 0eb6bc33b82e..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_channel.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 gkebackup_v1_generated_BackupForGKE_DeleteBackupChannel_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the delete_backup_channel call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup_channel. -# -def delete_backup_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new - - # Call the delete_backup_channel method. - result = client.delete_backup_channel request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_DeleteBackupChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_plan.rb deleted file mode 100644 index ad917a877742..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_backup_plan.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 gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the delete_backup_plan call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup_plan. -# -def delete_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.new - - # Call the delete_backup_plan method. - result = client.delete_backup_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore.rb deleted file mode 100644 index d7060b3758d9..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore.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 gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the delete_restore call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore. -# -def delete_restore - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new - - # Call the delete_restore method. - result = client.delete_restore request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_channel.rb deleted file mode 100644 index 2c28198a7754..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_channel.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 gkebackup_v1_generated_BackupForGKE_DeleteRestoreChannel_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the delete_restore_channel call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore_channel. -# -def delete_restore_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.new - - # Call the delete_restore_channel method. - result = client.delete_restore_channel request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_DeleteRestoreChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_plan.rb deleted file mode 100644 index 855134c6f2b0..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/delete_restore_plan.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 gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the delete_restore_plan call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore_plan. -# -def delete_restore_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new - - # Call the delete_restore_plan method. - result = client.delete_restore_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup.rb deleted file mode 100644 index c696be7b46bc..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup.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 gkebackup_v1_generated_BackupForGKE_GetBackup_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the get_backup call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup. -# -def get_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::GetBackupRequest.new - - # Call the get_backup method. - result = client.get_backup request - - # The returned object is of type Google::Cloud::GkeBackup::V1::Backup. - p result -end -# [END gkebackup_v1_generated_BackupForGKE_GetBackup_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_channel.rb deleted file mode 100644 index 3756946ee678..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_channel.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 gkebackup_v1_generated_BackupForGKE_GetBackupChannel_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the get_backup_channel call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_channel. -# -def get_backup_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new - - # Call the get_backup_channel method. - result = client.get_backup_channel request - - # The returned object is of type Google::Cloud::GkeBackup::V1::BackupChannel. - p result -end -# [END gkebackup_v1_generated_BackupForGKE_GetBackupChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_index_download_url.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_index_download_url.rb deleted file mode 100644 index 46138b138163..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_index_download_url.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 gkebackup_v1_generated_BackupForGKE_GetBackupIndexDownloadUrl_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the get_backup_index_download_url call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_index_download_url. -# -def get_backup_index_download_url - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new - - # Call the get_backup_index_download_url method. - result = client.get_backup_index_download_url request - - # The returned object is of type Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse. - p result -end -# [END gkebackup_v1_generated_BackupForGKE_GetBackupIndexDownloadUrl_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan.rb deleted file mode 100644 index 40c66d9577d7..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan.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 gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the get_backup_plan call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_plan. -# -def get_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new - - # Call the get_backup_plan method. - result = client.get_backup_plan request - - # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlan. - p result -end -# [END gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan_binding.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan_binding.rb deleted file mode 100644 index eb6c802bf42c..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_backup_plan_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 gkebackup_v1_generated_BackupForGKE_GetBackupPlanBinding_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the get_backup_plan_binding call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_plan_binding. -# -def get_backup_plan_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new - - # Call the get_backup_plan_binding method. - result = client.get_backup_plan_binding request - - # The returned object is of type Google::Cloud::GkeBackup::V1::BackupPlanBinding. - p result -end -# [END gkebackup_v1_generated_BackupForGKE_GetBackupPlanBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore.rb deleted file mode 100644 index 068f3377306c..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore.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 gkebackup_v1_generated_BackupForGKE_GetRestore_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the get_restore call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore. -# -def get_restore - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::GetRestoreRequest.new - - # Call the get_restore method. - result = client.get_restore request - - # The returned object is of type Google::Cloud::GkeBackup::V1::Restore. - p result -end -# [END gkebackup_v1_generated_BackupForGKE_GetRestore_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_channel.rb deleted file mode 100644 index e1d7326eff88..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_channel.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 gkebackup_v1_generated_BackupForGKE_GetRestoreChannel_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the get_restore_channel call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_channel. -# -def get_restore_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new - - # Call the get_restore_channel method. - result = client.get_restore_channel request - - # The returned object is of type Google::Cloud::GkeBackup::V1::RestoreChannel. - p result -end -# [END gkebackup_v1_generated_BackupForGKE_GetRestoreChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan.rb deleted file mode 100644 index ead4676bd72c..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan.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 gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the get_restore_plan call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_plan. -# -def get_restore_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new - - # Call the get_restore_plan method. - result = client.get_restore_plan request - - # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlan. - p result -end -# [END gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan_binding.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan_binding.rb deleted file mode 100644 index 2fcc61374824..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_restore_plan_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 gkebackup_v1_generated_BackupForGKE_GetRestorePlanBinding_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the get_restore_plan_binding call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_plan_binding. -# -def get_restore_plan_binding - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new - - # Call the get_restore_plan_binding method. - result = client.get_restore_plan_binding request - - # The returned object is of type Google::Cloud::GkeBackup::V1::RestorePlanBinding. - p result -end -# [END gkebackup_v1_generated_BackupForGKE_GetRestorePlanBinding_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_backup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_backup.rb deleted file mode 100644 index bf3e4483700a..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_backup.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 gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the get_volume_backup call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_volume_backup. -# -def get_volume_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new - - # Call the get_volume_backup method. - result = client.get_volume_backup request - - # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeBackup. - p result -end -# [END gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_restore.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_restore.rb deleted file mode 100644 index 565d2934a5cf..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/get_volume_restore.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 gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the get_volume_restore call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_volume_restore. -# -def get_volume_restore - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new - - # Call the get_volume_restore method. - result = client.get_volume_restore request - - # The returned object is of type Google::Cloud::GkeBackup::V1::VolumeRestore. - p result -end -# [END gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_channels.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_channels.rb deleted file mode 100644 index 733450ae3ce7..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_channels.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 gkebackup_v1_generated_BackupForGKE_ListBackupChannels_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the list_backup_channels call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_channels. -# -def list_backup_channels - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.new - - # Call the list_backup_channels method. - result = client.list_backup_channels request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupChannel. - p item - end -end -# [END gkebackup_v1_generated_BackupForGKE_ListBackupChannels_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plan_bindings.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plan_bindings.rb deleted file mode 100644 index a780fd527094..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plan_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 gkebackup_v1_generated_BackupForGKE_ListBackupPlanBindings_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the list_backup_plan_bindings call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_plan_bindings. -# -def list_backup_plan_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.new - - # Call the list_backup_plan_bindings method. - result = client.list_backup_plan_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::GkeBackup::V1::BackupPlanBinding. - p item - end -end -# [END gkebackup_v1_generated_BackupForGKE_ListBackupPlanBindings_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plans.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plans.rb deleted file mode 100644 index 31a456fd2506..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backup_plans.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 gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the list_backup_plans call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_plans. -# -def list_backup_plans - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.new - - # Call the list_backup_plans method. - result = client.list_backup_plans request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::GkeBackup::V1::BackupPlan. - p item - end -end -# [END gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backups.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backups.rb deleted file mode 100644 index fe5a2a626313..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_backups.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 gkebackup_v1_generated_BackupForGKE_ListBackups_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the list_backups call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backups. -# -def list_backups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::ListBackupsRequest.new - - # Call the list_backups method. - result = client.list_backups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::GkeBackup::V1::Backup. - p item - end -end -# [END gkebackup_v1_generated_BackupForGKE_ListBackups_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_channels.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_channels.rb deleted file mode 100644 index 234f2465fa88..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_channels.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 gkebackup_v1_generated_BackupForGKE_ListRestoreChannels_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the list_restore_channels call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_channels. -# -def list_restore_channels - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.new - - # Call the list_restore_channels method. - result = client.list_restore_channels request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::GkeBackup::V1::RestoreChannel. - p item - end -end -# [END gkebackup_v1_generated_BackupForGKE_ListRestoreChannels_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plan_bindings.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plan_bindings.rb deleted file mode 100644 index 20ed0f0420e1..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plan_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 gkebackup_v1_generated_BackupForGKE_ListRestorePlanBindings_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the list_restore_plan_bindings call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_plan_bindings. -# -def list_restore_plan_bindings - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.new - - # Call the list_restore_plan_bindings method. - result = client.list_restore_plan_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::GkeBackup::V1::RestorePlanBinding. - p item - end -end -# [END gkebackup_v1_generated_BackupForGKE_ListRestorePlanBindings_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plans.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plans.rb deleted file mode 100644 index ea5531535897..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restore_plans.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 gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the list_restore_plans call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_plans. -# -def list_restore_plans - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.new - - # Call the list_restore_plans method. - result = client.list_restore_plans request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::GkeBackup::V1::RestorePlan. - p item - end -end -# [END gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restores.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restores.rb deleted file mode 100644 index e1b7530c195e..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_restores.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 gkebackup_v1_generated_BackupForGKE_ListRestores_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the list_restores call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restores. -# -def list_restores - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::ListRestoresRequest.new - - # Call the list_restores method. - result = client.list_restores request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::GkeBackup::V1::Restore. - p item - end -end -# [END gkebackup_v1_generated_BackupForGKE_ListRestores_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_backups.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_backups.rb deleted file mode 100644 index 7ab6a11e5a16..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_backups.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 gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the list_volume_backups call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_volume_backups. -# -def list_volume_backups - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.new - - # Call the list_volume_backups method. - result = client.list_volume_backups request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeBackup. - p item - end -end -# [END gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_restores.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_restores.rb deleted file mode 100644 index 75c43204e722..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/list_volume_restores.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 gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the list_volume_restores call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_volume_restores. -# -def list_volume_restores - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.new - - # Call the list_volume_restores method. - result = client.list_volume_restores request - - # The returned object is of type Gapic::PagedEnumerable. You can iterate - # over elements, and API calls will be issued to fetch pages as needed. - result.each do |item| - # Each element is of type ::Google::Cloud::GkeBackup::V1::VolumeRestore. - p item - end -end -# [END gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup.rb deleted file mode 100644 index f406f9a035f9..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup.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 gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the update_backup call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup. -# -def update_backup - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new - - # Call the update_backup method. - result = client.update_backup request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_channel.rb deleted file mode 100644 index c9766c3b371d..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_channel.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 gkebackup_v1_generated_BackupForGKE_UpdateBackupChannel_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the update_backup_channel call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup_channel. -# -def update_backup_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new - - # Call the update_backup_channel method. - result = client.update_backup_channel request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_UpdateBackupChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_plan.rb deleted file mode 100644 index a4ea65d15828..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_backup_plan.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 gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the update_backup_plan call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup_plan. -# -def update_backup_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new - - # Call the update_backup_plan method. - result = client.update_backup_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore.rb deleted file mode 100644 index fe782c8457e2..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore.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 gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the update_restore call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore. -# -def update_restore - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new - - # Call the update_restore method. - result = client.update_restore request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_channel.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_channel.rb deleted file mode 100644 index 2958cdf118bf..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_channel.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 gkebackup_v1_generated_BackupForGKE_UpdateRestoreChannel_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the update_restore_channel call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore_channel. -# -def update_restore_channel - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new - - # Call the update_restore_channel method. - result = client.update_restore_channel request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_UpdateRestoreChannel_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_plan.rb b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_plan.rb deleted file mode 100644 index 78b9d9af5d2c..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/backup_for_gke/update_restore_plan.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 gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync] -require "google/cloud/gke_backup/v1" - -## -# Snippet for the update_restore_plan call in the BackupForGKE service -# -# This snippet has been automatically generated and should be regarded as a code -# template only. It will require modifications to work: -# - It may require correct/in-range values for request initialization. -# - It may require specifying regional endpoints when creating the service -# client as shown in https://cloud.google.com/ruby/docs/reference. -# -# This is an auto-generated example demonstrating basic usage of -# Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore_plan. -# -def update_restore_plan - # Create a client object. The client can be reused for multiple calls. - client = Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new - - # Create a request. To set request fields, pass in keyword arguments. - request = Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new - - # Call the update_restore_plan method. - result = client.update_restore_plan request - - # The returned object is of type Gapic::Operation. You can use it to - # check the status of an operation, cancel it, or wait for results. - # Here is 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 gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync] diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/snippet_metadata_google.cloud.gkebackup.v1.json b/owl-bot-staging/google-cloud-gke_backup-v1/snippets/snippet_metadata_google.cloud.gkebackup.v1.json deleted file mode 100644 index b421549460ad..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/snippets/snippet_metadata_google.cloud.gkebackup.v1.json +++ /dev/null @@ -1,1575 +0,0 @@ -{ - "client_library": { - "name": "google-cloud-gke_backup-v1", - "version": "", - "language": "RUBY", - "apis": [ - { - "id": "google.cloud.gkebackup.v1", - "version": "v1" - } - ] - }, - "snippets": [ - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_CreateBackupPlan_sync", - "title": "Snippet for the create_backup_plan call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup_plan.", - "file": "backup_for_gke/create_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup_plan", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "CreateBackupPlan", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.CreateBackupPlan", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_ListBackupPlans_sync", - "title": "Snippet for the list_backup_plans call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_plans.", - "file": "backup_for_gke/list_backup_plans.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_plans", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_plans", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "ListBackupPlans", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListBackupPlans", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_GetBackupPlan_sync", - "title": "Snippet for the get_backup_plan call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_plan.", - "file": "backup_for_gke/get_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_plan", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::BackupPlan", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "GetBackupPlan", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetBackupPlan", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_UpdateBackupPlan_sync", - "title": "Snippet for the update_backup_plan call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup_plan.", - "file": "backup_for_gke/update_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup_plan", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "UpdateBackupPlan", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackupPlan", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_DeleteBackupPlan_sync", - "title": "Snippet for the delete_backup_plan call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup_plan.", - "file": "backup_for_gke/delete_backup_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup_plan", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "DeleteBackupPlan", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackupPlan", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_CreateBackupChannel_sync", - "title": "Snippet for the create_backup_channel call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup_channel.", - "file": "backup_for_gke/create_backup_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup_channel", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "CreateBackupChannel", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.CreateBackupChannel", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_ListBackupChannels_sync", - "title": "Snippet for the list_backup_channels call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_channels.", - "file": "backup_for_gke/list_backup_channels.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_channels", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_channels", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "ListBackupChannels", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListBackupChannels", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_GetBackupChannel_sync", - "title": "Snippet for the get_backup_channel call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_channel.", - "file": "backup_for_gke/get_backup_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_channel", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::BackupChannel", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "GetBackupChannel", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetBackupChannel", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_UpdateBackupChannel_sync", - "title": "Snippet for the update_backup_channel call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup_channel.", - "file": "backup_for_gke/update_backup_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup_channel", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "UpdateBackupChannel", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackupChannel", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_DeleteBackupChannel_sync", - "title": "Snippet for the delete_backup_channel call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup_channel.", - "file": "backup_for_gke/delete_backup_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup_channel", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "DeleteBackupChannel", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackupChannel", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_ListBackupPlanBindings_sync", - "title": "Snippet for the list_backup_plan_bindings call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_plan_bindings.", - "file": "backup_for_gke/list_backup_plan_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backup_plan_bindings", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backup_plan_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "ListBackupPlanBindings", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListBackupPlanBindings", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_GetBackupPlanBinding_sync", - "title": "Snippet for the get_backup_plan_binding call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_plan_binding.", - "file": "backup_for_gke/get_backup_plan_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_plan_binding", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_plan_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::BackupPlanBinding", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "GetBackupPlanBinding", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetBackupPlanBinding", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_CreateBackup_sync", - "title": "Snippet for the create_backup call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup.", - "file": "backup_for_gke/create_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_backup", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::CreateBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "CreateBackup", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.CreateBackup", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_ListBackups_sync", - "title": "Snippet for the list_backups call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backups.", - "file": "backup_for_gke/list_backups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_backups", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_backups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::ListBackupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::ListBackupsResponse", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "ListBackups", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListBackups", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_GetBackup_sync", - "title": "Snippet for the get_backup call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup.", - "file": "backup_for_gke/get_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::GetBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::Backup", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "GetBackup", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetBackup", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_UpdateBackup_sync", - "title": "Snippet for the update_backup call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup.", - "file": "backup_for_gke/update_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_backup", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::UpdateBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "UpdateBackup", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.UpdateBackup", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_DeleteBackup_sync", - "title": "Snippet for the delete_backup call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup.", - "file": "backup_for_gke/delete_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_backup", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::DeleteBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "DeleteBackup", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.DeleteBackup", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_ListVolumeBackups_sync", - "title": "Snippet for the list_volume_backups call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_volume_backups.", - "file": "backup_for_gke/list_volume_backups.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_volume_backups", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_volume_backups", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "ListVolumeBackups", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeBackups", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_GetVolumeBackup_sync", - "title": "Snippet for the get_volume_backup call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_volume_backup.", - "file": "backup_for_gke/get_volume_backup.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_volume_backup", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_volume_backup", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::VolumeBackup", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "GetVolumeBackup", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeBackup", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_CreateRestorePlan_sync", - "title": "Snippet for the create_restore_plan call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore_plan.", - "file": "backup_for_gke/create_restore_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_restore_plan", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "CreateRestorePlan", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.CreateRestorePlan", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_ListRestorePlans_sync", - "title": "Snippet for the list_restore_plans call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_plans.", - "file": "backup_for_gke/list_restore_plans.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_restore_plans", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_plans", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "ListRestorePlans", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListRestorePlans", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_GetRestorePlan_sync", - "title": "Snippet for the get_restore_plan call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_plan.", - "file": "backup_for_gke/get_restore_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_restore_plan", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::RestorePlan", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "GetRestorePlan", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetRestorePlan", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_UpdateRestorePlan_sync", - "title": "Snippet for the update_restore_plan call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore_plan.", - "file": "backup_for_gke/update_restore_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_restore_plan", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "UpdateRestorePlan", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.UpdateRestorePlan", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_DeleteRestorePlan_sync", - "title": "Snippet for the delete_restore_plan call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore_plan.", - "file": "backup_for_gke/delete_restore_plan.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_restore_plan", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore_plan", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "DeleteRestorePlan", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestorePlan", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_CreateRestoreChannel_sync", - "title": "Snippet for the create_restore_channel call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore_channel.", - "file": "backup_for_gke/create_restore_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_restore_channel", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "CreateRestoreChannel", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.CreateRestoreChannel", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_ListRestoreChannels_sync", - "title": "Snippet for the list_restore_channels call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_channels.", - "file": "backup_for_gke/list_restore_channels.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_restore_channels", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_channels", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "ListRestoreChannels", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListRestoreChannels", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_GetRestoreChannel_sync", - "title": "Snippet for the get_restore_channel call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_channel.", - "file": "backup_for_gke/get_restore_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_restore_channel", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::RestoreChannel", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "GetRestoreChannel", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetRestoreChannel", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_UpdateRestoreChannel_sync", - "title": "Snippet for the update_restore_channel call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore_channel.", - "file": "backup_for_gke/update_restore_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_restore_channel", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "UpdateRestoreChannel", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.UpdateRestoreChannel", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_DeleteRestoreChannel_sync", - "title": "Snippet for the delete_restore_channel call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore_channel.", - "file": "backup_for_gke/delete_restore_channel.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_restore_channel", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore_channel", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "DeleteRestoreChannel", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestoreChannel", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_ListRestorePlanBindings_sync", - "title": "Snippet for the list_restore_plan_bindings call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_plan_bindings.", - "file": "backup_for_gke/list_restore_plan_bindings.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_restore_plan_bindings", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restore_plan_bindings", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "ListRestorePlanBindings", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListRestorePlanBindings", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_GetRestorePlanBinding_sync", - "title": "Snippet for the get_restore_plan_binding call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_plan_binding.", - "file": "backup_for_gke/get_restore_plan_binding.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_restore_plan_binding", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore_plan_binding", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::RestorePlanBinding", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "GetRestorePlanBinding", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetRestorePlanBinding", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_CreateRestore_sync", - "title": "Snippet for the create_restore call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore.", - "file": "backup_for_gke/create_restore.rb", - "language": "RUBY", - "client_method": { - "short_name": "create_restore", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#create_restore", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::CreateRestoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "CreateRestore", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.CreateRestore", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_ListRestores_sync", - "title": "Snippet for the list_restores call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restores.", - "file": "backup_for_gke/list_restores.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_restores", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_restores", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::ListRestoresRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::ListRestoresResponse", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "ListRestores", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListRestores", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_GetRestore_sync", - "title": "Snippet for the get_restore call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore.", - "file": "backup_for_gke/get_restore.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_restore", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_restore", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::GetRestoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::Restore", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "GetRestore", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetRestore", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_UpdateRestore_sync", - "title": "Snippet for the update_restore call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore.", - "file": "backup_for_gke/update_restore.rb", - "language": "RUBY", - "client_method": { - "short_name": "update_restore", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#update_restore", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "UpdateRestore", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.UpdateRestore", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_DeleteRestore_sync", - "title": "Snippet for the delete_restore call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore.", - "file": "backup_for_gke/delete_restore.rb", - "language": "RUBY", - "client_method": { - "short_name": "delete_restore", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#delete_restore", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Longrunning::Operation", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "DeleteRestore", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.DeleteRestore", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 53, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_ListVolumeRestores_sync", - "title": "Snippet for the list_volume_restores call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_volume_restores.", - "file": "backup_for_gke/list_volume_restores.rb", - "language": "RUBY", - "client_method": { - "short_name": "list_volume_restores", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#list_volume_restores", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "ListVolumeRestores", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.ListVolumeRestores", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 50, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_GetVolumeRestore_sync", - "title": "Snippet for the get_volume_restore call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_volume_restore.", - "file": "backup_for_gke/get_volume_restore.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_volume_restore", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_volume_restore", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::VolumeRestore", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "GetVolumeRestore", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetVolumeRestore", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - }, - { - "region_tag": "gkebackup_v1_generated_BackupForGKE_GetBackupIndexDownloadUrl_sync", - "title": "Snippet for the get_backup_index_download_url call in the BackupForGKE service", - "description": "This is an auto-generated example demonstrating basic usage of Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_index_download_url.", - "file": "backup_for_gke/get_backup_index_download_url.rb", - "language": "RUBY", - "client_method": { - "short_name": "get_backup_index_download_url", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client#get_backup_index_download_url", - "async": false, - "parameters": [ - { - "type": "::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest", - "name": "request" - } - ], - "result_type": "::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse", - "client": { - "short_name": "BackupForGKE::Client", - "full_name": "::Google::Cloud::GkeBackup::V1::BackupForGKE::Client" - }, - "method": { - "short_name": "GetBackupIndexDownloadUrl", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE.GetBackupIndexDownloadUrl", - "service": { - "short_name": "BackupForGKE", - "full_name": "google.cloud.gkebackup.v1.BackupForGKE" - } - } - }, - "canonical": true, - "origin": "API_DEFINITION", - "segments": [ - { - "start": 20, - "end": 46, - "type": "FULL" - } - ] - } - ] -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_operations_test.rb b/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_operations_test.rb deleted file mode 100644 index c5f15700016e..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_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/gkebackup/v1/gkebackup_pb" -require "google/cloud/gkebackup/v1/gkebackup_services_pb" -require "google/cloud/gke_backup/v1/backup_for_gke" - -class ::Google::Cloud::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::Operations::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_paths_test.rb b/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_paths_test.rb deleted file mode 100644 index c3005889bc18..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_paths_test.rb +++ /dev/null @@ -1,199 +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/gke_backup/v1/backup_for_gke" - -class ::Google::Cloud::GkeBackup::V1::BackupForGKE::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_backup_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_path project: "value0", location: "value1", backup_plan: "value2", backup: "value3" - assert_equal "projects/value0/locations/value1/backupPlans/value2/backups/value3", path - end - end - - def test_backup_channel_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_channel_path project: "value0", location: "value1", backup_channel: "value2" - assert_equal "projects/value0/locations/value1/backupChannels/value2", path - end - end - - def test_backup_plan_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_plan_path project: "value0", location: "value1", backup_plan: "value2" - assert_equal "projects/value0/locations/value1/backupPlans/value2", path - end - end - - def test_backup_plan_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::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.backup_plan_binding_path project: "value0", location: "value1", backup_channel: "value2", backup_plan_binding: "value3" - assert_equal "projects/value0/locations/value1/backupChannels/value2/backupPlanBindings/value3", path - end - end - - def test_cluster_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.cluster_path project: "value0", location: "value1", cluster: "value2" - assert_equal "projects/value0/locations/value1/clusters/value2", path - end - end - - def test_crypto_key_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.crypto_key_path project: "value0", location: "value1", key_ring: "value2", crypto_key: "value3" - assert_equal "projects/value0/locations/value1/keyRings/value2/cryptoKeys/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::GkeBackup::V1::BackupForGKE::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_restore_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.restore_path project: "value0", location: "value1", restore_plan: "value2", restore: "value3" - assert_equal "projects/value0/locations/value1/restorePlans/value2/restores/value3", path - end - end - - def test_restore_channel_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.restore_channel_path project: "value0", location: "value1", restore_channel: "value2" - assert_equal "projects/value0/locations/value1/restoreChannels/value2", path - end - end - - def test_restore_plan_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.restore_plan_path project: "value0", location: "value1", restore_plan: "value2" - assert_equal "projects/value0/locations/value1/restorePlans/value2", path - end - end - - def test_restore_plan_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::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.restore_plan_binding_path project: "value0", location: "value1", restore_channel: "value2", restore_plan_binding: "value3" - assert_equal "projects/value0/locations/value1/restoreChannels/value2/restorePlanBindings/value3", path - end - end - - def test_volume_backup_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.volume_backup_path project: "value0", location: "value1", backup_plan: "value2", backup: "value3", volume_backup: "value4" - assert_equal "projects/value0/locations/value1/backupPlans/value2/backups/value3/volumeBackups/value4", path - end - end - - def test_volume_restore_path - grpc_channel = ::GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - ::Gapic::ServiceStub.stub :new, DummyStub.new do - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - path = client.volume_restore_path project: "value0", location: "value1", restore_plan: "value2", restore: "value3", volume_restore: "value4" - assert_equal "projects/value0/locations/value1/restorePlans/value2/restores/value3/volumeRestores/value4", path - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_rest_test.rb b/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_rest_test.rb deleted file mode 100644 index 865d2dbce1bd..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_rest_test.rb +++ /dev/null @@ -1,2274 +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/gkebackup/v1/gkebackup_pb" -require "google/cloud/gke_backup/v1/backup_for_gke/rest" - - -class ::Google::Cloud::GkeBackup::V1::BackupForGKE::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_backup_plan - # 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" - backup_plan = {} - backup_plan_id = "hello world" - - create_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_create_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_backup_plan({ parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_backup_plan parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_backup_plan ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_backup_plan({ parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_backup_plan(::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_plan_client_stub.call_count - end - end - end - - def test_list_backup_plans - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse.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_backup_plans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_backup_plans_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_plans_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backup_plans({ parent: parent, page_size: 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_backup_plans parent: parent, page_size: 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_backup_plans ::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.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_backup_plans({ 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_backup_plans(::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.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_backup_plans_client_stub.call_count - end - end - end - - def test_get_backup_plan - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::BackupPlan.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_plan({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_plan name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_plan ::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_plan({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_plan(::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_plan_client_stub.call_count - end - end - end - - def test_update_backup_plan - # 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. - backup_plan = {} - update_mask = {} - - update_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_update_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backup_plan backup_plan: backup_plan, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backup_plan ::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backup_plan({ backup_plan: backup_plan, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backup_plan(::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_plan_client_stub.call_count - end - end - end - - def test_delete_backup_plan - # 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_backup_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_delete_backup_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup_plan({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup_plan name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup_plan ::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup_plan({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup_plan(::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.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_backup_plan_client_stub.call_count - end - end - end - - def test_create_backup_channel - # 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" - backup_channel = {} - backup_channel_id = "hello world" - - create_backup_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_create_backup_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_backup_channel({ parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_backup_channel parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_backup_channel ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new(parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_backup_channel({ parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_backup_channel(::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new(parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_channel_client_stub.call_count - end - end - end - - def test_list_backup_channels - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse.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_backup_channels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_backup_channels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_channels_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backup_channels({ parent: parent, page_size: 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_backup_channels parent: parent, page_size: 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_backup_channels ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.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_backup_channels({ 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_backup_channels(::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.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_backup_channels_client_stub.call_count - end - end - end - - def test_get_backup_channel - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::BackupChannel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_backup_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_channel({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_channel name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_channel ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_channel({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_channel(::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_channel_client_stub.call_count - end - end - end - - def test_update_backup_channel - # 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. - backup_channel = {} - update_mask = {} - - update_backup_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_update_backup_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backup_channel({ backup_channel: backup_channel, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backup_channel backup_channel: backup_channel, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backup_channel ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new(backup_channel: backup_channel, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backup_channel({ backup_channel: backup_channel, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backup_channel(::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new(backup_channel: backup_channel, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_channel_client_stub.call_count - end - end - end - - def test_delete_backup_channel - # 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" - force = true - - delete_backup_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_delete_backup_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup_channel({ name: name, etag: etag, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup_channel name: name, etag: etag, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup_channel ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new(name: name, etag: etag, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup_channel({ name: name, etag: etag, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup_channel(::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new(name: name, etag: etag, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_channel_client_stub.call_count - end - end - end - - def test_list_backup_plan_bindings - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse.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_backup_plan_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::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_backup_plan_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backup_plan_bindings_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backup_plan_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_backup_plan_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_backup_plan_bindings ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.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_backup_plan_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_backup_plan_bindings(::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.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_backup_plan_bindings_client_stub.call_count - end - end - end - - def test_get_backup_plan_binding - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::BackupPlanBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_plan_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::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_backup_plan_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_plan_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_plan_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_plan_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_plan_binding ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_plan_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_plan_binding(::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_plan_binding_client_stub.call_count - end - end - end - - def test_create_backup - # 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" - backup = {} - backup_id = "hello world" - - create_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_create_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_backup_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_backup({ parent: parent, backup: backup, backup_id: backup_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_backup parent: parent, backup: backup, backup_id: backup_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_backup ::Google::Cloud::GkeBackup::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_backup({ parent: parent, backup: backup, backup_id: backup_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_backup(::Google::Cloud::GkeBackup::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_backup_client_stub.call_count - end - end - end - - def test_list_backups - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::ListBackupsResponse.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" - return_partial_success = true - - list_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_backups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_backups_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.list_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.list_backups ::Google::Cloud::GkeBackup::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.list_backups(::Google::Cloud::GkeBackup::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, return_partial_success: return_partial_success), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, list_backups_client_stub.call_count - end - end - end - - def test_get_backup - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::Backup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup ::Google::Cloud::GkeBackup::V1::GetBackupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup(::Google::Cloud::GkeBackup::V1::GetBackupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_client_stub.call_count - end - end - end - - def test_update_backup - # 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. - backup = {} - update_mask = {} - - update_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_update_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_backup_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_backup({ backup: backup, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_backup backup: backup, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_backup ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_backup({ backup: backup, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_backup(::Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new(backup: backup, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_backup_client_stub.call_count - end - end - end - - def test_delete_backup - # 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" - force = true - - delete_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_delete_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_backup_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_backup({ name: name, etag: etag, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_backup name: name, etag: etag, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_backup ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new(name: name, etag: etag, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_backup({ name: name, etag: etag, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_backup(::Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new(name: name, etag: etag, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_backup_client_stub.call_count - end - end - end - - def test_list_volume_backups - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse.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_volume_backups_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_volume_backups_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_volume_backups_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_volume_backups({ parent: parent, page_size: 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_volume_backups parent: parent, page_size: 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_volume_backups ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.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_volume_backups({ 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_volume_backups(::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.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_volume_backups_client_stub.call_count - end - end - end - - def test_get_volume_backup - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::VolumeBackup.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_volume_backup_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_volume_backup_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_volume_backup_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_volume_backup({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_volume_backup name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_volume_backup ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_volume_backup({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_volume_backup(::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_volume_backup_client_stub.call_count - end - end - end - - def test_create_restore_plan - # 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" - restore_plan = {} - restore_plan_id = "hello world" - - create_restore_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_create_restore_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_restore_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_restore_plan({ parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_restore_plan parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_restore_plan ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new(parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_restore_plan({ parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_restore_plan(::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new(parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_restore_plan_client_stub.call_count - end - end - end - - def test_list_restore_plans - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse.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_restore_plans_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_restore_plans_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_restore_plans_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_restore_plans({ parent: parent, page_size: 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_restore_plans parent: parent, page_size: 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_restore_plans ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.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_restore_plans({ 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_restore_plans(::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.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_restore_plans_client_stub.call_count - end - end - end - - def test_get_restore_plan - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::RestorePlan.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_restore_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_restore_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_restore_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_restore_plan({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_restore_plan name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_restore_plan ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_restore_plan({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_restore_plan(::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_restore_plan_client_stub.call_count - end - end - end - - def test_update_restore_plan - # 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. - restore_plan = {} - update_mask = {} - - update_restore_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_update_restore_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_restore_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_restore_plan({ restore_plan: restore_plan, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_restore_plan restore_plan: restore_plan, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_restore_plan ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new(restore_plan: restore_plan, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_restore_plan({ restore_plan: restore_plan, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_restore_plan(::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new(restore_plan: restore_plan, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_restore_plan_client_stub.call_count - end - end - end - - def test_delete_restore_plan - # 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" - force = true - - delete_restore_plan_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_delete_restore_plan_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_restore_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_restore_plan({ name: name, etag: etag, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_restore_plan name: name, etag: etag, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_restore_plan ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new(name: name, etag: etag, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_restore_plan({ name: name, etag: etag, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_restore_plan(::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new(name: name, etag: etag, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_restore_plan_client_stub.call_count - end - end - end - - def test_create_restore_channel - # 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" - restore_channel = {} - restore_channel_id = "hello world" - - create_restore_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_create_restore_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_restore_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_restore_channel({ parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_restore_channel parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_restore_channel ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new(parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_restore_channel({ parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_restore_channel(::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new(parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_restore_channel_client_stub.call_count - end - end - end - - def test_list_restore_channels - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse.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_restore_channels_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_restore_channels_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_restore_channels_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_restore_channels({ parent: parent, page_size: 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_restore_channels parent: parent, page_size: 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_restore_channels ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.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_restore_channels({ 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_restore_channels(::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.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_restore_channels_client_stub.call_count - end - end - end - - def test_get_restore_channel - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::RestoreChannel.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_restore_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_restore_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_restore_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_restore_channel({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_restore_channel name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_restore_channel ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_restore_channel({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_restore_channel(::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_restore_channel_client_stub.call_count - end - end - end - - def test_update_restore_channel - # 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. - restore_channel = {} - update_mask = {} - - update_restore_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_update_restore_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_restore_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_restore_channel({ restore_channel: restore_channel, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_restore_channel restore_channel: restore_channel, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_restore_channel ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new(restore_channel: restore_channel, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_restore_channel({ restore_channel: restore_channel, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_restore_channel(::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new(restore_channel: restore_channel, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_restore_channel_client_stub.call_count - end - end - end - - def test_delete_restore_channel - # 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_restore_channel_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_delete_restore_channel_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_restore_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_restore_channel({ name: name, etag: etag }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_restore_channel name: name, etag: etag do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_restore_channel ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.new(name: name, etag: etag) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_restore_channel({ name: name, etag: etag }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_restore_channel(::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.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_restore_channel_client_stub.call_count - end - end - end - - def test_list_restore_plan_bindings - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse.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_restore_plan_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::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_restore_plan_bindings_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_restore_plan_bindings_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_restore_plan_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_restore_plan_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_restore_plan_bindings ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.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_restore_plan_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_restore_plan_bindings(::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.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_restore_plan_bindings_client_stub.call_count - end - end - end - - def test_get_restore_plan_binding - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::RestorePlanBinding.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_restore_plan_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::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_restore_plan_binding_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_restore_plan_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_restore_plan_binding({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_restore_plan_binding name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_restore_plan_binding ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_restore_plan_binding({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_restore_plan_binding(::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_restore_plan_binding_client_stub.call_count - end - end - end - - def test_create_restore - # 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" - restore = {} - restore_id = "hello world" - - create_restore_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_create_restore_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, create_restore_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.create_restore({ parent: parent, restore: restore, restore_id: restore_id }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.create_restore parent: parent, restore: restore, restore_id: restore_id do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.create_restore ::Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new(parent: parent, restore: restore, restore_id: restore_id) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.create_restore({ parent: parent, restore: restore, restore_id: restore_id }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.create_restore(::Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new(parent: parent, restore: restore, restore_id: restore_id), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, create_restore_client_stub.call_count - end - end - end - - def test_list_restores - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::ListRestoresResponse.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_restores_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_restores_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_restores_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_restores({ parent: parent, page_size: 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_restores parent: parent, page_size: 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_restores ::Google::Cloud::GkeBackup::V1::ListRestoresRequest.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_restores({ 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_restores(::Google::Cloud::GkeBackup::V1::ListRestoresRequest.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_restores_client_stub.call_count - end - end - end - - def test_get_restore - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::Restore.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_restore_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_restore_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_restore_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_restore({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_restore name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_restore ::Google::Cloud::GkeBackup::V1::GetRestoreRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_restore({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_restore(::Google::Cloud::GkeBackup::V1::GetRestoreRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_restore_client_stub.call_count - end - end - end - - def test_update_restore - # 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. - restore = {} - update_mask = {} - - update_restore_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_update_restore_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, update_restore_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.update_restore({ restore: restore, update_mask: update_mask }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.update_restore restore: restore, update_mask: update_mask do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.update_restore ::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new(restore: restore, update_mask: update_mask) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.update_restore({ restore: restore, update_mask: update_mask }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.update_restore(::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new(restore: restore, update_mask: update_mask), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, update_restore_client_stub.call_count - end - end - end - - def test_delete_restore - # 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" - force = true - - delete_restore_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_delete_restore_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, delete_restore_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.delete_restore({ name: name, etag: etag, force: force }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.delete_restore name: name, etag: etag, force: force do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.delete_restore ::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new(name: name, etag: etag, force: force) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.delete_restore({ name: name, etag: etag, force: force }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.delete_restore(::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new(name: name, etag: etag, force: force), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, delete_restore_client_stub.call_count - end - end - end - - def test_list_volume_restores - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse.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_volume_restores_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_list_volume_restores_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, list_volume_restores_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.list_volume_restores({ parent: parent, page_size: 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_volume_restores parent: parent, page_size: 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_volume_restores ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.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_volume_restores({ 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_volume_restores(::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.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_volume_restores_client_stub.call_count - end - end - end - - def test_get_volume_restore - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::VolumeRestore.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - name = "hello world" - - get_volume_restore_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_volume_restore_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_volume_restore_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_volume_restore({ name: name }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_volume_restore name: name do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_volume_restore ::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new(name: name) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_volume_restore({ name: name }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_volume_restore(::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new(name: name), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_volume_restore_client_stub.call_count - end - end - end - - def test_get_backup_index_download_url - # Create test objects. - client_result = ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse.new - http_response = OpenStruct.new body: client_result.to_json - - call_options = {} - - # Create request parameters for a unary method. - backup = "hello world" - - get_backup_index_download_url_client_stub = ClientStub.new http_response do |_verb, uri:, body:, params:, options:, method_name:| - assert options.metadata.key? :"x-goog-api-client" - assert options.metadata[:"x-goog-api-client"].include? "rest" - refute options.metadata[:"x-goog-api-client"].include? "grpc" - end - - ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::ServiceStub.stub :transcode_get_backup_index_download_url_request, ["", "", {}] do - Gapic::Rest::ClientStub.stub :new, get_backup_index_download_url_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client.new do |config| - config.credentials = :dummy_value - end - - # Use hash object - client.get_backup_index_download_url({ backup: backup }) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use named arguments - client.get_backup_index_download_url backup: backup do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object - client.get_backup_index_download_url ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new(backup: backup) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use hash object with options - client.get_backup_index_download_url({ backup: backup }, call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Use protobuf object with options - client.get_backup_index_download_url(::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new(backup: backup), call_options) do |_result, response| - assert_equal http_response, response.underlying_op - end - - # Verify method calls - assert_equal 5, get_backup_index_download_url_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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::Rest::Client::Configuration, config - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_test.rb b/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_test.rb deleted file mode 100644 index c34b7118d5dc..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/test/google/cloud/gke_backup/v1/backup_for_gke_test.rb +++ /dev/null @@ -1,2658 +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/gkebackup/v1/gkebackup_pb" -require "google/cloud/gke_backup/v1/backup_for_gke" - -class ::Google::Cloud::GkeBackup::V1::BackupForGKE::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_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_plan = {} - backup_plan_id = "hello world" - - create_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup_plan, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::BackupPlan), request["backup_plan"] - assert_equal "hello world", request["backup_plan_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_backup_plan({ parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id }) do |response, 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_backup_plan parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id do |response, 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_backup_plan ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id) do |response, operation| - assert_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_backup_plan({ parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id }, grpc_options) do |response, operation| - assert_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_backup_plan(::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new(parent: parent, backup_plan: backup_plan, backup_plan_id: backup_plan_id), grpc_options) do |response, operation| - assert_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_backup_plan_client_stub.call_rpc_count - end - end - - def test_list_backup_plans - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::ListBackupPlansResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_plans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_plans, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest, 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_backup_plans_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backup_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_backup_plans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_backup_plans ::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.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_backup_plans({ 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_backup_plans(::Google::Cloud::GkeBackup::V1::ListBackupPlansRequest.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_backup_plans_client_stub.call_rpc_count - end - end - - def test_get_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::BackupPlan.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_plan, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup_plan({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup_plan name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup_plan ::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup_plan({ 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_backup_plan(::Google::Cloud::GkeBackup::V1::GetBackupPlanRequest.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_backup_plan_client_stub.call_rpc_count - end - end - - def test_update_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - backup_plan = {} - update_mask = {} - - update_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup_plan, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::BackupPlan), request["backup_plan"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backup_plan({ backup_plan: backup_plan, 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_backup_plan backup_plan: backup_plan, 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_backup_plan ::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, 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_backup_plan({ backup_plan: backup_plan, 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_backup_plan(::Google::Cloud::GkeBackup::V1::UpdateBackupPlanRequest.new(backup_plan: backup_plan, 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_backup_plan_client_stub.call_rpc_count - end - end - - def test_delete_backup_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup_plan, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup_plan({ 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_backup_plan 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_backup_plan ::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.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_backup_plan({ 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_backup_plan(::Google::Cloud::GkeBackup::V1::DeleteBackupPlanRequest.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_backup_plan_client_stub.call_rpc_count - end - end - - def test_create_backup_channel - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup_channel = {} - backup_channel_id = "hello world" - - create_backup_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup_channel, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::BackupChannel), request["backup_channel"] - assert_equal "hello world", request["backup_channel_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_backup_channel({ parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id }) do |response, 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_backup_channel parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id do |response, 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_backup_channel ::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new(parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id) do |response, operation| - assert_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_backup_channel({ parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id }, grpc_options) do |response, operation| - assert_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_backup_channel(::Google::Cloud::GkeBackup::V1::CreateBackupChannelRequest.new(parent: parent, backup_channel: backup_channel, backup_channel_id: backup_channel_id), grpc_options) do |response, operation| - assert_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_backup_channel_client_stub.call_rpc_count - end - end - - def test_list_backup_channels - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::ListBackupChannelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_channels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_channels, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest, 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_backup_channels_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backup_channels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_backup_channels parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_backup_channels ::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.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_backup_channels({ 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_backup_channels(::Google::Cloud::GkeBackup::V1::ListBackupChannelsRequest.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_backup_channels_client_stub.call_rpc_count - end - end - - def test_get_backup_channel - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::BackupChannel.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_channel, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup_channel({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup_channel name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup_channel ::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup_channel({ 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_backup_channel(::Google::Cloud::GkeBackup::V1::GetBackupChannelRequest.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_backup_channel_client_stub.call_rpc_count - end - end - - def test_update_backup_channel - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - backup_channel = {} - update_mask = {} - - update_backup_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup_channel, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::BackupChannel), request["backup_channel"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backup_channel({ backup_channel: backup_channel, 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_backup_channel backup_channel: backup_channel, 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_backup_channel ::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new(backup_channel: backup_channel, 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_backup_channel({ backup_channel: backup_channel, 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_backup_channel(::Google::Cloud::GkeBackup::V1::UpdateBackupChannelRequest.new(backup_channel: backup_channel, 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_backup_channel_client_stub.call_rpc_count - end - end - - def test_delete_backup_channel - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - force = true - - delete_backup_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup_channel, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup_channel({ name: name, etag: etag, 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_backup_channel name: name, etag: etag, 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_backup_channel ::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new(name: name, etag: etag, 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_backup_channel({ name: name, etag: etag, 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_backup_channel(::Google::Cloud::GkeBackup::V1::DeleteBackupChannelRequest.new(name: name, etag: etag, 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_backup_channel_client_stub.call_rpc_count - end - end - - def test_list_backup_plan_bindings - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_plan_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backup_plan_bindings, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest, 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_backup_plan_bindings_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backup_plan_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_backup_plan_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_backup_plan_bindings ::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.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_backup_plan_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_backup_plan_bindings(::Google::Cloud::GkeBackup::V1::ListBackupPlanBindingsRequest.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_backup_plan_bindings_client_stub.call_rpc_count - end - end - - def test_get_backup_plan_binding - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::BackupPlanBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_plan_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_plan_binding, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_plan_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup_plan_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup_plan_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup_plan_binding ::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup_plan_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_backup_plan_binding(::Google::Cloud::GkeBackup::V1::GetBackupPlanBindingRequest.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_backup_plan_binding_client_stub.call_rpc_count - end - end - - def test_create_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - backup = {} - backup_id = "hello world" - - create_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_backup, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::CreateBackupRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::Backup), request["backup"] - assert_equal "hello world", request["backup_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_backup_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_backup({ parent: parent, backup: backup, backup_id: backup_id }) do |response, 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_backup parent: parent, backup: backup, backup_id: backup_id do |response, 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_backup ::Google::Cloud::GkeBackup::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id) do |response, operation| - assert_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_backup({ parent: parent, backup: backup, backup_id: backup_id }, grpc_options) do |response, operation| - assert_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_backup(::Google::Cloud::GkeBackup::V1::CreateBackupRequest.new(parent: parent, backup: backup, backup_id: backup_id), grpc_options) do |response, operation| - assert_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_backup_client_stub.call_rpc_count - end - end - - def test_list_backups - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::ListBackupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - return_partial_success = true - - list_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_backups, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::ListBackupsRequest, 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"] - assert_equal true, request["return_partial_success"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, list_backups_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups ::Google::Cloud::GkeBackup::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups(::Google::Cloud::GkeBackup::V1::ListBackupsRequest.new(parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: order_by, 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_backups_client_stub.call_rpc_count - end - end - - def test_get_backup - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::Backup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::GetBackupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup ::Google::Cloud::GkeBackup::V1::GetBackupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup({ 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_backup(::Google::Cloud::GkeBackup::V1::GetBackupRequest.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_backup_client_stub.call_rpc_count - end - end - - def test_update_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - backup = {} - update_mask = {} - - update_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_backup, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::Backup), request["backup"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_backup_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_backup({ backup: backup, 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_backup backup: backup, 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_backup ::Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new(backup: backup, 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_backup({ backup: backup, 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_backup(::Google::Cloud::GkeBackup::V1::UpdateBackupRequest.new(backup: backup, 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_backup_client_stub.call_rpc_count - end - end - - def test_delete_backup - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - force = true - - delete_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_backup, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_backup_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_backup({ name: name, etag: etag, 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_backup name: name, etag: etag, 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_backup ::Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new(name: name, etag: etag, 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_backup({ name: name, etag: etag, 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_backup(::Google::Cloud::GkeBackup::V1::DeleteBackupRequest.new(name: name, etag: etag, 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_backup_client_stub.call_rpc_count - end - end - - def test_list_volume_backups - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_volume_backups_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_volume_backups, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest, 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_volume_backups_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_volume_backups({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_volume_backups parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_volume_backups ::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.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_volume_backups({ 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_volume_backups(::Google::Cloud::GkeBackup::V1::ListVolumeBackupsRequest.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_volume_backups_client_stub.call_rpc_count - end - end - - def test_get_volume_backup - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::VolumeBackup.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_volume_backup_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_volume_backup, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_volume_backup_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_volume_backup({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_volume_backup name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_volume_backup ::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_volume_backup({ 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_volume_backup(::Google::Cloud::GkeBackup::V1::GetVolumeBackupRequest.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_volume_backup_client_stub.call_rpc_count - end - end - - def test_create_restore_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - restore_plan = {} - restore_plan_id = "hello world" - - create_restore_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_restore_plan, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::RestorePlan), request["restore_plan"] - assert_equal "hello world", request["restore_plan_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_restore_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_restore_plan({ parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id }) do |response, 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_restore_plan parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id do |response, 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_restore_plan ::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new(parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id) do |response, operation| - assert_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_restore_plan({ parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id }, grpc_options) do |response, operation| - assert_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_restore_plan(::Google::Cloud::GkeBackup::V1::CreateRestorePlanRequest.new(parent: parent, restore_plan: restore_plan, restore_plan_id: restore_plan_id), grpc_options) do |response, operation| - assert_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_restore_plan_client_stub.call_rpc_count - end - end - - def test_list_restore_plans - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::ListRestorePlansResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_restore_plans_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_restore_plans, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest, 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_restore_plans_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_restore_plans({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_restore_plans parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_restore_plans ::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.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_restore_plans({ 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_restore_plans(::Google::Cloud::GkeBackup::V1::ListRestorePlansRequest.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_restore_plans_client_stub.call_rpc_count - end - end - - def test_get_restore_plan - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::RestorePlan.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_restore_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_restore_plan, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_restore_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_restore_plan({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_restore_plan name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_restore_plan ::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_restore_plan({ 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_restore_plan(::Google::Cloud::GkeBackup::V1::GetRestorePlanRequest.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_restore_plan_client_stub.call_rpc_count - end - end - - def test_update_restore_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - restore_plan = {} - update_mask = {} - - update_restore_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_restore_plan, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::RestorePlan), request["restore_plan"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_restore_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_restore_plan({ restore_plan: restore_plan, 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_restore_plan restore_plan: restore_plan, 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_restore_plan ::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new(restore_plan: restore_plan, 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_restore_plan({ restore_plan: restore_plan, 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_restore_plan(::Google::Cloud::GkeBackup::V1::UpdateRestorePlanRequest.new(restore_plan: restore_plan, 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_restore_plan_client_stub.call_rpc_count - end - end - - def test_delete_restore_plan - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - force = true - - delete_restore_plan_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_restore_plan, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_restore_plan_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_restore_plan({ name: name, etag: etag, 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_restore_plan name: name, etag: etag, 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_restore_plan ::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new(name: name, etag: etag, 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_restore_plan({ name: name, etag: etag, 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_restore_plan(::Google::Cloud::GkeBackup::V1::DeleteRestorePlanRequest.new(name: name, etag: etag, 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_restore_plan_client_stub.call_rpc_count - end - end - - def test_create_restore_channel - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - restore_channel = {} - restore_channel_id = "hello world" - - create_restore_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_restore_channel, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::RestoreChannel), request["restore_channel"] - assert_equal "hello world", request["restore_channel_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_restore_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_restore_channel({ parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id }) do |response, 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_restore_channel parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id do |response, 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_restore_channel ::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new(parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id) do |response, operation| - assert_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_restore_channel({ parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id }, grpc_options) do |response, operation| - assert_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_restore_channel(::Google::Cloud::GkeBackup::V1::CreateRestoreChannelRequest.new(parent: parent, restore_channel: restore_channel, restore_channel_id: restore_channel_id), grpc_options) do |response, operation| - assert_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_restore_channel_client_stub.call_rpc_count - end - end - - def test_list_restore_channels - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_restore_channels_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_restore_channels, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest, 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_restore_channels_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_restore_channels({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_restore_channels parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_restore_channels ::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.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_restore_channels({ 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_restore_channels(::Google::Cloud::GkeBackup::V1::ListRestoreChannelsRequest.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_restore_channels_client_stub.call_rpc_count - end - end - - def test_get_restore_channel - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::RestoreChannel.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_restore_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_restore_channel, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_restore_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_restore_channel({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_restore_channel name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_restore_channel ::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_restore_channel({ 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_restore_channel(::Google::Cloud::GkeBackup::V1::GetRestoreChannelRequest.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_restore_channel_client_stub.call_rpc_count - end - end - - def test_update_restore_channel - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - restore_channel = {} - update_mask = {} - - update_restore_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_restore_channel, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::RestoreChannel), request["restore_channel"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_restore_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_restore_channel({ restore_channel: restore_channel, 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_restore_channel restore_channel: restore_channel, 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_restore_channel ::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new(restore_channel: restore_channel, 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_restore_channel({ restore_channel: restore_channel, 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_restore_channel(::Google::Cloud::GkeBackup::V1::UpdateRestoreChannelRequest.new(restore_channel: restore_channel, 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_restore_channel_client_stub.call_rpc_count - end - end - - def test_delete_restore_channel - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_restore_channel_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_restore_channel, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_restore_channel_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_restore_channel({ 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_restore_channel 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_restore_channel ::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.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_restore_channel({ 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_restore_channel(::Google::Cloud::GkeBackup::V1::DeleteRestoreChannelRequest.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_restore_channel_client_stub.call_rpc_count - end - end - - def test_list_restore_plan_bindings - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_restore_plan_bindings_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_restore_plan_bindings, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest, 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_restore_plan_bindings_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_restore_plan_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_restore_plan_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_restore_plan_bindings ::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.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_restore_plan_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_restore_plan_bindings(::Google::Cloud::GkeBackup::V1::ListRestorePlanBindingsRequest.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_restore_plan_bindings_client_stub.call_rpc_count - end - end - - def test_get_restore_plan_binding - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::RestorePlanBinding.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_restore_plan_binding_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_restore_plan_binding, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_restore_plan_binding_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_restore_plan_binding({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_restore_plan_binding name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_restore_plan_binding ::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_restore_plan_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_restore_plan_binding(::Google::Cloud::GkeBackup::V1::GetRestorePlanBindingRequest.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_restore_plan_binding_client_stub.call_rpc_count - end - end - - def test_create_restore - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - parent = "hello world" - restore = {} - restore_id = "hello world" - - create_restore_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :create_restore, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::CreateRestoreRequest, request - assert_equal "hello world", request["parent"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::Restore), request["restore"] - assert_equal "hello world", request["restore_id"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, create_restore_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.create_restore({ parent: parent, restore: restore, restore_id: restore_id }) do |response, 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_restore parent: parent, restore: restore, restore_id: restore_id do |response, 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_restore ::Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new(parent: parent, restore: restore, restore_id: restore_id) do |response, operation| - assert_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_restore({ parent: parent, restore: restore, restore_id: restore_id }, grpc_options) do |response, operation| - assert_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_restore(::Google::Cloud::GkeBackup::V1::CreateRestoreRequest.new(parent: parent, restore: restore, restore_id: restore_id), grpc_options) do |response, operation| - assert_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_restore_client_stub.call_rpc_count - end - end - - def test_list_restores - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::ListRestoresResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_restores_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_restores, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::ListRestoresRequest, 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_restores_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_restores({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_restores parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_restores ::Google::Cloud::GkeBackup::V1::ListRestoresRequest.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_restores({ 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_restores(::Google::Cloud::GkeBackup::V1::ListRestoresRequest.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_restores_client_stub.call_rpc_count - end - end - - def test_get_restore - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::Restore.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_restore_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_restore, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::GetRestoreRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_restore_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_restore({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_restore name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_restore ::Google::Cloud::GkeBackup::V1::GetRestoreRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_restore({ 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_restore(::Google::Cloud::GkeBackup::V1::GetRestoreRequest.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_restore_client_stub.call_rpc_count - end - end - - def test_update_restore - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - restore = {} - update_mask = {} - - update_restore_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :update_restore, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest, request - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Cloud::GkeBackup::V1::Restore), request["restore"] - assert_equal Gapic::Protobuf.coerce({}, to: ::Google::Protobuf::FieldMask), request["update_mask"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, update_restore_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.update_restore({ restore: restore, 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_restore restore: restore, 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_restore ::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new(restore: restore, 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_restore({ restore: restore, 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_restore(::Google::Cloud::GkeBackup::V1::UpdateRestoreRequest.new(restore: restore, 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_restore_client_stub.call_rpc_count - end - end - - def test_delete_restore - # Create GRPC objects. - grpc_response = ::Google::Longrunning::Operation.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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" - force = true - - delete_restore_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :delete_restore, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest, request - assert_equal "hello world", request["name"] - assert_equal "hello world", request["etag"] - assert_equal true, request["force"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, delete_restore_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.delete_restore({ name: name, etag: etag, 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_restore name: name, etag: etag, 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_restore ::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new(name: name, etag: etag, 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_restore({ name: name, etag: etag, 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_restore(::Google::Cloud::GkeBackup::V1::DeleteRestoreRequest.new(name: name, etag: etag, 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_restore_client_stub.call_rpc_count - end - end - - def test_list_volume_restores - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_volume_restores_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :list_volume_restores, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest, 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_volume_restores_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.list_volume_restores({ parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_volume_restores parent: parent, page_size: page_size, page_token: page_token, filter: filter, order_by: 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_volume_restores ::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.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_volume_restores({ 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_volume_restores(::Google::Cloud::GkeBackup::V1::ListVolumeRestoresRequest.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_volume_restores_client_stub.call_rpc_count - end - end - - def test_get_volume_restore - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::VolumeRestore.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_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_volume_restore_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_volume_restore, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest, request - assert_equal "hello world", request["name"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_volume_restore_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_volume_restore({ name: name }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_volume_restore name: name do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_volume_restore ::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.new(name: name) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_volume_restore({ 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_volume_restore(::Google::Cloud::GkeBackup::V1::GetVolumeRestoreRequest.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_volume_restore_client_stub.call_rpc_count - end - end - - def test_get_backup_index_download_url - # Create GRPC objects. - grpc_response = ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlResponse.new - grpc_operation = GRPC::ActiveCall::Operation.new nil - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - grpc_options = {} - - # Create request parameters for a unary method. - backup = "hello world" - - get_backup_index_download_url_client_stub = ClientStub.new grpc_response, grpc_operation do |name, request, options:| - assert_equal :get_backup_index_download_url, name - assert_kind_of ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest, request - assert_equal "hello world", request["backup"] - refute_nil options - end - - Gapic::ServiceStub.stub :new, get_backup_index_download_url_client_stub do - # Create client - client = ::Google::Cloud::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - - # Use hash object - client.get_backup_index_download_url({ backup: backup }) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use named arguments - client.get_backup_index_download_url backup: backup do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object - client.get_backup_index_download_url ::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new(backup: backup) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use hash object with options - client.get_backup_index_download_url({ backup: backup }, grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Use protobuf object with options - client.get_backup_index_download_url(::Google::Cloud::GkeBackup::V1::GetBackupIndexDownloadUrlRequest.new(backup: backup), grpc_options) do |response, operation| - assert_equal grpc_response, response - assert_equal grpc_operation, operation - end - - # Verify method calls - assert_equal 5, get_backup_index_download_url_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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = creds - end - assert_kind_of ::Google::Cloud::GkeBackup::V1::BackupForGKE::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::GkeBackup::V1::BackupForGKE::Client.new do |config| - config.credentials = grpc_channel - end - end - - assert_kind_of ::Google::Cloud::GkeBackup::V1::BackupForGKE::Operations, client.operations_client - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup-v1/test/helper.rb b/owl-bot-staging/google-cloud-gke_backup-v1/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup-v1/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct" diff --git a/owl-bot-staging/google-cloud-gke_backup/.gitignore b/owl-bot-staging/google-cloud-gke_backup/.gitignore deleted file mode 100644 index 0135b6bc6cfc..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/.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-gke_backup/.repo-metadata.json b/owl-bot-staging/google-cloud-gke_backup/.repo-metadata.json deleted file mode 100644 index f9f3879bef30..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/.repo-metadata.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "api_id": "gkebackup.googleapis.com", - "api_shortname": "gkebackup", - "client_documentation": "https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup/latest", - "distribution_name": "google-cloud-gke_backup", - "is_cloud": true, - "language": "ruby", - "name": "gkebackup", - "name_pretty": "Backup for GKE API", - "product_documentation": "https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/", - "release_level": "unreleased", - "repo": "googleapis/google-cloud-ruby", - "requires_billing": true, - "ruby-cloud-description": "Backup for GKE lets you protect, manage, and restore your containerized applications and data for stateful workloads running on Google Kubernetes Engine clusters.", - "ruby-cloud-product-url": "https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/", - "library_type": "GAPIC_AUTO" -} diff --git a/owl-bot-staging/google-cloud-gke_backup/.rubocop.yml b/owl-bot-staging/google-cloud-gke_backup/.rubocop.yml deleted file mode 100644 index b5042ce8eb70..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/.rubocop.yml +++ /dev/null @@ -1,39 +0,0 @@ -inherit_gem: - google-style: google-style.yml - -AllCops: - Exclude: - - "google-cloud-gke_backup.gemspec" - - "Rakefile" - - "acceptance/**/*" - - "test/**/*" - -Bundler/OrderedGems: - Enabled: false -Documentation: - Enabled: false -Layout/LineLength: - Enabled: false -Metrics/BlockLength: - Exclude: - - "samples/**/acceptance/*.rb" -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/FileName: - Exclude: - - "lib/google-cloud-gke_backup.rb" - -Style/BlockDelimiters: - Exclude: - - "samples/**/acceptance/*.rb" diff --git a/owl-bot-staging/google-cloud-gke_backup/.toys.rb b/owl-bot-staging/google-cloud-gke_backup/.toys.rb deleted file mode 100644 index 177e22456e8a..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/.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-gke_backup/.yardopts b/owl-bot-staging/google-cloud-gke_backup/.yardopts deleted file mode 100644 index 73f0b541e6b6..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/.yardopts +++ /dev/null @@ -1,11 +0,0 @@ ---no-private ---title="Backup for GKE API" ---exclude _pb\.rb$ ---markup markdown ---markup-provider redcarpet - -./lib/**/*.rb -- -README.md -AUTHENTICATION.md -LICENSE.md diff --git a/owl-bot-staging/google-cloud-gke_backup/AUTHENTICATION.md b/owl-bot-staging/google-cloud-gke_backup/AUTHENTICATION.md deleted file mode 100644 index 77be14ebc09c..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/AUTHENTICATION.md +++ /dev/null @@ -1,122 +0,0 @@ -# Authentication - -The recommended way to authenticate to the google-cloud-gke_backup 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-gke_backup 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/gke_backup" - -client = Google::Cloud::GkeBackup.backup_for_gke do |config| - config.credentials = "path/to/credentialfile.json" -end -``` - -To configure a credentials file globally for all clients: - -```ruby -require "google/cloud/gke_backup" - -Google::Cloud::GkeBackup.configure do |config| - config.credentials = "path/to/credentialfile.json" -end - -client = Google::Cloud::GkeBackup.backup_for_gke -``` - -### 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-gke_backup -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/gke_backup" - -ENV["GOOGLE_APPLICATION_CREDENTIALS"] = "path/to/credentialfile.json" - -client = Google::Cloud::GkeBackup.backup_for_gke -``` - -### 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-gke_backup/CHANGELOG.md b/owl-bot-staging/google-cloud-gke_backup/CHANGELOG.md deleted file mode 100644 index f88957a62ba2..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/CHANGELOG.md +++ /dev/null @@ -1,2 +0,0 @@ -# Release History - diff --git a/owl-bot-staging/google-cloud-gke_backup/Gemfile b/owl-bot-staging/google-cloud-gke_backup/Gemfile deleted file mode 100644 index 812c2196554d..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/Gemfile +++ /dev/null @@ -1,28 +0,0 @@ -source "https://rubygems.org" - -gemspec - -local_dependencies = ["google-cloud-gke_backup-v1"] - -main_spec = gemspecs.last || Bundler.load_gemspec(File.join(__dir__, "google-cloud-gke_backup.gemspec")) -local_dependencies.each do |name| - spec_path = File.expand_path "../#{name}/#{name}.gemspec", __dir__ - unless File.file? spec_path - warn "WARNING: Disabled local dependency for #{name} because gemspec not found." - next - end - version = Bundler.load_gemspec(spec_path).version - if main_spec.dependencies.any? { |dep| dep.name == name && !dep.requirement.satisfied_by?(version) } - warn "WARNING: Disabled local dependency for #{name} because the gemspec disallows version #{version}." - next - end - gem name, path: "../#{name}" -end - -gem "google-style", "~> 1.30.1" -gem "minitest", "~> 5.22" -gem "minitest-focus", "~> 1.4" -gem "minitest-rg", "~> 5.3" -gem "rake", ">= 13.0" -gem "redcarpet", "~> 3.6" -gem "yard", "~> 0.9" diff --git a/owl-bot-staging/google-cloud-gke_backup/LICENSE.md b/owl-bot-staging/google-cloud-gke_backup/LICENSE.md deleted file mode 100644 index c261857ba6ad..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/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-gke_backup/README.md b/owl-bot-staging/google-cloud-gke_backup/README.md deleted file mode 100644 index 0011d7c132ff..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/README.md +++ /dev/null @@ -1,142 +0,0 @@ -# Ruby Client for the Backup for GKE API - -API Client library for the Backup for GKE API - -Backup for GKE lets you protect, manage, and restore your containerized applications and data for stateful workloads running on Google Kubernetes Engine clusters. - -Actual client classes for the various versions of this API are defined in -_versioned_ client gems, with names of the form `google-cloud-gke_backup-v*`. -The gem `google-cloud-gke_backup` is the main client library that brings the -versioned gems in as dependencies, and provides high-level methods for -constructing clients. More information on versioned clients can be found below -in the section titled *Which client should I use?*. - -View the [Client Library Documentation](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup/latest) -for this library, google-cloud-gke_backup, to see the convenience methods for -constructing client objects. Reference documentation for the client objects -themselves can be found in the client library documentation for the versioned -client gems: -[google-cloud-gke_backup-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest). - -See also the [Product Documentation](https://cloud.google.com/kubernetes-engine/docs/add-on/backup-for-gke/) -for more usage information. - -## Quick Start - -``` -$ gem install google-cloud-gke_backup -``` - -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/gkebackup.googleapis.com) -1. [Set up authentication.](AUTHENTICATION.md) - -```ruby -require "google/cloud/gke_backup" - -client = Google::Cloud::GkeBackup.backup_for_gke -request = ::Google::Cloud::GkeBackup::V1::CreateBackupPlanRequest.new # (request fields as keyword arguments...) -response = client.create_backup_plan request -``` - -## 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. - -Debug logging also requires that the versioned clients for this service be -sufficiently recent, released after about Dec 10, 2024. If logging is not -working, try updating the versioned clients in your bundle or installed gems: -[google-cloud-gke_backup-v1](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest). - -## 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-gke_backup`, -and lower-level _versioned_ client libraries with names such as -`google-cloud-gke_backup-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-gke_backup`. -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-gke_backup-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-gke_backup/Rakefile b/owl-bot-staging/google-cloud-gke_backup/Rakefile deleted file mode 100644 index dfb2030ce6d0..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/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 = true -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-gke_backup 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/gke_backup/v1/backup_for_gke/credentials" - ::Google::Cloud::GkeBackup::V1::BackupForGKE::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-gke_backup 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-gke_backup 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-gke_backup 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-gke_backup gem does not have doctest tests." -end - -desc "Run the CI build" -task :ci do - header "BUILDING google-cloud-gke_backup" - header "google-cloud-gke_backup rubocop", "*" - Rake::Task[:rubocop].invoke - header "google-cloud-gke_backup yard", "*" - Rake::Task[:yard].invoke - header "google-cloud-gke_backup 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-gke_backup 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-gke_backup 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-gke_backup/google-cloud-gke_backup.gemspec b/owl-bot-staging/google-cloud-gke_backup/google-cloud-gke_backup.gemspec deleted file mode 100644 index 0d9d4aa105b6..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/google-cloud-gke_backup.gemspec +++ /dev/null @@ -1,27 +0,0 @@ -# -*- ruby -*- -# encoding: utf-8 - -require File.expand_path("lib/google/cloud/gke_backup/version", __dir__) - -Gem::Specification.new do |gem| - gem.name = "google-cloud-gke_backup" - gem.version = Google::Cloud::GkeBackup::VERSION - - gem.authors = ["Google LLC"] - gem.email = "googleapis-packages@google.com" - gem.description = "Backup for GKE lets you protect, manage, and restore your containerized applications and data for stateful workloads running on Google Kubernetes Engine clusters." - gem.summary = "API Client library for the Backup for GKE API" - 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") + - ["README.md", "AUTHENTICATION.md", "LICENSE.md", ".yardopts"] - gem.require_paths = ["lib"] - - gem.required_ruby_version = ">= 3.0" - - gem.add_dependency "google-cloud-core", "~> 1.6" - gem.add_dependency "google-cloud-gke_backup-v1", "~> 1.0" -end diff --git a/owl-bot-staging/google-cloud-gke_backup/lib/google-cloud-gke_backup.rb b/owl-bot-staging/google-cloud-gke_backup/lib/google-cloud-gke_backup.rb deleted file mode 100644 index a4cdd9d60eb0..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/lib/google-cloud-gke_backup.rb +++ /dev/null @@ -1,19 +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/gke_backup" unless defined? Google::Cloud::GkeBackup::VERSION diff --git a/owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup.rb b/owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup.rb deleted file mode 100644 index 7047e6279a27..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup.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! - -# Require this file early so that the version constant gets defined before -# requiring "google/cloud". This is because google-cloud-core will load the -# entrypoint (gem name) file, which in turn re-requires this file (hence -# causing a require cycle) unless the version constant is already defined. -require "google/cloud/gke_backup/version" - -require "googleauth" -gem "google-cloud-core" -require "google/cloud" unless defined? ::Google::Cloud.new -require "google/cloud/config" - -# Set the default configuration -::Google::Cloud.configure.add_config! :gke_backup do |config| - config.add_field! :endpoint, nil, match: ::String - config.add_field! :credentials, nil, match: [::String, ::Hash, ::Google::Auth::Credentials] - config.add_field! :scope, nil, match: [::Array, ::String] - config.add_field! :lib_name, nil, match: ::String - config.add_field! :lib_version, nil, match: ::String - config.add_field! :interceptors, nil, match: ::Array - config.add_field! :timeout, nil, match: ::Numeric - config.add_field! :metadata, nil, match: ::Hash - config.add_field! :retry_policy, nil, match: [::Hash, ::Proc] - config.add_field! :quota_project, nil, match: ::String - config.add_field! :universe_domain, nil, match: ::String -end - -module Google - module Cloud - module GkeBackup - ## - # Create a new client object for BackupForGKE. - # - # By default, this returns an instance of - # [Google::Cloud::GkeBackup::V1::BackupForGKE::Client](https://cloud.google.com/ruby/docs/reference/google-cloud-gke_backup-v1/latest/Google-Cloud-GkeBackup-V1-BackupForGKE-Client) - # for a gRPC client for version V1 of the API. - # However, you can specify a different API version by passing it in the - # `version` parameter. If the BackupForGKE service is - # supported by that API version, and the corresponding gem is available, the - # appropriate versioned client will be returned. - # You can also specify a different transport by passing `:rest` or `:grpc` in - # the `transport` parameter. - # - # Raises an exception if the currently installed versioned client gem for the - # given API version does not support the given transport of the BackupForGKE service. - # You can determine whether the method will succeed by calling - # {Google::Cloud::GkeBackup.backup_for_gke_available?}. - # - # ## About BackupForGKE - # - # BackupForGKE allows Kubernetes administrators to configure, execute, and - # manage backup and restore operations for their GKE clusters. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [::Object] A client object for the specified version. - # - def self.backup_for_gke version: :v1, transport: :grpc, &block - require "google/cloud/gke_backup/#{version.to_s.downcase}" - - package_name = Google::Cloud::GkeBackup - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - service_module = Google::Cloud::GkeBackup.const_get(package_name).const_get(:BackupForGKE) - service_module = service_module.const_get(:Rest) if transport == :rest - service_module.const_get(:Client).new(&block) - end - - ## - # Determines whether the BackupForGKE service is supported by the current client. - # If true, you can retrieve a client object by calling {Google::Cloud::GkeBackup.backup_for_gke}. - # If false, that method will raise an exception. This could happen if the given - # API version does not exist or does not support the BackupForGKE service, - # or if the versioned client gem needs an update to support the BackupForGKE service. - # - # @param version [::String, ::Symbol] The API version to connect to. Optional. - # Defaults to `:v1`. - # @param transport [:grpc, :rest] The transport to use. Defaults to `:grpc`. - # @return [boolean] Whether the service is available. - # - def self.backup_for_gke_available? version: :v1, transport: :grpc - require "google/cloud/gke_backup/#{version.to_s.downcase}" - package_name = Google::Cloud::GkeBackup - .constants - .select { |sym| sym.to_s.downcase == version.to_s.downcase.tr("_", "") } - .first - return false unless package_name - service_module = Google::Cloud::GkeBackup.const_get package_name - return false unless service_module.const_defined? :BackupForGKE - service_module = service_module.const_get :BackupForGKE - if transport == :rest - return false unless service_module.const_defined? :Rest - service_module = service_module.const_get :Rest - end - service_module.const_defined? :Client - rescue ::LoadError - false - end - - ## - # Configure the google-cloud-gke_backup library. - # - # The following configuration parameters are supported: - # - # * `credentials` (*type:* `String, Hash, Google::Auth::Credentials`) - - # The path to the keyfile as a String, the contents of the keyfile as a - # Hash, or a Google::Auth::Credentials object. - # * `lib_name` (*type:* `String`) - - # The library name as recorded in instrumentation and logging. - # * `lib_version` (*type:* `String`) - - # The library version as recorded in instrumentation and logging. - # * `interceptors` (*type:* `Array`) - - # An array of interceptors that are run before calls are executed. - # * `timeout` (*type:* `Numeric`) - - # Default timeout in seconds. - # * `metadata` (*type:* `Hash{Symbol=>String}`) - - # Additional headers to be sent with the call. - # * `retry_policy` (*type:* `Hash`) - - # 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 [::Google::Cloud::Config] The default configuration used by this library - # - def self.configure - yield ::Google::Cloud.configure.gke_backup if block_given? - - ::Google::Cloud.configure.gke_backup - end - end - end -end - -helper_path = ::File.join __dir__, "gke_backup", "helpers.rb" -require "google/cloud/gke_backup/helpers" if ::File.file? helper_path diff --git a/owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup/version.rb b/owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup/version.rb deleted file mode 100644 index 539dad38ab16..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/lib/google/cloud/gke_backup/version.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! - - -module Google - module Cloud - module GkeBackup - VERSION = "0.0.1" - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/client_test.rb b/owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/client_test.rb deleted file mode 100644 index e48b43f3eaa6..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/client_test.rb +++ /dev/null @@ -1,64 +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 "google/cloud/gke_backup" -require "gapic/common" -require "gapic/grpc" -require "gapic/rest" - -class Google::Cloud::GkeBackup::ClientConstructionMinitest < 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_backup_for_gke_grpc - skip unless Google::Cloud::GkeBackup.backup_for_gke_available? transport: :grpc - Gapic::ServiceStub.stub :new, DummyStub.new do - grpc_channel = GRPC::Core::Channel.new "localhost:8888", nil, :this_channel_is_insecure - client = Google::Cloud::GkeBackup.backup_for_gke transport: :grpc do |config| - config.credentials = grpc_channel - end - assert_kind_of Google::Cloud::GkeBackup::V1::BackupForGKE::Client, client - end - end - - def test_backup_for_gke_rest - skip unless Google::Cloud::GkeBackup.backup_for_gke_available? transport: :rest - Gapic::Rest::ClientStub.stub :new, DummyStub.new do - client = Google::Cloud::GkeBackup.backup_for_gke transport: :rest do |config| - config.credentials = :dummy_credentials - end - assert_kind_of Google::Cloud::GkeBackup::V1::BackupForGKE::Rest::Client, client - end - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/version_test.rb b/owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/version_test.rb deleted file mode 100644 index 63c8789f6038..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/test/google/cloud/gke_backup/version_test.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 "helper" -require "google/cloud/gke_backup/version" - -class Google::Cloud::GkeBackup::VersionMinitest < Minitest::Test - def test_has_a_version - refute_nil Google::Cloud::GkeBackup::VERSION - end -end diff --git a/owl-bot-staging/google-cloud-gke_backup/test/helper.rb b/owl-bot-staging/google-cloud-gke_backup/test/helper.rb deleted file mode 100644 index f0e715458fa2..000000000000 --- a/owl-bot-staging/google-cloud-gke_backup/test/helper.rb +++ /dev/null @@ -1,25 +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/rg" - -require "grpc" - -require "ostruct"